General: Fix various instances of incorrect filter docs and incorrect filter and action parameters.

Props keesiemeijer for identifying the issues

See #38462

Built from https://develop.svn.wordpress.org/trunk@41219


git-svn-id: http://core.svn.wordpress.org/trunk@41059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2017-08-03 15:43:43 +00:00
parent 8e71c49a12
commit b140e8f574
9 changed files with 13 additions and 12 deletions

View File

@ -479,7 +479,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
*
* @param array $actions An array of action links.
* @param WP_Theme $theme The current WP_Theme object.
* @param string $context Status of the theme.
* @param string $context Status of the theme, one of all', 'enabled', or 'disabled'.
*/
$actions = apply_filters( 'theme_action_links', array_filter( $actions ), $theme, $context );
@ -495,7 +495,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
*
* @param array $actions An array of action links.
* @param WP_Theme $theme The current WP_Theme object.
* @param string $context Status of the theme.
* @param string $context Status of the theme, one of all', 'enabled', or 'disabled'.
*/
$actions = apply_filters( "theme_action_links_{$stylesheet}", $actions, $theme, $context );

View File

@ -1720,9 +1720,10 @@ class WP_Posts_List_Table extends WP_List_Table {
* @since 2.7.0
*
* @param string $column_name Name of the column to edit.
* @param string $post_type The post type slug.
* @param string $post_type The post type slug, or current screen name if this is a taxonomy list table.
* @param string taxonomy The taxonomy name, if any.
*/
do_action( 'quick_edit_custom_box', $column_name, $screen->post_type );
do_action( 'quick_edit_custom_box', $column_name, $screen->post_type, '' );
}
}

View File

@ -1522,7 +1522,7 @@ class WP_Press_This {
<?php
/** This action is documented in wp-admin/admin-footer.php */
do_action( 'admin_footer' );
do_action( 'admin_footer', '' );
/** This action is documented in wp-admin/admin-footer.php */
do_action( 'admin_print_footer_scripts-press-this.php' );

View File

@ -192,10 +192,10 @@ class WP_Themes_List_Table extends WP_List_Table {
. "' );" . '">' . __( 'Delete' ) . '</a>';
/** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */
$actions = apply_filters( 'theme_action_links', $actions, $theme );
$actions = apply_filters( 'theme_action_links', $actions, $theme, 'all' );
/** This filter is documented in wp-admin/includes/class-wp-ms-themes-list-table.php */
$actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme );
$actions = apply_filters( "theme_action_links_$stylesheet", $actions, $theme, 'all' );
$delete_action = isset( $actions['delete'] ) ? '<div class="delete-theme">' . $actions['delete'] . '</div>' : '';
unset( $actions['delete'] );

View File

@ -260,7 +260,7 @@ function wpmu_delete_user( $id ) {
clean_user_cache( $user );
/** This action is documented in wp-admin/includes/user.php */
do_action( 'deleted_user', $id );
do_action( 'deleted_user', $id, null );
return true;
}

View File

@ -1382,7 +1382,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
if ( ! empty( $schema['properties']['guid'] ) ) {
$data['guid'] = array(
/** This filter is documented in wp-includes/post-template.php */
'rendered' => apply_filters( 'get_the_guid', $post->guid ),
'rendered' => apply_filters( 'get_the_guid', $post->guid, $post->ID ),
'raw' => $post->guid,
);
}

View File

@ -369,7 +369,7 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller {
if ( ! empty( $schema['properties']['guid'] ) ) {
$data['guid'] = array(
/** This filter is documented in wp-includes/post-template.php */
'rendered' => apply_filters( 'get_the_guid', $post->guid ),
'rendered' => apply_filters( 'get_the_guid', $post->guid, $post->ID ),
'raw' => $post->guid,
);
}

View File

@ -2749,7 +2749,7 @@ function check_theme_switched() {
do_action( 'after_switch_theme', $old_theme->get( 'Name' ), $old_theme );
} else {
/** This action is documented in wp-includes/theme.php */
do_action( 'after_switch_theme', $stylesheet );
do_action( 'after_switch_theme', $stylesheet, $old_theme );
}
flush_rewrite_rules();

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41218';
$wp_version = '4.9-alpha-41219';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.