WordPress.org

Make WordPress Core

Changeset 51142


Ignore:
Timestamp:
06/14/2021 03:15:26 PM (6 months ago)
Author:
SergeyBiryukov
Message:

Docs: Update documentation for some WP_Customize_Widgets methods per the documentation standards.

  • Add missing @since tags for the $id_base parameter of ::sanitize_widget_instance() and ::sanitize_widget_js_instance()`.
  • Document the usage of $wp_widget_factory global in ::sanitize_widget_instance().
  • Use multi-line comment syntax for a comment in ::enqueue_scripts().

Follow-up to [50996], [51141].

See #52628.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r51141 r51142  
    829829        );
    830830
    831         // TODO: Update 'wp-customize-widgets' to not rely so much on things in
    832         // 'customize-widgets'. This will let us skip most of the above and not
    833         // enqueue 'customize-widgets' which saves bytes.
     831        /*
     832         * TODO: Update 'wp-customize-widgets' to not rely so much on things in
     833         * 'customize-widgets'. This will let us skip most of the above and not
     834         * enqueue 'customize-widgets' which saves bytes.
     835         */
    834836
    835837        if ( wp_use_widgets_block_editor() ) {
     
    13951397     *
    13961398     * @since 3.9.0
     1399     * @since 5.8.0 Added the `$id_base` parameter.
    13971400     *
    13981401     * @global WP_Widget_Factory $wp_widget_factory
    13991402     *
    1400      * @param array $value Widget instance to sanitize.
    1401      * @param string $id_base Base of the ID of the widget being sanitized.
     1403     * @param array  $value  Widget instance to sanitize.
     1404     * @param string $id_base Optional. Base of the ID of the widget being sanitized. Default null.
    14021405     * @return array|void Sanitized widget instance.
    14031406     */
     
    14451448     *
    14461449     * @since 3.9.0
    1447      *
    1448      * @param array $value Widget instance to convert to JSON.
    1449      * @param string $id_base Base of the ID of the widget being sanitized.
     1450     * @since 5.8.0 Added the `$id_base` parameter.
     1451     *
     1452     * @global WP_Widget_Factory $wp_widget_factory
     1453     *
     1454     * @param array  $value   Widget instance to convert to JSON.
     1455     * @param string $id_base Optional. Base of the ID of the widget being sanitized. Default null.
    14501456     * @return array JSON-converted widget instance.
    14511457     */
Note: See TracChangeset for help on using the changeset viewer.