Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 148
Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 266
Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home2/cargocap/mrbuilders.pk/wp-includes/widgets/upgrade/index.php on line 274
fg
<?php
/*
Plugin Name: SpeedyCache Pro
Plugin URI: https://speedycache.com
Description: SpeedyCache is a plugin that helps you reduce the load time of your website by means of caching, minification, and compression of your website.
Version: 1.1.8
Author: Softaculous Team
Author URI: https://speedycache.com/
Text Domain: speedycache
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
*/
/*
* SPEEDYCACHE
* https://speedycache.com/
* (c 2024) SpeedyCache Team
*/
/*
SpeedyCache is fork of WP Fastest Cache :
https://wordpress.org/plugins/wp-fastest-cache/
Copyright (C) 2013 Emre Vona
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
// We need the ABSPATH
if(!defined('ABSPATH')) exit;
if(!function_exists('add_action')){
echo 'You are not allowed to access this page directly.';
exit;
}
// If SPEEDYCACHE_PRO_VERSION exists then the plugin is loaded already !
if(defined('SPEEDYCACHE_PRO_VERSION')){
return;
}
define('SPEEDYCACHE_PRO', plugin_basename(__FILE__));
define('SPEEDYCACHE_PRO_FILE', __FILE__);
$_tmp_plugins = get_option('active_plugins');
if(!in_array('speedycache/speedycache.php', $_tmp_plugins)){
add_action('plugins_loaded', 'speedycache_pro_load_plugin');
function speedycache_pro_load_plugin(){
// Nag informing the user to install the free version.
if(current_user_can('activate_plugins')){
add_action('admin_notices', 'speedycachepro_free_version_nag');
add_action('admin_menu', 'speedycachepro_add_menu');
if(!empty(get_option('speedycache_free_installed'))){
return;
}
update_option('speedycache_free_installed', time());
// Include the necessary stuff
include_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
include_once(ABSPATH . 'wp-admin/includes/file.php');
// Includes necessary for Plugin_Upgrader and Plugin_Installer_Skin
include_once(ABSPATH . 'wp-admin/includes/misc.php');
include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');
// Filter to prevent the activate text
add_filter('install_plugin_complete_actions', 'speedycache_pro_prevent_activation_text', 10, 3);
$upgrader = new Plugin_Upgrader(new WP_Ajax_Upgrader_Skin());
$installed = $upgrader->install('https://downloads.wordpress.org/plugin/speedycache.zip');
if(!is_wp_error($installed) && $installed){
$activate = activate_plugin('speedycache/speedycache.php');
//wp_safe_redirect(admin_url('/'));
}
}
}
// Do not shows the activation text if
function speedycache_pro_prevent_activation_text($install_actions, $api, $plugin_file){
if($plugin_file == 'speedycache/speedycache.php'){
return array();
}
return $install_actions;
}
function speedycachepro_free_version_nag(){
echo '<div class="notice notice-error">
<p style="font-size:16px;">You have not installed the free version of SpeedyCache. SpeedyCache Pro depends on the free version, so you must install it first in order to use SpeedyCache. <a href="'.admin_url('plugin-install.php?s=speedycache&tab=search').'" class="button button-primary">Install Now</a></p>
</div>';
}
function speedycachepro_add_menu(){
add_menu_page('SpeedyCache Settings', 'SpeedyCache', 'activate_plugins', 'speedycache', 'speedycachepro_menu_page');
}
function speedycachepro_menu_page(){
echo '<div style="color: #333;padding: 50px;text-align: center;">
<h1 style="font-size: 2em;margin-bottom: 10px;">SpeedyCache Free version is not installed!</h>
<p style=" font-size: 16px;margin-bottom: 20px; font-weight:400;">SpeedyCache Pro depends on the free version of SpeedyCache, so you need to install the free version first.</p>
<a href="'.admin_url('plugin-install.php?s=speedycache&tab=search').'" style="text-decoration: none;font-size:16px;">Install Now</a>
</div>';
}
return;
}
include_once(__DIR__ . '/init.php');