Make WordPress Core

Ticket #28979: 28979.DEMO.diff

File 28979.DEMO.diff, 3.4 KB (added by celloexpressions, 8 years ago)

Hacky patch to implement mixed sorting and an alternate arrow style.

  • src/wp-admin/css/customize-controls.css

     
    8888        border-bottom: 1px solid #eeeeee;
    8989}
    9090
     91#customize-info .accordion-section-title:after,
     92#customize-controls .accordion-section-title:after {
     93        content: "\f347";
     94}
     95
     96#customize-info.open .accordion-section-title:after,
     97#customize-controls .open .accordion-section-title:after {
     98        content: "\f343";
     99}
     100
    91101#customize-theme-controls .accordion-section-content {
    92102        color: #555555;
    93103        background: white;
     
    137147        margin: 0;
    138148}
    139149
    140 .control-section.control-panel > .accordion-section-title:after {
    141         content: "\f139";
     150#customize-theme-controls .control-section.control-panel > .accordion-section-title:after {
     151        content: "\f345";
    142152}
    143153
    144 .rtl .control-section.control-panel > .accordion-section-title:after {
    145         content: "\f141";
     154.rtl #customize-theme-controls .control-section.control-panel > .accordion-section-title:after {
     155        content: "\f341";
    146156}
    147157
    148158.accordion-sub-container.control-panel-content {
  • src/wp-admin/customize.php

     
    161161
    162162                        <div id="customize-theme-controls"><ul>
    163163                                <?php
    164                                 foreach ( $wp_customize->panels() as $panel ) {
    165                                         $panel->maybe_render();
     164                                foreach ( $wp_customize->containers() as $container ) {
     165                                        $container->maybe_render();
    166166                                }
    167                                 foreach ( $wp_customize->sections() as $section ) {
    168                                         $section->maybe_render();
    169                                 }
    170167                                ?>
    171168                        </ul></div>
    172169                </div>
  • src/wp-includes/class-wp-customize-manager.php

     
    4545        public $widgets;
    4646
    4747        protected $settings = array();
     48        protected $containers = array();
    4849        protected $panels   = array();
    4950        protected $sections = array();
    5051        protected $controls = array();
     
    329330        }
    330331
    331332        /**
     333         * Get the registered containers.
     334         *
     335         * @since 4.0.0
     336         * @access public
     337         *
     338         * @return array Sorted panels and top-level sections.
     339         */
     340        public function containers() {
     341                return $this->containers;
     342        }
     343
     344        /**
    332345         * Checks if the current theme is active.
    333346         *
    334347         * @since 3.4.0
     
    891904                        $panels[] = $panel;
    892905                }
    893906                $this->panels = $panels;
     907
     908                // Sort panels and top-level sections together.
     909                $this->containers = array_merge( $this->panels, $this->sections );
     910                uasort( $this->containers, array( $this, '_cmp_priority' ) );
    894911        }
    895912
    896913        /**
  • src/wp-includes/class-wp-customize-widgets.php

     
    436436                $this->manager->add_panel( 'widgets', array(
    437437                        'title' => __( 'Widgets' ),
    438438                        'description' => __( 'Widgets are independent sections of content that can be placed into widgetized areas provided by your theme (commonly called sidebars).' ),
     439                        'priority' => 30,
    439440                ) );
    440441
    441442                foreach ( $sidebars_widgets as $sidebar_id => $sidebar_widget_ids ) {