Inventory_Presser_Plugin::load_integrations()
Add hooks that power our integrations with other plugins.
Return Return
(void)
Source Source
File: inventory-presser.php
public function load_integrations() {
static $active_plugins = array();
if ( empty( $active_plugins ) ) {
$active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins' ) );
}
if ( ! function_exists( 'is_plugin_active_for_network' ) ) {
include_once ABSPATH . '/wp-admin/includes/plugin.php';
}
// WP All Import.
$plugin_path = 'wp-all-import-pro/wp-all-import-pro.php';
if ( in_array( $plugin_path, $active_plugins, true )
|| is_plugin_active_for_network( $plugin_path ) ) {
$wp_all_import = new Inventory_Presser_WP_All_Import();
$wp_all_import->add_hooks();
}
// Contact Form 7.
$plugin_path = 'contact-form-7/wp-contact-form-7.php';
if ( class_exists( 'Inventory_Presser_Contact_Form_7' )
&& ( in_array( $plugin_path, $active_plugins, true )
|| is_plugin_active_for_network( $plugin_path ) ) ) {
$contact_form_7 = new Inventory_Presser_Contact_Form_7();
$contact_form_7->add_hooks();
}
// WPForms Lite.
$plugin_path = 'wpforms-lite/wpforms.php';
if ( in_array( $plugin_path, $active_plugins, true )
|| is_plugin_active_for_network( $plugin_path ) ) {
$forms = new Inventory_Presser_WPForms();
$forms->add_hooks();
}
// Classic Editor.
$plugin_path = 'classic-editor/classic-editor.php';
if ( in_array( $plugin_path, $active_plugins, true )
|| is_plugin_active_for_network( $plugin_path ) ) {
$classic_editor = new Inventory_Presser_Classic_Editor();
$classic_editor->add_hooks();
}
// Avada Builder.
$plugin_path = 'fusion-builder/fusion-builder.php';
if ( in_array( $plugin_path, $active_plugins, true )
|| is_plugin_active_for_network( $plugin_path ) ) {
$avada = new Inventory_Presser_Avada();
$avada->add_hooks();
}
// Divi.
$divi = new Inventory_Presser_Divi();
$divi->add_hooks();
// Gravity Forms.
$plugin_path = 'gravityforms/gravityforms.php';
if ( ( in_array( $plugin_path, $active_plugins, true )
|| is_plugin_active_for_network( $plugin_path ) )
&& class_exists( 'GF_Fields' ) ) {
GF_Fields::register( new GF_Field_Vehicle() );
}
}
Expand full source codeCollapse full source codeView on Github