WordPress.org

Make WordPress Core

Changeset 20628


Ignore:
Timestamp:
04/27/2012 08:34:35 PM (6 years ago)
Author:
azaozz
Message:

Widgets: remove the widget title shown in the widget header when empty or doesn't exist, part props kawauso, fixes #19925

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/widgets.dev.js

    r18774 r20628  
    249249
    250250    appendTitle : function(widget) {
    251         var title = $('input[id*="-title"]', widget);
    252         if ( title = title.val() ) {
    253             title = title.replace(/<[^<>]+>/g, '').replace(/</g, '&lt;').replace(/>/g, '&gt;');
    254             $(widget).children('.widget-top').children('.widget-title').children()
    255                 .children('.in-widget-title').html(': ' + title);
    256         }
     251        var title = $('input[id*="-title"]', widget).val() || '';
     252
     253        if ( title )
     254            title = ': ' + title.replace(/<[^<>]+>/g, '').replace(/</g, '&lt;').replace(/>/g, '&gt;');
     255
     256        $(widget).children('.widget-top').children('.widget-title').children()
     257                .children('.in-widget-title').html(title);
     258
    257259    },
    258260
Note: See TracChangeset for help on using the changeset viewer.