Make WordPress Core


Ignore:
Timestamp:
06/23/2017 11:59:23 PM (7 years ago)
Author:
westonruter
Message:

Widgets: Rename "HTML Code" widget to "Custom HTML" widget.

Correspondingly renames files, ID base from html_code to custom_html, and the filter from widget_html_code_content to widget_custom_html_content.

See #40907.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-custom-html.php

    r40925 r40926  
    11<?php
    22/**
    3  * Widget API: WP_Widget_HTML_Code class
     3 * Widget API: WP_Widget_Custom_HTML class
    44 *
    55 * @package WordPress
     
    99
    1010/**
    11  * Core class used to implement a HTML Code widget.
     11 * Core class used to implement a Custom HTML widget.
    1212 *
    1313 * @since 4.8.1
     
    1515 * @see WP_Widget
    1616 */
    17 class WP_Widget_HTML_Code extends WP_Widget {
     17class WP_Widget_Custom_HTML extends WP_Widget {
    1818
    1919    /**
     
    2929
    3030    /**
    31      * Sets up a new HTML Code widget instance.
     31     * Sets up a new Custom HTML widget instance.
    3232     *
    3333     * @since 4.8.1
     
    3535    public function __construct() {
    3636        $widget_ops = array(
    37             'classname' => 'widget_html_code',
     37            'classname' => 'widget_custom_html',
    3838            'description' => __( 'Arbitrary HTML code.' ),
    3939            'customize_selective_refresh' => true,
    4040        );
    4141        $control_ops = array();
    42         parent::__construct( 'html_code', __( 'HTML Code' ), $widget_ops, $control_ops );
     42        parent::__construct( 'custom_html', __( 'Custom HTML' ), $widget_ops, $control_ops );
    4343    }
    4444
    4545    /**
    46      * Outputs the content for the current HTML Code widget instance.
     46     * Outputs the content for the current Custom HTML widget instance.
    4747     *
    4848     * @since 4.8.1
     
    5050     * @param array $args     Display arguments including 'before_title', 'after_title',
    5151     *                        'before_widget', and 'after_widget'.
    52      * @param array $instance Settings for the current HTML Code widget instance.
     52     * @param array $instance Settings for the current Custom HTML widget instance.
    5353     */
    5454    public function widget( $args, $instance ) {
     
    6262
    6363        /**
    64          * Filters the content of the HTML Code widget.
     64         * Filters the content of the Custom HTML widget.
    6565         *
    6666         * @since 4.8.1
    6767         *
    68          * @param string              $content  The widget content.
    69          * @param array               $instance Array of settings for the current widget.
    70          * @param WP_Widget_HTML_Code $this     Current HTML Code widget instance.
     68         * @param string                $content  The widget content.
     69         * @param array                 $instance Array of settings for the current widget.
     70         * @param WP_Widget_Custom_HTML $this     Current Custom HTML widget instance.
    7171         */
    72         $content = apply_filters( 'widget_html_code_content', $content, $instance, $this );
     72        $content = apply_filters( 'widget_custom_html_content', $content, $instance, $this );
    7373
    7474        echo $args['before_widget'];
     
    8181
    8282    /**
    83      * Handles updating settings for the current HTML Code widget instance.
     83     * Handles updating settings for the current Custom HTML widget instance.
    8484     *
    8585     * @since 4.8.1
     
    102102
    103103    /**
    104      * Outputs the HTML Code widget settings form.
     104     * Outputs the Custom HTML widget settings form.
    105105     *
    106106     * @since 4.8.1
Note: See TracChangeset for help on using the changeset viewer.