Make WordPress Core


Ignore:
Timestamp:
11/13/2014 12:18:01 PM (10 years ago)
Author:
ocean90
Message:

Customizer: Improve ability to filter active state for widget area Customizer sections.

  • Mark panels, sections, controls as active if preview explicitly indicates.
  • Introduce WP_Customize_Sidebar_Section PHP class, and SidebarSection JS class.
  • Move logic for determining whether a sidebar section is active from the SidebarControl to SidebarSection.

props westonruter.
fixes #30235.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-control.php

    r30326 r30329  
    11161116    }
    11171117
    1118     /**
    1119      * Whether the current sidebar is rendered on the page.
    1120      *
    1121      * @since 4.0.0
    1122      * @access public
    1123      *
    1124      * @return bool Whether sidebar is rendered.
    1125      */
    1126     public function active_callback() {
    1127         return $this->manager->widgets->is_sidebar_rendered( $this->sidebar_id );
    1128     }
    11291118}
    11301119
Note: See TracChangeset for help on using the changeset viewer.