admin管理员组文章数量:1290941
I need to find whether any element of the so many Gutenberg- or Elementor-elements have been used in posts or pages.
Example: I want to deactivate an Elementor Addon Plugin, which creates accordeons I need to know where this Addon Plugin was used in posts or pages, if not I can deactivate / delete it, if yes I have to replace the output by other elements
Unfortunately I never saw something like a "used in"-list
Any ideas please? I would be happy!
I need to find whether any element of the so many Gutenberg- or Elementor-elements have been used in posts or pages.
Example: I want to deactivate an Elementor Addon Plugin, which creates accordeons I need to know where this Addon Plugin was used in posts or pages, if not I can deactivate / delete it, if yes I have to replace the output by other elements
Unfortunately I never saw something like a "used in"-list
Any ideas please? I would be happy!
Share Improve this question asked Jun 5, 2021 at 9:02 Cornelie Müller-GödeckeCornelie Müller-Gödecke 12 Answers
Reset to default 1You are looking for:
is_plugin_active( string $plugin )
This function takes a string parameter that is the representation of the path to the plugin relative path in the plugins directory.
So your practical implementation would look something like this:
<?php
if(is_plugin_active('elementor/elementor.php') || is_plugin_active('woocommerce/woocommerce.php')){
// Do something, remove scripts etc..
}
I would deactivate it, check if site its working properly, if so it can be deleted, if not its always possible to activate it again and everything returns to normal.
本文标签: block editorHow to find out whether a plugin is used in pages or posts
版权声明:本文标题:block editor - How to find out whether a plugin is used in pages or posts? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741517317a2382971.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论