Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
a7ec9c9
Build/Test Tools: Infer apply_filters() return types from hook docblo…
westonruter May 29, 2026
260254d
Bundled Themes: Add hook documentation references.
westonruter May 29, 2026
bd260a0
Docs: Document hook invocations in XML-RPC and the Abilities API.
westonruter May 29, 2026
8bc73ae
Build/Test Tools: Enforce hook documentation and resolve "documented …
westonruter May 29, 2026
a0ec688
Improve array documentation for wp_get_image_editor_output_format() a…
westonruter May 29, 2026
b77d903
Bundled Themes: Pass the post to the the_permalink filter.
westonruter May 30, 2026
dcfd548
Bundled Themes: Fix hook parameter documentation.
westonruter May 30, 2026
72e9acf
REST API: Pass the $is_update argument to the wp_creating_autosave ac…
westonruter May 30, 2026
b23f1d2
HTTP API: Pass the request URL to the https_local_ssl_verify filter.
westonruter May 30, 2026
753e502
Menus: Pass $menu_data to the wp_update_nav_menu action from auto-add…
westonruter May 30, 2026
d359a7f
Plugins: Pass $network_wide to the activate_{$plugin} action in error…
westonruter May 30, 2026
ea34b55
Build/Test Tools: Resolve file-scope @global docblocks in PHPStan.
westonruter May 30, 2026
413ba4c
Plugins: Pass $paged to the install_plugins_upload action.
westonruter May 30, 2026
c75eff1
Taxonomy: Pass $args to edit/edited term actions and the term_id_filter.
westonruter May 30, 2026
92a2767
Build/Test Tools: Add a PHPStan rule enforcing hook argument counts.
westonruter May 30, 2026
daaf47d
Networks and Sites: Pass the site ID to handle_network_bulk_actions o…
westonruter May 30, 2026
8765464
Comments, REST API: Stop passing an undocumented argument to the_cont…
westonruter May 30, 2026
faa7cf0
Add missing EOL at EOF
westonruter May 31, 2026
286ebd5
Build/Test Tools: Scope hook docblocks to the node that introduces them.
westonruter May 31, 2026
7799649
Apply fixes to minor issues identified by PhpStorm inspections
westonruter May 31, 2026
b0f6210
fixup! Plugins: Pass $network_wide to the activate_{$plugin} action i…
westonruter May 31, 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: 4 additions & 4 deletions src/wp-admin/includes/class-wp-automatic-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -1785,9 +1785,6 @@ protected function has_fatal_error() {
'Cache-Control' => 'no-cache',
);

/** This filter is documented in wp-includes/class-wp-http-streams.php */
$sslverify = apply_filters( 'https_local_ssl_verify', false );

// Include Basic auth in the loopback request.
if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) {
$headers['Authorization'] = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) );
Expand All @@ -1804,7 +1801,10 @@ protected function has_fatal_error() {
$needle_start = "###### wp_scraping_result_start:$scrape_key ######";
$needle_end = "###### wp_scraping_result_end:$scrape_key ######";
$url = add_query_arg( $scrape_params, home_url( '/' ) );
$response = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) );

/** This filter is documented in wp-includes/class-wp-http-streams.php */
$sslverify = apply_filters( 'https_local_ssl_verify', false, $url );
$response = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) );

if ( is_wp_error( $response ) ) {
if ( $is_debug ) {
Expand Down
13 changes: 7 additions & 6 deletions src/wp-admin/includes/class-wp-site-health.php
Original file line number Diff line number Diff line change
Expand Up @@ -2212,9 +2212,6 @@ public function get_test_rest_availability() {
'Cache-Control' => 'no-cache',
'X-WP-Nonce' => wp_create_nonce( 'wp_rest' ),
);
/** This filter is documented in wp-includes/class-wp-http-streams.php */
$sslverify = apply_filters( 'https_local_ssl_verify', false );

// Include Basic auth in loopback requests.
if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) {
$headers['Authorization'] = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) );
Expand All @@ -2230,6 +2227,9 @@ public function get_test_rest_availability() {
$url
);

/** This filter is documented in wp-includes/class-wp-http-streams.php */
$sslverify = apply_filters( 'https_local_ssl_verify', false, $url );

$r = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) );

if ( is_wp_error( $r ) ) {
Expand Down Expand Up @@ -3289,8 +3289,6 @@ public function can_perform_loopback() {
$headers = array(
'Cache-Control' => 'no-cache',
);
/** This filter is documented in wp-includes/class-wp-http-streams.php */
$sslverify = apply_filters( 'https_local_ssl_verify', false );

// Include Basic auth in loopback requests.
if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) {
Expand All @@ -3299,6 +3297,9 @@ public function can_perform_loopback() {

$url = site_url( 'wp-cron.php' );

/** This filter is documented in wp-includes/class-wp-http-streams.php */
$sslverify = apply_filters( 'https_local_ssl_verify', false, $url );

/*
* A post request is used for the wp-cron.php loopback test to cause the file
* to finish early without triggering cron jobs. This has two benefits:
Expand Down Expand Up @@ -3621,7 +3622,7 @@ public function get_page_cache_headers(): array {
private function check_for_page_caching() {

/** This filter is documented in wp-includes/class-wp-http-streams.php */
$sslverify = apply_filters( 'https_local_ssl_verify', false );
$sslverify = apply_filters( 'https_local_ssl_verify', false, home_url( '/' ) );

$headers = array();

Expand Down
9 changes: 5 additions & 4 deletions src/wp-admin/includes/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,9 +541,6 @@ function wp_edit_theme_plugin_file( $args ) {
'Cache-Control' => 'no-cache',
);

/** This filter is documented in wp-includes/class-wp-http-streams.php */
$sslverify = apply_filters( 'https_local_ssl_verify', false );

// Include Basic auth in loopback requests.
if ( isset( $_SERVER['PHP_AUTH_USER'] ) && isset( $_SERVER['PHP_AUTH_PW'] ) ) {
$headers['Authorization'] = 'Basic ' . base64_encode( wp_unslash( $_SERVER['PHP_AUTH_USER'] ) . ':' . wp_unslash( $_SERVER['PHP_AUTH_PW'] ) );
Expand Down Expand Up @@ -583,7 +580,11 @@ function wp_edit_theme_plugin_file( $args ) {
session_write_close();
}

$url = add_query_arg( $scrape_params, $url );
$url = add_query_arg( $scrape_params, $url );

/** This filter is documented in wp-includes/class-wp-http-streams.php */
$sslverify = apply_filters( 'https_local_ssl_verify', false, $url );

$r = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout', 'sslverify' ) );
$body = wp_remote_retrieve_body( $r );
$scrape_result_position = strpos( $body, $needle_start );
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/nav-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -1509,7 +1509,7 @@ function wp_nav_menu_update_menu_items( $nav_menu_selected_id, $nav_menu_selecte
wp_defer_term_counting( false );

/** This action is documented in wp-includes/nav-menu.php */
do_action( 'wp_update_nav_menu', $nav_menu_selected_id );
do_action( 'wp_update_nav_menu', $nav_menu_selected_id, array() );

/* translators: %s: Nav menu title. */
$message = sprintf( __( '%s has been updated.' ), '<strong>' . $nav_menu_selected_title . '</strong>' );
Expand Down
8 changes: 5 additions & 3 deletions src/wp-admin/includes/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,13 @@ function get_inline_data( $post ) {

$title = esc_textarea( trim( $post->post_title ) );

/** This filter is documented in wp-admin/edit-tag-form.php */
$editable_slug = apply_filters( 'editable_slug', $post->post_name, $post );

echo '
<div class="hidden" id="inline_' . $post->ID . '">
<div class="post_title">' . $title . '</div>' .
/** This filter is documented in wp-admin/edit-tag-form.php */
'<div class="post_name">' . apply_filters( 'editable_slug', $post->post_name, $post ) . '</div>
<div class="post_title">' . $title . '</div>
<div class="post_name">' . $editable_slug . '</div>
<div class="post_author">' . $post->post_author . '</div>
<div class="comment_status">' . esc_html( $post->comment_status ) . '</div>
<div class="ping_status">' . esc_html( $post->ping_status ) . '</div>
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/network/themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
check_admin_referer( 'bulk-themes' );

/** This action is documented in wp-admin/network/site-themes.php */
$referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
$referer = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $referer, $action, $themes, 0 ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, but I don't think a separate three-argument variant is feasible here. handle_network_bulk_actions-{$screen} is a single dynamic hook with one canonical docblock (in wp-admin/network/site-themes.php), and a callback registered with accepted_args = 4 runs on every screen that fires it. If this screen fired only three arguments, such a callback would receive null/error for the fourth — exactly the ArgumentCountError/TypeError risk this rule is meant to catch. So all call sites need to pass the documented four arguments.

Since a network-wide screen has no single-site context, 0 is the appropriate value: it's the same "no specific site" sentinel that site-themes.php itself falls back to ($id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0), so four-argument callbacks already see 0 there in the no-site case. Keeping 0.

(Reply from Claude, acting on behalf of @westonruter.)


wp_safe_redirect( $referer );
exit;
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/network/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
$user_ids = (array) $_POST['allusers'];

/** This action is documented in wp-admin/network/site-themes.php */
$sendback = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $user_ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
$sendback = apply_filters( 'handle_network_bulk_actions-' . get_current_screen()->id, $sendback, $doaction, $user_ids, 0 ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reasoning as the Network Themes screen above: this is the same single dynamic hook (handle_network_bulk_actions-{$screen}) with one shared canonical docblock, so every site that fires it must pass the documented four arguments, otherwise a callback registered with accepted_args = 4 breaks. This network-wide users screen has no single-site context, so it passes 0 — the "no specific site" sentinel also used by site-themes.php when no id is present. Keeping 0.

(Reply from Claude, acting on behalf of @westonruter.)


wp_safe_redirect( $sendback );
exit;
Expand Down
11 changes: 10 additions & 1 deletion src/wp-admin/plugin-install.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@

$wp_list_table->prepare_items();

/**
* WP_Plugin_Install_List_Table::prepare_items() populates these globals, which
* are used throughout the rest of this file.
*
* @global string $tab The current tab of the Install Plugins screen.
* @global int $paged The current page number of the plugins list.
*/
global $tab, $paged;

$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );

if ( $pagenum > $total_pages && $total_pages > 0 ) {
Expand Down Expand Up @@ -169,7 +178,7 @@
<div class="upload-plugin-wrap">
<?php
/** This action is documented in wp-admin/plugin-install.php */
do_action( 'install_plugins_upload' );
do_action( 'install_plugins_upload', $paged );
?>
</div>
<?php
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
// Go back to "sandbox" scope so we get the same errors as before.
plugin_sandbox_scrape( $plugin );
/** This action is documented in wp-admin/includes/plugin.php */
do_action( "activate_{$plugin}" );
do_action( "activate_{$plugin}", is_network_admin() );
exit;

case 'deactivate':
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentyeleven/author.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
*
* @since Twenty Eleven 1.0
*
* @param int The height and width avatar dimension in pixels. Default 60.
* @param int $size The height and width avatar dimension in pixels. Default 60.
*/
$author_bio_avatar_size = apply_filters( 'twentyeleven_author_bio_avatar_size', 60 );
echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentyeleven/content-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*
* @since Twenty Eleven 1.0
*
* @param int The height and width avatar dimensions in pixels. Default 65.
* @param int $size The height and width avatar dimensions in pixels. Default 65.
*/
echo get_avatar( get_the_author_meta( 'ID' ), apply_filters( 'twentyeleven_status_avatar', 65 ) );
?>
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentyeleven/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ function twentyeleven_get_first_url() {
}

/** This filter is documented in wp-includes/link-template.php */
return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() );
return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink(), get_post() );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentyeleven/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
*
* @since Twenty Eleven 1.0
*
* @param int The width for the image attachment size in pixels. Default 848.
* @param int $size The width for the image attachment size in pixels. Default 848.
*/
$attachment_size = apply_filters( 'twentyeleven_attachment_size', 848 );
echo wp_get_attachment_image( $post->ID, array( $attachment_size, 1024 ) );
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentyeleven/inc/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function widget( $args, $instance ) {

ob_start();

/** This filter is documented in wp-includes/default-widgets.php */
/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
$args['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base );

if ( ! isset( $instance['number'] ) ) {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentyeleven/tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* @since Twenty Eleven 1.0
*
* @param string The default tag description.
* @param string $tag_archive_meta The default tag description.
*/
echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' );
}
Expand Down
3 changes: 2 additions & 1 deletion src/wp-content/themes/twentyfifteen/inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ function twentyfifteen_post_thumbnail() {
function twentyfifteen_get_link_url() {
$has_url = get_url_in_content( get_the_content() );

return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() );
/** This filter is documented in wp-includes/link-template.php */
return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink(), get_post() );
}
endif;

Expand Down
3 changes: 2 additions & 1 deletion src/wp-content/themes/twentyfourteen/inc/widgets.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ public function widget( $args, $instance ) {

$number = ! empty( $instance['number'] ) ? absint( $instance['number'] ) : 2;
$title = ! empty( $instance['title'] ) ? $instance['title'] : $format_string;
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );

$ephemera = new WP_Query(
array(
Expand Down
4 changes: 2 additions & 2 deletions src/wp-content/themes/twentyten/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ function twentyten_setup() {
*
* @since Twenty Ten 1.0
*
* @param int The default header image width in pixels. Default 940.
* @param int $width The default header image width in pixels. Default 940.
*/
'width' => apply_filters( 'twentyten_header_image_width', 940 ),
/**
* Filters the Twenty Ten default header image height.
*
* @since Twenty Ten 1.0
*
* @param int The default header image height in pixels. Default 198.
* @param int $height The default header image height in pixels. Default 198.
*/
'height' => apply_filters( 'twentyten_header_image_height', 198 ),
// Support flexible heights.
Expand Down
3 changes: 2 additions & 1 deletion src/wp-content/themes/twentythirteen/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,8 @@ function twentythirteen_get_link_url() {
$content = get_the_content();
$has_url = get_url_in_content( $content );

return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() );
/** This filter is documented in wp-includes/link-template.php */
return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink(), get_post() );
}

if ( ! function_exists( 'twentythirteen_excerpt_more' ) && ! is_admin() ) :
Expand Down
2 changes: 1 addition & 1 deletion src/wp-content/themes/twentytwentyone/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ function twentytwentyone_the_html_classes() {
*
* @since Twenty Twenty-One 1.0
*
* @param string The list of classes. Default empty string.
* @param string $classes The list of classes. Default empty string.
*/
$classes = apply_filters( 'twentytwentyone_html_classes', '' );
if ( ! $classes ) {
Expand Down
5 changes: 3 additions & 2 deletions src/wp-includes/abilities-api/class-wp-ability.php
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,8 @@ public function execute( $input = null ) {
*/
do_action( 'wp_ability_invoked', $this->name, $input, $this );

$pre_execute_sentinel = new WP_Filter_Sentinel();

/**
* Filters whether to short-circuit ability execution.
*
Expand All @@ -769,8 +771,7 @@ public function execute( $input = null ) {
* @param mixed $input The raw input passed to `execute()`.
* @param WP_Ability $ability The ability instance.
*/
$pre_execute_sentinel = new WP_Filter_Sentinel();
$pre = apply_filters( 'wp_pre_execute_ability', $pre_execute_sentinel, $this->name, $input, $this );
$pre = apply_filters( 'wp_pre_execute_ability', $pre_execute_sentinel, $this->name, $input, $this );
if ( $pre !== $pre_execute_sentinel ) {
return $pre;
}
Expand Down
6 changes: 4 additions & 2 deletions src/wp-includes/class-wp-xmlrpc-server.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,11 @@ private function set_is_enabled() {
* Respect old get_option() filters left for back-compat when the 'enable_xmlrpc'
* option was deprecated in 3.5.0. Use the {@see 'xmlrpc_enabled'} hook instead.
*/
$is_enabled = apply_filters( 'pre_option_enable_xmlrpc', false );
/** This filter is documented in wp-includes/option.php */
$is_enabled = apply_filters( 'pre_option_enable_xmlrpc', false, 'enable_xmlrpc', false );
if ( false === $is_enabled ) {
$is_enabled = apply_filters( 'option_enable_xmlrpc', true );
/** This filter is documented in wp-includes/option.php */
$is_enabled = apply_filters( 'option_enable_xmlrpc', true, 'enable_xmlrpc' );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/wp-includes/comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -3111,7 +3111,7 @@ function do_trackbacks( $post ) {

if ( empty( $post->post_excerpt ) ) {
/** This filter is documented in wp-includes/post-template.php */
$excerpt = apply_filters( 'the_content', $post->post_content, $post->ID );
$excerpt = apply_filters( 'the_content', $post->post_content );
} else {
/** This filter is documented in wp-includes/post-template.php */
$excerpt = apply_filters( 'the_excerpt', $post->post_excerpt );
Expand Down
6 changes: 4 additions & 2 deletions src/wp-includes/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,8 @@ function spawn_cron( $gmt_time = 0 ) {
$doing_wp_cron = sprintf( '%.22F', $gmt_time );
set_transient( 'doing_cron', $doing_wp_cron );

$cron_url = add_query_arg( 'doing_wp_cron', $doing_wp_cron, site_url( 'wp-cron.php' ) );

/**
* Filters the cron request arguments.
*
Expand All @@ -982,13 +984,13 @@ function spawn_cron( $gmt_time = 0 ) {
$cron_request = apply_filters(
'cron_request',
array(
'url' => add_query_arg( 'doing_wp_cron', $doing_wp_cron, site_url( 'wp-cron.php' ) ),
'url' => $cron_url,
'key' => $doing_wp_cron,
'args' => array(
'timeout' => 0.01,
'blocking' => false,
/** This filter is documented in wp-includes/class-wp-http-streams.php */
'sslverify' => apply_filters( 'https_local_ssl_verify', false ),
'sslverify' => apply_filters( 'https_local_ssl_verify', false, $cron_url ),
),
),
$doing_wp_cron
Expand Down
14 changes: 5 additions & 9 deletions src/wp-includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -6413,7 +6413,7 @@ function wp_high_priority_element_flag( $value = null ): bool {
*
* @param string $filename Path to the image.
* @param string $mime_type The source image mime type.
* @return string[] An array of mime type mappings.
* @return array<string, string> An array of mime type mappings.
*/
function wp_get_image_editor_output_format( $filename, $mime_type ) {
$output_format = array(
Expand All @@ -6435,14 +6435,10 @@ function wp_get_image_editor_output_format( $filename, $mime_type ) {
* @since 6.7.0 The default was changed from an empty array to an array
* containing the HEIC/HEIF images mime types.
*
* @param string[] $output_format {
* An array of mime type mappings. Maps a source mime type to a new
* destination mime type. By default maps HEIC/HEIF input to JPEG output.
*
* @type string ...$0 The new mime type.
* }
* @param string $filename Path to the image.
* @param string $mime_type The source image mime type.
* @param array<string, string> $output_format An array of mime type mappings. Maps a source mime type to a new
* destination mime type. By default maps HEIC/HEIF input to JPEG output.
* @param string $filename Path to the image.
* @param string $mime_type The source image mime type.
*/
return apply_filters( 'image_editor_output_format', $output_format, $filename, $mime_type );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public function create_post_autosave( $post_data, array $meta = array() ) {
$new_autosave['post_author'] = $user_id;

/** This action is documented in wp-admin/includes/post.php */
do_action( 'wp_creating_autosave', $new_autosave );
do_action( 'wp_creating_autosave', $new_autosave, true );

// wp_update_post() expects escaped array.
$revision_id = wp_update_post( wp_slash( $new_autosave ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ protected function handle_auto_add( $menu_id, $request ) {
$update = update_option( 'nav_menu_options', $nav_menu_option );

/** This action is documented in wp-includes/nav-menu.php */
do_action( 'wp_update_nav_menu', $menu_id );
do_action( 'wp_update_nav_menu', $menu_id, array() );

return $update;
}
Expand Down
Loading
Loading