Fix nav menu locations sorting. props jorbin, koopersmith with assists. see #13378.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f268a16a8b
commit
49437c3491
|
@ -1107,7 +1107,7 @@ case 'menu-locations-save':
|
|||
if ( ! current_user_can( 'edit_theme_options' ) )
|
||||
die('-1');
|
||||
check_ajax_referer( 'add-menu_item', 'menu-settings-column-nonce' );
|
||||
if ( ! isset( $_POST['menu-locations' ] ) )
|
||||
if ( ! isset( $_POST['menu-locations'] ) )
|
||||
die('0');
|
||||
set_theme_mod( 'nav_menu_locations', $_POST['menu-locations'] );
|
||||
die('1');
|
||||
|
|
|
@ -357,13 +357,13 @@ var wpNavMenu;
|
|||
},
|
||||
|
||||
attachThemeLocationsListeners : function() {
|
||||
var loc = $('#nav-menu-theme-locations'),
|
||||
params = {
|
||||
'action': 'menu-locations-save',
|
||||
'menu-locations': loc.find('select').serialize(),
|
||||
'menu-settings-column-nonce': $('#menu-settings-column-nonce').val()
|
||||
};
|
||||
var loc = $('#nav-menu-theme-locations'), params = {};
|
||||
params['action'] = 'menu-locations-save';
|
||||
params['menu-settings-column-nonce'] = $('#menu-settings-column-nonce').val();
|
||||
loc.find('input[type=submit]').click(function() {
|
||||
loc.find('select').each(function() {
|
||||
params[this.name] = $(this).val();
|
||||
});
|
||||
loc.find('.waiting').show();
|
||||
$.post( ajaxurl, params, function(r) {
|
||||
loc.find('.waiting').hide();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -384,7 +384,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
) );
|
||||
|
||||
// Custom Navigation
|
||||
$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100520' );
|
||||
$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100520a' );
|
||||
$scripts->localize( 'nav-menu', 'navMenuL10n', array(
|
||||
'home' => _x('Home', 'nav menu home label'),
|
||||
'homeurl' => home_url('/'),
|
||||
|
|
Loading…
Reference in New Issue