php - WORDPRESS: Call a plugin function from anotherplugin -


how can call function in plugin, plugin? function need call not in class

thanks

as function not inside class it's commonly accessible anywhere if plugin loads file on initial load.

wordpress loads plugins in ascending order (by name)

so need load plugin @ last allow plugins load entire code base , call function below

if(function_exists('needed_function')){   needed_function(); } 

otherwise include file.

include_once plugin_dir/that-plugin/file.php 

now call function


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -