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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -