Changeset 3441987
- Timestamp:
- 01/18/2026 04:03:03 PM (2 months ago)
- Location:
- folder-auditor
- Files:
-
- 81 added
- 4 edited
-
tags/5.3 (added)
-
tags/5.3/assets (added)
-
tags/5.3/assets/admin.js (added)
-
tags/5.3/assets/brand-banner.webp (added)
-
tags/5.3/assets/dark-icon.png (added)
-
tags/5.3/assets/email.jpg (added)
-
tags/5.3/assets/icon.png (added)
-
tags/5.3/assets/magic.webp (added)
-
tags/5.3/assets/style.css (added)
-
tags/5.3/folder-auditor.php (added)
-
tags/5.3/includes (added)
-
tags/5.3/includes/bridge (added)
-
tags/5.3/includes/bridge/status.php (added)
-
tags/5.3/includes/bridge/unlock-relock.php (added)
-
tags/5.3/includes/class-wp-folder-auditor.php (added)
-
tags/5.3/includes/handlers (added)
-
tags/5.3/includes/handlers/handler-actions.php (added)
-
tags/5.3/includes/handlers/handler-blacklist-checker.php (added)
-
tags/5.3/includes/handlers/handler-content.php (added)
-
tags/5.3/includes/handlers/handler-htaccess.php (added)
-
tags/5.3/includes/handlers/handler-plugin-refresher.php (added)
-
tags/5.3/includes/handlers/handler-plugins.php (added)
-
tags/5.3/includes/handlers/handler-root.php (added)
-
tags/5.3/includes/handlers/handler-scanner.php (added)
-
tags/5.3/includes/handlers/handler-settings.php (added)
-
tags/5.3/includes/handlers/handler-themes.php (added)
-
tags/5.3/includes/handlers/handler-uploads.php (added)
-
tags/5.3/includes/helpers (added)
-
tags/5.3/includes/helpers/admin.php (added)
-
tags/5.3/includes/helpers/health-score (added)
-
tags/5.3/includes/helpers/health-score/health-score-display.php (added)
-
tags/5.3/includes/helpers/health-score/health-score-functions.php (added)
-
tags/5.3/includes/helpers/html-export.php (added)
-
tags/5.3/includes/helpers/lock-system (added)
-
tags/5.3/includes/helpers/lock-system/folder-locker.php (added)
-
tags/5.3/includes/helpers/lock-system/traits (added)
-
tags/5.3/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_Actions.php (added)
-
tags/5.3/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_Assets.php (added)
-
tags/5.3/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_Cache.php (added)
-
tags/5.3/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_FS.php (added)
-
tags/5.3/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_FSModal.php (added)
-
tags/5.3/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_NoticesBar.php (added)
-
tags/5.3/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_Request.php (added)
-
tags/5.3/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_Status.php (added)
-
tags/5.3/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_Targets.php (added)
-
tags/5.3/includes/helpers/reports (added)
-
tags/5.3/includes/helpers/reports/Guard-Dog-Security-Report.html (added)
-
tags/5.3/includes/helpers/reports/index.html (added)
-
tags/5.3/includes/helpers/safe-paths.php (added)
-
tags/5.3/includes/helpers/scanner (added)
-
tags/5.3/includes/helpers/scanner/patterns.php (added)
-
tags/5.3/includes/helpers/scanner/scanner.php (added)
-
tags/5.3/includes/helpers/security-headers.php (added)
-
tags/5.3/includes/helpers/user-security.php (added)
-
tags/5.3/includes/summaries (added)
-
tags/5.3/includes/summaries/summary-content.php (added)
-
tags/5.3/includes/summaries/summary-htaccess.php (added)
-
tags/5.3/includes/summaries/summary-plugins.php (added)
-
tags/5.3/includes/summaries/summary-root.php (added)
-
tags/5.3/includes/summaries/summary-themes.php (added)
-
tags/5.3/includes/summaries/summary-totals.php (added)
-
tags/5.3/includes/summaries/summary-uploads.php (added)
-
tags/5.3/includes/views (added)
-
tags/5.3/includes/views/view-audit.php (added)
-
tags/5.3/includes/views/view-blacklist-checker.php (added)
-
tags/5.3/includes/views/view-content.php (added)
-
tags/5.3/includes/views/view-dashboard.php (added)
-
tags/5.3/includes/views/view-file-remover.php (added)
-
tags/5.3/includes/views/view-header.php (added)
-
tags/5.3/includes/views/view-htaccess-files.php (added)
-
tags/5.3/includes/views/view-html-export.php (added)
-
tags/5.3/includes/views/view-plugin-refresher.php (added)
-
tags/5.3/includes/views/view-plugins.php (added)
-
tags/5.3/includes/views/view-root.php (added)
-
tags/5.3/includes/views/view-scanner.php (added)
-
tags/5.3/includes/views/view-security.php (added)
-
tags/5.3/includes/views/view-settings.php (added)
-
tags/5.3/includes/views/view-themes.php (added)
-
tags/5.3/includes/views/view-tools.php (added)
-
tags/5.3/includes/views/view-uploads.php (added)
-
tags/5.3/readme.txt (added)
-
trunk/folder-auditor.php (modified) (1 diff)
-
trunk/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_FS.php (modified) (3 diffs)
-
trunk/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_NoticesBar.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
folder-auditor/trunk/folder-auditor.php
r3441624 r3441987 3 3 * Plugin Name: Guard Dog Security & Site Lock 4 4 * Description: Helps WordPress administrators take full control of their site. It scans critical areas including the root directory, wp-content, plugins, themes, uploads, and .htaccess files to detect anything suspicious such as orphaned folders, leftover files, or hidden PHP in uploads. From the WordPress dashboard, you can safely review, download, or remove items that don’t belong, with built-in protection to ensure required resources remain untouched. In addition, Guard Dog Security lets you lock all files and folders as read-only, preventing unauthorized changes, additions, or deletions to your WordPress installation. 5 * Version: 5. 25 * Version: 5.3 6 6 * Author: WP Fix It 7 7 * Author URI: https://www.wpfixit.com -
folder-auditor/trunk/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_FS.php
r3441624 r3441987 104 104 105 105 } 106 107 protected static function is_mainwp_child_active() { 108 109 // Load plugin functions if needed 110 if ( ! function_exists( 'is_plugin_active' ) ) { 111 require_once ABSPATH . 'wp-admin/includes/plugin.php'; 112 } 113 114 return is_plugin_active( 'mainwp-child/mainwp-child.php' ); 115 } 106 116 107 117 /** … … 111 121 */ 112 122 public static function get_hard_excluded_paths() { 123 113 124 $paths = array( 114 WP_CONTENT_DIR . '/cache', 115 WP_CONTENT_DIR . '/et-cache', 116 WP_CONTENT_DIR . '/uploads/elementor', 117 WP_CONTENT_DIR . '/uploads/mainwp', 118 WP_CONTENT_DIR . '/wp-rocket-config', 119 WP_CONTENT_DIR . '/updraft', 120 WP_CONTENT_DIR . '/fonts', 121 WP_CONTENT_DIR . '/litespeed', 122 WP_CONTENT_DIR . '/w3tc-config', 123 WP_CONTENT_DIR . '/ai1wm-backups', 124 WP_CONTENT_DIR . '/plugins/all-in-one-wp-migration', 125 WP_CONTENT_DIR . '/uploads/gravity_forms', 126 WP_CONTENT_DIR . '/uploads/wpforms', 127 WP_CONTENT_DIR . '/uploads/fluentform', 128 WP_CONTENT_DIR . '/uploads/woocommerce_uploads', 129 WP_CONTENT_DIR . '/uploads/wc-logs', 130 125 WP_CONTENT_DIR . '/cache', 126 WP_CONTENT_DIR . '/et-cache', 127 WP_CONTENT_DIR . '/uploads/elementor', 128 WP_CONTENT_DIR . '/uploads/mainwp', 129 WP_CONTENT_DIR . '/wp-rocket-config', 130 WP_CONTENT_DIR . '/updraft', 131 WP_CONTENT_DIR . '/fonts', 132 WP_CONTENT_DIR . '/litespeed', 133 WP_CONTENT_DIR . '/w3tc-config', 134 WP_CONTENT_DIR . '/ai1wm-backups', 135 WP_CONTENT_DIR . '/plugins/all-in-one-wp-migration', 136 WP_CONTENT_DIR . '/uploads/gravity_forms', 137 WP_CONTENT_DIR . '/uploads/wpforms', 138 WP_CONTENT_DIR . '/uploads/fluentform', 139 WP_CONTENT_DIR . '/uploads/woocommerce_uploads', 140 WP_CONTENT_DIR . '/uploads/wc-logs', 131 141 ); 132 142 … … 134 144 $paths = array_map( 'wp_normalize_path', $paths ); 135 145 136 /**137 * Allow extensions (optional, future-proof).138 */139 146 return apply_filters( 'wpfa_hard_excluded_paths', $paths ); 140 147 } 141 142 148 143 149 /** Exclude wp-content/cache, Uploads exclusions, wp-content exclusions, and ABSPATH (root) exclusions. */ 144 150 protected static function is_excluded_path( $path ) { 145 $p = wp_normalize_path( $path ); 151 152 $p = wp_normalize_path( $path ); 153 $wp_content = wp_normalize_path( WP_CONTENT_DIR ); 154 155 // 🔴 Special case: wp-content itself (non-recursive) 156 if ( self::is_mainwp_child_active() ) { 157 if ( untrailingslashit( $p ) === untrailingslashit( $wp_content ) ) { 158 return true; // exclude ONLY wp-content dir itself 159 } 160 } 161 162 // --- Always-excluded folders --- 163 $hard_excluded = self::get_hard_excluded_paths(); 164 foreach ( $hard_excluded as $excluded ) { 165 if ( $p === $excluded || strpos( $p, $excluded . '/' ) === 0 ) { 166 return true; 167 } 168 } 146 169 147 // --- Always-excluded folders---148 $hard_excluded = self::get_hard_excluded_paths();149 150 foreach ( $hard_excluded as $excluded ) {151 if ( $p === $excluded || strpos( $p, $excluded . '/' ) === 0 ) {152 return true;153 }154 }155 156 157 170 $wp_content = wp_normalize_path( WP_CONTENT_DIR ); 158 171 $abspath = wp_normalize_path( trailingslashit( ABSPATH ) ); -
folder-auditor/trunk/includes/helpers/lock-system/traits/WPFA_Folder_Locker_Trait_NoticesBar.php
r3374418 r3441987 123 123 } 124 124 125 125 126 /** 126 127 … … 198 199 199 200 ); 201 202 203 // 🔒 Hide wp-content from admin bar when MainWP Child is active 204 if ( self::is_mainwp_child_active() ) { 205 unset( $paths['wp-content'] ); 206 } 200 207 201 208 $guard_dog_security_url = admin_url( 'admin.php?page=guard-dog-security' ); -
folder-auditor/trunk/readme.txt
r3441624 r3441987 6 6 Tested up to: 6.9 7 7 Requires PHP: 7.4 8 Stable tag: 5. 28 Stable tag: 5.3 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 97 97 == Changelog == 98 98 99 = 5.3 = 100 * Fixed permissions issue with Site Lock and MainWP 101 99 102 = 5.2 = 100 103 * Added integration with MainWP to manage Site Lock feature during remote updates … … 238 241 == Upgrade Notice == 239 242 243 = 5.3 = 244 * Fixed permissions issue with Site Lock and MainWP 245 240 246 = 5.2 = 241 247 * Added integration with MainWP
Note: See TracChangeset
for help on using the changeset viewer.