* @copyright 2012-2022 Shea Bunge * @license GPL-2.0-or-later https://spdx.org/licenses/GPL-2.0-or-later.html * @version 3.2.1 * @link https://github.com/sheabunge/code-snippets */ /* Plugin Name: Code Snippets Plugin URI: https://codesnippets.pro 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! Author: Code Snippets Pro Author URI: https://codesnippets.pro Version: 3.2.1 License: GPL-2.0-or-later License URI: license.txt Text Domain: code-snippets Requires PHP: 5.6 Requires at least: 3.6 */ /* Exit if accessed directly */ if ( ! defined( 'ABSPATH' ) ) { return; } /* If a version of code snippets has already been loaded, then deactivate this plugin. */ if ( defined( 'CODE_SNIPPETS_FILE' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; deactivate_plugins( array( 'code-snippets/code-snippets.php' ), true ); if ( ! function_exists( 'code_snippets_deactivated_old_version_notice' ) ) { /** * Display a message informing the user that this plugin has been deactivated. */ function code_snippets_deactivated_old_version_notice() { echo '
'; esc_html_e( 'Another version of Code Snippets appears to be installed. Deactivating this version.', 'code-snippets' ); echo '
'; echo '
', esc_html__( 'Code Snippets requires PHP 5.6 or later.', 'code-snippets' ), '
';
$update_url = function_exists( 'wp_get_default_update_php_url' ) ?
wp_get_default_update_php_url() :
'https://wordpress.org/support/update-php/';
/* translators: %s: Update PHP URL */
$text = __( 'Please upgrade your server to the latest version of PHP to continue using Code Snippets.', 'code-snippets' );
echo wp_kses( sprintf( $text, $update_url ), array( 'a' => array( 'href' => array() ) ) );
echo '