Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有什么方法可以在wordpress codex中获取所有激活的插件列表。
我用这个
get_option('active_plugins');
这将返回插件文件路径。我要名字。因为有时文件名与实际插件名不同。
我得到了答案
$apl=get_option('active_plugins'); $plugins=get_plugins(); $activated_plugins=array(); foreach ($apl as $p){ if(isset($plugins[$p])){ array_push($activated_plugins, $plugins[$p]); } } //This is the $activated_plugins information