WordPress.org

Make WordPress Core

Changeset 40893


Ignore:
Timestamp:
06/09/17 23:53:27 (5 months ago)
Author:
westonruter
Message:

Widgets: Add widget dedicated for HTML Code, taking over this role of the Text widget.

Props westonruter, timmydcrawford.
See #40951, #35243.
Fixes #40907.

Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r40776 r40893  
    170170add_filter( 'widget_text_content', 'convert_smilies',  20 ); 
    171171add_filter( 'widget_text_content', 'wpautop'              ); 
     172 
     173add_filter( 'widget_html_code_content', 'balanceTags' ); 
    172174 
    173175add_filter( 'date_i18n', 'wp_maybe_decline_date' ); 
  • trunk/src/wp-includes/default-widgets.php

    r40640 r40893  
    6161/** WP_Nav_Menu_Widget class */ 
    6262require_once( ABSPATH . WPINC . '/widgets/class-wp-nav-menu-widget.php' ); 
     63 
     64/** WP_Widget_HTML_Code class */ 
     65require_once( ABSPATH . WPINC . '/widgets/class-wp-widget-html-code.php' ); 
  • trunk/src/wp-includes/widgets.php

    r40806 r40893  
    14751475    register_widget( 'WP_Nav_Menu_Widget' ); 
    14761476 
     1477    register_widget( 'WP_Widget_HTML_Code' ); 
     1478 
    14771479    /** 
    14781480     * Fires after all default WordPress widgets have been registered. 
  • trunk/src/wp-includes/widgets/class-wp-widget-text.php

    r40675 r40893  
    2626        $widget_ops = array( 
    2727            'classname' => 'widget_text', 
    28             'description' => __( 'Arbitrary text or HTML.' ), 
     28            'description' => __( 'Arbitrary text.' ), 
    2929            'customize_selective_refresh' => true, 
    3030        ); 
Note: See TracChangeset for help on using the changeset viewer.