function __construct()
 {
     $this->assets_js = plugin_dir_path(__FILE__) . 'js/';
     $this->assets_css = plugin_dir_path(__FILE__) . 'css/';
     $this->assets_dir = plugin_dir_path(__FILE__) . 'assets/';
     $this->classes_dir = plugin_dir_path(__FILE__) . 'classes/';
     $this->elements_dir = plugin_dir_path(__FILE__) . 'elements/';
     $this->shortcode_dir = plugin_dir_path(__FILE__) . 'shortcodes/';
     $this->plugins_dir = plugin_dir_path(__FILE__) . 'plugins/';
     $this->woocommerce_dir = plugin_dir_path(__FILE__) . 'woocommerce/';
     $this->bbpress_dir = plugin_dir_path(__FILE__) . 'bbpress/';
     $this->posttypes_dir = plugin_dir_path(__FILE__) . 'posttypes/';
     $this->images_dir = plugin_dir_path(__FILE__) . 'images/';
     $this->icons_dir = plugin_dir_path(__FILE__) . 'icons/';
     $this->detector_dir = plugin_dir_path(__FILE__) . 'detector/';
     $this->parameters_dir = plugin_dir_path(__FILE__) . 'parameters/';
     $this->TS_VCSC_PluginSlug = plugin_basename(__FILE__);
     $this->TS_VCSC_PluginPath = plugin_dir_url(__FILE__);
     $this->TS_VCSC_PluginDir = plugin_dir_path(__FILE__);
     // Check and Store VC Version, Applicable Post Types and Icon Picker
     // -----------------------------------------------------------------
     if (function_exists('vc_editor_post_types')) {
         $this->TS_VCSC_VisualComposer_Posts = vc_editor_post_types();
     }
     if (defined('WPB_VC_VERSION')) {
         $this->TS_VCSC_VisualComposer_Version = WPB_VC_VERSION;
         if (TS_VCSC_VersionCompare(WPB_VC_VERSION, '4.3.0') >= 0) {
             if (get_option('ts_vcsc_extend_settings_backendPreview', 1) == 1) {
                 $this->TS_VCSC_EditorLivePreview = "true";
             } else {
                 $this->TS_VCSC_EditorLivePreview = "false";
             }
         } else {
             $this->TS_VCSC_EditorLivePreview = "false";
         }
         if (TS_VCSC_VersionCompare(WPB_VC_VERSION, '4.4.0') >= 0) {
             $this->TS_VCSC_EditorIconFontsInternal = "true";
             $this->TS_VCSC_VisualComposer_Compliant = "true";
             $this->TS_VCSC_EditorFullWidthInternal = "true";
         } else {
             $this->TS_VCSC_EditorIconFontsInternal = "false";
             $this->TS_VCSC_VisualComposer_Compliant = "false";
             $this->TS_VCSC_EditorFullWidthInternal = "false";
         }
     } else {
         $this->TS_VCSC_EditorLivePreview = "false";
         $this->TS_VCSC_EditorIconFontsInternal = "false";
         $this->TS_VCSC_VisualComposer_Compliant = "false";
         $this->TS_VCSC_EditorFullWidthInternal = "false";
     }
     // Check and Set other Global Variables
     // ------------------------------------
     // Check if All Files should be loaded
     if (get_option('ts_vcsc_extend_settings_loadForcable', 0) == 0) {
         $this->TS_VCSC_LoadFrontEndForcable = "false";
     } else {
         $this->TS_VCSC_LoadFrontEndForcable = "true";
     }
     // Check if Waypoints should be loaded
     if (get_option('ts_vcsc_extend_settings_loadWaypoints', 1) == 1) {
         $this->TS_VCSC_LoadFrontEndWaypoints = "true";
     } else {
         $this->TS_VCSC_LoadFrontEndWaypoints = "false";
     }
     // Check if Modernizr should be loaded
     if (get_option('ts_vcsc_extend_settings_loadModernizr', 1) == 1) {
         $this->TS_VCSC_LoadFrontEndModernizr = "true";
     } else {
         $this->TS_VCSC_LoadFrontEndModernizr = "false";
     }
     // Check if CountTo should be loaded
     if (get_option('ts_vcsc_extend_settings_loadCountTo', 1) == 1) {
         $this->TS_VCSC_LoadFrontEndCountTo = "true";
     } else {
         $this->TS_VCSC_LoadFrontEndCountTo = "false";
     }
     // Check if CountUp should be loaded
     if (get_option('ts_vcsc_extend_settings_loadCountUp', 1) == 1) {
         $this->TS_VCSC_LoadFrontEndCountUp = "true";
     } else {
         $this->TS_VCSC_LoadFrontEndCountUp = "false";
     }
     // Check if Lightbox should be loaded
     if (get_option('ts_vcsc_extend_settings_loadLightbox', 0) == 1) {
         $this->TS_VCSC_LoadFrontEndLightbox = "true";
     } else {
         $this->TS_VCSC_LoadFrontEndLightbox = "false";
     }
     // Check if Tooltips should be loaded
     if (get_option('ts_vcsc_extend_settings_loadTooltip', 0) == 1) {
         $this->TS_VCSC_LoadFrontEndTooltips = "true";
     } else {
         $this->TS_VCSC_LoadFrontEndTooltips = "false";
     }
     // Check if ForceLoad of jQuery
     if (get_option('ts_vcsc_extend_settings_loadjQuery', 0) == 1) {
         $this->TS_VCSC_LoadFrontEndJQuery = "true";
     } else {
         $this->TS_VCSC_LoadFrontEndJQuery = "false";
     }
     // Check for Editor Image Preview
     if (get_option('ts_vcsc_extend_settings_previewImages', 1) == 1) {
         $this->TS_VCSC_EditorImagePreview = "true";
     } else {
         $this->TS_VCSC_EditorImagePreview = "false";
     }
     // Check for Background Indicator
     if (get_option('ts_vcsc_extend_settings_backgroundIndicator', 1) == 1) {
         $this->TS_VCSC_EditorBackgroundIndicator = "true";
     } else {
         $this->TS_VCSC_EditorBackgroundIndicator = "false";
     }
     // Check for Visual Icon Selector
     if (get_option('ts_vcsc_extend_settings_visualSelector', 1) == 1) {
         $this->TS_VCSC_EditorVisualSelector = "true";
     } else {
         $this->TS_VCSC_EditorVisualSelector = "false";
     }
     // Check for Native Icon Selector
     if (get_option('ts_vcsc_extend_settings_nativeSelector', 1) == 1) {
         $this->TS_VCSC_EditorNativeSelector = "true";
     } else {
         $this->TS_VCSC_EditorNativeSelector = "false";
     }
     // Check for Built-In Lightbox
     if (get_option('ts_vcsc_extend_settings_builtinLightbox', 1) == 1) {
         $this->TS_VCSC_UseInternalLightbox = "true";
     } else {
         $this->TS_VCSC_UseInternalLightbox = "false";
     }
     // Load Public Arrays that Define Element Settings
     // -----------------------------------------------
     require_once $this->assets_dir . 'ts_vcsc_arrays_public.php';
     // Load Arrays of Other Selection Items and Variables
     // --------------------------------------------------
     require_once $this->assets_dir . 'ts_vcsc_arrays_other.php';
     $this->TS_VCSC_PluginIsMultiSiteActive = is_plugin_active_for_network('ts-visual-composer-extend/ts-visual-composer-extend.php') == true ? "true" : "false";
     //ksort($this->TS_VCSC_Visual_Composer_Elements);
     // Status of WooCommerce Elements
     // ------------------------------
     if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
         $this->TS_VCSC_WooCommerceVersion = $this->TS_VCSC_WooCommerceVersion();
         $this->TS_VCSC_WooCommerceActive = "true";
         if (defined('WPB_VC_VERSION')) {
             if (TS_VCSC_VersionCompare(WPB_VC_VERSION, '4.4.0') >= 0) {
                 $this->TS_VCSC_WooCommerceRemove = "true";
             } else {
                 $this->TS_VCSC_WooCommerceRemove = "false";
             }
         } else {
             $this->TS_VCSC_WooCommerceRemove = "false";
         }
     } else {
         $this->TS_VCSC_WooCommerceVersion = "";
         $this->TS_VCSC_WooCommerceActive = "false";
         $this->TS_VCSC_WooCommerceRemove = "false";
     }
     // Status of bbPress Elements
     // --------------------------
     if (in_array('bbpress/bbpress.php', apply_filters('active_plugins', get_option('active_plugins')))) {
         $this->TS_VCSC_bbPressVersion = "";
         $this->TS_VCSC_bbPressActive = "true";
     } else {
         $this->TS_VCSC_bbPressVersion = "";
         $this->TS_VCSC_bbPressActive = "false";
     }
     // Check for Standalone Iconicum Plugin
     // ------------------------------------
     if (in_array('ts-iconicum-icon-fonts/ts-iconicum-icon-fonts.php', apply_filters('active_plugins', get_option('active_plugins'))) || class_exists('ICONICUM_ICON_FONTS')) {
         $this->TS_VCSC_IconicumStandard = "true";
     } else {
         $this->TS_VCSC_IconicumStandard = "false";
     }
     // Load Icon Shortcode Generator
     // -----------------------------
     if ($this->TS_VCSC_PluginIsMultiSiteActive == "true") {
         if (get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_iconicum', 1) == 1 && get_option('ts_vcsc_extend_settings_useIconGenerator', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_useIconGenerator', 0) == 1 && get_site_option('ts_vcsc_extend_settings_demo', 1) == 0) {
             $this->TS_VCSC_IconicumActivated = "true";
         } else {
             $this->TS_VCSC_IconicumActivated = "false";
         }
     } else {
         if (get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_iconicum', 1) == 1 && get_option('ts_vcsc_extend_settings_useIconGenerator', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_useIconGenerator', 0) == 1 && get_option('ts_vcsc_extend_settings_demo', 1) == 0) {
             $this->TS_VCSC_IconicumActivated = "true";
         } else {
             $this->TS_VCSC_IconicumActivated = "false";
         }
     }
     if ($this->TS_VCSC_IconicumStandard == "false") {
         if ($this->TS_VCSC_IconicumActivated == "true") {
             require_once $this->assets_dir . 'ts_vcsc_editor_button.php';
         }
     }
     // Load and Initialize the Auto-Update Class
     // -----------------------------------------
     if ($this->TS_VCSC_PluginIsMultiSiteActive == "true") {
         if (get_site_option('ts_vcsc_extend_settings_demo', 1) == 0 && get_option('ts_vcsc_extend_settings_extended', 0) == 0 && strpos(get_site_option('ts_vcsc_extend_settings_licenseInfo', ''), get_site_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE) {
             add_action('admin_init', array($this, 'TS_VCSC_ActivateAutoUpdate'));
         }
     } else {
         if (get_option('ts_vcsc_extend_settings_demo', 1) == 0 && get_option('ts_vcsc_extend_settings_extended', 0) == 0 && strpos(get_option('ts_vcsc_extend_settings_licenseInfo', ''), get_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE) {
             add_action('admin_init', array($this, 'TS_VCSC_ActivateAutoUpdate'));
         }
     }
     // Load Arrays of Font Settings
     // ----------------------------
     add_action('init', array($this, 'TS_VCSC_IconFontArrays'), 1);
     // Load Language / Translation Files
     // ---------------------------------
     if (get_option('ts_vcsc_extend_settings_translationsDomain', 1) == 1) {
         add_action('init', array($this, 'TS_VCSC_LoadTextDomains'), 9);
     }
     $plugin = plugin_basename(__FILE__);
     add_filter("plugin_action_links_{$plugin}", array($this, "TS_VCSC_PluginAddSettingsLink"));
     if ($this->TS_VCSC_PluginIsMultiSiteActive == "true") {
         if (get_site_option('ts_vcsc_extend_settings_licenseValid', 0) == 1 && strpos(get_site_option('ts_vcsc_extend_settings_licenseInfo', ''), get_site_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE || get_option('ts_vcsc_extend_settings_extended', 0) == 1) {
             update_site_option('ts_vcsc_extend_settings_demo', 0);
         } else {
             update_site_option('ts_vcsc_extend_settings_demo', 1);
         }
     } else {
         if (get_option('ts_vcsc_extend_settings_licenseValid', 0) == 1 && strpos(get_option('ts_vcsc_extend_settings_licenseInfo', ''), get_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE || get_option('ts_vcsc_extend_settings_extended', 0) == 1) {
             update_option('ts_vcsc_extend_settings_demo', 0);
         } else {
             update_option('ts_vcsc_extend_settings_demo', 1);
         }
     }
     // Register Custom CSS and JS Inputs
     // ---------------------------------
     if (get_option('ts_vcsc_extend_settings_codeeditors', 1) == 1) {
         add_action('admin_init', array($this, 'TS_VCSC_RegisterCustomCSS_Setting'));
         add_action('admin_init', array($this, 'TS_VCSC_RegisterCustomJS_Setting'));
     }
     // Function to Register / Load External Files on Back-End
     // ------------------------------------------------------
     add_action('admin_enqueue_scripts', array($this, 'TS_VCSC_Extensions_Admin_Files'), 999999999);
     add_action('admin_head', array($this, 'TS_VCSC_Extensions_Admin_Variables'), 999999999);
     // Function to Register / Load External Files on Front-End
     // -------------------------------------------------------
     add_action('wp_enqueue_scripts', array($this, 'TS_VCSC_Extensions_Front_Main'), 999999999);
     add_action('wp_head', array($this, 'TS_VCSC_Extensions_Front_Variables'), 1);
     add_action('wp_head', array($this, 'TS_VCSC_Extensions_Front_Head'), 8888);
     add_action('wp_footer', array($this, 'TS_VCSC_Extensions_Front_Footer'), 8888);
     // Add Dashboard Widget
     // --------------------
     if (get_option('ts_vcsc_extend_settings_dashboard', 1) == 1) {
         add_action('wp_dashboard_setup', array($this, 'TS_VCSC_DashboardHelpWidget'));
     }
     // Create Custom Post Types
     // ------------------------
     if (get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) {
         if (get_option('ts_vcsc_extend_settings_posttypeTeam', 1) == 0 && get_option('ts_vcsc_extend_settings_posttypeTestimonial', 1) == 0 && get_option('ts_vcsc_extend_settings_posttypeLogo', 1) == 0 && get_option('ts_vcsc_extend_settings_posttypeSkillset', 1) == 0 && get_option('ts_vcsc_extend_settings_posttypeTimeline', 1) == 0) {
             update_option('ts_vcsc_extend_settings_posttypes', 0);
         }
     }
     if (get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 0) {
         $this->TS_VCSC_CustomPostTypesCheckup = "true";
         if (get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_customTeam', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypeTeam', 1) == 1 && get_option('ts_vcsc_extend_settings_customTeam', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) {
             $this->TS_VCSC_CustomPostTypesTeam = "true";
         } else {
             $this->TS_VCSC_CustomPostTypesTeam = "false";
         }
         if (get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_customTestimonial', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypeTestimonial', 1) == 1 && get_option('ts_vcsc_extend_settings_customTestimonial', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) {
             $this->TS_VCSC_CustomPostTypesTestimonial = "true";
         } else {
             $this->TS_VCSC_CustomPostTypesTestimonial = "false";
         }
         if (get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_customLogo', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypeLogo', 1) == 1 && get_option('ts_vcsc_extend_settings_customLogo', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) {
             $this->TS_VCSC_CustomPostTypesLogo = "true";
         } else {
             $this->TS_VCSC_CustomPostTypesLogo = "false";
         }
         if (get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_customSkillset', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypeSkillset', 1) == 1 && get_option('ts_vcsc_extend_settings_customSkillset', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) {
             $this->TS_VCSC_CustomPostTypesSkillset = "true";
         } else {
             $this->TS_VCSC_CustomPostTypesSkillset = "false";
         }
         if (get_option('ts_vcsc_extend_settings_extended', 0) == 0 && get_option('ts_vcsc_extend_settings_customTimelines', 0) == 1 || get_option('ts_vcsc_extend_settings_extended', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypeTimeline', 1) == 1 && get_option('ts_vcsc_extend_settings_customTimelines', 0) == 1 && get_option('ts_vcsc_extend_settings_posttypes', 1) == 1) {
             $this->TS_VCSC_CustomPostTypesTimeline = "true";
         } else {
             $this->TS_VCSC_CustomPostTypesTimeline = "false";
         }
     } else {
         $this->TS_VCSC_CustomPostTypesCheckup = "false";
         $this->TS_VCSC_CustomPostTypesTeam = "false";
         $this->TS_VCSC_CustomPostTypesTestimonial = "false";
         $this->TS_VCSC_CustomPostTypesLogo = "false";
         $this->TS_VCSC_CustomPostTypesSkillset = "false";
         $this->TS_VCSC_CustomPostTypesTimeline = "false";
     }
     if ($this->TS_VCSC_CustomPostTypesTeam == "true" || $this->TS_VCSC_CustomPostTypesTestimonial == "true" || $this->TS_VCSC_CustomPostTypesLogo == "true" || $this->TS_VCSC_CustomPostTypesSkillset == "true" || $this->TS_VCSC_CustomPostTypesTimeline == "true") {
         require_once $this->posttypes_dir . 'ts_vcsc_custom_post_registration.php';
         $this->TS_VCSC_CustomPostTypesLoaded = "true";
         add_action('init', 'TS_VCSC_CMBMetaBoxes', 7777777777);
         if ($this->TS_VCSC_CustomPostTypesTeam == "true") {
             require_once $this->posttypes_dir . 'ts_vcsc_custom_post_team.php';
             add_action('admin_menu', array($this, 'TS_VCSC_Remove_MetaBoxes_Teams'));
         }
         if ($this->TS_VCSC_CustomPostTypesTestimonial == "true") {
             require_once $this->posttypes_dir . 'ts_vcsc_custom_post_testimonials.php';
             add_action('admin_menu', array($this, 'TS_VCSC_Remove_MetaBoxes_Testimonials'));
         }
         if ($this->TS_VCSC_CustomPostTypesSkillset == "true") {
             require_once $this->posttypes_dir . 'ts_vcsc_custom_post_skillsets.php';
             add_action('admin_menu', array($this, 'TS_VCSC_Remove_MetaBoxes_Skillsets'));
         }
         if ($this->TS_VCSC_CustomPostTypesTimeline == "true") {
             require_once $this->posttypes_dir . 'ts_vcsc_custom_post_timeline.php';
             add_action('admin_menu', array($this, 'TS_VCSC_Remove_MetaBoxes_Timeline'));
         }
         if ($this->TS_VCSC_CustomPostTypesLogo == "true") {
             require_once $this->posttypes_dir . 'ts_vcsc_custom_post_logos.php';
             add_action('admin_menu', array($this, 'TS_VCSC_Remove_MetaBoxes_Logos'));
         }
     }
     // Create Custom Admin Menu for Plugin
     // -----------------------------------
     require_once $this->assets_dir . 'ts_vcsc_registrations_menu.php';
     // Load Shortcode Definitions
     // --------------------------
     add_action('init', array($this, 'TS_VCSC_RegisterAllShortcodes'), 888888888);
     //add_action('vc_before_init', 				array($this, 	'TS_VCSC_RegisterAllShortcodes'), 			888888888);
     // Load Composer Elements
     // ----------------------
     add_action('init', array($this, 'TS_VCSC_RegisterWithComposer'), 999999999);
     //add_action('after_setup_theme',			array($this,	'TS_VCSC_RegisterWithComposer'));
     //add_action('vc_before_init',				array($this, 	'TS_VCSC_RegisterWithComposer'), 			999999999);
     add_action('admin_init', array($this, 'TS_VCSC_ChangeDownloadsUploadDirectory'), 999);
     add_action('admin_notices', array($this, 'TS_VCSC_CustomPackInstalledError'));
     add_action('wp_ajax_ts_delete_custom_pack', array($this, 'TS_VCSC_DeleteCustomPack_Ajax'));
     add_action('wp_ajax_ts_savepostmetadata', array($this, 'TS_VCSC_SavePostMetaData'));
     add_action('wp_ajax_ts_system_download', array($this, 'TS_VCSC_DownloadSystemInfoData'));
     add_action('wp_ajax_ts_export_settings', array($this, 'TS_VCSC_ExportPluginSettings'));
     // Allow Shortcodes in Widgets / Sidebar
     // -------------------------------------
     add_filter('widget_text', 'do_shortcode');
     // Check Default Settings Arrays
     // -----------------------------
     if (get_option('ts_vcsc_extend_settings_dataRestore', 0) == 1) {
         add_action('admin_init', array($this, 'TS_VCSC_CheckDefaultOptions'), 888888888);
     }
     // Enable / Disable VC Frontend Editor
     // -----------------------------------
     if (function_exists('vc_enabled_frontend') && function_exists('vc_disable_frontend')) {
         if (get_option('ts_vcsc_extend_settings_frontendEditor', 1) == 0) {
             vc_disable_frontend(true);
         } else {
             if (get_option('ts_vcsc_extend_settings_frontendEditor', 1) == 1) {
                 vc_disable_frontend(false);
             }
         }
     }
     // Redirect to "About Composium" Page After Activation
     // ---------------------------------------------------
     add_action('admin_init', array($this, 'TS_VCSC_ActivationRedirect'), 1);
     // Lightbox Media Integrations
     // ---------------------------
     if (get_option('ts_vcsc_extend_settings_lightboxIntegration', 0) == 1) {
         add_filter('image_send_to_editor', array($this, 'TS_VCSC_AddLightboxClassMediaEditor'), 10, 3);
     }
 }
Example #2
0
 /**
  * Add our self-hosted autoupdate plugin to the filter transient
  *
  * @param $transient
  * @return object $ transient
  */
 public function check_update($transient)
 {
     global $VISUAL_COMPOSER_EXTENSIONS;
     // Get the remote version
     $remote_version = $this->getRemote_version();
     $current_version = $this->current_version;
     if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginIsMultiSiteActive == "true") {
         update_site_option('ts_vcsc_extend_settings_versionCurrent', $current_version);
         update_site_option('ts_vcsc_extend_settings_versionLatest', $remote_version);
     } else {
         update_option('ts_vcsc_extend_settings_versionCurrent', $current_version);
         update_option('ts_vcsc_extend_settings_versionLatest', $remote_version);
     }
     if (empty($transient->checked)) {
         if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginIsMultiSiteActive == "true") {
             update_site_option('ts_vcsc_extend_settings_updateAvailable', 0);
         } else {
             update_option('ts_vcsc_extend_settings_updateAvailable', 0);
         }
         return $transient;
     }
     if (TS_VCSC_VersionCompare($current_version, $remote_version) != -1) {
         if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginIsMultiSiteActive == "true") {
             update_site_option('ts_vcsc_extend_settings_updateAvailable', 0);
         } else {
             update_option('ts_vcsc_extend_settings_updateAvailable', 0);
         }
         return $transient;
     }
     if (TS_VCSC_VersionCompare($current_version, $remote_version) == -1) {
         if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginIsMultiSiteActive == "true") {
             if (strlen(get_site_option('ts_vcsc_extend_settings_licenseInfo', '')) != 0 && strlen(get_site_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != 0) {
                 if (strpos(get_site_option('ts_vcsc_extend_settings_licenseInfo', ''), get_site_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE) {
                     update_site_option('ts_vcsc_extend_settings_updateAvailable', 1);
                     $obj = new stdClass();
                     $obj->slug = $this->slug;
                     $obj->new_version = $remote_version;
                     $obj->url = $this->update_path;
                     $obj->package = $this->update_path;
                     $transient->response[$this->plugin_slug] = $obj;
                 } else {
                     update_site_option('ts_vcsc_extend_settings_updateAvailable', 0);
                 }
             } else {
                 update_site_option('ts_vcsc_extend_settings_updateAvailable', 0);
             }
         } else {
             if (strlen(get_option('ts_vcsc_extend_settings_licenseInfo', '')) != 0 && strlen(get_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != 0) {
                 if (strpos(get_option('ts_vcsc_extend_settings_licenseInfo', ''), get_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE) {
                     update_option('ts_vcsc_extend_settings_updateAvailable', 1);
                     $obj = new stdClass();
                     $obj->slug = $this->slug;
                     $obj->new_version = $remote_version;
                     $obj->url = $this->update_path;
                     $obj->package = $this->update_path;
                     $transient->response[$this->plugin_slug] = $obj;
                 } else {
                     update_option('ts_vcsc_extend_settings_updateAvailable', 0);
                 }
             } else {
                 update_option('ts_vcsc_extend_settings_updateAvailable', 0);
             }
         }
     }
     return $transient;
 }
Example #3
0
$memory_checkup = $memory_remaining < $memory_recommended ? "false" : "true";
$memory_minimum = $memory_remaining < $memory_required ? "false" : "true";
if ($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_PluginIsMultiSiteActive == "true") {
    if (get_site_option('ts_vcsc_extend_settings_demo', 1) == 0 && get_option('ts_vcsc_extend_settings_extended', 0) == 0 && strpos(get_site_option('ts_vcsc_extend_settings_licenseInfo', ''), get_site_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE) {
        $autoupdate_allowed = "true";
    } else {
        $autoupdate_allowed = "false";
    }
} else {
    if (get_option('ts_vcsc_extend_settings_demo', 1) == 0 && get_option('ts_vcsc_extend_settings_extended', 0) == 0 && strpos(get_option('ts_vcsc_extend_settings_licenseInfo', ''), get_option('ts_vcsc_extend_settings_licenseKeyed', 'emptydelimiterfix')) != FALSE) {
        $autoupdate_allowed = "true";
    } else {
        $autoupdate_allowed = "false";
    }
}
if (TS_VCSC_VersionCompare($VISUAL_COMPOSER_EXTENSIONS->TS_VCSC_VisualComposer_Version, '4.5.0') >= 0) {
    $visual_composer_link = 'admin.php?page=vc-general';
} else {
    $visual_composer_link = 'options-general.php?page=vc_settings';
}
?>
<div id="ts-settings-general" class="tab-content">
	<div class="ts-vcsc-section-main">
		<div class="ts-vcsc-section-title ts-vcsc-section-show"><i class="dashicons-info"></i>General Information</div>
		<div class="ts-vcsc-section-content">
			<div class="ts-vcsc-notice-field ts-vcsc-success" style="margin-top: 10px; font-size: 13px; text-align: justify;">
				In order to use this plugin, you MUST have the Visual Composer Plugin installed; either as a normal plugin or as part of your theme. If Visual Composer is part of your theme, please ensure that it has not been modified;
				some theme developers heavily modify Visual Composer in order to allow for certain theme functions. Unfortunately, some of these modification prevent this extension pack from working correctly.
			</div>
			<div style="margin-top: 20px; margin-bottom: 10px;">
				<h4>Visual Composer Extensions</h4>