wp/wp-includes/class-wp-customize-panel.php
changeset 19 3d72ae0968f4
parent 16 a86126ab1dd4
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
    54 
    54 
    55 	/**
    55 	/**
    56 	 * Priority of the panel, defining the display order of panels and sections.
    56 	 * Priority of the panel, defining the display order of panels and sections.
    57 	 *
    57 	 *
    58 	 * @since 4.0.0
    58 	 * @since 4.0.0
    59 	 * @var integer
    59 	 * @var int
    60 	 */
    60 	 */
    61 	public $priority = 160;
    61 	public $priority = 160;
    62 
    62 
    63 	/**
    63 	/**
    64 	 * Capability required for the panel.
    64 	 * Capability required for the panel.
   230 	/**
   230 	/**
   231 	 * Checks required user capabilities and whether the theme has the
   231 	 * Checks required user capabilities and whether the theme has the
   232 	 * feature support required by the panel.
   232 	 * feature support required by the panel.
   233 	 *
   233 	 *
   234 	 * @since 4.0.0
   234 	 * @since 4.0.0
       
   235 	 * @since 5.9.0 Method was marked non-final.
   235 	 *
   236 	 *
   236 	 * @return bool False if theme doesn't support the panel or the user doesn't have the capability.
   237 	 * @return bool False if theme doesn't support the panel or the user doesn't have the capability.
   237 	 */
   238 	 */
   238 	final public function check_capabilities() {
   239 	public function check_capabilities() {
   239 		if ( $this->capability && ! current_user_can( $this->capability ) ) {
   240 		if ( $this->capability && ! current_user_can( $this->capability ) ) {
   240 			return false;
   241 			return false;
   241 		}
   242 		}
   242 
   243 
   243 		if ( $this->theme_supports && ! current_theme_supports( ... (array) $this->theme_supports ) ) {
   244 		if ( $this->theme_supports && ! current_theme_supports( ... (array) $this->theme_supports ) ) {
   273 		/**
   274 		/**
   274 		 * Fires before rendering a Customizer panel.
   275 		 * Fires before rendering a Customizer panel.
   275 		 *
   276 		 *
   276 		 * @since 4.0.0
   277 		 * @since 4.0.0
   277 		 *
   278 		 *
   278 		 * @param WP_Customize_Panel $this WP_Customize_Panel instance.
   279 		 * @param WP_Customize_Panel $panel WP_Customize_Panel instance.
   279 		 */
   280 		 */
   280 		do_action( 'customize_render_panel', $this );
   281 		do_action( 'customize_render_panel', $this );
   281 
   282 
   282 		/**
   283 		/**
   283 		 * Fires before rendering a specific Customizer panel.
   284 		 * Fires before rendering a specific Customizer panel.