/** * This page should only get loaded if the site is running php 5.3 or greater, * otherwise this file will generate PHP parsing errors. * */ if (!defined('WP_PLUGIN_DIR')) { exit('No direct script access allowed'); } //------------------------------------------------------------------------------ //! Load up! // plugin_dir_path(__FILE__) //------------------------------------------------------------------------------ require_once PHP_SNIPPETS_PATH . '/includes/Base.php'; require_once PHP_SNIPPETS_PATH . '/includes/License.php'; $php_license = PhpSnippets\License::check(); $php_snippets_data = get_option('php_snippets'); // Check the license, show an error add_action('admin_notices', function () { global $php_license; // Don't show this when we're posting data if ($php_license != 'valid' && empty($_POST)) { print PhpSnippets\License::get_error_msg(); } }); if ($php_license != 'valid') { return; } require_once PHP_SNIPPETS_PATH . '/includes/Snippet.php'; require_once PHP_SNIPPETS_PATH . '/includes/Ajax.php'; require_once PHP_SNIPPETS_PATH . '/includes/Widget.php';