[wp-trac] [WordPress Trac] #31540: Dropdown pages Customizer description option

WordPress Trac noreply at wordpress.org
Mon Jul 13 23:23:30 UTC 2015


#31540: Dropdown pages Customizer description option
-------------------------+-----------------------------
 Reporter:  _smartik_    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Customize    |     Version:  4.1.1
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |     Focuses:  ui
-------------------------+-----------------------------

Comment (by downstairsdev):

 Hi @afercia. Did you have a chance to file that ticket about moving
 descriptions below elements? If so, could you link?

 I agree the description should be added. I found this ticket while trying
 to trace down why it wasn't showing up for me in a theme.

 The latest patch from @MikeHansenMe worked well for me. I tested it and
 will post a refresh.

 If anyone else would like to test, here's some boilerplate dropdown
 customizer code you can drop in:

 {{{
 /**
  * Add page selector to the customizer.
  *
  * @since Theme 1.0.0
  *
  * @param WP_Customize_Manager $wp_customize Customizer object.
  */
 function prefix_customize_register( $wp_customize ) {

         $wp_customize->add_section( 'dropdown-pages-example' , array(
                 'title'      => __( 'Dropdown Pages', 'textdomain' ),
                 'priority'   => 30,
         ) );

         // Add color scheme setting and control.
         $wp_customize->add_setting( 'showcase-page-1', array(
                 'default'           => '',
                 'sanitize_callback' => 'absint'
         ) );

         $wp_customize->add_control( 'showcase-page-1', array(
                 'label'    => __( 'Select Page', 'textdomain' ),
                 'section'  => 'dropdown-pages-example',
                 'type'     => 'dropdown-pages',
                 'description' => __( 'Testing description.', 'textdomain'
 ),
         ) );

 }
 add_action( 'customize_register', 'prefix_customize_register', 12 );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31540#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list