Make WordPress Core


Ignore:
Timestamp:
07/29/2026 03:02:41 AM (6 weeks ago)
Author:
westonruter
Message:

Bundled Themes: Fix hook docblocks and filter arguments.

  • Add the missing variable name to @param tags that document a type and a description but no name, in Twenty Ten, Twenty Eleven, and Twenty Twenty-One.
  • Pass the documented $post argument to the the_permalink filter in Twenty Eleven, Twenty Thirteen, and Twenty Fifteen. The filter gained that parameter in 4.4, but these call sites were never updated, so a callback registered for two arguments received only one.
  • Point Twenty Eleven's widget_title reference comment at wp-includes/widgets/class-wp-widget-pages.php, since wp-includes/default-widgets.php no longer exists. Add the reference comments that were missing altogether for the_permalink in Twenty Thirteen and Twenty Fifteen, and for widget_title in Twenty Fourteen.

These issues were surfaced by the PHPStan extensions under development for this ticket, which are committed separately.

Developed as subset of https://github.com/WordPress/wordpress-develop/pull/12022.
Follow-up to r25625, r25627, r33843, r35002, r51304, r60077.

See #65376, #64896.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/inc/widgets.php

    r62465 r62893  
    114114                $number = ! empty( $instance['number'] ) ? absint( $instance['number'] ) : 2;
    115115                $title  = ! empty( $instance['title'] ) ? $instance['title'] : $format_string;
    116                 $title  = apply_filters( 'widget_title', $title, $instance, $this->id_base );
     116                /** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
     117                $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    117118
    118119                $ephemera = new WP_Query(
Note: See TracChangeset for help on using the changeset viewer.