Docs: In various @return tags, list the expected type first, instead of WP_Error.

See #48303.

git-svn-id: https://develop.svn.wordpress.org/trunk@46696 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2019-11-11 02:41:15 +00:00
parent 63a534030e
commit cde71eed52
28 changed files with 81 additions and 78 deletions

View File

@@ -613,7 +613,7 @@ function is_network_only_plugin( $plugin ) {
* @param bool $network_wide Optional. Whether to enable the plugin for all sites in the network
* or just the current site. Multisite only. Default false.
* @param bool $silent Optional. Whether to prevent calling activation hooks. Default false.
* @return WP_Error|null WP_Error on invalid file or null on success.
* @return null|WP_Error WP_Error on invalid file or null on success.
*/
function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silent = false ) {
$plugin = plugin_basename( trim( $plugin ) );
@@ -1071,7 +1071,7 @@ function validate_active_plugins() {
* @since 2.5.0
*
* @param string $plugin Path to the plugin file relative to the plugins directory.
* @return WP_Error|int 0 on success, WP_Error on failure.
* @return int|WP_Error 0 on success, WP_Error on failure.
*/
function validate_plugin( $plugin ) {
if ( validate_file( $plugin ) ) {