1 | <?php |
||
12 | class Gallery |
||
13 | { |
||
14 | public $gallery; |
||
15 | |||
16 | protected $args; |
||
17 | protected $image; |
||
18 | protected $postmeta; |
||
19 | protected $theme; |
||
20 | protected $utility; |
||
21 | |||
22 | public function __construct( Image $image, PostMeta $postmeta, Theme $theme, Utility $utility ) |
||
23 | { |
||
24 | $this->image = $image; |
||
25 | $this->postmeta = $postmeta; |
||
26 | $this->theme = $theme; |
||
27 | $this->utility = $utility; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @return WP_Query |
||
32 | */ |
||
33 | public function get( array $args = [] ) |
||
49 | |||
50 | /** |
||
51 | * @return string |
||
52 | */ |
||
53 | public function render() |
||
64 | |||
65 | /** |
||
66 | * @return null|string |
||
67 | */ |
||
68 | public function renderImage( WP_Post $attachment ) |
||
84 | |||
85 | /** |
||
86 | * @return null|string |
||
87 | */ |
||
88 | public function renderPagination() |
||
100 | |||
101 | /** |
||
102 | * @param string $key |
||
103 | * @param mixed $value |
||
104 | * |
||
105 | * @return bool |
||
106 | */ |
||
107 | protected function getBoolValue( $key, $value = null ) |
||
116 | |||
117 | /** |
||
118 | * @param mixed $value |
||
119 | * |
||
120 | * @return int |
||
121 | */ |
||
122 | protected function getGalleryArg( $value = null ) |
||
133 | |||
134 | /** |
||
135 | * @param mixed $value |
||
136 | * |
||
137 | * @return int |
||
138 | */ |
||
139 | protected function getImagesPerPageArg( $value = null ) |
||
150 | |||
151 | /** |
||
152 | * @param mixed $value |
||
153 | * |
||
154 | * @return bool |
||
155 | */ |
||
156 | protected function getLazyloadArg( $value = null ) |
||
160 | |||
161 | /** |
||
162 | * @param mixed $value |
||
163 | * |
||
164 | * @return array |
||
165 | */ |
||
166 | protected function getMediaArg( $value = null ) |
||
180 | |||
181 | /** |
||
182 | * @return int |
||
183 | */ |
||
184 | protected function getPaged() |
||
188 | |||
189 | /** |
||
190 | * @param mixed $value |
||
191 | * |
||
192 | * @return bool |
||
193 | */ |
||
194 | protected function getPaginationArg( $value = null ) |
||
198 | |||
199 | /** |
||
200 | * @param mixed $value |
||
201 | * |
||
202 | * @return bool |
||
203 | */ |
||
204 | protected function getPermalinksArg( $value = null ) |
||
208 | |||
209 | /** |
||
210 | * @return string |
||
211 | */ |
||
212 | protected function getPhotoswipeData( $image ) |
||
223 | |||
224 | /** |
||
225 | * @param string $key |
||
226 | * @param mixed $value |
||
227 | * |
||
228 | * @return mixed |
||
229 | */ |
||
230 | protected function getValue( $key, $value = null ) |
||
237 | |||
238 | /** |
||
239 | * @return array |
||
240 | */ |
||
241 | protected function normalizeArgs( array $args = [] ) |
||
263 | |||
264 | /** |
||
265 | * @param object $image |
||
266 | * @return null|string |
||
267 | */ |
||
268 | protected function renderImageCaption( $image ) |
||
276 | |||
277 | /** |
||
278 | * @param object $image |
||
279 | * @return null|string |
||
280 | */ |
||
281 | protected function renderImageTag( $image ) |
||
297 | } |
||
298 |