首页 WordPress函数大全 activate_plugins()

activate_plugins()

2020-05-02 / 4412阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

activate_plugins( string|string[] $plugins, string $redirect = '', bool $network_wide = false, bool $silent = false )

激活多个插件。

描述

返回WP_Error时,并不意味着>

参数

$plugins

(string|string[])
(Required)
Single plugin or list of plugins to activate.

$redirect

(string)
(Optional)
Redirect to page after successful activation.

Default value: ''

$network_wide

(bool)
(Optional)
Whether to enable the plugin for all sites in the network.

Default value: false

$silent

(bool)
(Optional)
Prevent calling activation hooks.

Default value: false

返回

(bool|WP_Error) True when finished or WP_Error if there were errors during a plugin activation.

大家谈论
    我的见解