Esempio n. 1
0
<?php

/**
 * Plugin.
 *
 * @wp-plugin
 *
 * Version: 161026.47592
 * Text Domain: wp-sharks-core
 * Plugin Name: WP Sharks Core
 *
 * Author: WP Sharks™
 * Author URI: https://wpsharks.com/
 *
 * License: GPL-3.0+
 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
 *
 * Plugin URI: https://wpsharks.com/product/wp-sharks-core
 * Description: The WP Sharks Core is a WordPress plugin that serves as a framework for other plugins by the WP Sharks™ team.
 */
// PHP v5.2 compatible.
if (!defined('WPINC')) {
    exit('Do NOT access this file directly: ' . basename(__FILE__));
}
require dirname(__FILE__) . '/src/includes/wp-php-rv.php';
if (require dirname(__FILE__) . '/src/vendor/websharks/wp-php-rv/src/includes/check.php') {
    require_once dirname(__FILE__) . '/src/includes/plugin.php';
} else {
    wp_php_rv_notice('WP Sharks™ Core');
}
Esempio n. 2
0
 * Plugin.
 *
 * @since     160212 PSR compliance.
 *
 * @copyright WebSharks, Inc. <http://websharks-inc.com>
 * @license   GNU General Public License, version 3
 */
/*
Version: 161118
Text Domain: comment-mail
Plugin Name: Comment Mail

Author: WebSharks, Inc.
Author URI: http://www.websharks-inc.com

Plugin URI: http://comment-mail.com/
Description: A WordPress plugin enabling email subscriptions for comments.

Enables email subscriptions for comments in WordPress.
*/
if (!defined('WPINC')) {
    // MUST have WordPress.
    exit('Do NOT access this file directly: ' . basename(__FILE__));
}
$GLOBALS['wp_php_rv'] = '5.4';
//php-required-version//
if (require __DIR__ . '/src/vendor/websharks/wp-php-rv/src/includes/check.php') {
    require_once __DIR__ . '/src/includes/plugin.php';
} else {
    wp_php_rv_notice('Comment Mail');
}
Esempio n. 3
0
            ${__FILE__}['php54_warning'] .= '<p style="margin-top:0;">' . __('Learn more about this upcoming change here: <a href="http://zencache.com/r/new-minimum-php-version-php-5-4/" target="_blank">New Minimum PHP Version: PHP 5.4</a>', 'zencache') . '</p>';
            if ($_apc_enabled) {
                ${__FILE__}['php54_warning'] .= '<p style="margin-top:0;">' . __('Your server is also running the <strong>outdated PHP APC extension</strong>. Please see: <a href="http://zencache.com/r/php-apc-extension-no-longer-supported/" target="_blank">PHP APC Extension No Longer Supported</a>', 'zencache') . '</p>';
            }
            ${__FILE__}['php54_warning'] .= '<p style="margin-bottom:.5em;">' . __('<a href="' . esc_attr(add_query_arg('zencache_min_php54_warning_bypass', '1')) . '" onclick="if(!confirm(\'Are you sure? Press OK to continue, or Cancel to stop and read carefully.\')) return false;">Dismiss this notice.</a>', 'zencache') . '</p>';
            add_action('all_admin_notices', create_function('', 'if(!current_user_can(\'activate_plugins\'))' . '   return;' . "\n" . 'echo \'' . '<div class="error">' . '      ' . str_replace("'", "\\'", ${__FILE__}['php54_warning']) . '</div>' . '\';'));
        }
        unset(${__FILE__});
        // Housekeeping.
    } else {
        if (version_compare(PHP_VERSION, '5.4', '>=') && $_apc_enabled) {
            if (!get_site_option('zencache_apc_deprecated_warning_bypass') && is_admin()) {
                ${__FILE__}['apc_deprecated_warning'] = '<h3 style="margin:.5em 0 .25em 0;">' . __('<strong>NOTICE: ZenCache + PHP APC Extension</strong></h3>', 'zencache');
                ${__FILE__}['apc_deprecated_warning'] .= '<p style="margin-top:0;">' . sprintf(__('<strong>As of December 1st, 2015 ZenCache will no longer run with the outdated PHP APC extension.</strong> It appears that you\'re currently running PHP v%1$s with APC enabled. You will need to follow one of the actions below to run the next version of ZenCache.', 'zencache'), esc_html(PHP_VERSION)) . '</p>';
                ${__FILE__}['apc_deprecated_warning'] .= __('<h4 style="margin:0 0 .5em 0; font-size:1.25em;"><span class="dashicons dashicons-lightbulb"></span> Options Available (Action Required):</h4>', 'zencache');
                ${__FILE__}['apc_deprecated_warning'] .= '<ul style="margin-left:2em; list-style:disc;">';
                ${__FILE__}['apc_deprecated_warning'] .= '  <li>' . __('Please add <code>ini_set(\'apc.cache_by_default\', false);</code> to the top of your <code>/wp-config.php</code> file. That will get rid of this message and allow ZenCache to run without issue.', 'zencache') . '</li>';
                ${__FILE__}['apc_deprecated_warning'] .= '  <li>' . __('Or, contact your web hosting provider and ask about upgrading to PHP v5.5+; which includes the new <a href="http://zencache.com/r/php-opcache-extension/" target="_blank">OPcache extension for PHP</a>. The new OPcache extension replaces APC in modern versions of PHP.', 'zencache') . '</li>';
                ${__FILE__}['apc_deprecated_warning'] .= '</ul>';
                ${__FILE__}['apc_deprecated_warning'] .= '<p style="margin-top:0;">' . __('To learn more about this upcoming change, please see the announcement: <a href="http://zencache.com/r/php-apc-extension-no-longer-supported/" target="_blank">PHP APC Extension No Longer Supported</a>', 'zencache') . '</p>';
                ${__FILE__}['apc_deprecated_warning'] .= '<p style="margin-bottom:.5em;">' . __('<a href="' . esc_attr(add_query_arg('zencache_apc_deprecated_warning_bypass', '1')) . '" onclick="if(!confirm(\'Are you sure? Press OK to continue, or Cancel to stop and read carefully.\')) return false;">Dismiss this notice.</a>', 'zencache') . '</p>';
                add_action('all_admin_notices', create_function('', 'if(!current_user_can(\'activate_plugins\'))' . '   return;' . "\n" . 'echo \'' . '<div class="error">' . '      ' . str_replace("'", "\\'", ${__FILE__}['apc_deprecated_warning']) . '</div>' . '\';'));
            }
            unset(${__FILE__});
            // Housekeeping.
        }
    }
    require_once dirname(__FILE__) . '/zencache.inc.php';
} else {
    wp_php_rv_notice('ZenCache');
}
Esempio n. 4
0
 /**
  * Creates a WP Dashboard notice regarding PHP requirements.
  *
  * @param string $notice Optional. Custom notice HTML instead of default markup.
  * @param string $notice_cap Optional. Capability to view notice. Defaults to `activate_plugins`.
  * @param string $notice_action Optional. Action hook. Defaults to `all_admin_notices`.
  */
 function wp_php_rv_custom_notice($notice = '', $notice_cap = '', $notice_action = '')
 {
     if (isset($GLOBALS['wp_php_rv'])) {
         ___wp_php_rv_initialize();
     }
     // Prep internals.
     wp_php_rv_notice('', '', $notice_cap, $notice_action, $notice);
 }
Esempio n. 5
0
            if (${__FILE__}['apc_enabled']) {
                ${__FILE__}['php54_notice'] .= '<p style="margin-top:0;">' . __('Your server is also running the <strong>outdated PHP APC extension</strong>. Please see: <a href="http://cometcache.com/r/php-apc-extension-no-longer-supported/" target="_blank">PHP APC Extension No Longer Supported</a>', 'comet-cache') . '</p>';
            }
            add_action('all_admin_notices', create_function('', 'if(!current_user_can(\'activate_plugins\'))' . '   return;' . "\n" . 'echo \'' . '<div class="error">' . '      ' . str_replace("'", "\\'", ${__FILE__}['php54_notice']) . '</div>' . '\';'));
        } elseif (${__FILE__}['apc_enabled'] && is_admin()) {
            ${__FILE__}['apc_deprecated_notice'] = '<h3 style="margin:.5em 0 .25em 0;">' . __('<strong>NOTICE: Comet Cache + PHP APC Extension</strong></h3>', 'comet-cache');
            ${__FILE__}['apc_deprecated_notice'] .= '<p style="margin-top:0;">' . sprintf(__('<strong>As of December 1st, 2015 Comet Cache no longer runs with the outdated PHP APC extension.</strong> It appears that you\'re currently running PHP v%1$s with APC enabled. You will need to follow one of the actions below to run this version of Comet Cache.', 'comet-cache'), esc_html(PHP_VERSION)) . '</p>';
            ${__FILE__}['apc_deprecated_notice'] .= __('<h4 style="margin:0 0 .5em 0; font-size:1.25em;"><span class="dashicons dashicons-lightbulb"></span> Options Available (Action Required):</h4>', 'comet-cache');
            ${__FILE__}['apc_deprecated_notice'] .= '<ul style="margin-left:2em; list-style:disc;">';
            ${__FILE__}['apc_deprecated_notice'] .= '  <li>' . __('Please add <code>ini_set(\'apc.cache_by_default\', false);</code> to the top of your <code>/wp-config.php</code> file. That will get rid of this message and allow Comet Cache to run without issue.', 'comet-cache') . '</li>';
            ${__FILE__}['apc_deprecated_notice'] .= '  <li>' . __('Or, contact your web hosting provider and ask about upgrading to PHP v5.5+; which includes the new <a href="http://cometcache.com/r/php-opcache-extension/" target="_blank">OPcache extension for PHP</a>. The new OPcache extension replaces APC in modern versions of PHP.', 'comet-cache') . '</li>';
            ${__FILE__}['apc_deprecated_notice'] .= '</ul>';
            ${__FILE__}['apc_deprecated_notice'] .= '<p style="margin-top:0;">' . __('To learn more about this change, please see the announcement: <a href="http://cometcache.com/r/php-apc-extension-no-longer-supported/" target="_blank">PHP APC Extension No Longer Supported</a>', 'comet-cache') . '</p>';
            add_action('all_admin_notices', create_function('', 'if(!current_user_can(\'activate_plugins\'))' . '   return;' . "\n" . 'echo \'' . '<div class="error">' . '      ' . str_replace("'", "\\'", ${__FILE__}['apc_deprecated_notice']) . '</div>' . '\';'));
        }
    } else {
        // Load the plugin
        if (!extension_loaded('mbstring') && !get_site_option('comet_cache_mbstring_deprecated_warning_bypass') && is_admin()) {
            ${__FILE__}['mbstring_deprecated_warning'] = '<h3 style="margin:.5em 0 .25em 0;">' . __('<strong>NOTICE: Comet Cache Will Require the PHP <code>mbstring</code> Extension</strong></h3>', 'comet-cache');
            ${__FILE__}['mbstring_deprecated_warning'] .= '<p style="margin-top:0;">' . sprintf(__('<strong>After March 1st, 2016 Comet Cache will require PHP Multibyte String support.</strong> It appears that your site is currently running PHP v%1$s <strong>without</strong> the <code>mbstring</code> extension enabled. You will need to contact your web hosting company and have them enable the PHP <code>mbstring</code> extension if you want to run the next version of Comet Cache.', 'comet-cache'), esc_html(PHP_VERSION)) . '</p>';
            ${__FILE__}['mbstring_deprecated_warning'] .= '<p style="margin-top:0;">' . __('The <code>mbstring</code> extension provides Multibyte String support to PHP and is required to properly handle UTF-8 characters, which many sites now use. Without Multibyte String support, Comet Cache will be unstable. For that reason we are requiring the <code>mbstring</code> extension to improve reliablity when caching and to prevent your site from experiencing unforeseen issues in the future.', 'comet-cache') . '</p>';
            ${__FILE__}['mbstring_deprecated_warning'] .= '<p style="margin-bottom:.5em;">' . __('<a href="' . esc_attr(add_query_arg('comet_cache_mbstring_deprecated_warning_bypass', '1')) . '" onclick="if(!confirm(\'Are you sure? Press OK to continue, or Cancel to stop and read carefully.\')) return false;">Dismiss this notice.</a>', 'comet-cache') . '</p>';
            add_action('all_admin_notices', create_function('', 'if(!current_user_can(\'activate_plugins\'))' . '   return;' . "\n" . 'echo \'' . '<div class="notice notice-warning">' . '      ' . str_replace("'", "\\'", ${__FILE__}['mbstring_deprecated_warning']) . '</div>' . '\';'));
        }
        require_once dirname(__FILE__) . '/src/includes/plugin.php';
    }
} else {
    wp_php_rv_notice('Comet Cache');
}
unset(${__FILE__});
// Housekeeping.
Esempio n. 6
0
<?php

if (!defined('WPINC')) {
    exit('Do NOT access this file directly: ' . basename(__FILE__));
}
$GLOBALS['wp_php_rv'] = '5.3.2';
//php-required-version//
if (require dirname(__FILE__) . '/src/vendor/websharks/wp-php-rv/src/includes/check.php') {
    require_once dirname(__FILE__) . '/src/includes/plugin.php';
} else {
    wp_php_rv_notice('ZenCache Pro');
}
Esempio n. 7
0
/**
 * Back compat. function (rarely used).
 */
function wp_php_rv_custom_notice()
{
    wp_php_rv_notice(___wp_php_rv_notice_brand_name());
}