~canonical-sysadmins/wordpress/4.8.1

« back to all changes in this revision

Viewing changes to wp-includes/class-wp-customize-panel.php

  • Committer: Barry Price
  • Date: 2016-08-17 04:50:12 UTC
  • mfrom: (1.1.18 upstream)
  • Revision ID: barry.price@canonical.com-20160817045012-qfui81zhqnqv2ba9
Merge WP4.6 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
         * @see WP_Customize_Section::active()
131
131
         *
132
132
         * @var callable Callback is called with one argument, the instance of
133
 
         *               {@see WP_Customize_Section}, and returns bool to indicate
134
 
         *               whether the section is active (such as it relates to the URL
135
 
         *               currently being previewed).
 
133
         *               WP_Customize_Section, and returns bool to indicate whether
 
134
         *               the section is active (such as it relates to the URL currently
 
135
         *               being previewed).
136
136
         */
137
137
        public $active_callback = '';
138
138
 
179
179
                $active = call_user_func( $this->active_callback, $this );
180
180
 
181
181
                /**
182
 
                 * Filter response of WP_Customize_Panel::active().
 
182
                 * Filters response of WP_Customize_Panel::active().
183
183
                 *
184
184
                 * @since 4.1.0
185
185
                 *
186
 
                 * @param bool               $active  Whether the Customizer panel is active.
187
 
                 * @param WP_Customize_Panel $panel   {@see WP_Customize_Panel} instance.
 
186
                 * @param bool               $active Whether the Customizer panel is active.
 
187
                 * @param WP_Customize_Panel $panel  WP_Customize_Panel instance.
188
188
                 */
189
189
                $active = apply_filters( 'customize_panel_active', $active, $panel );
190
190
 
192
192
        }
193
193
 
194
194
        /**
195
 
         * Default callback used when invoking {@see WP_Customize_Panel::active()}.
 
195
         * Default callback used when invoking WP_Customize_Panel::active().
196
196
         *
197
197
         * Subclasses can override this with their specific logic, or they may
198
198
         * provide an 'active_callback' argument to the constructor.
290
290
        /**
291
291
         * Render the panel container, and then its contents (via `this->render_content()`) in a subclass.
292
292
         *
293
 
         * Panel containers are now rendered in JS by default, see {@see WP_Customize_Panel::print_template()}.
 
293
         * Panel containers are now rendered in JS by default, see WP_Customize_Panel::print_template().
294
294
         *
295
295
         * @since 4.0.0
296
296
         * @access protected
300
300
        /**
301
301
         * Render the panel UI in a subclass.
302
302
         *
303
 
         * Panel contents are now rendered in JS by default, see {@see WP_Customize_Panel::print_template()}.
 
303
         * Panel contents are now rendered in JS by default, see WP_Customize_Panel::print_template().
304
304
         *
305
305
         * @since 4.1.0
306
306
         * @access protected