deactivate_plugin

動作鉤子
do_action( 'deactivate_plugin', $plugin, $network_deactivating )
引數
  • (string) $plugin Path to the plugin file relative to the plugins directory.
    Required:
  • (bool) $network_deactivating Whether the plugin is deactivated for all sites in the network or just the current site. Multisite only. Default false.
    Required:
定義位置
相關勾子
deactivate_pluginactivated_pluginactivate_plugindeactivate_blogactivate_blog
相關方法
deactivate_pluginsactivate_pluginactivate_pluginsdeactivate_sitewide_plugindeactivated_plugins_noticevalidate_active_plugins
引入
2.9.0
棄用
-

deactivate_plugin: 當一個外掛被停用時,這個動作鉤被觸發。它允許開發者在外掛停用時進行操作,如清理資料或禁用功能。

在一個外掛被停用之前觸發。

如果一個外掛被靜靜地停用(比如在更新期間),這個鉤子不會觸發。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'deactivate_plugin', $plugin, $network_deactivating );
do_action( 'deactivate_plugin', $plugin, $network_deactivating );
do_action( 'deactivate_plugin', $plugin, $network_deactivating );

常見問題

FAQs
檢視更多 >