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
Post a Comment