1 | <?php |
||
8 | abstract class GravityView_Lightbox_Provider { |
||
9 | |||
10 | public static $slug; |
||
11 | |||
12 | public static $script_slug; |
||
13 | |||
14 | public static $style_slug; |
||
15 | |||
16 | /** |
||
17 | * Adds actions and that modify GravityView to use this lightbox provider |
||
18 | */ |
||
19 | public function add_hooks() { |
||
33 | |||
34 | |||
35 | /** |
||
36 | * Prints scripts for lightbox after a View is rendered |
||
37 | * |
||
38 | * @since 2.10.1 |
||
39 | * |
||
40 | * @param GV\Template_Context $gravityview |
||
41 | * |
||
42 | * @return void |
||
43 | */ |
||
44 | public function print_scripts( $gravityview ) { |
||
53 | |||
54 | /** |
||
55 | * Returns whether the provider is active for this View |
||
56 | * |
||
57 | * @since 2.10.1 |
||
58 | * |
||
59 | * @param GV\Template_Context $gravityview |
||
60 | * |
||
61 | * @return bool true: yes! false: no! |
||
62 | */ |
||
63 | protected static function is_active( $gravityview ) { |
||
79 | |||
80 | /** |
||
81 | * Removes actions that were added by {@see GravityView_Lightbox_Provider::add_hooks} |
||
82 | * @internal Do not call directly. Instead, use: |
||
83 | * |
||
84 | * <code> |
||
85 | * do_action( 'gravityview/lightbox/provider', 'slug' ); |
||
86 | * </code> |
||
87 | */ |
||
88 | public function remove_hooks() { |
||
100 | |||
101 | /** |
||
102 | * Modifies the name of the stylesheet to be enqueued when loading thickbox |
||
103 | * |
||
104 | * @param string $script |
||
105 | * |
||
106 | * @return string |
||
107 | */ |
||
108 | public function filter_lightbox_script( $script = 'thickbox' ) { |
||
111 | |||
112 | /** |
||
113 | * Modifies the name of the stylesheet to be enqueued when loading thickbox |
||
114 | * |
||
115 | * @param string $style |
||
116 | * |
||
117 | * @return string |
||
118 | */ |
||
119 | public function filter_lightbox_style( $style = 'thickbox' ) { |
||
122 | |||
123 | /** |
||
124 | * Get default settings for the script |
||
125 | * |
||
126 | * @return array |
||
127 | */ |
||
128 | protected function default_settings() { |
||
131 | |||
132 | /** |
||
133 | * Get the settings for the JavaScript, with filter applied |
||
134 | * |
||
135 | * @internal |
||
136 | * |
||
137 | * @return mixed|void |
||
138 | */ |
||
139 | protected function get_settings() { |
||
146 | |||
147 | /** |
||
148 | * Output raw HTML in the wp_footer() |
||
149 | * |
||
150 | * @internal |
||
151 | */ |
||
152 | public function output_footer() {} |
||
153 | |||
154 | /** |
||
155 | * Enqueue scripts for the lightbox |
||
156 | * |
||
157 | * @internal |
||
158 | */ |
||
159 | public function enqueue_scripts() {} |
||
160 | |||
161 | /** |
||
162 | * Enqueue styles for the lightbox |
||
163 | * |
||
164 | * @internal |
||
165 | */ |
||
166 | public function enqueue_styles() {} |
||
167 | |||
168 | /** |
||
169 | * Modify the attributes allowed in an anchor tag generated by GravityView |
||
170 | * |
||
171 | * @internal |
||
172 | * |
||
173 | * @param array $atts Attributes allowed in an anchor <a> tag. |
||
174 | * |
||
175 | * @return array |
||
176 | */ |
||
177 | public function allowed_atts( $atts = array() ) { |
||
180 | |||
181 | /** |
||
182 | * Modified File Upload field links to use lightbox |
||
183 | * |
||
184 | * @since 2.10.1 Added $insecure_file_path |
||
185 | * @internal |
||
186 | * |
||
187 | * @param array|string $link_atts Array or attributes string. |
||
188 | * @param array $field_compat Current GravityView field. |
||
189 | * @param \GV\Template_Context|null $context The context. |
||
190 | * @param array $additional_details Array of additional details about the file. { |
||
191 | * @type string $file_path URL to file. |
||
192 | * @type string $insecure_file_path URL to insecure file. |
||
193 | * } |
||
194 | * |
||
195 | * @return mixed |
||
196 | */ |
||
197 | public function fileupload_link_atts( $link_atts, $field_compat = array(), $context = null, $additional_details = null ) { |
||
200 | |||
201 | } |
||
202 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.