Pixel sanity check. props filosofo, fixes #13470.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-21 23:35:37 +00:00
parent 9f255f3a1e
commit c84bc2e846
3 changed files with 4 additions and 3 deletions

View File

@ -55,7 +55,8 @@ var wpNavMenu;
// jQuery extensions // jQuery extensions
$.fn.extend({ $.fn.extend({
menuItemDepth : function() { menuItemDepth : function() {
return api.pxToDepth( this.eq(0).css('margin-left').slice(0, -2) ); var margin = this.eq(0).css('margin-left');
return api.pxToDepth( margin && -1 != margin.indexOf('px') ? margin.slice(0, -2) : 0 );
}, },
updateDepthClass : function(current, prev) { updateDepthClass : function(current, prev) {
return this.each(function(){ return this.each(function(){

File diff suppressed because one or more lines are too long

View File

@ -384,7 +384,7 @@ function wp_default_scripts( &$scripts ) {
) ); ) );
// Custom Navigation // Custom Navigation
$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100520a' ); $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", false, '20100521' );
$scripts->localize( 'nav-menu', 'navMenuL10n', array( $scripts->localize( 'nav-menu', 'navMenuL10n', array(
'home' => _x('Home', 'nav menu home label'), 'home' => _x('Home', 'nav menu home label'),
'homeurl' => home_url('/'), 'homeurl' => home_url('/'),