Widgets: remove the widget title shown in the widget header when empty or doesn't exist, part props kawauso, fixes #19925
git-svn-id: https://develop.svn.wordpress.org/trunk@20628 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
001e92a1f2
commit
29e2ec2ac5
|
@ -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, '<').replace(/>/g, '>');
|
if ( title )
|
||||||
$(widget).children('.widget-top').children('.widget-title').children()
|
title = ': ' + title.replace(/<[^<>]+>/g, '').replace(/</g, '<').replace(/>/g, '>');
|
||||||
.children('.in-widget-title').html(': ' + title);
|
|
||||||
}
|
$(widget).children('.widget-top').children('.widget-title').children()
|
||||||
|
.children('.in-widget-title').html(title);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
resize : function() {
|
resize : function() {
|
||||||
|
|
Loading…
Reference in New Issue