} } } private static function customize_parameter_array($source, $num) { $result = array(); foreach ($source as $tag => $value) { $result[$tag] = str_replace('{{num}}', $num, $value); } return $result; } private static function check_php_version($setting = false) { if (!defined('PHP_VERSION_ID')) { $version = explode('.', PHP_VERSION); define('PHP_VERSION_ID', $version[0] * 10000 + $version[1] * 100 + $version[2]); } if (PHP_VERSION_ID < 50300) { $message = 'The server is currently running PHP Version ' . PHP_VERSION . '. PopupAlly needs at least PHP 5.3 to function properly. Please ask your host to upgrade.'; if (false !== $setting) { add_settings_error($setting, 'php_version_error', $message, 'error'); } else { return $message; } } return false; } } require_once plugin_dir_path(__FILE__) . '/resource/popup-ally-template.php'; PopupAlly::init(); }