diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-includes/widgets/class-wp-widget-custom-html.php --- a/wp/wp-includes/widgets/class-wp-widget-custom-html.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-includes/widgets/class-wp-widget-custom-html.php Tue Dec 15 13:49:49 2020 +0100 @@ -70,10 +70,12 @@ wp_add_inline_script( 'custom-html-widgets', sprintf( 'wp.customHtmlWidgets.idBases.push( %s );', wp_json_encode( $this->id_base ) ) ); - // Note that the widgets component in the customizer will also do the 'admin_print_scripts-widgets.php' action in WP_Customize_Widgets::print_scripts(). + // Note that the widgets component in the customizer will also do + // the 'admin_print_scripts-widgets.php' action in WP_Customize_Widgets::print_scripts(). add_action( 'admin_print_scripts-widgets.php', array( $this, 'enqueue_admin_scripts' ) ); - // Note that the widgets component in the customizer will also do the 'admin_footer-widgets.php' action in WP_Customize_Widgets::print_footer_scripts(). + // Note that the widgets component in the customizer will also do + // the 'admin_footer-widgets.php' action in WP_Customize_Widgets::print_footer_scripts(). add_action( 'admin_footer-widgets.php', array( 'WP_Widget_Custom_HTML', 'render_control_template_scripts' ) ); // Note this action is used to ensure the help text is added to the end. @@ -103,7 +105,8 @@ * * @since 4.8.1 * - * @global WP_Post $post + * @global WP_Post $post Global post object. + * * @param array $args Display arguments including 'before_title', 'after_title', * 'before_widget', and 'after_widget'. * @param array $instance Settings for the current Custom HTML widget instance. @@ -221,10 +224,11 @@ $l10n = array( 'errorNotice' => array( - /* translators: %d: error count */ + /* translators: %d: Error count. */ 'singular' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 1 ), - /* translators: %d: error count */ - 'plural' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 2 ), // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. + /* translators: %d: Error count. */ + 'plural' => _n( 'There is %d error which must be fixed before you can save.', 'There are %d errors which must be fixed before you can save.', 2 ), + // @todo This is lacking, as some languages have a dedicated dual form. For proper handling of plurals in JS, see #20491. ), ); wp_add_inline_script( 'custom-html-widgets', sprintf( 'jQuery.extend( wp.customHtmlWidgets.l10n, %s );', wp_json_encode( $l10n ) ), 'after' ); @@ -237,8 +241,8 @@ * @since 4.9.0 The form contains only hidden sync inputs. For the control UI, see `WP_Widget_Custom_HTML::render_control_template_scripts()`. * * @see WP_Widget_Custom_HTML::render_control_template_scripts() + * * @param array $instance Current instance. - * @returns void */ public function form( $instance ) { $instance = wp_parse_args( (array) $instance, $this->default_instance ); @@ -303,13 +307,13 @@ if ( 'false' !== wp_get_current_user()->syntax_highlighting ) { $content .= '

'; $content .= sprintf( - /* translators: 1: link to user profile, 2: additional link attributes, 3: accessibility text */ + /* translators: 1: Link to user profile, 2: Additional link attributes, 3: Accessibility text. */ __( 'The edit field automatically highlights code syntax. You can disable this in your user profile%3$s to work in plain text mode.' ), esc_url( get_edit_profile_url() ), 'class="external-link" target="_blank"', sprintf( ' %s', - /* translators: accessibility text */ + /* translators: Accessibility text. */ __( '(opens in a new tab)' ) ) );