| 1 |
<?php |
| 2 |
defined('ABSPATH') or die('No direct access permitted'); |
| 3 |
|
| 4 |
// probably load this after all plugins are loaded. |
| 5 |
class maxIntegrations |
| 6 |
{ |
| 7 |
|
| 8 |
|
| 9 |
static function init() |
| 10 |
{ |
| 11 |
// check and init after plugin loaded. |
| 12 |
add_action('plugins_loaded', array('maxIntegrations', 'load_integrations'), 999); |
| 13 |
|
| 14 |
// integrations that fire right now, like ones that are based on actions and filters. |
| 15 |
// This are the ones that also can't crash the plugin, since it's hook based - no hook - no call. |
| 16 |
self::doDirectInit(); |
| 17 |
|
| 18 |
//remove_action( 'wp_ajax_fusion_pallete_elements', array( $instance,'get_pallete_elements') ); |
| 19 |
} |
| 20 |
|
| 21 |
|
| 22 |
static function load_integrations() |
| 23 |
{ |
| 24 |
|
| 25 |
} |
| 26 |
|
| 27 |
static function doDirectInit() |
| 28 |
{ |
| 29 |
$integration_path = MB()->get_plugin_path() . 'assets/integrations/'; |
| 30 |
require_once( $integration_path . "siteorigins_builder/sitebuilder.php"); |
| 31 |
require_once( $integration_path . "shortcake/shortcake.php"); |
| 32 |
|
| 33 |
do_action('maxbutton-direct-integrations'); |
| 34 |
|
| 35 |
} |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
} // class |
| 41 |
|