code-snippets
Last commit date
assets
3 years ago
css
1 year ago
dist
1 year ago
js
1 year ago
php
1 year ago
vendor
1 year ago
CHANGELOG.md
1 year ago
code-snippets.php
1 year ago
license.txt
3 years ago
readme.txt
1 year ago
uninstall.php
1 year ago
code-snippets.php
65 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Plugin Name: Code Snippets |
| 4 | * Plugin URI: https://codesnippets.pro |
| 5 | * Description: An easy, clean and simple way to run code snippets on your site. No need to edit to your theme's functions.php file again! |
| 6 | * Author: Code Snippets Pro |
| 7 | * Author URI: https://codesnippets.pro |
| 8 | * License: GPL-2.0-or-later |
| 9 | * License URI: license.txt |
| 10 | * Text Domain: code-snippets |
| 11 | * Version: 3.6.6.1 |
| 12 | * Requires PHP: 7.4 |
| 13 | * Requires at least: 5.0 |
| 14 | * |
| 15 | * @version 3.6.6.1 |
| 16 | * @package Code_Snippets |
| 17 | * @author Shea Bunge <shea@codesnippets.pro> |
| 18 | * @copyright 2012-2023 Code Snippets Pro |
| 19 | * @license GPL-2.0-or-later https://spdx.org/licenses/GPL-2.0-or-later.html |
| 20 | * @link https://github.com/codesnippetspro/code-snippets |
| 21 | * |
| 22 | * phpcs:disable Modernize.FunctionCalls.Dirname.FileConstant |
| 23 | */ |
| 24 | |
| 25 | // Exit if accessed directly. |
| 26 | if ( ! defined( 'ABSPATH' ) ) { |
| 27 | return; |
| 28 | } |
| 29 | |
| 30 | // Halt loading here if the plugin is already loaded, or we're running an incompatible version of PHP. |
| 31 | if ( ! defined( 'CODE_SNIPPETS_FILE' ) && version_compare( phpversion(), '7.4', '>=' ) ) { |
| 32 | |
| 33 | /** |
| 34 | * The current plugin version. |
| 35 | * |
| 36 | * Should be set to the same value as set above. |
| 37 | * |
| 38 | * @const string |
| 39 | */ |
| 40 | define( 'CODE_SNIPPETS_VERSION', '3.6.6.1' ); |
| 41 | |
| 42 | /** |
| 43 | * The full path to the main file of this plugin. |
| 44 | * |
| 45 | * This can later be passed to functions such as plugin_dir_path(), plugins_url() and plugin_basename() |
| 46 | * to retrieve information about plugin paths. |
| 47 | * |
| 48 | * @since 2.0.0 |
| 49 | * @const string |
| 50 | */ |
| 51 | define( 'CODE_SNIPPETS_FILE', __FILE__ ); |
| 52 | |
| 53 | /** |
| 54 | * Used to determine which version of Code Snippets is running. |
| 55 | * |
| 56 | * @since 3.0.0 |
| 57 | * @onst boolean |
| 58 | */ |
| 59 | define( 'CODE_SNIPPETS_PRO', true ); |
| 60 | |
| 61 | require_once dirname( __FILE__ ) . '/php/load.php'; |
| 62 | } else { |
| 63 | require_once dirname( __FILE__ ) . '/php/deactivation-notice.php'; |
| 64 | } |
| 65 |