1 | <?php |
||
8 | class FooGallery_LazyLoad { |
||
|
|||
9 | |||
10 | function __construct() { |
||
28 | |||
29 | /** |
||
30 | * Add lazy load fields to the gallery template |
||
31 | * |
||
32 | * @uses "foogallery_override_gallery_template_fields" |
||
33 | * @param $fields |
||
34 | * @param $template |
||
35 | * |
||
36 | * @return array |
||
37 | */ |
||
38 | function add_lazyload_fields( $fields, $template ) { |
||
56 | |||
57 | /** |
||
58 | * Determine if the gallery has lazy loading enabled |
||
59 | * |
||
60 | * @param $foogallery |
||
61 | * @param $post |
||
62 | */ |
||
63 | function determine_lazyload( $foogallery, $post ) { |
||
72 | |||
73 | /** |
||
74 | * @param array $attr |
||
75 | * @param array $args |
||
76 | * @param FooGalleryAttachment $attachment |
||
77 | * @return mixed |
||
78 | */ |
||
79 | function change_src_attributes($attr, $args, $attachment) { |
||
101 | |||
102 | |||
103 | /** |
||
104 | * Add the required lazy load attributes onto the gallery container div |
||
105 | * |
||
106 | * @param $attributes array |
||
107 | * @param $gallery FooGallery |
||
108 | * |
||
109 | * @return array |
||
110 | */ |
||
111 | function add_lazyload_attributes($attributes, $gallery) { |
||
117 | |||
118 | /** |
||
119 | * Add the required lazy load class to the gallery |
||
120 | * |
||
121 | * @param $classes array |
||
122 | * @param $gallery FooGallery |
||
123 | * |
||
124 | * @return array |
||
125 | */ |
||
126 | function add_lazyload_class($classes, $gallery) { |
||
132 | } |
||
133 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.