Docs: All sorts of improvements and corrections to function and hook docs.

See #57840


git-svn-id: https://develop.svn.wordpress.org/trunk@55694 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2023-04-27 23:13:36 +00:00
parent 65d27e4485
commit 991fa6bff2
12 changed files with 79 additions and 61 deletions

View File

@@ -825,6 +825,8 @@ function switch_theme( $stylesheet ) {
/**
* Fires after the theme is switched.
*
* See {@see 'after_switch_theme'}.
*
* @since 1.5.0
* @since 4.5.0 Introduced the `$old_theme` parameter.
*
@@ -3386,13 +3388,14 @@ function check_theme_switched() {
if ( $old_theme->exists() ) {
/**
* Fires on the first WP load after a theme switch if the old theme still exists.
* Fires on the next WP load after the theme has been switched.
*
* This action fires multiple times and the parameters differs
* according to the context, if the old theme exists or not.
* If the old theme is missing, the parameter will be the slug
* The parameters differ according to whether the old theme exists or not.
* If the old theme is missing, the old name will instead be the slug
* of the old theme.
*
* See {@see 'switch_theme'}.
*
* @since 3.3.0
*
* @param string $old_name Old theme name.