public function __construct($mainFilepath) { parent::__construct($mainFilepath, $this); //Set table names GlobalsBannerRotator::$table_sliders = self::$table_prefix . GlobalsBannerRotator::TABLE_SLIDERS_NAME; GlobalsBannerRotator::$table_slides = self::$table_prefix . GlobalsBannerRotator::TABLE_SLIDES_NAME; GlobalsBannerRotator::$table_settings = self::$table_prefix . GlobalsBannerRotator::TABLE_SETTINGS_NAME; }
public function __construct($mainFilepath) { parent::__construct($mainFilepath, $this, self::DEFAULT_VIEW); //Set table names GlobalsBannerRotator::$table_sliders = self::$table_prefix . GlobalsBannerRotator::TABLE_SLIDERS_NAME; GlobalsBannerRotator::$table_slides = self::$table_prefix . GlobalsBannerRotator::TABLE_SLIDES_NAME; GlobalsBannerRotator::$table_settings = self::$table_prefix . GlobalsBannerRotator::TABLE_SETTINGS_NAME; GlobalsBannerRotator::$filepath_captions = self::$path_plugin . "css/caption.css"; GlobalsBannerRotator::$filepath_captions_original = self::$path_plugin . "css/caption-original.css"; GlobalsBannerRotator::$urlCaptionsCSS = self::$url_plugin . "css/caption.css"; $this->init(); }
public function __construct($mainFile, $t) { global $wpdb; self::$is_multisite = UniteFunctionsWPBanner::isMultisite(); self::$wpdb = $wpdb; self::$table_prefix = self::$wpdb->base_prefix; if (UniteFunctionsWPBanner::isMultisite()) { $blogID = UniteFunctionsWPBanner::getBlogID(); if ($blogID != 1) { self::$table_prefix .= $blogID . "_"; } } self::$mainFile = $mainFile; self::$t = $t; //Set plugin dirname (as the main filename) $info = pathinfo($mainFile); $baseName = $info["basename"]; $filename = str_replace(".php", "", $baseName); self::$dir_plugin = $filename; self::$url_plugin = plugins_url(self::$dir_plugin) . "/"; self::$url_ajax = admin_url("admin-ajax.php"); self::$url_ajax_actions = self::$url_ajax . "?action=" . self::$dir_plugin . "_ajax_action"; self::$url_ajax_showimage = self::$url_ajax . "?action=" . self::$dir_plugin . "_show_image"; self::$path_plugin = dirname(self::$mainFile) . "/"; self::$path_settings = self::$path_plugin . "settings/"; self::$path_temp = self::$path_plugin . "temp/"; //Set cache path self::setPathCache(); self::$path_views = self::$path_plugin . "views/"; self::$path_templates = self::$path_views . "/templates/"; self::$path_base = ABSPATH; self::$path_languages = self::$path_plugin . "languages/"; self::$dir_languages = self::$dir_plugin . "/languages/"; load_plugin_textdomain(self::$dir_plugin, false, self::$dir_languages); //Update globals old version flag GlobalsBannerRotator::$isNewVersion = false; $version = get_bloginfo("version"); $version = (double) $version; if ($version >= 3.5) { GlobalsBannerRotator::$isNewVersion = true; } }