Version Description
(18 June 2021)= * Fix - Update the jetPack tracking script * Fix - Show plugin settings calling the plugin hook correctly * Fix - Warning: Constants may only evaluate to scalar values in hide-my-wp/config/config.php on line 107 * Fix - Removed the memory limit verification * Fix - Add a warning for memory under 64MB * Fix - Fixed the <?PHP warning in Permalinks at the end of the file
Download this release
Release Info
Developer | johndarrel |
Plugin | Hide My WP Ghost – Security Plugin |
Version | 4.1.08 |
Comparing to | |
See all releases |
Code changes from version 4.1.07 to 4.1.08
- classes/Action.php +92 -4
- classes/Tools.php +6 -24
- config/config.php +6 -75
- config/paths.php +1 -1
- controllers/Menu.php +8 -1
- index.php +9 -3
- readme.txt +8 -0
- view/Advanced.php +1 -1
- view/Permalinks.php +477 -490
- view/js/jptraffic.min.js +66 -1
classes/Action.php
CHANGED
@@ -24,7 +24,10 @@ class HMW_Classes_Action extends HMW_Classes_FrontController {
|
|
24 |
}
|
25 |
}
|
26 |
|
27 |
-
|
|
|
|
|
|
|
28 |
/* Only if post */
|
29 |
if ( HMW_Classes_Tools::isAjax() ) {
|
30 |
$this->getActions();
|
@@ -36,14 +39,17 @@ class HMW_Classes_Action extends HMW_Classes_FrontController {
|
|
36 |
*
|
37 |
* @return void
|
38 |
*/
|
39 |
-
function hookMenu() {
|
40 |
/* Only if post */
|
41 |
if ( ! HMW_Classes_Tools::isAjax() ) {
|
42 |
$this->getActions();
|
43 |
}
|
44 |
}
|
45 |
|
46 |
-
|
|
|
|
|
|
|
47 |
/* Only if post */
|
48 |
if ( ! HMW_Classes_Tools::isAjax() ) {
|
49 |
$this->getActions();
|
@@ -51,6 +57,86 @@ class HMW_Classes_Action extends HMW_Classes_FrontController {
|
|
51 |
}
|
52 |
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
/**
|
55 |
* Get all actions from config.json in core directory and add them in the WP
|
56 |
*
|
@@ -72,7 +158,9 @@ class HMW_Classes_Action extends HMW_Classes_FrontController {
|
|
72 |
return;
|
73 |
}
|
74 |
|
75 |
-
|
|
|
|
|
76 |
if ( isset( $block['active'] ) && $block['active'] == 1 ) {
|
77 |
/* if there is a single action */
|
78 |
if ( isset( $block['actions']['action'] ) ) {
|
24 |
}
|
25 |
}
|
26 |
|
27 |
+
/**
|
28 |
+
* Hook the actions in the Frontend
|
29 |
+
*/
|
30 |
+
public function hookFrontinit() {
|
31 |
/* Only if post */
|
32 |
if ( HMW_Classes_Tools::isAjax() ) {
|
33 |
$this->getActions();
|
39 |
*
|
40 |
* @return void
|
41 |
*/
|
42 |
+
public function hookMenu() {
|
43 |
/* Only if post */
|
44 |
if ( ! HMW_Classes_Tools::isAjax() ) {
|
45 |
$this->getActions();
|
46 |
}
|
47 |
}
|
48 |
|
49 |
+
/**
|
50 |
+
* Hook the actions for Multisite Network
|
51 |
+
*/
|
52 |
+
public function hookMultisiteMenu() {
|
53 |
/* Only if post */
|
54 |
if ( ! HMW_Classes_Tools::isAjax() ) {
|
55 |
$this->getActions();
|
57 |
}
|
58 |
|
59 |
|
60 |
+
/**
|
61 |
+
* Get the list with all the plugin actions
|
62 |
+
* @return array
|
63 |
+
*/
|
64 |
+
public function getActionsTable() {
|
65 |
+
return array(
|
66 |
+
array(
|
67 |
+
"name" => "HMW_Controllers_Settings",
|
68 |
+
"actions" => array(
|
69 |
+
"action" => array(
|
70 |
+
"hmw_settings",
|
71 |
+
"hmw_tweakssettings",
|
72 |
+
"hmw_confirm",
|
73 |
+
"hmw_newpluginschange",
|
74 |
+
"hmw_mappsettings",
|
75 |
+
"hmw_logout",
|
76 |
+
"hmw_abort",
|
77 |
+
"hmw_manualrewrite",
|
78 |
+
"hmw_advsettings",
|
79 |
+
"hmw_backup",
|
80 |
+
"hmw_restore",
|
81 |
+
"hmw_support",
|
82 |
+
"hmw_connect",
|
83 |
+
"hmw_dont_connect"
|
84 |
+
)
|
85 |
+
),
|
86 |
+
"active" => "1"
|
87 |
+
),
|
88 |
+
array(
|
89 |
+
"name" => "HMW_Controllers_Plugins",
|
90 |
+
"actions" => array(
|
91 |
+
"action" => array(
|
92 |
+
"hmw_plugin_install"
|
93 |
+
)
|
94 |
+
),
|
95 |
+
"active" => "1"
|
96 |
+
),
|
97 |
+
array(
|
98 |
+
"name" => "HMW_Controllers_SecurityCheck",
|
99 |
+
"actions" => array(
|
100 |
+
"action" => array(
|
101 |
+
"hmw_securitycheck",
|
102 |
+
"hmw_securityexclude",
|
103 |
+
"hmw_resetexclude"
|
104 |
+
)
|
105 |
+
),
|
106 |
+
"active" => "1"
|
107 |
+
),
|
108 |
+
array(
|
109 |
+
"name" => "HMW_Controllers_Brute",
|
110 |
+
"actions" => array(
|
111 |
+
"action" => array(
|
112 |
+
"hmw_brutesettings",
|
113 |
+
"hmw_blockedips",
|
114 |
+
"hmw_deleteip",
|
115 |
+
"hmw_deleteallips"
|
116 |
+
)
|
117 |
+
),
|
118 |
+
"active" => "1"
|
119 |
+
),
|
120 |
+
array(
|
121 |
+
"name" => "HMW_Controllers_Widget",
|
122 |
+
"actions" => array(
|
123 |
+
"action" => "hmw_widget_securitycheck"
|
124 |
+
),
|
125 |
+
"active" => "1"
|
126 |
+
),
|
127 |
+
array(
|
128 |
+
"name" => "HMW_Controllers_Notice",
|
129 |
+
"actions" => array(
|
130 |
+
"action" => array(
|
131 |
+
"hmw_disable_notice",
|
132 |
+
"hmw_ignore_notice"
|
133 |
+
)
|
134 |
+
),
|
135 |
+
"active" => "1"
|
136 |
+
)
|
137 |
+
);
|
138 |
+
}
|
139 |
+
|
140 |
/**
|
141 |
* Get all actions from config.json in core directory and add them in the WP
|
142 |
*
|
158 |
return;
|
159 |
}
|
160 |
|
161 |
+
$actions = $this->getActionsTable();
|
162 |
+
|
163 |
+
foreach ( $actions as $block ) {
|
164 |
if ( isset( $block['active'] ) && $block['active'] == 1 ) {
|
165 |
/* if there is a single action */
|
166 |
if ( isset( $block['actions']['action'] ) ) {
|
classes/Tools.php
CHANGED
@@ -21,21 +21,6 @@ class HMW_Classes_Tools extends HMW_Classes_FrontController {
|
|
21 |
static $current_user_role = 'default';
|
22 |
|
23 |
public function __construct() {
|
24 |
-
//Check the max memory usage
|
25 |
-
$maxmemory = self::getMaxMemory();
|
26 |
-
if ( $maxmemory && $maxmemory < 60 ) {
|
27 |
-
if ( defined( 'WP_MAX_MEMORY_LIMIT' ) && (int) WP_MAX_MEMORY_LIMIT > 60 ) {
|
28 |
-
@ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
|
29 |
-
$maxmemory = self::getMaxMemory();
|
30 |
-
if ( $maxmemory && $maxmemory < 60 ) {
|
31 |
-
define( 'HMW_DISABLE', true );
|
32 |
-
HMW_Classes_Error::setError( sprintf( __( 'Your memory limit is %sM. You need at least %sM to prevent loading errors in frontend. See: %sIncreasing memory allocated to PHP%s', _HMW_PLUGIN_NAME_ ), $maxmemory, 64, '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">', '</a>' ) );
|
33 |
-
}
|
34 |
-
} else {
|
35 |
-
define( 'HMW_DISABLE', true );
|
36 |
-
HMW_Classes_Error::setError( sprintf( __( 'Your memory limit is %sM. You need at least %sM to prevent loading errors in frontend. See: %sIncreasing memory allocated to PHP%s', _HMW_PLUGIN_NAME_ ), $maxmemory, 64, '<a href="https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP" target="_blank">', '</a>' ) );
|
37 |
-
}
|
38 |
-
}
|
39 |
|
40 |
//Get the plugin options from database
|
41 |
self::$options = self::getOptions();
|
@@ -47,7 +32,8 @@ class HMW_Classes_Tools extends HMW_Classes_FrontController {
|
|
47 |
add_filter( "plugin_row_meta", array( $this, 'hookExtraLinks' ), 10, 4 );
|
48 |
|
49 |
//add setting link in plugin
|
50 |
-
add_filter( '
|
|
|
51 |
}
|
52 |
|
53 |
/**
|
@@ -378,18 +364,14 @@ class HMW_Classes_Tools extends HMW_Classes_FrontController {
|
|
378 |
* Add a link to settings in the plugin list
|
379 |
*
|
380 |
* @param array $links
|
381 |
-
* @param string $file
|
382 |
*
|
383 |
* @return array
|
384 |
*/
|
385 |
-
public function hookActionlink( $links
|
386 |
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
$link .= '<a href="' . self::getSettingsUrl() . '" title="Hide My Wp Settings">' . __( 'Settings', _HMW_PLUGIN_NAME_ ) . '</a>';
|
391 |
-
array_unshift( $links, $link );
|
392 |
-
}
|
393 |
|
394 |
return $links;
|
395 |
}
|
21 |
static $current_user_role = 'default';
|
22 |
|
23 |
public function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
//Get the plugin options from database
|
26 |
self::$options = self::getOptions();
|
32 |
add_filter( "plugin_row_meta", array( $this, 'hookExtraLinks' ), 10, 4 );
|
33 |
|
34 |
//add setting link in plugin
|
35 |
+
add_filter( 'plugin_action_links_' . HMW_BASENAME, array( $this, 'hookActionlink' ) );
|
36 |
+
|
37 |
}
|
38 |
|
39 |
/**
|
364 |
* Add a link to settings in the plugin list
|
365 |
*
|
366 |
* @param array $links
|
|
|
367 |
*
|
368 |
* @return array
|
369 |
*/
|
370 |
+
public function hookActionlink( $links ) {
|
371 |
|
372 |
+
$links[] = '<a href="https://hidemywpghost.com/wordpress_update" target="_blank" style="color:#11967A; font-weight: bold">' . __( 'Upgrade to Premium', _HMW_PLUGIN_NAME_ ) . '</a>';
|
373 |
+
$links[] = '<a href="' . self::getSettingsUrl() . '">' . __( 'Settings', _HMW_PLUGIN_NAME_ ) . '</a>';
|
374 |
+
$links = array_reverse( $links );
|
|
|
|
|
|
|
375 |
|
376 |
return $links;
|
377 |
}
|
config/config.php
CHANGED
@@ -5,7 +5,12 @@ defined( 'ABSPATH' ) || die( 'Cheatin\' uh?' );
|
|
5 |
* The configuration file
|
6 |
*/
|
7 |
defined( 'HMW_REQUEST_TIME' ) || define( 'HMW_REQUEST_TIME', microtime( true ) );
|
8 |
-
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
//force Hide My Wp to load right after initialization
|
11 |
defined( 'HMW_PRIORITY' ) || define( 'HMW_PRIORITY', false );
|
@@ -26,77 +31,3 @@ require_once( dirname( __FILE__ ) . '/paths.php' );
|
|
26 |
/* Define the record name in the Option and UserMeta tables */
|
27 |
define( 'HMW_OPTION', 'hmw_options' );
|
28 |
define( 'HMW_OPTION_SAFE', 'hmw_options_safe' );
|
29 |
-
|
30 |
-
define( 'HMW_ACTIONS', array(
|
31 |
-
array(
|
32 |
-
"name" => "HMW_Controllers_Settings",
|
33 |
-
"actions" => array(
|
34 |
-
"action" => array(
|
35 |
-
"hmw_settings",
|
36 |
-
"hmw_tweakssettings",
|
37 |
-
"hmw_confirm",
|
38 |
-
"hmw_newpluginschange",
|
39 |
-
"hmw_mappsettings",
|
40 |
-
"hmw_logout",
|
41 |
-
"hmw_abort",
|
42 |
-
"hmw_manualrewrite",
|
43 |
-
"hmw_advsettings",
|
44 |
-
"hmw_backup",
|
45 |
-
"hmw_restore",
|
46 |
-
"hmw_support",
|
47 |
-
"hmw_connect",
|
48 |
-
"hmw_dont_connect"
|
49 |
-
)
|
50 |
-
),
|
51 |
-
"active" => "1"
|
52 |
-
),
|
53 |
-
array(
|
54 |
-
"name" => "HMW_Controllers_Plugins",
|
55 |
-
"actions" => array(
|
56 |
-
"action" => array(
|
57 |
-
"hmw_plugin_install"
|
58 |
-
)
|
59 |
-
),
|
60 |
-
"active" => "1"
|
61 |
-
),
|
62 |
-
array(
|
63 |
-
"name" => "HMW_Controllers_SecurityCheck",
|
64 |
-
"actions" => array(
|
65 |
-
"action" => array(
|
66 |
-
"hmw_securitycheck",
|
67 |
-
"hmw_securityexclude",
|
68 |
-
"hmw_resetexclude"
|
69 |
-
)
|
70 |
-
),
|
71 |
-
"active" => "1"
|
72 |
-
),
|
73 |
-
array(
|
74 |
-
"name" => "HMW_Controllers_Brute",
|
75 |
-
"actions" => array(
|
76 |
-
"action" => array(
|
77 |
-
"hmw_brutesettings",
|
78 |
-
"hmw_blockedips",
|
79 |
-
"hmw_deleteip",
|
80 |
-
"hmw_deleteallips"
|
81 |
-
)
|
82 |
-
),
|
83 |
-
"active" => "1"
|
84 |
-
),
|
85 |
-
array(
|
86 |
-
"name" => "HMW_Controllers_Widget",
|
87 |
-
"actions" => array(
|
88 |
-
"action" => "hmw_widget_securitycheck"
|
89 |
-
),
|
90 |
-
"active" => "1"
|
91 |
-
),
|
92 |
-
array(
|
93 |
-
"name" => "HMW_Controllers_Notice",
|
94 |
-
"actions" => array(
|
95 |
-
"action" => array(
|
96 |
-
"hmw_disable_notice",
|
97 |
-
"hmw_ignore_notice"
|
98 |
-
)
|
99 |
-
),
|
100 |
-
"active" => "1"
|
101 |
-
)
|
102 |
-
) );
|
5 |
* The configuration file
|
6 |
*/
|
7 |
defined( 'HMW_REQUEST_TIME' ) || define( 'HMW_REQUEST_TIME', microtime( true ) );
|
8 |
+
|
9 |
+
if ( defined( 'NONCE_KEY' ) ) {
|
10 |
+
defined( '_HMW_NONCE_ID_' ) || define( '_HMW_NONCE_ID_', NONCE_KEY );
|
11 |
+
} else {
|
12 |
+
defined( '_HMW_NONCE_ID_' ) || define( '_HMW_NONCE_ID_', md5( date( 'Y-m-d' ) ) );
|
13 |
+
}
|
14 |
|
15 |
//force Hide My Wp to load right after initialization
|
16 |
defined( 'HMW_PRIORITY' ) || define( 'HMW_PRIORITY', false );
|
31 |
/* Define the record name in the Option and UserMeta tables */
|
32 |
define( 'HMW_OPTION', 'hmw_options' );
|
33 |
define( 'HMW_OPTION_SAFE', 'hmw_options_safe' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config/paths.php
CHANGED
@@ -18,5 +18,5 @@ define( '_HMW_TRANSLATIONS_DIR_', _HMW_ROOT_DIR_ . '/languages/' );
|
|
18 |
define( '_HMW_THEME_DIR_', _HMW_ROOT_DIR_ . '/view/' );
|
19 |
|
20 |
/* URLS */
|
21 |
-
define( '_HMW_URL_', plugins_url() . '/' . basename(realpath(dirname( __FILE__ ) . '/..')) );
|
22 |
define( '_HMW_THEME_URL_', _HMW_URL_ . '/view/' );
|
18 |
define( '_HMW_THEME_DIR_', _HMW_ROOT_DIR_ . '/view/' );
|
19 |
|
20 |
/* URLS */
|
21 |
+
define( '_HMW_URL_', plugins_url() . '/' . basename( realpath( dirname( __FILE__ ) . '/..' ) ) );
|
22 |
define( '_HMW_THEME_URL_', _HMW_URL_ . '/view/' );
|
controllers/Menu.php
CHANGED
@@ -9,6 +9,13 @@ class HMW_Controllers_Menu extends HMW_Classes_FrontController {
|
|
9 |
* Hook the Admin load
|
10 |
*/
|
11 |
public function hookInit() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
/* add the plugin menu in admin */
|
13 |
if (current_user_can('manage_options')) {
|
14 |
//check if activated
|
@@ -41,7 +48,7 @@ class HMW_Controllers_Menu extends HMW_Classes_FrontController {
|
|
41 |
* Creates the Setting menu in WordPress
|
42 |
*/
|
43 |
public function hookMenu() {
|
44 |
-
if (!is_multisite()
|
45 |
$this->model->addMenu(array(ucfirst(_HMW_PLUGIN_NAME_),
|
46 |
'Hide My WP' . $this->alert,
|
47 |
'manage_options',
|
9 |
* Hook the Admin load
|
10 |
*/
|
11 |
public function hookInit() {
|
12 |
+
|
13 |
+
//Check the max memory usage
|
14 |
+
$maxmemory = HMW_Classes_Tools::getMaxMemory();
|
15 |
+
if ( $maxmemory && $maxmemory < 60 ) {
|
16 |
+
HMW_Classes_Error::setError( sprintf( __( 'Your memory limit is %sM. You need at least %sM to prevent loading errors in frontend. See: %sIncreasing memory allocated to PHP%s', _HMW_PLUGIN_NAME_ ), $maxmemory, 64, '<a href="https://www.wpbeginner.com/wp-tutorials/fix-wordpress-memory-exhausted-error-increase-php-memory/" target="_blank">', '</a>' ) );
|
17 |
+
}
|
18 |
+
|
19 |
/* add the plugin menu in admin */
|
20 |
if (current_user_can('manage_options')) {
|
21 |
//check if activated
|
48 |
* Creates the Setting menu in WordPress
|
49 |
*/
|
50 |
public function hookMenu() {
|
51 |
+
if (!is_multisite()) {
|
52 |
$this->model->addMenu(array(ucfirst(_HMW_PLUGIN_NAME_),
|
53 |
'Hide My WP' . $this->alert,
|
54 |
'manage_options',
|
index.php
CHANGED
@@ -6,17 +6,23 @@
|
|
6 |
Plugin Name: Hide My WP Ghost Lite
|
7 |
Plugin URI: https://wordpress.org/plugins/hide-my-wp/
|
8 |
Description: The best solution for WordPress Security. Hide wp-admin, wp-login, wp-content, plugins, themes etc. Add Firewall, Brute Force protection & more. <br /> <a href="https://hidemywpghost.com/wordpress" target="_blank"><strong>Unlock all features</strong></a>
|
9 |
-
Version: 4.1.
|
10 |
Author: WPPlugins - WordPress Security Plugins
|
11 |
Author URI: https://hidemywp.co
|
12 |
License: GPLv2 or later
|
13 |
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
14 |
Text Domain: hide-my-wp
|
15 |
Domain Path: /languages
|
|
|
16 |
*/
|
17 |
|
18 |
-
if (defined( '
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
20 |
/* Call config files */
|
21 |
require( dirname( __FILE__ ) . '/config/config.php' );
|
22 |
|
6 |
Plugin Name: Hide My WP Ghost Lite
|
7 |
Plugin URI: https://wordpress.org/plugins/hide-my-wp/
|
8 |
Description: The best solution for WordPress Security. Hide wp-admin, wp-login, wp-content, plugins, themes etc. Add Firewall, Brute Force protection & more. <br /> <a href="https://hidemywpghost.com/wordpress" target="_blank"><strong>Unlock all features</strong></a>
|
9 |
+
Version: 4.1.08
|
10 |
Author: WPPlugins - WordPress Security Plugins
|
11 |
Author URI: https://hidemywp.co
|
12 |
License: GPLv2 or later
|
13 |
License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
14 |
Text Domain: hide-my-wp
|
15 |
Domain Path: /languages
|
16 |
+
Network: true
|
17 |
*/
|
18 |
|
19 |
+
if (defined( 'ABSPATH' ) && ! defined( 'HMW_VERSION' ) ) {
|
20 |
+
|
21 |
+
define( 'HMW_VERSION', '4.1.08' );
|
22 |
+
define( 'HMW_STABLE_VERSION', '4.1.07' );
|
23 |
+
define( 'HMW_BASENAME', plugin_basename(__FILE__) );
|
24 |
+
|
25 |
+
|
26 |
/* Call config files */
|
27 |
require( dirname( __FILE__ ) . '/config/config.php' );
|
28 |
|
readme.txt
CHANGED
@@ -363,6 +363,14 @@ Enjoy!
|
|
363 |
8. Hide Your WP Site from Theme Detectors like wpthemedetector.com
|
364 |
|
365 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
= 4.1.07 (19 May 2021)=
|
367 |
* Update - Compatibility with WordPress 5.7.2
|
368 |
* Update - Added compatibility with Oxygen Builder
|
363 |
8. Hide Your WP Site from Theme Detectors like wpthemedetector.com
|
364 |
|
365 |
== Changelog ==
|
366 |
+
= 4.1.08 (18 June 2021)=
|
367 |
+
* Fix - Update the jetPack tracking script
|
368 |
+
* Fix - Show plugin settings calling the plugin hook correctly
|
369 |
+
* Fix - Warning: Constants may only evaluate to scalar values in hide-my-wp/config/config.php on line 107
|
370 |
+
* Fix - Removed the memory limit verification
|
371 |
+
* Fix - Add a warning for memory under 64MB
|
372 |
+
* Fix - Fixed the <?PHP warning in Permalinks at the end of the file
|
373 |
+
|
374 |
= 4.1.07 (19 May 2021)=
|
375 |
* Update - Compatibility with WordPress 5.7.2
|
376 |
* Update - Added compatibility with Oxygen Builder
|
view/Advanced.php
CHANGED
@@ -221,4 +221,4 @@
|
|
221 |
</div>
|
222 |
</div>
|
223 |
</div>
|
224 |
-
<?php }
|
221 |
</div>
|
222 |
</div>
|
223 |
</div>
|
224 |
+
<?php } ?>
|
view/Permalinks.php
CHANGED
@@ -1,630 +1,617 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
<input type="hidden" name="action" value="hmw_settings"/>
|
26 |
-
<input type="hidden" name="hmw_mode" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_mode' ) ?>"/>
|
27 |
-
|
28 |
-
<?php do_action( 'hmw_form_notices' ); ?>
|
29 |
-
|
30 |
-
<div class="card col-sm-12">
|
31 |
-
<div class="card-body py-2 px-0">
|
32 |
-
<h3 class="card-title"><?php _e( 'Levels of security', _HMW_PLUGIN_NAME_ ); ?>:</h3>
|
33 |
-
<div class="group_autoload d-flex justify-content-center btn-group mt-3" role="group" data-toggle="button">
|
34 |
-
<button type="button" class="btn btn-lg btn-outline-info default_autoload m-1 py-3 px-4 <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'default' ) ? 'active' : '' ) ?>"><?php echo __( "Default (unsafe)", _HMW_PLUGIN_NAME_ ) ?></button>
|
35 |
-
<button type="button" class="btn btn-lg btn-outline-info lite_autoload m-1 py-3 px-4 <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'lite' ) ? 'active' : '' ) ?>"><?php echo __( "Lite mode", _HMW_PLUGIN_NAME_ ) ?></button>
|
36 |
-
|
37 |
-
<div style="position: relative; margin: .23rem!important;">
|
38 |
-
<div class="box" style="border: none" data-toggle="popover" data-html="true" data-placement="top" data-content="<?php echo sprintf( __( 'Upgrade Your Website Security. Add Firewall, Hide WordPress Completely. %sUnlock this feature%s', _HMW_PLUGIN_NAME_ ), "<br /><a href='https://hidemywpghost.com/wordpress_update' target='_blank'>", "</a>" ) ?>">
|
39 |
-
<div class="ribbon"><span><?php echo __( 'PRO', _HMW_PLUGIN_NAME_ ) ?></span>
|
40 |
-
</div>
|
41 |
</div>
|
42 |
-
<button type="button" class="btn btn-lg btn-outline-info m-1 py-3 px-4" style="opacity: 0.7;"><?php echo __( "Ghost mode", _HMW_PLUGIN_NAME_ ) ?></button>
|
43 |
</div>
|
|
|
44 |
</div>
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
$(".default_autoload").on('click', function () {
|
54 |
-
$('input[name=hmw_mode]').val('default');
|
55 |
-
$('.group_autoload button').removeClass('active');
|
56 |
-
<?php
|
57 |
-
foreach ( HMW_Classes_Tools::$default as $name => $value ) {
|
58 |
-
if ( is_string( $value ) && $value <> "0" && $value <> "1" ) {
|
59 |
-
echo '$("input[type=text][name=' . $name . ']").val("' . str_replace( '"', '\\"', $value ) . '");' . "\n";
|
60 |
-
} elseif ( $value == "0" || $value == "1" ) {
|
61 |
-
echo '$("input[name=' . $name . ']").prop("checked", ' . (int) $value . '); $("input[name=' . $name . ']").trigger("change");';
|
62 |
-
}
|
63 |
-
}
|
64 |
-
?>
|
65 |
-
$('input[name=hmw_admin_url]').trigger('keyup');
|
66 |
-
$('.tab-panel').hide();
|
67 |
-
$('.tab-panel_tutorial').show();
|
68 |
-
});
|
69 |
-
$(".lite_autoload").on('click', function () {
|
70 |
-
$('input[name=hmw_mode]').val('lite');
|
71 |
-
$('.group_autoload button').removeClass('active');
|
72 |
-
<?php
|
73 |
-
$lite = @array_merge( HMW_Classes_Tools::$default, HMW_Classes_Tools::$lite );
|
74 |
-
foreach ( $lite as $name => $value ) {
|
75 |
-
if ( is_string( $value ) && $value <> "0" && $value <> "1" ) {
|
76 |
-
echo '$("input[type=text][name=' . $name . ']").val("' . str_replace( '"', '\\"', $value ) . '");' . "\n";
|
77 |
-
} elseif ( $value == "0" || $value == "1" ) {
|
78 |
-
echo '$("input[name=' . $name . ']").prop("checked", ' . (int) $value . '); $("input[name=' . $name . ']").trigger("change");';
|
79 |
-
|
80 |
-
}
|
81 |
-
}
|
82 |
-
?>
|
83 |
-
$('input[name=hmw_admin_url]').trigger('keyup');
|
84 |
-
$('.tab-panel').show();
|
85 |
-
$('.tab-panel_tutorial').hide();
|
86 |
-
|
87 |
-
});
|
88 |
-
$(".ninja_autoload").on('click', function () {
|
89 |
-
$('input[name=hmw_mode]').val('ninja');
|
90 |
-
$('.group_autoload button').removeClass('active');
|
91 |
-
<?php
|
92 |
-
$ninja = @array_merge( HMW_Classes_Tools::$default, HMW_Classes_Tools::$ninja );
|
93 |
-
foreach ( $ninja as $name => $value ) {
|
94 |
-
if ( is_string( $value ) && $value <> "0" && $value <> "1" ) {
|
95 |
-
echo '$("input[type=text][name=' . $name . ']").val("' . str_replace( '"', '\\"', $value ) . '");' . "\n";
|
96 |
-
} elseif ( $value == "0" || $value == "1" ) {
|
97 |
-
echo '$("input[name=' . $name . ']").prop("checked", ' . (int) $value . '); $("input[name=' . $name . ']").trigger("change");';
|
98 |
-
|
99 |
-
}
|
100 |
-
}
|
101 |
-
?>
|
102 |
-
$('input[name=hmw_admin_url]').trigger('keyup');
|
103 |
-
$('.tab-panel').show();
|
104 |
-
$('.tab-panel_tutorial').hide();
|
105 |
-
|
106 |
-
});
|
107 |
-
|
108 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
});
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
<h3 class="card-title bg-brown text-white p-2"><?php _e( 'Admin Settings', _HMW_PLUGIN_NAME_ ); ?>:</h3>
|
120 |
-
<div class="card-body">
|
121 |
-
<?php if ( defined( 'HMW_DEFAULT_ADMIN' ) && HMW_DEFAULT_ADMIN ) {
|
122 |
-
echo ' <div class="text-danger col-sm-12 border-bottom border-light py-3 mx-0 my-3">' . sprintf( __( 'Your admin URL is changed by another plugin/theme in %s. To activate this option, disable the custom admin in the other plugin or deativate it.', _HMW_PLUGIN_NAME_ ), '<strong>' . HMW_DEFAULT_ADMIN . '</strong>' ) . '</div>';
|
123 |
-
echo '<input type="hidden" name="hmw_admin_url" value="' . HMW_Classes_Tools::$default['hmw_admin_url'] . '"/>';
|
124 |
-
} else {
|
125 |
-
if ( HMW_Classes_Tools::isGodaddy() ) {
|
126 |
-
echo ' <div class="text-danger col-sm-12 border-bottom border-light py-3 mx-0 my-3">' . sprintf( __( "Your admin URL can't be changed on %s hosting because of the %s security terms.", _HMW_PLUGIN_NAME_ ), '<strong>Godaddy</strong>', '<strong>Godaddy</strong>' ) . '</div>';
|
127 |
-
echo '<input type="hidden" name="hmw_admin_url" value="' . HMW_Classes_Tools::$default['hmw_admin_url'] . '"/>';
|
128 |
-
} elseif (PHP_VERSION_ID >= 70400 && HMW_Classes_Tools::isWpengine()) {
|
129 |
-
echo ' <div class="text-danger col-sm-12 border-bottom border-light py-3 mx-0 my-3">' . sprintf( __( "Your admin URL can't be changed on %s because of the %s rules are no longer used.", _HMW_PLUGIN_NAME_ ), '<strong>Wpengine with PHP 7 or greater</strong>' , '<strong>.htaccess</strong>') . '</div>';
|
130 |
-
echo '<input type="hidden" name="hmw_admin_url" value="' . HMW_Classes_Tools::$default['hmw_admin_url'] . '"/>';
|
131 |
-
}else{ ?>
|
132 |
-
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
133 |
-
<div class="col-sm-4 p-0 font-weight-bold">
|
134 |
-
<?php _e( 'Custom Admin Path', _HMW_PLUGIN_NAME_ ); ?>:
|
135 |
-
<div class="small text-black-50"><?php _e( 'eg. adm, back', _HMW_PLUGIN_NAME_ ); ?></div>
|
136 |
-
</div>
|
137 |
-
<div class="col-sm-8 p-0 input-grou p input-group-lg">
|
138 |
-
<input type="text" class="form-control bg-input" name="hmw_admin_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_admin_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_admin_url'] ?>"/>
|
139 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_admin" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
140 |
-
</div>
|
141 |
-
</div>
|
142 |
-
<?php } ?>
|
143 |
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
<div class="checker col-sm-12 row my-2 py-1">
|
156 |
-
<div class="col-sm-12 p-0 switch switch-sm">
|
157 |
-
<input type="hidden" name="hmw_hide_newadmin" value="0"/>
|
158 |
-
<input type="checkbox" id="hmw_hide_newadmin" name="hmw_hide_newadmin" class="switch" <?php echo( HMW_Classes_Tools::getOption( 'hmw_hide_newadmin' ) ? 'checked="checked"' : '' ) ?> value="1"/>
|
159 |
-
<label for="hmw_hide_newadmin"><?php _e( 'Hide the new admin path', _HMW_PLUGIN_NAME_ ); ?></label>
|
160 |
-
<div class="offset-1 text-black-50"><?php _e( 'Let only the new login be accessible and redirect me to admin after logging in', _HMW_PLUGIN_NAME_ ); ?></div>
|
161 |
-
</div>
|
162 |
-
</div>
|
163 |
-
</div>
|
164 |
-
<div class="admin_warning col-sm-12 my-3 text-danger p-0 text-center small" style="display: none">
|
165 |
-
<?php echo sprintf( __( "Some Themes don't work with custom Admin and Ajax paths. In case of ajax errors, switch back to wp-admin and admin-ajax.php.", _HMW_PLUGIN_NAME_ ) ); ?>
|
166 |
-
</div>
|
167 |
-
<div class="col-sm-12 text-center border-light py-1 m-0">
|
168 |
-
<a href="<?php echo HMW_Classes_Tools::getSettingsUrl( 'hmw_settings-hmw_tweaks', true )?>" target="_blank">
|
169 |
-
<?php _e( 'Manage Login and Logout Redirects', _HMW_PLUGIN_NAME_ ); ?>
|
170 |
-
</a>
|
171 |
-
</div>
|
172 |
-
<?php } ?>
|
173 |
-
</div>
|
174 |
-
</div>
|
175 |
-
<div class="card col-sm-12 p-0 tab-panel" <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'default' ) ? 'style="display:none"' : '' ) ?>>
|
176 |
-
<h3 class="card-title bg-brown text-white p-2"><?php _e( 'Login Settings', _HMW_PLUGIN_NAME_ ); ?>:</h3>
|
177 |
-
<div class="card-body">
|
178 |
-
<?php if ( defined( 'HMW_DEFAULT_LOGIN' ) && HMW_DEFAULT_LOGIN ) {
|
179 |
-
echo ' <div class="text-danger col-sm-12 border-bottom border-light py-3 mx-0 my-3">' . sprintf( __( 'Your login URL is changed by another plugin/theme in %s. To activate this option, disable the custom login in the other plugin or deativate it.', _HMW_PLUGIN_NAME_ ), '<strong>' . HMW_DEFAULT_LOGIN . '</strong>' ) . '</div>';
|
180 |
-
} else {
|
181 |
-
?>
|
182 |
-
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
183 |
-
<div class="col-sm-4 p-0 font-weight-bold">
|
184 |
-
<?php _e( 'Custom Login Path', _HMW_PLUGIN_NAME_ ); ?>:
|
185 |
-
<div class="small text-black-50"><?php _e( 'eg. login or signin', _HMW_PLUGIN_NAME_ ); ?></div>
|
186 |
-
</div>
|
187 |
-
<div class="col-sm-8 p-0 input-group input-group-lg">
|
188 |
-
<input type="text" class="form-control bg-input" name="hmw_login_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_login_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_login_url'] ?>"/>
|
189 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_login" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
190 |
-
</div>
|
191 |
-
</div>
|
192 |
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
<div class="offset-1 text-black-50"><?php _e( 'Show 404 Not Found Error when visitors access /wp-login.php', _HMW_PLUGIN_NAME_ ); ?></div>
|
200 |
-
</div>
|
201 |
-
</div>
|
202 |
-
</div>
|
203 |
|
204 |
-
|
205 |
-
<div class="checker col-sm-12 row my-2 py-1">
|
206 |
-
<div class="col-sm-12 p-0 switch switch-sm">
|
207 |
-
<input type="hidden" name="hmw_hide_login" value="0"/>
|
208 |
-
<input type="checkbox" id="hmw_hide_login" name="hmw_hide_login" class="switch" <?php echo( HMW_Classes_Tools::getOption( 'hmw_hide_login' ) ? 'checked="checked"' : '' ) ?> value="1"/>
|
209 |
-
<label for="hmw_hide_login"><?php _e( 'Hide /login', _HMW_PLUGIN_NAME_ ); ?></label>
|
210 |
-
<div class="offset-1 text-black-50"><?php _e( 'Show 404 Not Found Error when visitors access /login', _HMW_PLUGIN_NAME_ ); ?></div>
|
211 |
-
</div>
|
212 |
-
</div>
|
213 |
-
</div>
|
214 |
|
215 |
-
<div class="border-bottom border-gray"></div>
|
216 |
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
<div class="small text-black-50"><?php _e( 'eg. lostpass or forgotpass', _HMW_PLUGIN_NAME_ ); ?></div>
|
221 |
-
</div>
|
222 |
-
<div class="col-sm-8 p-0 input-group input-group-lg">
|
223 |
-
<input type="text" class="form-control bg-input" name="hmw_lostpassword_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_lostpassword_url' ) ?>" placeholder="?action=lostpassword"/>
|
224 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_lost_password" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
225 |
-
</div>
|
226 |
-
</div>
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
229 |
<div class="col-sm-4 p-0 font-weight-bold">
|
230 |
-
<?php _e( 'Custom
|
231 |
-
<div class="small text-black-50"><?php _e( 'eg.
|
232 |
</div>
|
233 |
-
<div class="col-sm-8 p-0 input-
|
234 |
-
<input type="text" class="form-control bg-input" name="
|
235 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#
|
236 |
</div>
|
237 |
</div>
|
|
|
238 |
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
<
|
243 |
-
|
244 |
-
|
245 |
-
<
|
246 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_logout" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
247 |
</div>
|
248 |
</div>
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
<div class="
|
257 |
-
<input type="text" class="form-control bg-input" name="hmw_activate_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_activate_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_activate_url'] ?>"/>
|
258 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_activation" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
259 |
-
</div>
|
260 |
</div>
|
261 |
-
<?php } ?>
|
262 |
-
|
263 |
-
<div class="col-sm-12 text-center border-light py-1 m-0">
|
264 |
-
<a href="<?php echo HMW_Classes_Tools::getSettingsUrl( 'hmw_settings-hmw_tweaks', true )?>" target="_blank">
|
265 |
-
<?php _e( 'Manage Login and Logout Redirects', _HMW_PLUGIN_NAME_ ); ?>
|
266 |
-
</a>
|
267 |
</div>
|
268 |
-
|
269 |
-
|
270 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
</div>
|
272 |
-
|
273 |
-
|
274 |
-
|
|
|
|
|
|
|
|
|
|
|
275 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
276 |
<div class="col-sm-4 p-0 font-weight-bold">
|
277 |
-
<?php _e( 'Custom
|
278 |
-
<div class="small text-black-50"><?php _e( 'eg.
|
279 |
</div>
|
280 |
<div class="col-sm-8 p-0 input-group input-group-lg">
|
281 |
-
<input type="text" class="form-control bg-input" name="
|
282 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#
|
283 |
</div>
|
284 |
</div>
|
285 |
|
286 |
-
<div class="col-sm-12 row mb-1 ml-1
|
287 |
<div class="checker col-sm-12 row my-2 py-1">
|
288 |
<div class="col-sm-12 p-0 switch switch-sm">
|
289 |
-
<input type="hidden" name="
|
290 |
-
<input type="checkbox" id="
|
291 |
-
<label for="
|
292 |
-
<div class="offset-1 text-black-50"><?php
|
293 |
-
<div class="offset-1 text-danger"><?php _e( 'Works only with the custom admin-ajax path to avoid infinite loops.', _HMW_PLUGIN_NAME_ ); ?></div>
|
294 |
</div>
|
295 |
</div>
|
296 |
</div>
|
297 |
|
298 |
-
<div class="col-sm-12 row
|
299 |
-
<div class="col-sm-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
</div>
|
307 |
</div>
|
308 |
|
|
|
|
|
309 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
310 |
<div class="col-sm-4 p-0 font-weight-bold">
|
311 |
-
<?php _e( 'Custom
|
312 |
-
<div class="small text-black-50"><?php _e( 'eg.
|
313 |
</div>
|
314 |
<div class="col-sm-8 p-0 input-group input-group-lg">
|
315 |
-
<input type="text" class="form-control bg-input" name="
|
316 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#
|
317 |
</div>
|
318 |
</div>
|
319 |
|
320 |
-
|
321 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
322 |
<div class="col-sm-4 p-0 font-weight-bold">
|
323 |
-
<?php _e( 'Custom
|
324 |
-
<div class="small text-black-50"><?php _e( 'eg.
|
|
|
|
|
|
|
|
|
325 |
</div>
|
326 |
-
<?php if ( ! defined( 'UPLOADS' ) ) { ?>
|
327 |
-
<div class="col-sm-8 p-0 input-group input-group-lg">
|
328 |
-
<input type="text" class="form-control bg-input" name="hmw_upload_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_upload_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_upload_url'] ?>"/>
|
329 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_uloads" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
330 |
-
</div>
|
331 |
-
<?php } else { ?>
|
332 |
-
<div class="col-sm-8 text-danger p-0">
|
333 |
-
<?php echo sprintf( __( "You already defined a different wp-content/uploads directory in wp-config.php %s", _HMW_PLUGIN_NAME_ ), ': <strong>' . UPLOADS . '</strong>' ); ?>
|
334 |
-
</div>
|
335 |
-
<?php } ?>
|
336 |
</div>
|
|
|
337 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
338 |
<div class="col-sm-4 p-0 font-weight-bold">
|
339 |
-
<?php _e( 'Custom
|
340 |
-
<div class="small text-black-50"><?php _e( 'eg.
|
341 |
</div>
|
342 |
<div class="col-sm-8 p-0 input-group input-group-lg">
|
343 |
-
<input type="text" class="form-control bg-input" name="
|
344 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#
|
345 |
</div>
|
346 |
</div>
|
347 |
|
348 |
-
<?php if (
|
349 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
350 |
<div class="col-sm-4 p-0 font-weight-bold">
|
351 |
-
<?php _e( 'Custom
|
352 |
-
<div class="small text-black-50"><?php _e( 'eg.
|
353 |
</div>
|
354 |
<div class="col-sm-8 p-0 input-group input-group-lg">
|
355 |
-
<input type="text" class="form-control bg-input" name="
|
356 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#
|
357 |
</div>
|
358 |
</div>
|
359 |
-
<?php } else { ?>
|
360 |
-
<input type="hidden" name="hmw_author_url" value="<?php echo HMW_Classes_Tools::$default['hmw_author_url'] ?>"/>
|
361 |
<?php } ?>
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
373 |
</div>
|
374 |
</div>
|
|
|
375 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
376 |
</div>
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
382 |
<div class="col-sm-4 p-0 font-weight-bold">
|
383 |
-
<?php _e( 'Custom
|
384 |
-
<div class="small text-black-50"><?php _e( 'eg.
|
385 |
</div>
|
386 |
<div class="col-sm-8 p-0 input-group input-group-lg">
|
387 |
-
<input type="text" class="form-control bg-input" name="
|
388 |
-
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#
|
389 |
</div>
|
390 |
</div>
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
|
|
|
|
|
|
398 |
</div>
|
|
|
|
|
399 |
</div>
|
400 |
</div>
|
401 |
</div>
|
|
|
402 |
</div>
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
</div>
|
415 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
</div>
|
427 |
</div>
|
428 |
</div>
|
|
|
429 |
|
430 |
|
431 |
-
</div>
|
432 |
</div>
|
433 |
</div>
|
434 |
</div>
|
435 |
-
|
436 |
-
|
437 |
-
|
|
|
438 |
|
439 |
-
|
440 |
-
|
441 |
-
|
|
|
|
|
|
|
|
|
|
|
442 |
</div>
|
443 |
-
<div class="col-sm-
|
444 |
-
<
|
445 |
-
<?php _e( 'Custom wp-json Path', _HMW_PLUGIN_NAME_ ); ?>:
|
446 |
-
<div class="small text-black-50"><?php _e( 'eg. json, api, call', _HMW_PLUGIN_NAME_ ); ?></div>
|
447 |
-
</div>
|
448 |
-
<div class="col-sm-8 p-0 input-group input-group-lg" style="opacity: 0.3">
|
449 |
-
<input type="text" class="form-control bg-input"/>
|
450 |
-
</div>
|
451 |
</div>
|
452 |
</div>
|
|
|
453 |
|
454 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
455 |
<div class="col-sm-12 row mb-1 ml-1">
|
456 |
<div class="checker col-sm-12 row my-2 py-1">
|
457 |
<div class="col-sm-12 p-0 switch switch-sm">
|
458 |
-
<
|
459 |
-
|
460 |
-
|
461 |
-
<
|
462 |
-
<div class="offset-1 text-black-50"><?php _e(
|
|
|
|
|
463 |
</div>
|
464 |
</div>
|
465 |
</div>
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
|
|
|
|
|
|
473 |
</div>
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
</div>
|
481 |
-
<label for="hmw_hide_oldpaths"><?php _e( 'Hide WordPress Common Paths', _HMW_PLUGIN_NAME_ ); ?></label>
|
482 |
-
<div class="offset-1 text-black-50"><?php _e( 'Hide /wp-content, /wp-include, /plugins, /themes paths', _HMW_PLUGIN_NAME_ ); ?></div>
|
483 |
-
<div class="offset-1 text-black-50"><?php _e( 'Hide upgrade.php and install.php for visitors', _HMW_PLUGIN_NAME_ ); ?></div>
|
484 |
-
<div class="offset-1 text-black-50"><?php _e( '(this may affect the fonts and images loaded through CSS)', _HMW_PLUGIN_NAME_ ); ?></div>
|
485 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
486 |
</div>
|
487 |
</div>
|
|
|
|
|
|
|
|
|
488 |
<div class="col-sm-12 row mb-1 ml-1">
|
489 |
<div class="checker col-sm-12 row my-2 py-1">
|
490 |
<div class="col-sm-12 p-0 switch switch-sm">
|
491 |
<div class="hmw_pro">
|
492 |
-
<img src="<?php echo _HMW_THEME_URL_ . 'img/pro.png' ?>">
|
493 |
-
|
494 |
-
<
|
495 |
-
<div class="offset-1 text-black-50"><?php
|
496 |
</div>
|
497 |
</div>
|
498 |
</div>
|
499 |
|
500 |
<div class="col-sm-12 row mb-1 ml-1">
|
|
|
501 |
<div class="checker col-sm-12 row my-2 py-1">
|
502 |
<div class="col-sm-12 p-0 switch switch-sm">
|
503 |
<div class="hmw_pro">
|
504 |
-
<img src="<?php echo _HMW_THEME_URL_ . 'img/pro.png' ?>">
|
505 |
-
|
506 |
-
<
|
507 |
-
<div class="offset-1 text-black-50"><?php _e( "Add Strict-Transport-Security header", _HMW_PLUGIN_NAME_ ); ?> </div>
|
508 |
-
<div class="offset-1 text-black-50"><?php _e( "Add Content-Security-Policy header", _HMW_PLUGIN_NAME_ ); ?> </div>
|
509 |
-
<div class="offset-1 text-black-50"><?php _e( "Add X-Frame-Options header", _HMW_PLUGIN_NAME_ ); ?> </div>
|
510 |
-
<div class="offset-1 text-black-50"><?php _e( "Add X-XSS-Protection header", _HMW_PLUGIN_NAME_ ); ?> </div>
|
511 |
-
<div class="offset-1 text-black-50"><?php _e( "Add X-Content-Type-Options header", _HMW_PLUGIN_NAME_ ); ?> </div>
|
512 |
</div>
|
513 |
</div>
|
514 |
</div>
|
515 |
|
516 |
-
|
517 |
-
|
518 |
-
<div class="col-sm-12 row mb-1 ml-1">
|
519 |
-
<div class="checker col-sm-12 row my-2 py-1">
|
520 |
-
<div class="col-sm-12 p-0 switch switch-sm">
|
521 |
-
<div class="hmw_pro">
|
522 |
-
<img src="<?php echo _HMW_THEME_URL_ . 'img/pro.png' ?>"></div>
|
523 |
-
<label for="hmw_sqlinjection"><?php _e( 'Firewall Against Script Injection', _HMW_PLUGIN_NAME_ ); ?></label>
|
524 |
-
<div class="offset-1 text-black-50"><?php echo __( 'Most WordPress installations are hosted on the popular Apache, Nginx and IIS web servers.', _HMW_PLUGIN_NAME_ ); ?></div>
|
525 |
-
<div class="offset-1 text-black-50"><?php echo __( 'A thorough set of rules can prevent many types of SQL Injection and URL hacks from being interpreted.', _HMW_PLUGIN_NAME_ ); ?></div>
|
526 |
-
</div>
|
527 |
-
</div>
|
528 |
-
</div>
|
529 |
-
|
530 |
-
<div class="col-sm-12 row mb-1 ml-1">
|
531 |
-
<?php $uploads = wp_upload_dir(); ?>
|
532 |
-
<div class="checker col-sm-12 row my-2 py-1">
|
533 |
-
<div class="col-sm-12 p-0 switch switch-sm">
|
534 |
-
<div class="hmw_pro">
|
535 |
-
<img src="<?php echo _HMW_THEME_URL_ . 'img/pro.png' ?>"></div>
|
536 |
-
<label for="hmw_disable_browsing"><?php _e( 'Disable Directory Browsing', _HMW_PLUGIN_NAME_ ); ?></label>
|
537 |
-
<div class="offset-1 text-black-50"><?php echo sprintf( __( "Don't let hackers see any directory content. See %sUploads Directory%s", _HMW_PLUGIN_NAME_ ), '<a href="' . $uploads['baseurl'] . '" target="_blank">', '</a>' ); ?></div>
|
538 |
-
</div>
|
539 |
-
</div>
|
540 |
-
</div>
|
541 |
-
|
542 |
-
<?php } ?>
|
543 |
-
</div>
|
544 |
</div>
|
545 |
</div>
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
<div class="col-sm-8 p-0 input-group input-group-lg">
|
554 |
-
<input type="text" class="form-control bg-input" name="hmw_category_base" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_category_base' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_category_base'] ?>"/>
|
555 |
-
</div>
|
556 |
</div>
|
|
|
|
|
|
|
|
|
557 |
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
</div>
|
566 |
</div>
|
567 |
</div>
|
568 |
</div>
|
|
|
569 |
|
570 |
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
|
598 |
-
|
599 |
-
|
600 |
-
</div>
|
601 |
</div>
|
602 |
</div>
|
|
|
603 |
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
</div>
|
622 |
</div>
|
623 |
</div>
|
|
|
624 |
|
625 |
-
|
626 |
|
627 |
-
</div>
|
628 |
</div>
|
629 |
</div>
|
630 |
-
|
1 |
+
<div id="hmw_wrap" class="d-flex flex-row my-3 bg-light">
|
2 |
+
<?php echo $view->getAdminTabs( HMW_Classes_Tools::getValue( 'tab', 'hmw_permalinks' ) ); ?>
|
3 |
+
<div class="hmw_row d-flex flex-row bg-white px-3">
|
4 |
+
<?php do_action( 'hmw_notices' ); ?>
|
5 |
+
<div class="hmw_col flex-grow-1 mr-3">
|
6 |
+
<?php echo $view->getView( 'FrontendCheck' ); ?>
|
7 |
+
|
8 |
+
<form method="POST">
|
9 |
+
<?php wp_nonce_field( 'hmw_settings', 'hmw_nonce' ); ?>
|
10 |
+
<input type="hidden" name="action" value="hmw_settings"/>
|
11 |
+
<input type="hidden" name="hmw_mode" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_mode' ) ?>"/>
|
12 |
+
|
13 |
+
<?php do_action( 'hmw_form_notices' ); ?>
|
14 |
+
|
15 |
+
<div class="card col-sm-12">
|
16 |
+
<div class="card-body py-2 px-0">
|
17 |
+
<h3 class="card-title"><?php _e( 'Levels of security', _HMW_PLUGIN_NAME_ ); ?>:</h3>
|
18 |
+
<div class="group_autoload d-flex justify-content-center btn-group mt-3" role="group" data-toggle="button">
|
19 |
+
<button type="button" class="btn btn-lg btn-outline-info default_autoload m-1 py-3 px-4 <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'default' ) ? 'active' : '' ) ?>"><?php echo __( "Default (unsafe)", _HMW_PLUGIN_NAME_ ) ?></button>
|
20 |
+
<button type="button" class="btn btn-lg btn-outline-info lite_autoload m-1 py-3 px-4 <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'lite' ) ? 'active' : '' ) ?>"><?php echo __( "Lite mode", _HMW_PLUGIN_NAME_ ) ?></button>
|
21 |
+
|
22 |
+
<div style="position: relative; margin: .23rem!important;">
|
23 |
+
<div class="box" style="border: none" data-toggle="popover" data-html="true" data-placement="top" data-content="<?php echo sprintf( __( 'Upgrade Your Website Security. Add Firewall, Hide WordPress Completely. %sUnlock this feature%s', _HMW_PLUGIN_NAME_ ), "<br /><a href='https://hidemywpghost.com/wordpress_update' target='_blank'>", "</a>" ) ?>">
|
24 |
+
<div class="ribbon"><span><?php echo __( 'PRO', _HMW_PLUGIN_NAME_ ) ?></span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
</div>
|
|
|
26 |
</div>
|
27 |
+
<button type="button" class="btn btn-lg btn-outline-info m-1 py-3 px-4" style="opacity: 0.7;"><?php echo __( "Ghost mode", _HMW_PLUGIN_NAME_ ) ?></button>
|
28 |
</div>
|
29 |
+
</div>
|
30 |
+
<div class="wp-admin_warning col-sm-12 my-2 text-danger p-0 text-center" <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_hide_admin' ) ) ? '' : 'style="display: none;"' ) ?> >
|
31 |
+
<div class="my-2 small"><?php echo sprintf( __( "%sWARNING:%s The admin path is hidden from visitors. Use the custom login URL to login to admin", _HMW_PLUGIN_NAME_ ), '<span class="font-weight-bold">', '</span>' ); ?>:
|
32 |
+
<br/>
|
33 |
+
<a href="<?php echo site_url() . '/' . HMW_Classes_Tools::getOption( 'hmw_login_url' ) ?>" target="_blank"><strong><?php echo site_url() . '/' . HMW_Classes_Tools::getOption( 'hmw_login_url' ) ?></strong></a>
|
34 |
+
</div>
|
35 |
+
<div class="my-3 small"><?php echo sprintf( __( "If you can't login, use this URL: %s and all your changes are roll back to default", _HMW_PLUGIN_NAME_ ), "<strong>" . site_url() . "/wp-login.php?" . HMW_Classes_Tools::getOption( 'hmw_disable_name' ) . "=" . HMW_Classes_Tools::getOption( 'hmw_disable' ) . "</strong><br />" ); ?></div>
|
36 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
+
<script>
|
39 |
+
(function ($) {
|
40 |
+
$(document).ready(function () {
|
41 |
+
$(".default_autoload").on('click', function () {
|
42 |
+
$('input[name=hmw_mode]').val('default');
|
43 |
+
$('.group_autoload button').removeClass('active');
|
44 |
+
<?php
|
45 |
+
foreach ( HMW_Classes_Tools::$default as $name => $value ) {
|
46 |
+
if ( is_string( $value ) && $value <> "0" && $value <> "1" ) {
|
47 |
+
echo '$("input[type=text][name=' . $name . ']").val("' . str_replace( '"', '\\"', $value ) . '");' . "\n";
|
48 |
+
} elseif ( $value == "0" || $value == "1" ) {
|
49 |
+
echo '$("input[name=' . $name . ']").prop("checked", ' . (int) $value . '); $("input[name=' . $name . ']").trigger("change");';
|
50 |
+
}
|
51 |
+
}
|
52 |
+
?>
|
53 |
+
$('input[name=hmw_admin_url]').trigger('keyup');
|
54 |
+
$('.tab-panel').hide();
|
55 |
+
$('.tab-panel_tutorial').show();
|
56 |
});
|
57 |
+
$(".lite_autoload").on('click', function () {
|
58 |
+
$('input[name=hmw_mode]').val('lite');
|
59 |
+
$('.group_autoload button').removeClass('active');
|
60 |
+
<?php
|
61 |
+
$lite = @array_merge( HMW_Classes_Tools::$default, HMW_Classes_Tools::$lite );
|
62 |
+
foreach ( $lite as $name => $value ) {
|
63 |
+
if ( is_string( $value ) && $value <> "0" && $value <> "1" ) {
|
64 |
+
echo '$("input[type=text][name=' . $name . ']").val("' . str_replace( '"', '\\"', $value ) . '");' . "\n";
|
65 |
+
} elseif ( $value == "0" || $value == "1" ) {
|
66 |
+
echo '$("input[name=' . $name . ']").prop("checked", ' . (int) $value . '); $("input[name=' . $name . ']").trigger("change");';
|
67 |
|
68 |
+
}
|
69 |
+
}
|
70 |
+
?>
|
71 |
+
$('input[name=hmw_admin_url]').trigger('keyup');
|
72 |
+
$('.tab-panel').show();
|
73 |
+
$('.tab-panel_tutorial').hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
+
});
|
76 |
+
$(".ninja_autoload").on('click', function () {
|
77 |
+
$('input[name=hmw_mode]').val('ninja');
|
78 |
+
$('.group_autoload button').removeClass('active');
|
79 |
+
<?php
|
80 |
+
$ninja = @array_merge( HMW_Classes_Tools::$default, HMW_Classes_Tools::$ninja );
|
81 |
+
foreach ( $ninja as $name => $value ) {
|
82 |
+
if ( is_string( $value ) && $value <> "0" && $value <> "1" ) {
|
83 |
+
echo '$("input[type=text][name=' . $name . ']").val("' . str_replace( '"', '\\"', $value ) . '");' . "\n";
|
84 |
+
} elseif ( $value == "0" || $value == "1" ) {
|
85 |
+
echo '$("input[name=' . $name . ']").prop("checked", ' . (int) $value . '); $("input[name=' . $name . ']").trigger("change");';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
+
}
|
88 |
+
}
|
89 |
+
?>
|
90 |
+
$('input[name=hmw_admin_url]').trigger('keyup');
|
91 |
+
$('.tab-panel').show();
|
92 |
+
$('.tab-panel_tutorial').hide();
|
|
|
|
|
|
|
|
|
93 |
|
94 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
|
|
96 |
|
97 |
+
});
|
98 |
+
})(jQuery);
|
99 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
+
</div>
|
102 |
+
</div>
|
103 |
+
<div class="card col-sm-12 p-0 tab-panel_tutorial embed-responsive embed-responsive-16by9 text-center" <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'lite' ) ? 'style="display:none"' : '' ) ?>>
|
104 |
+
<iframe width="853" height="480" style="max-width: 100%" src="https://www.youtube.com/embed/VGUs1dL611I?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
|
105 |
+
</div>
|
106 |
+
<div class="card col-sm-12 p-0 tab-panel" <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'default' ) ? 'style="display:none"' : '' ) ?>>
|
107 |
+
<h3 class="card-title bg-brown text-white p-2"><?php _e( 'Admin Settings', _HMW_PLUGIN_NAME_ ); ?>:</h3>
|
108 |
+
<div class="card-body">
|
109 |
+
<?php if ( defined( 'HMW_DEFAULT_ADMIN' ) && HMW_DEFAULT_ADMIN ) {
|
110 |
+
echo ' <div class="text-danger col-sm-12 border-bottom border-light py-3 mx-0 my-3">' . sprintf( __( 'Your admin URL is changed by another plugin/theme in %s. To activate this option, disable the custom admin in the other plugin or deativate it.', _HMW_PLUGIN_NAME_ ), '<strong>' . HMW_DEFAULT_ADMIN . '</strong>' ) . '</div>';
|
111 |
+
echo '<input type="hidden" name="hmw_admin_url" value="' . HMW_Classes_Tools::$default['hmw_admin_url'] . '"/>';
|
112 |
+
} else {
|
113 |
+
if ( HMW_Classes_Tools::isGodaddy() ) {
|
114 |
+
echo ' <div class="text-danger col-sm-12 border-bottom border-light py-3 mx-0 my-3">' . sprintf( __( "Your admin URL can't be changed on %s hosting because of the %s security terms.", _HMW_PLUGIN_NAME_ ), '<strong>Godaddy</strong>', '<strong>Godaddy</strong>' ) . '</div>';
|
115 |
+
echo '<input type="hidden" name="hmw_admin_url" value="' . HMW_Classes_Tools::$default['hmw_admin_url'] . '"/>';
|
116 |
+
} elseif ( PHP_VERSION_ID >= 70400 && HMW_Classes_Tools::isWpengine() ) {
|
117 |
+
echo ' <div class="text-danger col-sm-12 border-bottom border-light py-3 mx-0 my-3">' . sprintf( __( "Your admin URL can't be changed on %s because of the %s rules are no longer used.", _HMW_PLUGIN_NAME_ ), '<strong>Wpengine with PHP 7 or greater</strong>', '<strong>.htaccess</strong>' ) . '</div>';
|
118 |
+
echo '<input type="hidden" name="hmw_admin_url" value="' . HMW_Classes_Tools::$default['hmw_admin_url'] . '"/>';
|
119 |
+
} else { ?>
|
120 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
121 |
<div class="col-sm-4 p-0 font-weight-bold">
|
122 |
+
<?php _e( 'Custom Admin Path', _HMW_PLUGIN_NAME_ ); ?>:
|
123 |
+
<div class="small text-black-50"><?php _e( 'eg. adm, back', _HMW_PLUGIN_NAME_ ); ?></div>
|
124 |
</div>
|
125 |
+
<div class="col-sm-8 p-0 input-grou p input-group-lg">
|
126 |
+
<input type="text" class="form-control bg-input" name="hmw_admin_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_admin_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_admin_url'] ?>"/>
|
127 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_admin" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
128 |
</div>
|
129 |
</div>
|
130 |
+
<?php } ?>
|
131 |
|
132 |
+
<div class="col-sm-12 row mb-1 ml-1">
|
133 |
+
<div class="checker col-sm-12 row my-2 py-1">
|
134 |
+
<div class="col-sm-12 p-0 switch switch-sm">
|
135 |
+
<input type="hidden" name="hmw_hide_admin" value="0"/>
|
136 |
+
<input type="checkbox" id="hmw_hide_admin" name="hmw_hide_admin" class="switch" <?php echo( HMW_Classes_Tools::getOption( 'hmw_hide_admin' ) ? 'checked="checked"' : '' ) ?> value="1"/>
|
137 |
+
<label for="hmw_hide_admin"><?php _e( 'Hide "wp-admin"', _HMW_PLUGIN_NAME_ ); ?></label>
|
138 |
+
<div class="offset-1 text-black-50"><?php _e( 'Show 404 Not Found Error when visitors access /wp-admin', _HMW_PLUGIN_NAME_ ); ?></div>
|
|
|
139 |
</div>
|
140 |
</div>
|
141 |
+
</div>
|
142 |
+
<div class="col-sm-12 row mb-1 ml-1 hmw_hide_newadmin_div" <?php echo( HMW_Classes_Tools::getOption( 'hmw_admin_url' ) == HMW_Classes_Tools::$default['hmw_admin_url'] ? 'style="display:none;"' : '' ) ?>>
|
143 |
+
<div class="checker col-sm-12 row my-2 py-1">
|
144 |
+
<div class="col-sm-12 p-0 switch switch-sm">
|
145 |
+
<input type="hidden" name="hmw_hide_newadmin" value="0"/>
|
146 |
+
<input type="checkbox" id="hmw_hide_newadmin" name="hmw_hide_newadmin" class="switch" <?php echo( HMW_Classes_Tools::getOption( 'hmw_hide_newadmin' ) ? 'checked="checked"' : '' ) ?> value="1"/>
|
147 |
+
<label for="hmw_hide_newadmin"><?php _e( 'Hide the new admin path', _HMW_PLUGIN_NAME_ ); ?></label>
|
148 |
+
<div class="offset-1 text-black-50"><?php _e( 'Let only the new login be accessible and redirect me to admin after logging in', _HMW_PLUGIN_NAME_ ); ?></div>
|
|
|
|
|
|
|
149 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
</div>
|
151 |
+
</div>
|
152 |
+
<div class="admin_warning col-sm-12 my-3 text-danger p-0 text-center small" style="display: none">
|
153 |
+
<?php echo sprintf( __( "Some Themes don't work with custom Admin and Ajax paths. In case of ajax errors, switch back to wp-admin and admin-ajax.php.", _HMW_PLUGIN_NAME_ ) ); ?>
|
154 |
+
</div>
|
155 |
+
<div class="col-sm-12 text-center border-light py-1 m-0">
|
156 |
+
<a href="<?php echo HMW_Classes_Tools::getSettingsUrl( 'hmw_settings-hmw_tweaks', true ) ?>" target="_blank">
|
157 |
+
<?php _e( 'Manage Login and Logout Redirects', _HMW_PLUGIN_NAME_ ); ?>
|
158 |
+
</a>
|
159 |
+
</div>
|
160 |
+
<?php } ?>
|
161 |
</div>
|
162 |
+
</div>
|
163 |
+
<div class="card col-sm-12 p-0 tab-panel" <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'default' ) ? 'style="display:none"' : '' ) ?>>
|
164 |
+
<h3 class="card-title bg-brown text-white p-2"><?php _e( 'Login Settings', _HMW_PLUGIN_NAME_ ); ?>:</h3>
|
165 |
+
<div class="card-body">
|
166 |
+
<?php if ( defined( 'HMW_DEFAULT_LOGIN' ) && HMW_DEFAULT_LOGIN ) {
|
167 |
+
echo ' <div class="text-danger col-sm-12 border-bottom border-light py-3 mx-0 my-3">' . sprintf( __( 'Your login URL is changed by another plugin/theme in %s. To activate this option, disable the custom login in the other plugin or deativate it.', _HMW_PLUGIN_NAME_ ), '<strong>' . HMW_DEFAULT_LOGIN . '</strong>' ) . '</div>';
|
168 |
+
} else {
|
169 |
+
?>
|
170 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
171 |
<div class="col-sm-4 p-0 font-weight-bold">
|
172 |
+
<?php _e( 'Custom Login Path', _HMW_PLUGIN_NAME_ ); ?>:
|
173 |
+
<div class="small text-black-50"><?php _e( 'eg. login or signin', _HMW_PLUGIN_NAME_ ); ?></div>
|
174 |
</div>
|
175 |
<div class="col-sm-8 p-0 input-group input-group-lg">
|
176 |
+
<input type="text" class="form-control bg-input" name="hmw_login_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_login_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_login_url'] ?>"/>
|
177 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_login" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
178 |
</div>
|
179 |
</div>
|
180 |
|
181 |
+
<div class="col-sm-12 row mb-1 ml-1 hmw_hide_wplogin_div">
|
182 |
<div class="checker col-sm-12 row my-2 py-1">
|
183 |
<div class="col-sm-12 p-0 switch switch-sm">
|
184 |
+
<input type="hidden" name="hmw_hide_wplogin" value="0"/>
|
185 |
+
<input type="checkbox" id="hmw_hide_wplogin" name="hmw_hide_wplogin" class="switch" <?php echo( HMW_Classes_Tools::getOption( 'hmw_hide_wplogin' ) ? 'checked="checked"' : '' ) ?> value="1"/>
|
186 |
+
<label for="hmw_hide_wplogin"><?php _e( 'Hide "wp-login.php"', _HMW_PLUGIN_NAME_ ); ?></label>
|
187 |
+
<div class="offset-1 text-black-50"><?php _e( 'Show 404 Not Found Error when visitors access /wp-login.php', _HMW_PLUGIN_NAME_ ); ?></div>
|
|
|
188 |
</div>
|
189 |
</div>
|
190 |
</div>
|
191 |
|
192 |
+
<div class="col-sm-12 row mb-1 ml-1 hmw_hide_login_div">
|
193 |
+
<div class="checker col-sm-12 row my-2 py-1">
|
194 |
+
<div class="col-sm-12 p-0 switch switch-sm">
|
195 |
+
<input type="hidden" name="hmw_hide_login" value="0"/>
|
196 |
+
<input type="checkbox" id="hmw_hide_login" name="hmw_hide_login" class="switch" <?php echo( HMW_Classes_Tools::getOption( 'hmw_hide_login' ) ? 'checked="checked"' : '' ) ?> value="1"/>
|
197 |
+
<label for="hmw_hide_login"><?php _e( 'Hide /login', _HMW_PLUGIN_NAME_ ); ?></label>
|
198 |
+
<div class="offset-1 text-black-50"><?php _e( 'Show 404 Not Found Error when visitors access /login', _HMW_PLUGIN_NAME_ ); ?></div>
|
199 |
+
</div>
|
200 |
</div>
|
201 |
</div>
|
202 |
|
203 |
+
<div class="border-bottom border-gray"></div>
|
204 |
+
|
205 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
206 |
<div class="col-sm-4 p-0 font-weight-bold">
|
207 |
+
<?php _e( 'Custom Lost Password Path', _HMW_PLUGIN_NAME_ ); ?>:
|
208 |
+
<div class="small text-black-50"><?php _e( 'eg. lostpass or forgotpass', _HMW_PLUGIN_NAME_ ); ?></div>
|
209 |
</div>
|
210 |
<div class="col-sm-8 p-0 input-group input-group-lg">
|
211 |
+
<input type="text" class="form-control bg-input" name="hmw_lostpassword_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_lostpassword_url' ) ?>" placeholder="?action=lostpassword"/>
|
212 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_lost_password" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
213 |
</div>
|
214 |
</div>
|
215 |
|
|
|
216 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
217 |
<div class="col-sm-4 p-0 font-weight-bold">
|
218 |
+
<?php _e( 'Custom Register Path', _HMW_PLUGIN_NAME_ ); ?>:
|
219 |
+
<div class="small text-black-50"><?php _e( 'eg. newuser or register', _HMW_PLUGIN_NAME_ ); ?></div>
|
220 |
+
</div>
|
221 |
+
<div class="col-sm-8 p-0 input-group input-group-lg">
|
222 |
+
<input type="text" class="form-control bg-input" name="hmw_register_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_register_url' ) ?>" placeholder="?action=register"/>
|
223 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_register" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
224 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
</div>
|
226 |
+
|
227 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
228 |
<div class="col-sm-4 p-0 font-weight-bold">
|
229 |
+
<?php _e( 'Custom Logout Path', _HMW_PLUGIN_NAME_ ); ?>:
|
230 |
+
<div class="small text-black-50"><?php _e( 'eg. logout or disconnect', _HMW_PLUGIN_NAME_ ); ?></div>
|
231 |
</div>
|
232 |
<div class="col-sm-8 p-0 input-group input-group-lg">
|
233 |
+
<input type="text" class="form-control bg-input" name="hmw_logout_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_logout_url' ) ?>" placeholder="?action=logout"/>
|
234 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_logout" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
235 |
</div>
|
236 |
</div>
|
237 |
|
238 |
+
<?php if ( is_multisite() ) { ?>
|
239 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
240 |
<div class="col-sm-4 p-0 font-weight-bold">
|
241 |
+
<?php _e( 'Custom Activation Path', _HMW_PLUGIN_NAME_ ); ?>:
|
242 |
+
<div class="small text-black-50"><?php _e( 'eg. multisite activation link', _HMW_PLUGIN_NAME_ ); ?></div>
|
243 |
</div>
|
244 |
<div class="col-sm-8 p-0 input-group input-group-lg">
|
245 |
+
<input type="text" class="form-control bg-input" name="hmw_activate_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_activate_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_activate_url'] ?>"/>
|
246 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_activation" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
247 |
</div>
|
248 |
</div>
|
|
|
|
|
249 |
<?php } ?>
|
250 |
+
|
251 |
+
<div class="col-sm-12 text-center border-light py-1 m-0">
|
252 |
+
<a href="<?php echo HMW_Classes_Tools::getSettingsUrl( 'hmw_settings-hmw_tweaks', true ) ?>" target="_blank">
|
253 |
+
<?php _e( 'Manage Login and Logout Redirects', _HMW_PLUGIN_NAME_ ); ?>
|
254 |
+
</a>
|
255 |
+
</div>
|
256 |
+
<?php } ?>
|
257 |
+
|
258 |
+
</div>
|
259 |
+
</div>
|
260 |
+
<div class="card col-sm-12 p-0 tab-panel" <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'default' ) ? 'style="display:none"' : '' ) ?>>
|
261 |
+
<h3 class="card-title bg-brown text-white p-2"><?php _e( 'Common Paths', _HMW_PLUGIN_NAME_ ); ?>:</h3>
|
262 |
+
<div class="card-body">
|
263 |
+
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
264 |
+
<div class="col-sm-4 p-0 font-weight-bold">
|
265 |
+
<?php _e( 'Custom admin-ajax Path', _HMW_PLUGIN_NAME_ ); ?>:
|
266 |
+
<div class="small text-black-50"><?php _e( 'eg. ajax, json', _HMW_PLUGIN_NAME_ ); ?></div>
|
267 |
+
</div>
|
268 |
+
<div class="col-sm-8 p-0 input-group input-group-lg">
|
269 |
+
<input type="text" class="form-control bg-input" name="hmw_admin-ajax_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_admin-ajax_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_admin-ajax_url'] ?>"/>
|
270 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_ajax" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
271 |
+
</div>
|
272 |
+
</div>
|
273 |
+
|
274 |
+
<div class="col-sm-12 row mb-1 ml-1 hmw_hideajax_admin_div">
|
275 |
+
<div class="checker col-sm-12 row my-2 py-1">
|
276 |
+
<div class="col-sm-12 p-0 switch switch-sm">
|
277 |
+
<input type="hidden" name="hmw_hideajax_admin" value="0"/>
|
278 |
+
<input type="checkbox" id="hmw_hideajax_admin" name="hmw_hideajax_admin" class="switch" <?php echo( HMW_Classes_Tools::getOption( 'hmw_hideajax_admin' ) ? 'checked="checked"' : '' ) ?> value="1"/>
|
279 |
+
<label for="hmw_hideajax_admin"><?php _e( 'Hide wp-admin from ajax URL', _HMW_PLUGIN_NAME_ ); ?></label>
|
280 |
+
<div class="offset-1 text-black-50"><?php echo sprintf( __( 'Show /%s instead of /%s', _HMW_PLUGIN_NAME_ ), HMW_Classes_Tools::getOption( 'hmw_admin-ajax_url' ), HMW_Classes_Tools::getOption( 'hmw_admin_url' ) . '/' . HMW_Classes_Tools::getOption( 'hmw_admin-ajax_url' ) ); ?></div>
|
281 |
+
<div class="offset-1 text-danger"><?php _e( 'Works only with the custom admin-ajax path to avoid infinite loops.', _HMW_PLUGIN_NAME_ ); ?></div>
|
282 |
</div>
|
283 |
</div>
|
284 |
+
</div>
|
285 |
|
286 |
+
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
287 |
+
<div class="col-sm-4 p-0 font-weight-bold">
|
288 |
+
<?php _e( 'Custom wp-content Path', _HMW_PLUGIN_NAME_ ); ?>:
|
289 |
+
<div class="small text-black-50"><?php _e( 'eg. core, inc, include', _HMW_PLUGIN_NAME_ ); ?></div>
|
290 |
+
</div>
|
291 |
+
<div class="col-sm-8 p-0 input-group input-group-lg">
|
292 |
+
<input type="text" class="form-control bg-input" name="hmw_wp-content_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_wp-content_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_wp-content_url'] ?>"/>
|
293 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_wpcontent" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
294 |
+
</div>
|
295 |
</div>
|
296 |
+
|
297 |
+
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
298 |
+
<div class="col-sm-4 p-0 font-weight-bold">
|
299 |
+
<?php _e( 'Custom wp-includes Path', _HMW_PLUGIN_NAME_ ); ?>:
|
300 |
+
<div class="small text-black-50"><?php _e( 'eg. lib, library', _HMW_PLUGIN_NAME_ ); ?></div>
|
301 |
+
</div>
|
302 |
+
<div class="col-sm-8 p-0 input-group input-group-lg">
|
303 |
+
<input type="text" class="form-control bg-input" name="hmw_wp-includes_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_wp-includes_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_wp-includes_url'] ?>"/>
|
304 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_wpincludes" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
305 |
+
</div>
|
306 |
+
</div>
|
307 |
+
|
308 |
+
|
309 |
+
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
310 |
+
<div class="col-sm-4 p-0 font-weight-bold">
|
311 |
+
<?php _e( 'Custom uploads Path', _HMW_PLUGIN_NAME_ ); ?>:
|
312 |
+
<div class="small text-black-50"><?php _e( 'eg. images, files', _HMW_PLUGIN_NAME_ ); ?></div>
|
313 |
+
</div>
|
314 |
+
<?php if ( ! defined( 'UPLOADS' ) ) { ?>
|
315 |
+
<div class="col-sm-8 p-0 input-group input-group-lg">
|
316 |
+
<input type="text" class="form-control bg-input" name="hmw_upload_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_upload_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_upload_url'] ?>"/>
|
317 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_uloads" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
318 |
+
</div>
|
319 |
+
<?php } else { ?>
|
320 |
+
<div class="col-sm-8 text-danger p-0">
|
321 |
+
<?php echo sprintf( __( "You already defined a different wp-content/uploads directory in wp-config.php %s", _HMW_PLUGIN_NAME_ ), ': <strong>' . UPLOADS . '</strong>' ); ?>
|
322 |
+
</div>
|
323 |
+
<?php } ?>
|
324 |
+
</div>
|
325 |
+
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
326 |
+
<div class="col-sm-4 p-0 font-weight-bold">
|
327 |
+
<?php _e( 'Custom comment Path', _HMW_PLUGIN_NAME_ ); ?>:
|
328 |
+
<div class="small text-black-50"><?php _e( 'eg. comments, discussion', _HMW_PLUGIN_NAME_ ); ?></div>
|
329 |
+
</div>
|
330 |
+
<div class="col-sm-8 p-0 input-group input-group-lg">
|
331 |
+
<input type="text" class="form-control bg-input" name="hmw_wp-comments-post" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_wp-comments-post' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_wp-comments-post'] ?>"/>
|
332 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_comments" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
333 |
+
</div>
|
334 |
+
</div>
|
335 |
+
|
336 |
+
<?php if ( ! HMW_Classes_Tools::isMultisites() && ! HMW_Classes_Tools::isNginx() && ! HMW_Classes_Tools::isWpengine() ) { ?>
|
337 |
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
338 |
<div class="col-sm-4 p-0 font-weight-bold">
|
339 |
+
<?php _e( 'Custom author Path', _HMW_PLUGIN_NAME_ ); ?>:
|
340 |
+
<div class="small text-black-50"><?php _e( 'eg. profile, usr, writer', _HMW_PLUGIN_NAME_ ); ?></div>
|
341 |
</div>
|
342 |
<div class="col-sm-8 p-0 input-group input-group-lg">
|
343 |
+
<input type="text" class="form-control bg-input" name="hmw_author_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_author_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_author_url'] ?>"/>
|
344 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_author" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
345 |
</div>
|
346 |
</div>
|
347 |
+
<?php } else { ?>
|
348 |
+
<input type="hidden" name="hmw_author_url" value="<?php echo HMW_Classes_Tools::$default['hmw_author_url'] ?>"/>
|
349 |
+
<?php } ?>
|
350 |
+
<div class="col-sm-12 row mb-1 ml-1">
|
351 |
+
<div class="box" data-toggle="popover" data-html="true" data-placement="top" data-content="<?php echo sprintf( __( 'This feature requires %sHide My WP Ghost%s.', _HMW_PLUGIN_NAME_ ), "<a href='https://hidemywpghost.com/hide-my-wp-pricing/' target='_blank'>", "</a>" ) ?>">
|
352 |
+
<div class="ribbon"><span><?php echo __( 'PRO', _HMW_PLUGIN_NAME_ ) ?></span></div>
|
353 |
+
</div>
|
354 |
+
<div class="checker col-sm-12 row my-2 py-1" style="opacity: 0.3">
|
355 |
+
<div class="col-sm-12 p-0 switch switch-sm">
|
356 |
+
<div class="hmw_pro"><img src="<?php echo _HMW_THEME_URL_ . 'img/pro.png' ?>">
|
357 |
</div>
|
358 |
+
<label for="hmw_hide_authors"><?php _e( 'Hide Author ID URL', _HMW_PLUGIN_NAME_ ); ?></label>
|
359 |
+
<div class="offset-1 text-black-50"><?php _e( "Don't let URLs like domain.com?author=1 show the user login name", _HMW_PLUGIN_NAME_ ); ?></div>
|
360 |
</div>
|
361 |
</div>
|
362 |
</div>
|
363 |
+
|
364 |
</div>
|
365 |
+
</div>
|
366 |
+
<div class="card col-sm-12 p-0 tab-panel" <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'default' ) ? 'style="display:none"' : '' ) ?>>
|
367 |
+
<h3 class="card-title bg-brown text-white p-2"><?php _e( 'Plugin Settings', _HMW_PLUGIN_NAME_ ); ?>:</h3>
|
368 |
+
<div class="card-body">
|
369 |
+
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
370 |
+
<div class="col-sm-4 p-0 font-weight-bold">
|
371 |
+
<?php _e( 'Custom plugins Path', _HMW_PLUGIN_NAME_ ); ?>:
|
372 |
+
<div class="small text-black-50"><?php _e( 'eg. modules', _HMW_PLUGIN_NAME_ ); ?></div>
|
373 |
+
</div>
|
374 |
+
<div class="col-sm-8 p-0 input-group input-group-lg">
|
375 |
+
<input type="text" class="form-control bg-input" name="hmw_plugin_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_plugin_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_plugin_url'] ?>"/>
|
376 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_plugins" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
377 |
+
</div>
|
378 |
+
</div>
|
379 |
+
<div class="col-sm-12 row mb-1 ml-1">
|
380 |
+
<div class="checker col-sm-12 row my-2 py-1">
|
381 |
+
<div class="col-sm-12 p-0 switch switch-sm">
|
382 |
+
<input type="hidden" name="hmw_hide_plugins" value="0"/>
|
383 |
+
<input type="checkbox" id="hmw_hide_plugins" name="hmw_hide_plugins" class="switch" <?php echo( HMW_Classes_Tools::getOption( 'hmw_hide_plugins' ) ? 'checked="checked"' : '' ) ?> value="1"/>
|
384 |
+
<label for="hmw_hide_plugins"><?php _e( 'Hide plugin names', _HMW_PLUGIN_NAME_ ); ?></label>
|
385 |
+
<div class="offset-1 text-black-50"><?php _e( 'Give random names to each plugin', _HMW_PLUGIN_NAME_ ); ?></div>
|
386 |
</div>
|
387 |
</div>
|
388 |
+
</div>
|
389 |
+
</div>
|
390 |
+
</div>
|
391 |
+
<div class="card col-sm-12 p-0 tab-panel" <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'default' ) ? 'style="display:none"' : '' ) ?>>
|
392 |
+
<h3 class="card-title bg-brown text-white p-2"><?php _e( 'Theme Settings', _HMW_PLUGIN_NAME_ ); ?>:</h3>
|
393 |
+
<div class="card-body">
|
394 |
+
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
395 |
+
<div class="col-sm-4 p-0 font-weight-bold">
|
396 |
+
<?php _e( 'Custom themes Path', _HMW_PLUGIN_NAME_ ); ?>:
|
397 |
+
<div class="small text-black-50"><?php _e( 'eg. assets, templates, styles', _HMW_PLUGIN_NAME_ ); ?></div>
|
398 |
+
</div>
|
399 |
+
<div class="col-sm-8 p-0 input-group input-group-lg">
|
400 |
+
<input type="text" class="form-control bg-input" name="hmw_themes_url" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_themes_url' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_themes_url'] ?>"/>
|
401 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#customize_themes" target="_blank" class="position-absolute float-right" style="right: 7px;top: 25%;"><i class="fa fa-question-circle"></i></a>
|
402 |
+
</div>
|
403 |
+
</div>
|
404 |
|
405 |
+
<div style="position: relative">
|
406 |
+
<div>
|
407 |
+
<div class="col-sm-12 row mb-1 ml-1">
|
408 |
+
<div class="checker col-sm-12 row my-2 py-1">
|
409 |
+
<div class="col-sm-12 p-0 switch switch-sm">
|
410 |
+
<input type="hidden" name="hmw_hide_themes" value="0"/>
|
411 |
+
<input type="checkbox" id="hmw_hide_themes" name="hmw_hide_themes" class="switch" <?php echo( HMW_Classes_Tools::getOption( 'hmw_hide_themes' ) ? 'checked="checked"' : '' ) ?> value="1"/>
|
412 |
+
<label for="hmw_hide_themes"><?php _e( 'Hide theme names', _HMW_PLUGIN_NAME_ ); ?></label>
|
413 |
+
<div class="offset-1 text-black-50"><?php _e( 'Give random names to each theme (works in WP multisite)', _HMW_PLUGIN_NAME_ ); ?></div>
|
|
|
414 |
</div>
|
415 |
</div>
|
416 |
+
</div>
|
417 |
|
418 |
|
|
|
419 |
</div>
|
420 |
</div>
|
421 |
</div>
|
422 |
+
</div>
|
423 |
+
<div class="card col-sm-12 p-0 tab-panel" <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'default' ) ? 'style="display:none"' : '' ) ?>>
|
424 |
+
<h3 class="card-title bg-brown text-white p-2"><?php _e( 'REST API Settings', _HMW_PLUGIN_NAME_ ); ?>:</h3>
|
425 |
+
<div class="card-body">
|
426 |
|
427 |
+
<div class="col-sm-12 row mb-1 ml-1">
|
428 |
+
<div class="box" data-toggle="popover" data-html="true" data-placement="top" data-content="<?php echo sprintf( __( 'This feature requires %sHide My WP Ghost%s.', _HMW_PLUGIN_NAME_ ), "<a href='https://hidemywpghost.com/hide-my-wp-pricing/' target='_blank'>", "</a>" ) ?>">
|
429 |
+
<div class="ribbon"><span><?php echo __( 'PRO', _HMW_PLUGIN_NAME_ ) ?></span></div>
|
430 |
+
</div>
|
431 |
+
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3" style="opacity: 0.3">
|
432 |
+
<div class="col-sm-4 p-0 font-weight-bold">
|
433 |
+
<?php _e( 'Custom wp-json Path', _HMW_PLUGIN_NAME_ ); ?>:
|
434 |
+
<div class="small text-black-50"><?php _e( 'eg. json, api, call', _HMW_PLUGIN_NAME_ ); ?></div>
|
435 |
</div>
|
436 |
+
<div class="col-sm-8 p-0 input-group input-group-lg" style="opacity: 0.3">
|
437 |
+
<input type="text" class="form-control bg-input"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
</div>
|
439 |
</div>
|
440 |
+
</div>
|
441 |
|
442 |
|
443 |
+
<div class="col-sm-12 row mb-1 ml-1">
|
444 |
+
<div class="checker col-sm-12 row my-2 py-1">
|
445 |
+
<div class="col-sm-12 p-0 switch switch-sm">
|
446 |
+
<input type="hidden" name="hmw_disable_rest_api" value="0"/>
|
447 |
+
<input type="checkbox" id="hmw_disable_rest_api" name="hmw_disable_rest_api" class="js-switch pull-right fixed-sidebar-check" <?php echo( HMW_Classes_Tools::getOption( 'hmw_disable_rest_api' ) ? 'checked="checked"' : '' ) ?> value="1"/>
|
448 |
+
<label for="hmw_disable_rest_api"><?php _e( 'Disable Rest API access', _HMW_PLUGIN_NAME_ ); ?></label>
|
449 |
+
<a href="https://hidemywpghost.com/kb/customize-paths-in-hide-my-wp-ghost/#hide_rest_api" target="_blank" class="d-inline-block ml-2"><i class="fa fa-question-circle"></i></a>
|
450 |
+
<div class="offset-1 text-black-50"><?php _e( "Disable Rest API access for not logged in users", _HMW_PLUGIN_NAME_ ); ?></div>
|
451 |
+
</div>
|
452 |
+
</div>
|
453 |
+
</div>
|
454 |
+
</div>
|
455 |
+
</div>
|
456 |
+
<div class="card col-sm-12 p-0 tab-panel" <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'default' ) ? 'style="display:none"' : '' ) ?>>
|
457 |
+
<h3 class="card-title bg-brown text-white p-2"><?php _e( 'Security Settings', _HMW_PLUGIN_NAME_ ); ?>:</h3>
|
458 |
+
<div class="card-body">
|
459 |
+
<div class="box" data-toggle="popover" data-html="true" data-placement="top" data-content="<?php echo sprintf( __( 'This feature requires %sHide My WP Ghost%s.', _HMW_PLUGIN_NAME_ ), "<a href='https://hidemywpghost.com/hide-my-wp-pricing/' target='_blank'>", "</a>" ) ?>">
|
460 |
+
<div class="ribbon"><span><?php echo __( 'PRO', _HMW_PLUGIN_NAME_ ) ?></span></div>
|
461 |
+
</div>
|
462 |
+
<div style="opacity: 0.3">
|
463 |
<div class="col-sm-12 row mb-1 ml-1">
|
464 |
<div class="checker col-sm-12 row my-2 py-1">
|
465 |
<div class="col-sm-12 p-0 switch switch-sm">
|
466 |
+
<div class="hmw_pro">
|
467 |
+
<img src="<?php echo _HMW_THEME_URL_ . 'img/pro.png' ?>">
|
468 |
+
</div>
|
469 |
+
<label for="hmw_hide_oldpaths"><?php _e( 'Hide WordPress Common Paths', _HMW_PLUGIN_NAME_ ); ?></label>
|
470 |
+
<div class="offset-1 text-black-50"><?php _e( 'Hide /wp-content, /wp-include, /plugins, /themes paths', _HMW_PLUGIN_NAME_ ); ?></div>
|
471 |
+
<div class="offset-1 text-black-50"><?php _e( 'Hide upgrade.php and install.php for visitors', _HMW_PLUGIN_NAME_ ); ?></div>
|
472 |
+
<div class="offset-1 text-black-50"><?php _e( '(this may affect the fonts and images loaded through CSS)', _HMW_PLUGIN_NAME_ ); ?></div>
|
473 |
</div>
|
474 |
</div>
|
475 |
</div>
|
476 |
+
<div class="col-sm-12 row mb-1 ml-1">
|
477 |
+
<div class="checker col-sm-12 row my-2 py-1">
|
478 |
+
<div class="col-sm-12 p-0 switch switch-sm">
|
479 |
+
<div class="hmw_pro">
|
480 |
+
<img src="<?php echo _HMW_THEME_URL_ . 'img/pro.png' ?>">
|
481 |
+
</div>
|
482 |
+
<label for="hmw_hide_commonfiles"><?php _e( 'Hide WordPress Common Files', _HMW_PLUGIN_NAME_ ); ?></label>
|
483 |
+
<div class="offset-1 text-black-50"><?php _e( 'Hide wp-config.php , wp-config-sample.php, readme.html, license.txt files', _HMW_PLUGIN_NAME_ ); ?></div>
|
484 |
+
</div>
|
485 |
+
</div>
|
486 |
</div>
|
487 |
+
|
488 |
+
<div class="col-sm-12 row mb-1 ml-1">
|
489 |
+
<div class="checker col-sm-12 row my-2 py-1">
|
490 |
+
<div class="col-sm-12 p-0 switch switch-sm">
|
491 |
+
<div class="hmw_pro">
|
492 |
+
<img src="<?php echo _HMW_THEME_URL_ . 'img/pro.png' ?>">
|
|
|
|
|
|
|
|
|
|
|
493 |
</div>
|
494 |
+
<label for="hmwp_security_header"><?php _e( 'Add Security Headers for XSS and Code Injection Attacks', _HMW_PLUGIN_NAME_ ); ?></label>
|
495 |
+
<div class="offset-1 text-black-50"><?php _e( "Add Strict-Transport-Security header", _HMW_PLUGIN_NAME_ ); ?> </div>
|
496 |
+
<div class="offset-1 text-black-50"><?php _e( "Add Content-Security-Policy header", _HMW_PLUGIN_NAME_ ); ?> </div>
|
497 |
+
<div class="offset-1 text-black-50"><?php _e( "Add X-Frame-Options header", _HMW_PLUGIN_NAME_ ); ?> </div>
|
498 |
+
<div class="offset-1 text-black-50"><?php _e( "Add X-XSS-Protection header", _HMW_PLUGIN_NAME_ ); ?> </div>
|
499 |
+
<div class="offset-1 text-black-50"><?php _e( "Add X-Content-Type-Options header", _HMW_PLUGIN_NAME_ ); ?> </div>
|
500 |
</div>
|
501 |
</div>
|
502 |
+
</div>
|
503 |
+
|
504 |
+
<?php if ( HMW_Classes_Tools::isNginx() || HMW_Classes_Tools::isApache() || HMW_Classes_Tools::isLitespeed() ) { ?>
|
505 |
+
|
506 |
<div class="col-sm-12 row mb-1 ml-1">
|
507 |
<div class="checker col-sm-12 row my-2 py-1">
|
508 |
<div class="col-sm-12 p-0 switch switch-sm">
|
509 |
<div class="hmw_pro">
|
510 |
+
<img src="<?php echo _HMW_THEME_URL_ . 'img/pro.png' ?>"></div>
|
511 |
+
<label for="hmw_sqlinjection"><?php _e( 'Firewall Against Script Injection', _HMW_PLUGIN_NAME_ ); ?></label>
|
512 |
+
<div class="offset-1 text-black-50"><?php echo __( 'Most WordPress installations are hosted on the popular Apache, Nginx and IIS web servers.', _HMW_PLUGIN_NAME_ ); ?></div>
|
513 |
+
<div class="offset-1 text-black-50"><?php echo __( 'A thorough set of rules can prevent many types of SQL Injection and URL hacks from being interpreted.', _HMW_PLUGIN_NAME_ ); ?></div>
|
514 |
</div>
|
515 |
</div>
|
516 |
</div>
|
517 |
|
518 |
<div class="col-sm-12 row mb-1 ml-1">
|
519 |
+
<?php $uploads = wp_upload_dir(); ?>
|
520 |
<div class="checker col-sm-12 row my-2 py-1">
|
521 |
<div class="col-sm-12 p-0 switch switch-sm">
|
522 |
<div class="hmw_pro">
|
523 |
+
<img src="<?php echo _HMW_THEME_URL_ . 'img/pro.png' ?>"></div>
|
524 |
+
<label for="hmw_disable_browsing"><?php _e( 'Disable Directory Browsing', _HMW_PLUGIN_NAME_ ); ?></label>
|
525 |
+
<div class="offset-1 text-black-50"><?php echo sprintf( __( "Don't let hackers see any directory content. See %sUploads Directory%s", _HMW_PLUGIN_NAME_ ), '<a href="' . $uploads['baseurl'] . '" target="_blank">', '</a>' ); ?></div>
|
|
|
|
|
|
|
|
|
|
|
526 |
</div>
|
527 |
</div>
|
528 |
</div>
|
529 |
|
530 |
+
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
531 |
</div>
|
532 |
</div>
|
533 |
+
</div>
|
534 |
+
<div class="card col-sm-12 p-0 tab-panel" <?php echo( ( HMW_Classes_Tools::getOption( 'hmw_mode' ) == 'default' ) ? 'style="display:none"' : '' ) ?>>
|
535 |
+
<div class="card-body">
|
536 |
+
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
537 |
+
<div class="col-sm-4 p-0 font-weight-bold">
|
538 |
+
<?php _e( 'Custom category Path', _HMW_PLUGIN_NAME_ ); ?>:
|
539 |
+
<div class="small text-black-50"><?php _e( 'eg. cat, dir, list', _HMW_PLUGIN_NAME_ ); ?></div>
|
|
|
|
|
|
|
540 |
</div>
|
541 |
+
<div class="col-sm-8 p-0 input-group input-group-lg">
|
542 |
+
<input type="text" class="form-control bg-input" name="hmw_category_base" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_category_base' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_category_base'] ?>"/>
|
543 |
+
</div>
|
544 |
+
</div>
|
545 |
|
546 |
+
<div class="col-sm-12 row border-bottom border-light py-3 mx-1 my-3">
|
547 |
+
<div class="col-sm-4 p-0 font-weight-bold">
|
548 |
+
<?php _e( 'Custom tags Path', _HMW_PLUGIN_NAME_ ); ?>:
|
549 |
+
<div class="small text-black-50"><?php _e( 'eg. keyword, topic', _HMW_PLUGIN_NAME_ ); ?></div>
|
550 |
+
</div>
|
551 |
+
<div class="col-sm-8 p-0 input-group input-group-lg">
|
552 |
+
<input type="text" class="form-control" name="hmw_tag_base" value="<?php echo HMW_Classes_Tools::getOption( 'hmw_tag_base' ) ?>" placeholder="<?php echo HMW_Classes_Tools::$default['hmw_tag_base'] ?>"/>
|
|
|
553 |
</div>
|
554 |
</div>
|
555 |
</div>
|
556 |
+
</div>
|
557 |
|
558 |
|
559 |
+
<?php if ( HMW_Classes_Tools::getOption( 'test_frontend' ) || HMW_Classes_Tools::getOption( 'logout' ) || HMW_Classes_Tools::getOption( 'error' ) ) { ?>
|
560 |
+
<div class="col-sm-12 m-0 p-2">
|
561 |
+
<button type="submit" class="btn rounded-0 btn-success btn-lg px-5 mr-5 save"><?php _e( 'Save', _HMW_PLUGIN_NAME_ ); ?></button>
|
562 |
+
<a href="https://wordpress.org/support/plugin/hide-my-wp/reviews/?rate=5#new-post" target="_blank" style="color: #ff005e;"><?php echo sprintf( __( 'Love Hide My WP %s? Show us ;)', _HMW_PLUGIN_NAME_ ), _HMW_VER_NAME_ ); ?></a>
|
563 |
+
</div>
|
564 |
+
<?php } else { ?>
|
565 |
+
<div class="col-sm-12 m-0 p-2 bg-light text-center" style="position: fixed; bottom: 0; right: 0; z-index: 100; box-shadow: 0px 0px 8px -3px #444;">
|
566 |
+
<button type="submit" class="btn rounded-0 btn-success btn-lg px-5 mr-5 save"><?php _e( 'Save', _HMW_PLUGIN_NAME_ ); ?></button>
|
567 |
+
<a href="https://wordpress.org/support/plugin/hide-my-wp/reviews/?rate=5#new-post" target="_blank" style="color: #ff005e;"><?php echo sprintf( __( 'Love Hide My WP %s? Show us ;)', _HMW_PLUGIN_NAME_ ), _HMW_VER_NAME_ ); ?></a>
|
568 |
+
</div>
|
569 |
+
<?php } ?>
|
570 |
+
</form>
|
571 |
+
</div>
|
572 |
+
<div class="hmw_col hmw_col_side">
|
573 |
+
<div class="card col-sm-12 p-0">
|
574 |
+
<div class="card-body f-gray-dark text-center">
|
575 |
+
<h3 class="card-title"><?php _e( 'Check Your Website', _HMW_PLUGIN_NAME_ ); ?></h3>
|
576 |
+
<div class="card-text text-muted">
|
577 |
+
<?php echo __( 'Check if your website is secured with the current settings.', _HMW_PLUGIN_NAME_ ) ?>
|
578 |
+
</div>
|
579 |
+
<div class="card-text text-info m-3">
|
580 |
+
<a href="<?php echo HMW_Classes_Tools::getSettingsUrl( 'hmw_securitycheck' ) ?>" class="btn rounded-0 btn-warning btn-lg text-white px-4 securitycheck"><?php _e( 'Security Check', _HMW_PLUGIN_NAME_ ); ?></a>
|
581 |
+
</div>
|
582 |
+
<div class="card-text text-muted small">
|
583 |
+
<?php echo __( 'Make sure you save the settings and empty the cache before checking your website with our tool.', _HMW_PLUGIN_NAME_ ) ?>
|
584 |
+
</div>
|
585 |
|
586 |
+
<div class="card-text m-3 ">
|
587 |
+
<a class="bigbutton text-center" href="https://hidemywpghost.com/knowledge-base/" target="_blank"><?php echo __( "Learn more about Hide My WP", _HMW_PLUGIN_NAME_ ); ?></a>
|
|
|
588 |
</div>
|
589 |
</div>
|
590 |
+
</div>
|
591 |
|
592 |
+
<div class="card col-sm-12 p-0">
|
593 |
+
<div class="card-body f-gray-dark text-center">
|
594 |
+
<h3 class="card-title"><?php echo __( 'Love Hide My WP?', _HMW_PLUGIN_NAME_ ); ?></h3>
|
595 |
+
<div class="card-text text-muted">
|
596 |
+
<h1>
|
597 |
+
<a href="https://wordpress.org/support/plugin/hide-my-wp/reviews/?rate=5#new-post" target="_blank" style="font-size: 80px"><i class="fa fa-heart text-danger"></i></a>
|
598 |
+
</h1>
|
599 |
+
<?php echo __( 'Please help us and support our plugin on WordPress.org', _HMW_PLUGIN_NAME_ ) ?>
|
600 |
+
</div>
|
601 |
+
<div class="card-text text-info m-3">
|
602 |
+
<a href="https://wordpress.org/support/plugin/hide-my-wp/reviews/?rate=5#new-post" target="_blank" class="btn rounded-0 btn-success btn-lg px-4"><?php echo __( 'Rate Hide My WP', _HMW_PLUGIN_NAME_ ); ?></a>
|
603 |
+
</div>
|
604 |
+
<div class="card-text text-muted">
|
605 |
+
<?php echo __( 'Contact us after you left the review cause we have a surprise for you.', _HMW_PLUGIN_NAME_ ) ?>
|
606 |
+
<h1>
|
607 |
+
<a href="https://hidemywpghost.com/contact/" target="_blank" style="font-size: 80px"><i class="fa fa-gift text-info"></i></a>
|
608 |
+
</h1>
|
|
|
609 |
</div>
|
610 |
</div>
|
611 |
+
</div>
|
612 |
|
613 |
+
<?php echo $view->getView( 'Support' ) ?>
|
614 |
|
|
|
615 |
</div>
|
616 |
</div>
|
617 |
+
</div>
|
view/js/jptraffic.min.js
CHANGED
@@ -1 +1,66 @@
|
|
1 |
-
(function(root,ns,factory){"use strict";if(typeof module!=="undefined"&&module.exports){module.exports=factory(ns,root)}else if(typeof define==="function"&&define.amd){define("factory",function(){return factory(ns,root)})}else{root[ns]=factory(ns,root)}})(window,"detectZoom",function(){var devicePixelRatio=function(){return window.devicePixelRatio||1};var fallback=function(){return{zoom:1,devicePxPerCssPx:1}};var ie8=function(){var zoom=Math.round(screen.deviceXDPI/screen.logicalXDPI*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()}};var ie10=function(){var zoom=Math.round(document.documentElement.offsetHeight/window.innerHeight*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()}};var webkitMobile=function(){var deviceWidth=Math.abs(window.orientation)==90?screen.height:screen.width;var zoom=deviceWidth/window.innerWidth;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()}};var webkit=function(){var important=function(str){return str.replace(/;/g," !important;")};var div=document.createElement("div");div.innerHTML="1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>0";div.setAttribute("style",important("font: 100px/1em sans-serif; -webkit-text-size-adjust: none; text-size-adjust: none; height: auto; width: 1em; padding: 0; overflow: visible;"));var container=document.createElement("div");container.setAttribute("style",important("width:0; height:0; overflow:hidden; visibility:hidden; position: absolute;"));container.appendChild(div);document.body.appendChild(container);var zoom=1e3/div.clientHeight;zoom=Math.round(zoom*100)/100;document.body.removeChild(container);return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()}};var firefox4=function(){var zoom=mediaQueryBinarySearch("min--moz-device-pixel-ratio","",0,10,20,1e-4);zoom=Math.round(zoom*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom}};var firefox18=function(){return{zoom:firefox4().zoom,devicePxPerCssPx:devicePixelRatio()}};var opera11=function(){var zoom=window.top.outerWidth/window.top.innerWidth;zoom=Math.round(zoom*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()}};var mediaQueryBinarySearch=function(property,unit,a,b,maxIter,epsilon){var matchMedia;var head,style,div;if(window.matchMedia){matchMedia=window.matchMedia}else{head=document.getElementsByTagName("head")[0];style=document.createElement("style");head.appendChild(style);div=document.createElement("div");div.className="mediaQueryBinarySearch";div.style.display="none";document.body.appendChild(div);matchMedia=function(query){style.sheet.insertRule("@media "+query+"{.mediaQueryBinarySearch "+"{text-decoration: underline} }",0);var matched=getComputedStyle(div,null).textDecoration=="underline";style.sheet.deleteRule(0);return{matches:matched}}}var ratio=binarySearch(a,b,maxIter);if(div){head.removeChild(style);document.body.removeChild(div)}return ratio;function binarySearch(a,b,maxIter){var mid=(a+b)/2;if(maxIter<=0||b-a<epsilon){return mid}var query="("+property+":"+mid+unit+")";if(matchMedia(query).matches){return binarySearch(mid,b,maxIter-1)}else{return binarySearch(a,mid,maxIter-1)}}};var detectFunction=function(){var func=fallback;if(!isNaN(screen.logicalXDPI)&&!isNaN(screen.systemXDPI)){func=ie8}else if(window.navigator.msMaxTouchPoints){func=ie10}else if("orientation"in window&&typeof document.body.style.webkitMarquee==="string"){func=webkitMobile}else if(typeof document.body.style.webkitMarquee==="string"){func=webkit}else if(navigator.userAgent.indexOf("Opera")>=0){func=opera11}else if(window.devicePixelRatio){func=firefox18}else if(firefox4().zoom>.001){func=firefox4}return func}();return{zoom:function(){return detectFunction().zoom},device:function(){return detectFunction().devicePxPerCssPx}}});var wpcom_img_zoomer={zoomed:false,timer:null,interval:1e3,imgNeedsSizeAtts:function(img){if(img.getAttribute("width")!==null||img.getAttribute("height")!==null)return false;if(img.width<img.naturalWidth||img.height<img.naturalHeight)return false;return true},updateResizeUrl:function(url,width,height){var url_resize=url.match(/resize=([0-9%2C,]+)/);if(url_resize===null||!url_resize[1]){return url}var url_sizes=url_resize[1].split(",");var new_resize=null;if(url_sizes[0]!==width){new_resize=width}if(url_sizes[1]!==height){if(new_resize!==null){new_resize+="%2C"}new_resize+=height}if(new_resize!==url_resize[1]){new_resize="resize="+new_resize;url=url.replace(url_resize[0],new_resize)}return url},init:function(){var t=this;try{t.zoomImages();t.timer=setInterval(function(){t.zoomImages()},t.interval)}catch(e){}},stop:function(){if(this.timer)clearInterval(this.timer)},getScale:function(){var scale=detectZoom.device();if(scale>3){scale=Math.ceil(scale*2)/2}return scale},shouldZoom:function(scale){var t=this;if("innerWidth"in window&&!window.innerWidth)return false;if(scale==1&&t.zoomed==false)return false;return true},zoomImages:function(){var t=this;var scale=t.getScale();if(!t.shouldZoom(scale)){return}t.zoomed=true;var imgs=document.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){if("complete"in imgs[i]&&!imgs[i].complete)continue;if(imgs[i].hasAttribute("srcset")&&imgs[i].hasAttribute("sizes")&&"sizes"in imgs[i]){continue}var imgScale=imgs[i].getAttribute("scale");if(imgScale==scale||imgScale=="0")continue;var scaleFail=imgs[i].getAttribute("scale-fail");if(scaleFail&&scaleFail<=scale)continue;if(!(imgs[i].width&&imgs[i].height))continue;if(!imgScale&&imgs[i].getAttribute("data-lazy-src")&&imgs[i].getAttribute("data-lazy-src")!==imgs[i].getAttribute("src"))continue;if(t.scaleImage(imgs[i],scale)){imgs[i].setAttribute("scale",scale)}else{imgs[i].setAttribute("scale","0")}}},scaleImage:function(img,scale){var t=this;var newSrc=img.src;if(img.parentNode.className.match(/slideshow-slide/))return false;if(img.src.match(/^https?:\/\/([^\/]*\.)?gravatar\.com\/.+[?&](s|size)=/)){newSrc=img.src.replace(/([?&](s|size)=)(\d+)/,function($0,$1,$2,$3){var originalAtt="originals",originalSize=img.getAttribute(originalAtt);if(originalSize===null){originalSize=$3;img.setAttribute(originalAtt,originalSize);if(t.imgNeedsSizeAtts(img)){img.width=img.width;img.height=img.height}}var size=img.clientWidth;var targetSize=Math.ceil(img.clientWidth*scale);targetSize=Math.max(targetSize,originalSize);targetSize=Math.min(targetSize,512);return $1+targetSize})}else if(img.src.match(/^https?:\/\/([^\/]+)\.files\.wordpress\.com\/.+[?&][wh]=/)){if(img.src.match(/[?&]crop/))return false;var changedAttrs={};var matches=img.src.match(/([?&]([wh])=)(\d+)/g);for(var i=0;i<matches.length;i++){var lr=matches[i].split("=");var thisAttr=lr[0].replace(/[?&]/g,"");var thisVal=lr[1];var originalAtt="original"+thisAttr,originalSize=img.getAttribute(originalAtt);if(originalSize===null){originalSize=thisVal;img.setAttribute(originalAtt,originalSize);if(t.imgNeedsSizeAtts(img)){img.width=img.width;img.height=img.height}}var size=thisAttr=="w"?img.clientWidth:img.clientHeight;var naturalSize=thisAttr=="w"?img.naturalWidth:img.naturalHeight;var targetSize=Math.ceil(size*scale);targetSize=Math.max(targetSize,originalSize);if(scale>img.getAttribute("scale")&&targetSize<=naturalSize)targetSize=thisVal;if(naturalSize<thisVal)targetSize=thisVal;if(targetSize!=thisVal)changedAttrs[thisAttr]=targetSize}var w=changedAttrs.w||false;var h=changedAttrs.h||false;if(w){newSrc=img.src.replace(/([?&])w=\d+/g,function($0,$1){return $1+"w="+w})}if(h){newSrc=newSrc.replace(/([?&])h=\d+/g,function($0,$1){return $1+"h="+h})}}else if(img.src.match(/^https?:\/\/([^\/]+\.)*(wordpress|wp)\.com\/mshots\/.+[?&]w=\d+/)){newSrc=img.src.replace(/([?&]w=)(\d+)/,function($0,$1,$2){var originalAtt="originalw",originalSize=img.getAttribute(originalAtt);if(originalSize===null){originalSize=$2;img.setAttribute(originalAtt,originalSize);if(t.imgNeedsSizeAtts(img)){img.width=img.width;img.height=img.height}}var size=img.clientWidth;var targetSize=Math.ceil(size*scale);targetSize=Math.max(targetSize,originalSize);if(scale>img.getAttribute("scale")&&targetSize<=img.naturalWidth)targetSize=$2;if($2!=targetSize)return $1+targetSize;return $0});newSrc=newSrc.replace(/([?&]h=)(\d+)/,function($0,$1,$2){if(newSrc==img.src){return $0}var originalAtt="originalh",originalSize=img.getAttribute(originalAtt);if(originalSize===null){originalSize=$2;img.setAttribute(originalAtt,originalSize)}var size=img.clientHeight;var targetSize=Math.ceil(size*scale);targetSize=Math.max(targetSize,originalSize);if(scale>img.getAttribute("scale")&&targetSize<=img.naturalHeight)targetSize=$2;if($2!=targetSize)return $1+targetSize;return $0})}else if(img.src.match(/^https?:\/\/([^\/.]+\.)*(wp|wordpress)\.com\/imgpress\?(.+)/)){var imgpressSafeFunctions=["zoom","url","h","w","fit","filter","brightness","contrast","colorize","smooth","unsharpmask"];var qs=RegExp.$3.split("&");for(var q in qs){q=qs[q].split("=")[0];if(imgpressSafeFunctions.indexOf(q)==-1){return false}}img.width=img.width;img.height=img.height;if(scale==1)newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,"?");else newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,"?zoom="+scale+"&")}else if(img.src.match(/^https?:\/\/([^\/.]+\.)*(wp|wordpress)\.com\/latex\.php\?(latex|zoom)=(.+)/)||img.src.match(/^https?:\/\/i[\d]{1}\.wp\.com\/(.+)/)){if(navigator.userAgent.indexOf("Firefox")>-1){return}img.width=img.width;img.height=img.height;if(scale==1)newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,"?");else newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,"?zoom="+scale+"&");if(!img.srcset&&img.src.match(/resize/)){newSrc=t.updateResizeUrl(newSrc,img.width,img.height);img.setAttribute("srcset",newSrc)}}else if(img.src.match(/^https?:\/\/[^\/]+\/.*[-@]([12])x\.(gif|jpeg|jpg|webp|png)(\?|$)/)){img.width=img.width;img.height=img.height;var currentSize=RegExp.$1,newSize=currentSize;if(scale<=1)newSize=1;else newSize=2;if(currentSize!=newSize)newSrc=img.src.replace(/([-@])[12]x\.(gif|jpeg|jpg|webp|png)(\?|$)/,"$1"+newSize+"x.$2$3")}else{return false}if(newSrc!=img.src){var prevSrc,origSrc=img.getAttribute("src-orig");if(!origSrc){origSrc=img.src;img.setAttribute("src-orig",origSrc)}prevSrc=img.src;img.onerror=function(){img.src=prevSrc;if(img.getAttribute("scale-fail")<scale)img.setAttribute("scale-fail",scale);img.onerror=null};img.src=newSrc}return true}};wpcom_img_zoomer.init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(root,ns,factory){"use strict";if(typeof(module)!=='undefined'&&module.exports){module.exports=factory(ns,root);}else if(typeof(define)==='function'&&define.amd){define("factory",function(){return factory(ns,root);});}else{root[ns]=factory(ns,root);}}(window,'detectZoom',function(){var devicePixelRatio=function(){return window.devicePixelRatio||1;};var fallback=function(){return{zoom:1,devicePxPerCssPx:1};};var ie8=function(){var zoom=Math.round((screen.deviceXDPI/screen.logicalXDPI)*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()};};var ie10=function(){var zoom=Math.round((document.documentElement.offsetHeight/window.innerHeight)*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()};};var webkitMobile=function(){var deviceWidth=(Math.abs(window.orientation)==90)?screen.height:screen.width;var zoom=deviceWidth/window.innerWidth;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()};};var webkit=function(){var important=function(str){return str.replace(/;/g," !important;");};var div=document.createElement('div');div.innerHTML="1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>0";div.setAttribute('style',important('font: 100px/1em sans-serif; -webkit-text-size-adjust: none; text-size-adjust: none; height: auto; width: 1em; padding: 0; overflow: visible;'));var container=document.createElement('div');container.setAttribute('style',important('width:0; height:0; overflow:hidden; visibility:hidden; position: absolute;'));container.appendChild(div);document.body.appendChild(container);var zoom=1000/div.clientHeight;zoom=Math.round(zoom*100)/100;document.body.removeChild(container);return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()};};var firefox4=function(){var zoom=mediaQueryBinarySearch('min--moz-device-pixel-ratio','',0,10,20,0.0001);zoom=Math.round(zoom*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom};};var firefox18=function(){return{zoom:firefox4().zoom,devicePxPerCssPx:devicePixelRatio()};};var opera11=function(){var zoom=window.top.outerWidth/window.top.innerWidth;zoom=Math.round(zoom*100)/100;return{zoom:zoom,devicePxPerCssPx:zoom*devicePixelRatio()};};var mediaQueryBinarySearch=function(property,unit,a,b,maxIter,epsilon){var matchMedia;var head,style,div;if(window.matchMedia){matchMedia=window.matchMedia;}else{head=document.getElementsByTagName('head')[0];style=document.createElement('style');head.appendChild(style);div=document.createElement('div');div.className='mediaQueryBinarySearch';div.style.display='none';document.body.appendChild(div);matchMedia=function(query){style.sheet.insertRule('@media '+query+'{.mediaQueryBinarySearch '+'{text-decoration: underline} }',0);var matched=getComputedStyle(div,null).textDecoration=='underline';style.sheet.deleteRule(0);return{matches:matched};};}
|
2 |
+
var ratio=binarySearch(a,b,maxIter);if(div){head.removeChild(style);document.body.removeChild(div);}
|
3 |
+
return ratio;function binarySearch(a,b,maxIter){var mid=(a+b)/2;if(maxIter<=0||b-a<epsilon){return mid;}
|
4 |
+
var query="("+property+":"+mid+unit+")";if(matchMedia(query).matches){return binarySearch(mid,b,maxIter-1);}else{return binarySearch(a,mid,maxIter-1);}}};var detectFunction=(function(){var func=fallback;if(!isNaN(screen.logicalXDPI)&&!isNaN(screen.systemXDPI)){func=ie8;}
|
5 |
+
else if(window.navigator.msMaxTouchPoints){func=ie10;}
|
6 |
+
else if('orientation'in window&&typeof document.body.style.webkitMarquee==='string'){func=webkitMobile;}
|
7 |
+
else if(typeof document.body.style.webkitMarquee==='string'){func=webkit;}
|
8 |
+
else if(navigator.userAgent.indexOf('Opera')>=0){func=opera11;}
|
9 |
+
else if(window.devicePixelRatio){func=firefox18;}
|
10 |
+
else if(firefox4().zoom>0.001){func=firefox4;}
|
11 |
+
return func;}());return({zoom:function(){return detectFunction().zoom;},device:function(){return detectFunction().devicePxPerCssPx;}});}));var wpcom_img_zoomer={zoomed:false,timer:null,interval:1000,imgNeedsSizeAtts:function(img){if(img.getAttribute('width')!==null||img.getAttribute('height')!==null)
|
12 |
+
return false;if(img.width<img.naturalWidth||img.height<img.naturalHeight)
|
13 |
+
return false;return true;},updateResizeUrl:function(url,width,height){var url_resize=url.match(/resize=([0-9%2C,]+)/);if(url_resize===null||!url_resize[1]){return url;}
|
14 |
+
var url_sizes=url_resize[1].split(',');var new_resize=null;if(url_sizes[0]!==width){new_resize=width;}
|
15 |
+
if(url_sizes[1]!==height){if(new_resize!==null){new_resize+='%2C';}
|
16 |
+
new_resize+=height;}
|
17 |
+
if(new_resize!==url_resize[1]){new_resize='resize='+new_resize;url=url.replace(url_resize[0],new_resize);}
|
18 |
+
return url;},init:function(){var t=this;try{t.zoomImages();t.timer=setInterval(function(){t.zoomImages();},t.interval);}
|
19 |
+
catch(e){}},stop:function(){if(this.timer)
|
20 |
+
clearInterval(this.timer);},getScale:function(){var scale=detectZoom.device();if(scale>3){scale=Math.ceil(scale*2)/2;}
|
21 |
+
return scale;},shouldZoom:function(scale){var t=this;if("innerWidth"in window&&!window.innerWidth)
|
22 |
+
return false;if(scale==1.0&&t.zoomed==false)
|
23 |
+
return false;return true;},zoomImages:function(){var t=this;var scale=t.getScale();if(!t.shouldZoom(scale)){return;}
|
24 |
+
t.zoomed=true;var imgs=document.getElementsByTagName("img");for(var i=0;i<imgs.length;i++){if("complete"in imgs[i]&&!imgs[i].complete)
|
25 |
+
continue;if(imgs[i].hasAttribute('srcset')&&imgs[i].hasAttribute('sizes')&&('sizes'in imgs[i])){continue;}
|
26 |
+
var imgScale=imgs[i].getAttribute("scale");if(imgScale==scale||imgScale=="0")
|
27 |
+
continue;var scaleFail=imgs[i].getAttribute("scale-fail");if(scaleFail&&scaleFail<=scale)
|
28 |
+
continue;if(!(imgs[i].width&&imgs[i].height))
|
29 |
+
continue;if(!imgScale&&imgs[i].getAttribute("data-lazy-src")&&(imgs[i].getAttribute("data-lazy-src")!==imgs[i].getAttribute("src")))
|
30 |
+
continue;if(t.scaleImage(imgs[i],scale)){imgs[i].setAttribute("scale",scale);}
|
31 |
+
else{imgs[i].setAttribute("scale","0");}}},scaleImage:function(img,scale){var t=this;var newSrc=img.src;if(img.parentNode.className.match(/slideshow-slide/))
|
32 |
+
return false;if(img.src.match(/^https?:\/\/([^\/]*\.)?gravatar\.com\/.+[?&](s|size)=/)){newSrc=img.src.replace(/([?&](s|size)=)(\d+)/,function($0,$1,$2,$3){var originalAtt="originals",originalSize=img.getAttribute(originalAtt);if(originalSize===null){originalSize=$3;img.setAttribute(originalAtt,originalSize);if(t.imgNeedsSizeAtts(img)){img.width=img.width;img.height=img.height;}}
|
33 |
+
var size=img.clientWidth;var targetSize=Math.ceil(img.clientWidth*scale);targetSize=Math.max(targetSize,originalSize);targetSize=Math.min(targetSize,512);return $1+targetSize;});}
|
34 |
+
else if(img.src.match(/^https?:\/\/([^\/]+)\.files\.wordpress\.com\/.+[?&][wh]=/)){if(img.src.match(/[?&]crop/))
|
35 |
+
return false;var changedAttrs={};var matches=img.src.match(/([?&]([wh])=)(\d+)/g);for(var i=0;i<matches.length;i++){var lr=matches[i].split('=');var thisAttr=lr[0].replace(/[?&]/g,'');var thisVal=lr[1];var originalAtt='original'+thisAttr,originalSize=img.getAttribute(originalAtt);if(originalSize===null){originalSize=thisVal;img.setAttribute(originalAtt,originalSize);if(t.imgNeedsSizeAtts(img)){img.width=img.width;img.height=img.height;}}
|
36 |
+
var size=thisAttr=='w'?img.clientWidth:img.clientHeight;var naturalSize=(thisAttr=='w'?img.naturalWidth:img.naturalHeight);var targetSize=Math.ceil(size*scale);targetSize=Math.max(targetSize,originalSize);if(scale>img.getAttribute("scale")&&targetSize<=naturalSize)
|
37 |
+
targetSize=thisVal;if(naturalSize<thisVal)
|
38 |
+
targetSize=thisVal;if(targetSize!=thisVal)
|
39 |
+
changedAttrs[thisAttr]=targetSize;}
|
40 |
+
var w=changedAttrs.w||false;var h=changedAttrs.h||false;if(w){newSrc=img.src.replace(/([?&])w=\d+/g,function($0,$1){return $1+'w='+w;});}
|
41 |
+
if(h){newSrc=newSrc.replace(/([?&])h=\d+/g,function($0,$1){return $1+'h='+h;});}}
|
42 |
+
else if(img.src.match(/^https?:\/\/([^\/]+\.)*(wordpress|wp)\.com\/mshots\/.+[?&]w=\d+/)){newSrc=img.src.replace(/([?&]w=)(\d+)/,function($0,$1,$2){var originalAtt='originalw',originalSize=img.getAttribute(originalAtt);if(originalSize===null){originalSize=$2;img.setAttribute(originalAtt,originalSize);if(t.imgNeedsSizeAtts(img)){img.width=img.width;img.height=img.height;}}
|
43 |
+
var size=img.clientWidth;var targetSize=Math.ceil(size*scale);targetSize=Math.max(targetSize,originalSize);if(scale>img.getAttribute("scale")&&targetSize<=img.naturalWidth)
|
44 |
+
targetSize=$2;if($2!=targetSize)
|
45 |
+
return $1+targetSize;return $0;});newSrc=newSrc.replace(/([?&]h=)(\d+)/,function($0,$1,$2){if(newSrc==img.src){return $0;}
|
46 |
+
var originalAtt='originalh',originalSize=img.getAttribute(originalAtt);if(originalSize===null){originalSize=$2;img.setAttribute(originalAtt,originalSize);}
|
47 |
+
var size=img.clientHeight;var targetSize=Math.ceil(size*scale);targetSize=Math.max(targetSize,originalSize);if(scale>img.getAttribute("scale")&&targetSize<=img.naturalHeight)
|
48 |
+
targetSize=$2;if($2!=targetSize)
|
49 |
+
return $1+targetSize;return $0;});}
|
50 |
+
else if(img.src.match(/^https?:\/\/([^\/.]+\.)*(wp|wordpress)\.com\/imgpress\?(.+)/)){var imgpressSafeFunctions=["zoom","url","h","w","fit","filter","brightness","contrast","colorize","smooth","unsharpmask"];var qs=RegExp.$3.split('&');for(var q in qs){q=qs[q].split('=')[0];if(imgpressSafeFunctions.indexOf(q)==-1){return false;}}
|
51 |
+
img.width=img.width;img.height=img.height;if(scale==1)
|
52 |
+
newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,'?');else
|
53 |
+
newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,'?zoom='+scale+'&');}
|
54 |
+
else if(img.src.match(/^https?:\/\/([^\/.]+\.)*(wp|wordpress)\.com\/latex\.php\?(latex|zoom)=(.+)/)||img.src.match(/^https?:\/\/i[\d]{1}\.wp\.com\/(.+)/)){if(navigator.userAgent.indexOf('Firefox')>-1){return;}
|
55 |
+
img.width=img.width;img.height=img.height;if(scale==1)
|
56 |
+
newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,'?');else
|
57 |
+
newSrc=img.src.replace(/\?(zoom=[^&]+&)?/,'?zoom='+scale+'&');if(!img.srcset&&img.src.match(/resize/)){newSrc=t.updateResizeUrl(newSrc,img.width,img.height);img.setAttribute('srcset',newSrc);}}
|
58 |
+
else if(img.src.match(/^https?:\/\/[^\/]+\/.*[-@]([12])x\.(gif|jpeg|jpg|png)(\?|$)/)){img.width=img.width;img.height=img.height;var currentSize=RegExp.$1,newSize=currentSize;if(scale<=1)
|
59 |
+
newSize=1;else
|
60 |
+
newSize=2;if(currentSize!=newSize)
|
61 |
+
newSrc=img.src.replace(/([-@])[12]x\.(gif|jpeg|jpg|png)(\?|$)/,'$1'+newSize+'x.$2$3');}
|
62 |
+
else{return false;}
|
63 |
+
if(newSrc!=img.src){var prevSrc,origSrc=img.getAttribute("src-orig");if(!origSrc){origSrc=img.src;img.setAttribute("src-orig",origSrc);}
|
64 |
+
prevSrc=img.src;img.onerror=function(){img.src=prevSrc;if(img.getAttribute("scale-fail")<scale)
|
65 |
+
img.setAttribute("scale-fail",scale);img.onerror=null;};img.src=newSrc;}
|
66 |
+
return true;}};wpcom_img_zoomer.init();
|