<?php
/**
- * Customize Panel Class.
- *
- * A UI container for sections, managed by the WP_Customize_Manager.
+ * WordPress Customize Panel classes
*
* @package WordPress
* @subpackage Customize
* @since 4.0.0
*/
+
+/**
+ * Customize Panel class.
+ *
+ * A UI container for sections, managed by the WP_Customize_Manager.
+ *
+ * @since 4.0.0
+ *
+ * @see WP_Customize_Manager
+ */
class WP_Customize_Panel {
/**
$this->instance_number = self::$instance_count;
$this->sections = array(); // Users cannot customize the $sections array.
-
- return $this;
}
/**
*
* @return bool Whether the panel is active to the current preview.
*/
- public final function active() {
+ final public function active() {
$panel = $this;
$active = call_user_func( $this->active_callback, $this );
*
* @return bool False if theme doesn't support the panel or the user doesn't have the capability.
*/
- public final function check_capabilities() {
+ final public function check_capabilities() {
if ( $this->capability && ! call_user_func_array( 'current_user_can', (array) $this->capability ) ) {
return false;
}
*
* @return string Content for the panel.
*/
- public final function get_content() {
+ final public function get_content() {
ob_start();
$this->maybe_render();
$template = trim( ob_get_contents() );
*
* @since 4.0.0
*/
- public final function maybe_render() {
+ final public function maybe_render() {
if ( ! $this->check_capabilities() ) {
return;
}