Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
78ec1ff
Docs: Add missing hook cross-reference docblock comments.
westonruter Mar 12, 2026
0d03283
Docs: Correct lone `@param null` usages around some `$deprecated` vars.
JJJ Mar 12, 2026
1f4416c
REST API: Prevent inaccessible attachments from being embedded in posts.
JJJ Mar 12, 2026
e9b452a
Toolbar: Prevent PHP deprecation warning in admin bar when node is ad…
westonruter Mar 12, 2026
3839805
Docs: Explicitly document the `rest_revision_query` filter.
SergeyBiryukov Mar 12, 2026
202a1f3
Build/Test tools: Unify REST API group as `restapi`.
peterwilsoncc Mar 12, 2026
b00c4ac
Twenty Seventeen: Restore `$post_id` parameter to `twentyseventeen_ed…
westonruter Mar 13, 2026
c604524
Build/Test Tools: Improve Gutenberg artifact fetching.
desrosj Mar 13, 2026
76c5605
Build/Test Tools: Fix installation tests for PHP <= 7.3.
desrosj Mar 13, 2026
159ca2d
Build/Test Tools: Add additional innovation release `exclude`s.
desrosj Mar 13, 2026
474a396
Docs: Correct return type for `add_link()`, `edit_link()`, and `wp_up…
SergeyBiryukov Mar 13, 2026
1c0f088
Initial attempt at context aware upgrade testing.
desrosj Mar 14, 2026
148a95d
Remove repo-specific restrictions.
desrosj Mar 14, 2026
a01b6d6
Configure WP CLI correctly for PHP 5.4 & 5.5.
desrosj Mar 14, 2026
c78fb49
Exclude PHP 8.x for WP 4.7.
desrosj Mar 14, 2026
ceaf798
Limit matrix to test.
desrosj Mar 14, 2026
04e4823
Test exclusions using an array.
desrosj Mar 14, 2026
23e2781
Fix issues.
desrosj Mar 14, 2026
d74dc7a
Try breaking up tests.
desrosj Mar 14, 2026
16f8c0c
Fix old PHP and new MySQL.
desrosj Mar 14, 2026
a21982f
Remove entrypoint.
desrosj Mar 14, 2026
5b844a8
Inputs not matrix.
desrosj Mar 14, 2026
4206214
Re-add entrypoint.
desrosj Mar 14, 2026
584b923
Change logic.
desrosj Mar 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/install-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,13 @@ jobs:
- db-version: '5.0'
- db-version: '5.1'
- db-version: '5.5'
# The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '8.4'
- php: '7.3'
db-version: '8.4'
# Only test the latest innovation release.
- db-version: '9.0'
- db-version: '9.1'
- db-version: '9.2'
- db-version: '9.3'
- db-version: '9.4'
- db-version: '9.5'
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.6'
Expand All @@ -118,7 +114,7 @@ jobs:
-e MYSQL_ROOT_PASSWORD="root"
-e MYSQL_DATABASE="test_db"
--entrypoint sh ${{ matrix.db-type }}:${{ matrix.db-version }}
-c "exec docker-entrypoint.sh mysqld${{ matrix.db-type == 'mysql' && contains( fromJSON('["7.2", "7.3"]'), matrix.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}"
-c "exec docker-entrypoint.sh mysqld${{ matrix.db-type == 'mysql' && contains( fromJSON('["5.4", "5.5", "5.6", "7.0", "7.1", "7.2", "7.3"]'), matrix.php ) && ( matrix.db-version == '8.4' && ' --mysql-native-password=ON --authentication-policy=mysql_native_password' || ' --default-authentication-plugin=mysql_native_password' ) || '' }}"

steps:
- name: Set up PHP ${{ matrix.php }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-upgrade-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
with:
php-version: '${{ inputs.php }}'
coverage: none
tools: wp-cli
tools: ${{ contains( fromJSON('["5.4", "5.5"]'), inputs.php ) && 'wp-cli:2.4.0' || 'wp-cli' }}

- name: Download WordPress ${{ inputs.wp }}
run: wp core download --version="${WP_VERSION}"
Expand Down
307 changes: 299 additions & 8 deletions .github/workflows/upgrade-testing.yml

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1589,13 +1589,9 @@ module.exports = function(grunt) {

grunt.registerTask( 'gutenberg:download', 'Downloads the built Gutenberg artifact.', function() {
const done = this.async();
const args = [ 'tools/gutenberg/download.js' ];
if ( grunt.option( 'force' ) ) {
args.push( '--force' );
}
grunt.util.spawn( {
cmd: 'node',
args,
args: [ 'tools/gutenberg/download.js' ],
opts: { stdio: 'inherit' }
}, function( error ) {
done( ! error );
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"wicg-inert": "3.1.3"
},
"scripts": {
"postinstall": "npm run gutenberg:download",
"postinstall": "npm run gutenberg:verify",
"build": "grunt build",
"build:dev": "grunt build --dev",
"build:gutenberg": "grunt build:gutenberg",
Expand Down Expand Up @@ -140,6 +140,7 @@
"test:visual": "wp-scripts test-playwright --config tests/visual-regression/playwright.config.js",
"typecheck:php": "node ./tools/local-env/scripts/docker.js run --rm php composer phpstan",
"gutenberg:copy": "node tools/gutenberg/copy.js",
"gutenberg:verify": "node tools/gutenberg/utils.js",
"gutenberg:download": "node tools/gutenberg/download.js",
"vendor:copy": "node tools/vendors/copy-vendors.js",
"sync-gutenberg-packages": "grunt sync-gutenberg-packages",
Expand Down
5 changes: 5 additions & 0 deletions src/wp-admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,17 +395,22 @@
*/
if ( 'page' === $typenow ) {
if ( 'post-new.php' === $pagenow ) {
/** This action is documented in wp-admin/admin.php */
do_action( 'load-page-new.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
} elseif ( 'post.php' === $pagenow ) {
/** This action is documented in wp-admin/admin.php */
do_action( 'load-page.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
} elseif ( 'edit-tags.php' === $pagenow ) {
if ( 'category' === $taxnow ) {
/** This action is documented in wp-admin/admin.php */
do_action( 'load-categories.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
} elseif ( 'link_category' === $taxnow ) {
/** This action is documented in wp-admin/admin.php */
do_action( 'load-edit-link-categories.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
} elseif ( 'term.php' === $pagenow ) {
/** This action is documented in wp-admin/admin.php */
do_action( 'load-edit-tags.php' ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/wp-admin/includes/bookmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @since 2.0.0
*
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success.
* @return int The link ID on success. The value 0 on failure.
*/
function add_link() {
return edit_link();
Expand All @@ -23,7 +23,7 @@ function add_link() {
* @since 2.0.0
*
* @param int $link_id Optional. ID of the link to edit. Default 0.
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success.
* @return int The link ID on success. The value 0 on failure.
*/
function edit_link( $link_id = 0 ) {
if ( ! current_user_can( 'manage_links' ) ) {
Expand Down Expand Up @@ -169,7 +169,7 @@ function get_link_to_edit( $link ) {
* If empty, uses default link category.
* }
* @param bool $wp_error Optional. Whether to return a WP_Error object on failure. Default false.
* @return int|WP_Error Value 0 or WP_Error on failure. The link ID on success.
* @return int|WP_Error The link ID on success. The value 0 or WP_Error on failure.
*/
function wp_insert_link( $linkdata, $wp_error = false ) {
global $wpdb;
Expand Down Expand Up @@ -295,7 +295,7 @@ function wp_set_link_cats( $link_id = 0, $link_categories = array() ) {
* @since 2.0.0
*
* @param array $linkdata Link data to update. See wp_insert_link() for accepted arguments.
* @return int|WP_Error Value 0 or WP_Error on failure. The updated link ID on success.
* @return int The updated link ID on success. The value 0 on failure.
*/
function wp_update_link( $linkdata ) {
$link_id = (int) $linkdata['link_id'];
Expand Down
17 changes: 9 additions & 8 deletions src/wp-content/themes/twentyseventeen/inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,23 @@ function twentyseventeen_entry_footer() {

if ( ! function_exists( 'twentyseventeen_edit_link' ) ) :
/**
* Returns an accessibility-friendly link to edit a post or page.
* Displays an accessibility-friendly link to edit a post or page.
*
* This also gives a little context about what exactly we're editing
* (post or page?) so that users understand a bit more where they are in terms
* of the template hierarchy and their content. Helpful when/if the single-page
* layout with multiple posts/pages shown gets confusing.
* @since Twenty Seventeen 1.0
* @since Twenty Seventeen 4.1 Added `$post_id` parameter.
*
* @param int $post_id Post ID. Default 0.
*/
function twentyseventeen_edit_link() {
function twentyseventeen_edit_link( $post_id = 0 ) {
edit_post_link(
sprintf(
/* translators: %s: Post title. Only visible to screen readers. */
__( 'Edit<span class="screen-reader-text"> "%s"</span>', 'twentyseventeen' ),
get_the_title()
get_the_title( $post_id )
),
'<span class="edit-link">',
'</span>'
'</span>',
$post_id
);
}
endif;
Expand Down
1 change: 1 addition & 0 deletions src/wp-includes/block-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ function _wp_get_iframed_editor_assets() {
* front-end assets for the content.
*/
add_filter( 'should_load_block_editor_scripts_and_styles', '__return_false' );
/** This action is documented in wp-includes/script-loader.php */
do_action( 'enqueue_block_assets' );
remove_filter( 'should_load_block_editor_scripts_and_styles', '__return_false' );

Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/category-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -1258,8 +1258,8 @@ function tag_description( $tag = 0 ) {
* @since 2.8.0
* @since 4.9.2 The `$taxonomy` parameter was deprecated.
*
* @param int $term Optional. Term ID. Defaults to the current term ID.
* @param null $deprecated Deprecated. Not used.
* @param int $term Optional. Term ID. Defaults to the current term ID.
* @param mixed $deprecated Not used.
* @return string Term description, if available.
*/
function term_description( $term = 0, $deprecated = null ) {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-admin-bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public function add_node( $args ) {
'my-blogs' => array( 'my-sites', '3.3' ),
);

if ( isset( $back_compat_parents[ $args['parent'] ] ) ) {
if ( is_string( $args['parent'] ) && isset( $back_compat_parents[ $args['parent'] ] ) ) {
list( $new_parent, $version ) = $back_compat_parents[ $args['parent'] ];
_deprecated_argument( __METHOD__, $version, sprintf( 'Use <code>%s</code> as the parent for the <code>%s</code> admin bar node instead of <code>%s</code>.', $new_parent, $args['id'], $args['parent'] ) );
$args['parent'] = $new_parent;
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-block-parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public function freeform( $inner_html ) {
*
* @internal
* @since 5.0.0
* @param null $length how many bytes of document text to output.
* @param null|int $length How many bytes of document text to output.
*/
public function add_freeform( $length = null ) {
$length = $length ? $length : strlen( $this->document ) - $this->offset;
Expand Down
6 changes: 3 additions & 3 deletions src/wp-includes/class-wp-widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -546,9 +546,9 @@ public function form_callback( $widget_args = 1 ) {
*
* @since 2.8.0
*
* @param WP_Widget $widget The widget instance (passed by reference).
* @param null $return Return null if new fields are added.
* @param array $instance An array of the widget's settings.
* @param WP_Widget $widget The widget instance (passed by reference).
* @param null|string $return Default 'noform'. Return null if new fields are added.
* @param array $instance An array of the widget's settings.
*/
do_action_ref_array( 'in_widget_form', array( &$this, &$return, $instance ) );
}
Expand Down
5 changes: 5 additions & 0 deletions src/wp-includes/deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ function previous_post($format='%', $previous='previous post: ', $title='yes', $

$string = '<a href="'.get_permalink($post->ID).'">'.$previous;
if ( 'yes' == $title )
/** This filter is documented in wp-includes/post-template.php */
$string .= apply_filters('the_title', $post->post_title, $post->ID);
$string .= '</a>';
$format = str_replace('%', $string, $format);
Expand Down Expand Up @@ -185,6 +186,7 @@ function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat=

$string = '<a href="'.get_permalink($post->ID).'">'.$next;
if ( 'yes' == $title )
/** This filter is documented in wp-includes/post-template.php */
$string .= apply_filters('the_title', $post->post_title, $post->ID);
$string .= '</a>';
$format = str_replace('%', $string, $format);
Expand Down Expand Up @@ -1060,6 +1062,7 @@ function get_links_list($order = 'name') {
// Handle each category.

// Display the category name.
/** This filter is documented in wp-includes/bookmark-template.php */
echo ' <li id="linkcat-' . $cat->term_id . '" class="linkcat"><h2>' . apply_filters('link_category', $cat->name ) . "</h2>\n\t<ul>\n";
// Call get_links() with all the appropriate params.
get_links($cat->term_id, '<li>', "</li>", "\n", true, 'name', false);
Expand Down Expand Up @@ -2702,6 +2705,7 @@ function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $ex

$title = str_replace('%title', $post->post_title, $title);
$title = str_replace('%date', $date, $title);
/** This filter is documented in wp-includes/post-template.php */
$title = apply_filters('the_title', $title, $post->ID);

$link = $start ? "<link rel='start' title='" : "<link rel='end' title='";
Expand Down Expand Up @@ -2779,6 +2783,7 @@ function get_parent_post_rel_link( $title = '%title' ) {

$title = str_replace('%title', $post->post_title, $title);
$title = str_replace('%date', $date, $title);
/** This filter is documented in wp-includes/post-template.php */
$title = apply_filters('the_title', $title, $post->ID);

$link = "<link rel='up' title='";
Expand Down
3 changes: 2 additions & 1 deletion src/wp-includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2886,7 +2886,7 @@ function _wp_check_existing_file_names( $filename, $files ) {
* @since 2.0.0
*
* @param string $name Filename.
* @param null|string $deprecated Never used. Set to null.
* @param null|string $deprecated Not used. Set to null.
* @param string $bits File content
* @param string|null $time Optional. Time formatted in 'yyyy/mm'. Default null.
* @return array {
Expand Down Expand Up @@ -5853,6 +5853,7 @@ function _deprecated_file( $file, $version, $replacement = '', $message = '' ) {
wp_trigger_error( '', $message, E_USER_DEPRECATED );
}
}

/**
* Marks a function argument as deprecated and inform when it has been used.
*
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/ms-blogs.php
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ function update_archived( $id, $archived ) {
* @param int $blog_id Blog ID.
* @param string $pref Field name.
* @param string $value Field value.
* @param null $deprecated Not used.
* @param mixed $deprecated Not used.
* @return string|false $value
*/
function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) {
Expand Down
3 changes: 2 additions & 1 deletion src/wp-includes/ms-deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ function install_blog_defaults( $blog_id, $user_id ) {
* Previously used in core to mark a user as spam or "ham" (not spam) in Multisite.
*
* @since 3.0.0
* @since 3.0.2 Deprecated fourth argument.
* @deprecated 5.3.0 Use wp_update_user()
* @see wp_update_user()
*
Expand All @@ -703,7 +704,7 @@ function install_blog_defaults( $blog_id, $user_id ) {
* @param string $pref The column in the wp_users table to update the user's status
* in (presumably user_status, spam, or deleted).
* @param int $value The new status for the user.
* @param null $deprecated Deprecated as of 3.0.2 and should not be used.
* @param mixed $deprecated Not used.
* @return int The initially passed $value.
*/
function update_user_status( $id, $pref, $value, $deprecated = null ) {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/pluggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2263,7 +2263,7 @@ function wp_password_change_notification( $user ) {
* @since 4.6.0 The `$notify` parameter accepts 'user' for sending notification only to the user created.
*
* @param int $user_id User ID.
* @param null $deprecated Not used (argument deprecated).
* @param mixed $deprecated Not used.
* @param string $notify Optional. Type of notification that should happen. Accepts 'admin' or an empty
* string (admin only), 'user', or 'both' (admin and user). Default empty.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2294,7 +2294,7 @@ protected function prepare_links( $post ) {

// If we have a featured media, add that.
$featured_media = get_post_thumbnail_id( $post->ID );
if ( $featured_media ) {
if ( $featured_media && ( 'publish' === get_post_status( $featured_media ) || current_user_can( 'read_post', $featured_media ) ) ) {
$image_url = rest_url( rest_get_route_for_post( $featured_media ) );

$links['https://api.w.org/featuredmedia'] = array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ protected function get_revision( $id ) {
*
* @since 4.7.0
*
* @see WP_REST_Posts_Controller::get_items()
*
* @param WP_REST_Request $request Full details about the request.
* @return WP_REST_Response|WP_Error Response object on success, or WP_Error object on failure.
*/
Expand Down Expand Up @@ -297,7 +299,17 @@ public function get_items( $request ) {
$args['update_post_meta_cache'] = false;
}

/** This filter is documented in wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php */
/**
* Filters WP_Query arguments when querying revisions via the REST API.
*
* Serves the same purpose as the {@see 'rest_{$this->post_type}_query'} filter in
* WP_REST_Posts_Controller, but for the standalone WP_REST_Revisions_Controller.
*
* @since 5.0.0
*
* @param array $args Array of arguments for WP_Query.
* @param WP_REST_Request $request The REST API request.
*/
$args = apply_filters( 'rest_revision_query', $args, $request );
if ( ! is_array( $args ) ) {
$args = array();
Expand Down
Loading
Loading