Wordpress核心中activate_plugin函数的说明

时间:2019-01-03 13:54:37

标签: wordpress hook

此功能在wordpress核心的plugin.php文件中。 我读了代码,却没有默默地知道它是做什么的。 谁能给这个功能一些解释?

1 个答案:

答案 0 :(得分:0)

所有插件都存储在SELECT AccNumber, SimpleLoanBal, (select sum(MonthlyCollection) from Trans group by AccNumber) as Mo FROM Trans 中的数组中。该数组包含每个活动插件的文件路径。

当我们要激活插件时,需要确定其路径,然后将该路径传递到active_plugins option

在使用activate_plugin($plugin_path)之前,我们需要包含plugin.php文件夹中的wp-admin/includes/文件。

例如

activate_plugin()

Reference link

Read the documentation