plgDir = dirname(__FILE__); $this->plgURL = plugin_dir_url(__FILE__); $this->isPro = file_exists("{$this->plgDir}/admin/options-advanced.php"); $this->strPro = ' Lite'; if ($this->isPro) { $this->strPro = ' Pro'; } if (is_admin()) { require_once($this->plgDir . '/EzTran.php'); $this->domain = 'ads-ez'; $this->ezTran = new EzTran(__FILE__, "Ads EZ{$this->strPro}", $this->domain); $this->ezTran->setLang(); } } function displayAd($atts, $content = '') { $query = "?wp"; $vars = array("cat" => "", "type" => "banner", "size" => "300x250"); $vars = shortcode_atts($vars, $atts); foreach ($vars as $k => $v) { if (!empty($v)) { $query .= "&$k=$v"; } } list($w, $h) = explode("x", $vars['size']); $adLink = ""; return $adLink; } static function install() { $mOptions = "adsEz"; $ezOptions = get_option($mOptions); if (empty($ezOptions)) { // create the necessary tables $isInstallingWP = true; chdir(dirname(__FILE__) . '/admin'); require_once('dbSetup.php'); $ezOptions['isSetup'] = true; } update_option($mOptions, $ezOptions); } static function uninstall() { $mOptions = "adsEz"; delete_option($mOptions); } function printAdminPage() { $testFile = plugins_url("admin/promo.php", __FILE__); if (!@file_get_contents($testFile)) { // index cannot be used for testing ?>
.htaccess file in your wp-content folder, please remove it or modify it to allow access to the php files in plgDir; ?>/.