[wp-trac] [WordPress Trac] #19910: Appearance Improvements: Theme Customization Frame
WordPress Trac
wp-trac at lists.automattic.com
Wed Feb 29 14:00:49 UTC 2012
#19910: Appearance Improvements: Theme Customization Frame
----------------------------+--------------------------
Reporter: koopersmith | Owner: koopersmith
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 3.4
Component: Themes | Version: 3.3.1
Severity: normal | Resolution:
Keywords: |
----------------------------+--------------------------
Comment (by cais):
This may be more observation and be a result of coder error but I found
the following to cause the Customization > Navigation to not produce the
results you would expect:
{{{
if ( ! function_exists( 'register_my_menu' ) ) {
function register_my_menu() {
register_nav_menu( 'top-menu', __( 'Top Menu', 'my-textdomain'
) );
}
}
add_action( 'init', 'register_my_menu' );
}}}
This will produce the expected menu drop down(s) under Appearance > Menu
but in the Customization > Navigation it returns there are "0" menus.
Simply replacing the above with the following will produce the correct
expected output:
{{{ register_nav_menu( 'top-menu', __( 'Top Menu', 'my-textdomain' ) );
}}}
To note (if relevant) this is wrapped in:
{{{ add_action( 'after_setup_theme', 'my_theme_setup' ); }}}
Also, the above examples are taken from the code used in my current
themes' menu structure.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19910#comment:24>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list