function advman_init() { global $wp_version; global $advman_engine; define('ADVMAN_VERSION', '3.4.17'); define('ADVMAN_PATH', dirname(__FILE__)); define('ADVMAN_LIB', ADVMAN_PATH . '/lib/Advman'); define('OX_LIB', ADVMAN_PATH . '/lib/OX'); define('ADVMAN_URL', get_bloginfo('wpurl') . '/wp-content/plugins/advertising-manager'); // Get the template path $version = version_compare($wp_version, "2.7-alpha", "<") ? 'WP2.6' : 'WP2.7'; define('ADVMAN_TEMPLATE_PATH', ADVMAN_PATH . "/lib/Advman/Template/{$version}"); // Load the language file load_plugin_textdomain('advman', false, 'advertising-manager/languages'); // Load all require files that are needed for Advertising Manager require_once OX_LIB . '/Tools.php'; require_once OX_LIB . '/Swifty.php'; require_once ADVMAN_LIB . '/Dal.php'; // Define PHP_INT_MAX for versions of PHP < 4.4.0 if (!defined('PHP_INT_MAX')) { define('PHP_INT_MAX', OX_Tools::get_int_max()); } // Get an instance of the ad engine $advman_engine = new OX_Swifty('Advman_Dal'); // Next, load admin if needed if (is_admin()) { require_once ADVMAN_LIB . '/Admin.php'; } // Add widgets if (version_compare($wp_version, "2.8-alpha", "<")) { include_once ADVMAN_LIB . '/Widget_Old.php'; add_action('widgets_init', array('Advman_Widget', 'init'), 1); } else { include_once ADVMAN_LIB . '/Widget.php'; add_action('widgets_init', create_function('', 'return register_widget("Advman_Widget");')); } }
function advman_init() { global $wp_version; global $advman_engine; // number used to uniquely identify ad slots global $advman_slot; $advman_slot = 1; define('ADVMAN_VERSION', '3.5.3'); define('ADVMAN_PATH', dirname(__FILE__)); define('ADVMAN_LIB', ADVMAN_PATH . '/lib/Advman'); define('OX_LIB', ADVMAN_PATH . '/lib/OX'); define('ADVMAN_URL', get_bloginfo('wpurl') . '/wp-content/plugins/advertising-manager'); // Load the language file load_plugin_textdomain('advman', false, 'advertising-manager/languages'); // Load all require files that are needed for Advertising Manager require_once OX_LIB . '/Tools.php'; require_once OX_LIB . '/Swifty.php'; require_once ADVMAN_LIB . '/Dal.php'; // Define PHP_INT_MAX for versions of PHP < 4.4.0 if (!defined('PHP_INT_MAX')) { define('PHP_INT_MAX', OX_Tools::get_int_max()); } // Get an instance of the ad engine $advman_engine = new OX_Swifty('Advman_Dal'); // Next, load admin if needed if (is_admin()) { require_once ADVMAN_LIB . '/Admin.php'; register_activation_hook(__FILE__, array('Advman_Admin', 'activate')); } // Add widgets include_once ADVMAN_LIB . '/Widget.php'; add_action('widgets_init', create_function('', 'return register_widget("Advman_Widget");')); // Add ad quality script if enabled if ($advman_engine->getSetting('enable-adjs')) { wp_enqueue_script('adjs', '//cdn.adjs.net/publisher.ad.min.js'); } }
public function testGetIntMax() { $i = OX_Tools::get_int_max(); $this->assertEquals($i, 9.223372036854776E+18); }