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:
azaozz 2012-04-27 20:34:35 +00:00
parent 8929b78ae2
commit 641650117e
1 changed files with 8 additions and 6 deletions

View File

@ -248,12 +248,14 @@ wpWidgets = {
}, },
appendTitle : function(widget) { appendTitle : function(widget) {
var title = $('input[id*="-title"]', widget); var title = $('input[id*="-title"]', widget).val() || '';
if ( title = title.val() ) {
title = title.replace(/<[^<>]+>/g, '').replace(/</g, '&lt;').replace(/>/g, '&gt;'); if ( title )
$(widget).children('.widget-top').children('.widget-title').children() title = ': ' + title.replace(/<[^<>]+>/g, '').replace(/</g, '&lt;').replace(/>/g, '&gt;');
.children('.in-widget-title').html(': ' + title);
} $(widget).children('.widget-top').children('.widget-title').children()
.children('.in-widget-title').html(title);
}, },
resize : function() { resize : function() {