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

php - Cannot override Laravel Spark authentication with own implementation -

What is happening when Matlab is starting a "parallel pool"? -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -