Changeset 2324087
- Timestamp:
- 06/15/2020 01:59:08 AM (6 years ago)
- Location:
- lcs-security/trunk
- Files:
-
- 2 edited
-
lcs-security.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lcs-security/trunk/lcs-security.php
r2324069 r2324087 4 4 Plugin URI: http://www.latcomsystems.com/index.cfm?SheetIndex=wp_lcs_security 5 5 Description: Adds a comprehensive suite of security measures to WordPress. 6 Version: 1. 86 Version: 1.9 7 7 Author: LatCom Systems 8 8 Author URI: http://www.latcomsystems.com/ … … 48 48 register_activation_hook(__FILE__, array($this, 'lcs_sec_activation')); 49 49 register_deactivation_hook(__FILE__, array($this, 'lcs_sec_deactivation')); 50 $this->check_for_updates(); 50 51 $this->lcs_sec_run(); 51 52 //add_action('init', array($this, 'lcs_sec_run')); … … 126 127 } 127 128 129 private function check_for_updates() { 130 if (is_admin()) : 131 $metadata = get_file_data(__FILE__, ['Version' => 'Version'], false); 132 $plugin_version = $metadata['Version']; 133 if (get_option($this->settings_prefix.'version') != $plugin_version) : 134 add_action('admin_menu', array($this, 'lcs_sec_activation')); 135 update_option($this->settings_prefix.'version', $plugin_version); 136 endif; 137 endif; 138 } 139 128 140 public function lcs_sec_menu() 129 141 { … … 439 451 $path = $path_obj['basedir']; 440 452 $web_config_file = $path.'/web.config'; 441 if ( ( ( ! file_exists($web_config_file) && win_is_writable($ home_path) ) || win_is_writable($web_config_file) ) ) :453 if ( ( ( ! file_exists($web_config_file) && win_is_writable($path) ) || win_is_writable($web_config_file) ) ) : 442 454 if ($value == 1) : 443 455 return (file_put_contents($web_config_file, file_get_contents(__DIR__.'/template_web_config.txt', false)) !== false); … … 468 480 if ($is_iis7) : 469 481 $path = get_home_path(); 470 $web_config_file = $path.' /wp-includes/web.config';471 if ( ( ( ! file_exists($web_config_file) && win_is_writable($ home_path) ) || win_is_writable($web_config_file) ) ) :482 $web_config_file = $path.'wp-includes/web.config'; 483 if ( ( ( ! file_exists($web_config_file) && win_is_writable($path) ) || win_is_writable($web_config_file) ) ) : 472 484 if ($value == 1) : 473 485 return (file_put_contents($web_config_file, file_get_contents(__DIR__.'/template_web_config_includes.txt', false)) !== false); … … 482 494 elseif ($is_apache) : 483 495 $path = get_home_path(); 484 $htaccess_file = $path.' /wp-includes/.htaccess';496 $htaccess_file = $path.'wp-includes/.htaccess'; 485 497 if ((!file_exists($htaccess_file) && is_writable($path)) || is_writable($htaccess_file)) : 486 498 if ($value == 1) : … … 584 596 } 585 597 586 p ublicfunction disable_code_editing() {598 private function disable_code_editing() { 587 599 define('DISALLOW_FILE_EDIT', true); 588 600 } -
lcs-security/trunk/readme.txt
r2324069 r2324087 5 5 Requires at least: 3.5 6 6 Tested up to: 5.4 7 Stable tag: 1. 87 Stable tag: 1.9 8 8 License: GPLv2 9 9 License URI: http://www.gnu.org/licenses/agpl-2.0.html … … 79 79 == Changelog == 80 80 81 = 1.9 = 82 * Set newly added default options during update. 83 * Minor bug fix. 84 81 85 = 1.8 = 82 86 * Add option to disable code editing within wp-admin.
Note: See TracChangeset
for help on using the changeset viewer.