Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PluginA {
- public function func_a() {
- // do stuff
- }
- }
- class PluginB {
- function functB() {
- if (class_exists('PluginA')) {
- //do stuff that depends of PluginA
- }
- }
- }
- add_action('plugins_loaded', 'call_plugin_a_using_plugin_b');
- function call_plugin_a_using_plugin_b() {
- PluginB::functB();
- }
- function from_plugin_alpha( some_thing ) {
- // do stuff
- }
- function from_plugin_bravo() {
- if ( !function_exists( 'from_plugin_alpha' ) ) {
- return;
- }
- from_plugin_alpha( some_thing );
- }
Add Comment
Please, Sign In to add comment