admin_url('customize.php?autofocus[panel]=widgets'), 'optimwidgt' => __( 'aazeen Widgets', 'aazeen-extension' ), 'othrimwidgt' => __( 'Other Widgets', 'aazeen-extension' ), ) ); } add_action( 'customize_controls_enqueue_scripts', 'aazeen_extension_enqueue_customizer_scripts' ); /** * Checks whether woocommerce is active or not * * @return boolean */ function aazeen_extension_is_woocommerce_active() { if (class_exists('woocommerce')) { return true; } else { return false; } } /** * Checks whether siteorigin pagebuilder is active or not * * @return boolean */ if ( ! function_exists( 'is_plugin_active' ) ) { include_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // Require plugin.php to use is_plugin_active() below } // check aazeen theme active or not $theme_data = wp_get_theme(); $is_child = is_child_aazeen_ex( $theme_data ); function is_child_aazeen_ex( $theme_data ) { // For limitation of empty() write in var $parent = $theme_data->parent(); if ( ! empty( $parent ) ) { return TRUE; } return FALSE; } if ( $is_child ) { $current_theme_name = $theme_data->parent()->Name; } else { $current_theme = wp_get_theme(); $current_theme_name = $current_theme->Name; } if($current_theme_name == 'Aazeen' || $current_theme_name == 'Aazeen Pro'){ // widgtes require $AAZEEN_EXTEN_dir . 'inc/widget-clients.php'; require $AAZEEN_EXTEN_dir . 'inc/widget-service.php'; require $AAZEEN_EXTEN_dir . 'inc/widget-team.php'; require $AAZEEN_EXTEN_dir . 'inc/widget-contact.php'; require $AAZEEN_EXTEN_dir . 'inc/widget-feature.php'; require $AAZEEN_EXTEN_dir . 'inc/latest-posts-carousel.php'; require $AAZEEN_EXTEN_dir . 'inc/latest-posts-masonry.php'; if($current_theme_name == 'Aazeen' ){ require $AAZEEN_EXTEN_dir . 'inc/widget-slider.php'; } elseif ($current_theme_name == 'Aazeen Pro') { require $AAZEEN_EXTEN_dir . 'inc/widget-slider-pro.php'; require $AAZEEN_EXTEN_dir . 'inc/widget-service-syone.php'; } require $AAZEEN_EXTEN_dir . 'inc/widget-callout.php'; if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { require $AAZEEN_EXTEN_dir . 'inc/product-carousel.php'; } } if ( is_plugin_active( 'siteorigin-panels/siteorigin-panels.php' ) ) { // siteorigin panel if($current_theme_name == 'Aazeen' ){ require $AAZEEN_EXTEN_dir . 'siteorigin.php'; } elseif ($current_theme_name == 'Aazeen Pro') { require $AAZEEN_EXTEN_dir . 'siteorigin-pro.php'; } } // extensions-functions require_once 'extensions-functions.php'; // $meta_boxes require_once 'meta-box/meta-box.php'; // TGM-Plugin-Activation require_once 'tgm-activation.php'; // demos if($current_theme_name == 'Aazeen' ){ require_once 'function-demo.php'; }elseif ($current_theme_name == 'Aazeen Pro') { require_once 'function-demo-pro.php'; } require_once 'fontawesome.php'; require_once 'inc/default.php'; if ( !is_plugin_active( 'one-click-demo-import/one-click-demo-import.php' ) ) { // one click demo require_once 'one-click-demo-import/one-click-demo-import.php'; }