Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/password...
File: wp-protect-password.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* The plugin bootstrap file
[3] Fix | Delete
*
[4] Fix | Delete
* This file is read by WordPress to generate the plugin information in the plugin
[5] Fix | Delete
* admin area. This file also includes all of the dependencies used by the plugin,
[6] Fix | Delete
* registers the activation and deactivation functions, and defines a function
[7] Fix | Delete
* that starts the plugin.
[8] Fix | Delete
*
[9] Fix | Delete
* @link https://passwordprotectwp.com?utm_source=user-website&utm_medium=pluginsite_link&utm_campaign=ppwp
[10] Fix | Delete
* @since 1.7.6
[11] Fix | Delete
* @package Password_Protect_Page
[12] Fix | Delete
*
[13] Fix | Delete
* @wordpress-plugin
[14] Fix | Delete
* Plugin Name: Password Protect WordPress Lite
[15] Fix | Delete
* Plugin URI: https://passwordprotectwp.com?utm_source=user-website&utm_medium=pluginsite_link&utm_campaign=ppwp_lite
[16] Fix | Delete
* Description: Password protect the entire WordPress site, unlimited pages and posts by user roles. This plugin is required for our Pro version to work properly.
[17] Fix | Delete
* Version: 1.9.2
[18] Fix | Delete
* Author: BWPS
[19] Fix | Delete
* Author URI: https://passwordprotectwp.com
[20] Fix | Delete
* License: GPL-2.0+
[21] Fix | Delete
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
[22] Fix | Delete
* Text Domain: password-protect-page
[23] Fix | Delete
* Domain Path: /languages
[24] Fix | Delete
*/
[25] Fix | Delete
[26] Fix | Delete
// If this file is called directly, abort.
[27] Fix | Delete
if ( ! defined( 'WPINC' ) ) {
[28] Fix | Delete
die;
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
/**
[32] Fix | Delete
* Currently plugin version.
[33] Fix | Delete
* Start at version 1.1.2 and use SemVer - https://semver.org
[34] Fix | Delete
* Rename this for your plugin and update it as you release new versions.
[35] Fix | Delete
*/
[36] Fix | Delete
define( 'PPW_VERSION', '1.9.2' );
[37] Fix | Delete
[38] Fix | Delete
if ( ! defined( 'PPW_DIR_PATH' ) ) {
[39] Fix | Delete
define( 'PPW_DIR_PATH', plugin_dir_path( __FILE__ ) );
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
if ( ! defined( 'PPW_DIR_URL' ) ) {
[43] Fix | Delete
define( 'PPW_DIR_URL', plugin_dir_url( __FILE__ ) );
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
if ( ! defined( 'PPW_VIEW_URL' ) ) {
[47] Fix | Delete
define( 'PPW_VIEW_URL', plugin_dir_url( __FILE__ ) . 'includes/views/' );
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
if ( ! defined( 'PPW_PLUGIN_NAME' ) ) {
[51] Fix | Delete
define( 'PPW_PLUGIN_NAME', 'Password Protect WordPress Lite' );
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
if ( ! defined( 'PPW_PLUGIN_BASE_NAME' ) ) {
[55] Fix | Delete
define( 'PPW_PLUGIN_BASE_NAME', plugin_basename( __FILE__ ) );
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
if ( ! defined( 'PPWP_SIDEBAR_API' ) ) {
[59] Fix | Delete
define( 'PPWP_SIDEBAR_API', 'https://preventdirectaccess.com/wp-json/pda-fss-ppwp/v1/content' );
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
/**
[63] Fix | Delete
* The code that runs during plugin activation.
[64] Fix | Delete
* This action is documented in includes/class-ppw-activator.php
[65] Fix | Delete
*/
[66] Fix | Delete
function activate_password_protect_page() {
[67] Fix | Delete
require_once plugin_dir_path( __FILE__ ) . 'includes/class-ppw-activator.php';
[68] Fix | Delete
PPW_Activator::activate();
[69] Fix | Delete
}
[70] Fix | Delete
[71] Fix | Delete
/**
[72] Fix | Delete
* The code that runs during plugin deactivation.
[73] Fix | Delete
* This action is documented in includes/class-ppw-deactivator.php
[74] Fix | Delete
*/
[75] Fix | Delete
function deactivate_password_protect_page() {
[76] Fix | Delete
require_once plugin_dir_path( __FILE__ ) . 'includes/class-ppw-deactivator.php';
[77] Fix | Delete
PPW_Deactivator::deactivate();
[78] Fix | Delete
}
[79] Fix | Delete
[80] Fix | Delete
/**
[81] Fix | Delete
* The code that runs when uninstall plugin.
[82] Fix | Delete
*/
[83] Fix | Delete
function uninstall_password_protect_page() {
[84] Fix | Delete
require_once plugin_dir_path( __FILE__ ) . 'includes/class-ppw-uninstall.php';
[85] Fix | Delete
PPW_Uninstall::uninstall();
[86] Fix | Delete
}
[87] Fix | Delete
[88] Fix | Delete
register_activation_hook( __FILE__, 'activate_password_protect_page' );
[89] Fix | Delete
register_deactivation_hook( __FILE__, 'deactivate_password_protect_page' );
[90] Fix | Delete
register_uninstall_hook( __FILE__, 'uninstall_password_protect_page' );
[91] Fix | Delete
[92] Fix | Delete
/**
[93] Fix | Delete
* The core plugin class that is used to define internationalization,
[94] Fix | Delete
* admin-specific hooks, and public-facing site hooks.
[95] Fix | Delete
*/
[96] Fix | Delete
require plugin_dir_path( __FILE__ ) . 'includes/class-ppw.php';
[97] Fix | Delete
[98] Fix | Delete
/**
[99] Fix | Delete
* Begins execution of the plugin
[100] Fix | Delete
*
[101] Fix | Delete
* Since everything within the plugin is registered via hooks,
[102] Fix | Delete
* then kicking off the plugin from this point in the file does
[103] Fix | Delete
* not affect the page life cycle.
[104] Fix | Delete
*
[105] Fix | Delete
* @since 1.1.2
[106] Fix | Delete
*/
[107] Fix | Delete
function run_password_protect_page() {
[108] Fix | Delete
$plugin = new Password_Protect_Page();
[109] Fix | Delete
$plugin->run();
[110] Fix | Delete
}
[111] Fix | Delete
[112] Fix | Delete
do_action( 'ppw_free/loaded' );
[113] Fix | Delete
[114] Fix | Delete
if ( ! version_compare( PHP_VERSION, '5.6', '>=' ) ) {
[115] Fix | Delete
add_action( 'admin_notices', 'ppw_fail_php_version' );
[116] Fix | Delete
} elseif ( ! version_compare( get_bloginfo( 'version' ), '4.7', '>=' ) ) {
[117] Fix | Delete
add_action( 'admin_notices', 'ppw_fail_wp_version' );
[118] Fix | Delete
}
[119] Fix | Delete
[120] Fix | Delete
run_password_protect_page();
[121] Fix | Delete
[122] Fix | Delete
[123] Fix | Delete
add_action( 'plugins_loaded', 'ppw_free_load_plugin' );
[124] Fix | Delete
[125] Fix | Delete
/**
[126] Fix | Delete
* Load migration service
[127] Fix | Delete
*/
[128] Fix | Delete
function ppw_free_load_plugin() {
[129] Fix | Delete
global $migration_free_service;
[130] Fix | Delete
$migration_free_service = new PPW_Default_PW_Manager_Services();
[131] Fix | Delete
global $password_recovery_service;
[132] Fix | Delete
$password_recovery_service = new PPW_Password_Recovery_Manager();
[133] Fix | Delete
}
[134] Fix | Delete
[135] Fix | Delete
/**
[136] Fix | Delete
* Function to check when PHP version is not supported.
[137] Fix | Delete
*/
[138] Fix | Delete
function ppw_fail_php_version() {
[139] Fix | Delete
/* translators: %s: PHP version */
[140] Fix | Delete
$message = sprintf( esc_html__( 'Password Protect WordPress requires PHP version %s+, plugin is currently NOT WORKING.', PPW_Constants::DOMAIN ), '5.6' );
[141] Fix | Delete
$html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
[142] Fix | Delete
echo wp_kses_post( $html_message );
[143] Fix | Delete
}
[144] Fix | Delete
[145] Fix | Delete
/**
[146] Fix | Delete
* Function to check when WP version is not supported.
[147] Fix | Delete
*/
[148] Fix | Delete
function ppw_fail_wp_version() {
[149] Fix | Delete
/* translators: %s: PHP version */
[150] Fix | Delete
$message = sprintf( esc_html__( 'Password Protect WordPress requires WordPress version %s+. Because you are using an earlier version, the plugin is currently NOT WORKING.', PPW_Constants::DOMAIN ), '4.7' );
[151] Fix | Delete
$html_message = sprintf( '<div class="error">%s</div>', wpautop( $message ) );
[152] Fix | Delete
echo wp_kses_post( $html_message );
[153] Fix | Delete
}
[154] Fix | Delete
[155] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function