WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/22/2012 04:14:26 AM (8 years ago)
Author:
koopersmith
Message:

Theme Customizer: Make dropdown-pages a native customize control. see #19910.

While the customize_render_control- action has been removed, we could still accomplish this with the customize_render_setting action. That said, in this case, avoiding native integration was a matter of minor semantics that ended in the same result.

File:
1 edited

Legend:

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

    r20248 r20254  
    383383                <?php
    384384                break;
     385            case 'dropdown-pages':
     386                printf(
     387                    '<label class="customize-control-select"><span class="customize-control-title">%s</span> %s</label>',
     388                    $this->label,
     389                    wp_dropdown_pages(
     390                        array(
     391                            'name'              => $this->get_name(),
     392                            'echo'              => 0,
     393                            'show_option_none'  => __( '&mdash; Select &mdash;' ),
     394                            'option_none_value' => '0',
     395                            'selected'          => get_option( $this->id )
     396                        )
     397                    )
     398                );
     399                break;
    385400        }
    386401    }
Note: See TracChangeset for help on using the changeset viewer.