[wp-trac] [WordPress Trac] #38329: Create positioning control for Custom Logos

WordPress Trac noreply at wordpress.org
Tue Jan 17 04:33:44 UTC 2017


#38329: Create positioning control for Custom Logos
-------------------------+------------------
 Reporter:  melchoyce    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  4.8
Component:  Customize    |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+------------------
Changes (by westonruter):

 * keywords:   => needs-patch
 * milestone:  Awaiting Review => 4.8


Comment:

 Perhaps the theme options could be amended with a `position_choices`
 array?

 {{{#!php
 <?php
 add_theme_support( 'custom-logo', array(
         'width'       => 250,
         'height'      => 250,
         'flex-width'  => true,
         'position_choices'  => array(
                 'above' => __( 'Above', 'twentyseventeen' ),
                 'left_side' => __( 'Left Side', 'twentyseventeen' ),
                 'right_side' => __( 'Right Side', 'twentyseventeen' ),
                 'below' => __( 'Below', 'twentyseventeen' ),
         ),
 ) );
 }}}

 When this `position_choices` theme support config option is present, this
 could cause an additional `custom_logo_position` setting and control to
 appear, with a dropdown of the choices presented in the
 `add_theme_support()` call. A theme would then be responsible for looking
 at `get_theme_mod( 'custom_logo_position' )` to determine where in the
 template that the logo should be displayed.

 Note also that the `custom_logo_position` setting would probably need to
 default to have the `refresh` transport, as the template would probably
 need to be refreshed as a whole to move the logo to the required position.

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


More information about the wp-trac mailing list