Widgets: remove the widget title shown in the widget header when empty or doesn't exist, part props kawauso, fixes #19925
git-svn-id: http://svn.automattic.com/wordpress/trunk@20628 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8929b78ae2
commit
641650117e
|
@ -248,12 +248,14 @@ wpWidgets = {
|
|||
},
|
||||
|
||||
appendTitle : function(widget) {
|
||||
var title = $('input[id*="-title"]', widget);
|
||||
if ( title = title.val() ) {
|
||||
title = title.replace(/<[^<>]+>/g, '').replace(/</g, '<').replace(/>/g, '>');
|
||||
var title = $('input[id*="-title"]', widget).val() || '';
|
||||
|
||||
if ( title )
|
||||
title = ': ' + title.replace(/<[^<>]+>/g, '').replace(/</g, '<').replace(/>/g, '>');
|
||||
|
||||
$(widget).children('.widget-top').children('.widget-title').children()
|
||||
.children('.in-widget-title').html(': ' + title);
|
||||
}
|
||||
.children('.in-widget-title').html(title);
|
||||
|
||||
},
|
||||
|
||||
resize : function() {
|
||||
|
|
Loading…
Reference in New Issue