mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
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:
parent
9f255f3a1e
commit
c84bc2e846
@ -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
@ -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('/'),
|
||||||
|
Loading…
Reference in New Issue
Block a user