Add unique ids as well as of classes in the admin bar to make it easier for plugins to extend.
Ensure we escape the classname. Fixes #16211 props koopersmith. git-svn-id: http://svn.automattic.com/wordpress/trunk@17279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -90,15 +90,16 @@
|
||||
if ( ! t || t == d || t == aB )
|
||||
return;
|
||||
// Check if we've found the shortlink node.
|
||||
if ( t.className && -1 != t.className.indexOf('ab-get-shortlink') )
|
||||
if ( t.id && t.id == 'wp-admin-bar-get-shortlink' )
|
||||
break;
|
||||
t = t.parentNode;
|
||||
}
|
||||
|
||||
|
||||
// IE doesn't support preventDefault, and does support returnValue
|
||||
if ( e.preventDefault )
|
||||
e.preventDefault();
|
||||
e.returnValue = false;
|
||||
|
||||
|
||||
if ( -1 == t.className.indexOf('selected') )
|
||||
t.className += ' selected';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user