diff --git a/wp-security-pack/README.md b/security-pack/README.md similarity index 96% rename from wp-security-pack/README.md rename to security-pack/README.md index f5fd40a..2605bf8 100644 --- a/wp-security-pack/README.md +++ b/security-pack/README.md @@ -1,4 +1,4 @@ -# WP Security Pack +# Security Pack WordPress security without the bullshit. No upsells, no premium tier, no fake threat counters. @@ -69,7 +69,7 @@ X-Content-Type-Options, X-Frame-Options, X-XSS-Protection, Referrer-Policy, Perm ## Installation -1. Upload to `/wp-content/plugins/wp-security-pack/` +1. Upload to `/wp-content/plugins/security-pack/` 2. Activate 3. Configure under Security menu diff --git a/wp-security-pack/assets/css/admin.css b/security-pack/assets/css/admin.css similarity index 100% rename from wp-security-pack/assets/css/admin.css rename to security-pack/assets/css/admin.css diff --git a/wp-security-pack/assets/css/index.php b/security-pack/assets/css/index.php similarity index 57% rename from wp-security-pack/assets/css/index.php rename to security-pack/assets/css/index.php index 0343009..91bbd2b 100644 --- a/wp-security-pack/assets/css/index.php +++ b/security-pack/assets/css/index.php @@ -2,5 +2,5 @@ /** * Silence is golden. * - * @package WP_Security_Pack + * @package Security_Pack */ diff --git a/security-pack/assets/icon-128x128.png b/security-pack/assets/icon-128x128.png new file mode 100644 index 0000000..ca758d5 Binary files /dev/null and b/security-pack/assets/icon-128x128.png differ diff --git a/security-pack/assets/icon-256x256.png b/security-pack/assets/icon-256x256.png new file mode 100644 index 0000000..f1acaa8 Binary files /dev/null and b/security-pack/assets/icon-256x256.png differ diff --git a/wp-security-pack/assets/index.php b/security-pack/assets/index.php similarity index 57% rename from wp-security-pack/assets/index.php rename to security-pack/assets/index.php index 0343009..91bbd2b 100644 --- a/wp-security-pack/assets/index.php +++ b/security-pack/assets/index.php @@ -2,5 +2,5 @@ /** * Silence is golden. * - * @package WP_Security_Pack + * @package Security_Pack */ diff --git a/security-pack/assets/js/index.php b/security-pack/assets/js/index.php new file mode 100644 index 0000000..6220032 --- /dev/null +++ b/security-pack/assets/js/index.php @@ -0,0 +1,2 @@ +=7&&v(t),null==a&&(a=p(e,n,u)),w(a,r)},l=function(t,r){for(var e=-1;e<=7;e+=1)if(!(t+e<=-1||i<=t+e))for(var n=-1;n<=7;n+=1)r+n<=-1||i<=r+n||(o[t+e][r+n]=0<=e&&e<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==e||6==e)||2<=e&&e<=4&&2<=n&&n<=4)},h=function(){for(var t=8;t>n&1);o[Math.floor(n/3)][n%3+i-8-3]=a}for(n=0;n<18;n+=1){a=!t&&1==(r>>n&1);o[n%3+i-8-3][Math.floor(n/3)]=a}},d=function(t,r){for(var e=n<<3|r,a=B.getBCHTypeInfo(e),u=0;u<15;u+=1){var f=!t&&1==(a>>u&1);u<6?o[u][8]=f:u<8?o[u+1][8]=f:o[i-15+u][8]=f}for(u=0;u<15;u+=1){f=!t&&1==(a>>u&1);u<8?o[8][i-u-1]=f:u<9?o[8][15-u-1+1]=f:o[8][15-u-1]=f}o[i-8][8]=!t},w=function(t,r){for(var e=-1,n=i-1,a=7,u=0,f=B.getMaskFunction(r),c=i-1;c>0;c-=2)for(6==c&&(c-=1);;){for(var g=0;g<2;g+=1)if(null==o[n][c-g]){var l=!1;u>>a&1)),f(n,c-g)&&(l=!l),o[n][c-g]=l,-1==(a-=1)&&(u+=1,a=7)}if((n+=e)<0||i<=n){n-=e,e=-e;break}}},p=function(t,r,e){for(var n=A.getRSBlocks(t,r),o=b(),i=0;i8*u)throw"code length overflow. ("+o.getLengthInBits()+">"+8*u+")";for(o.getLengthInBits()+4<=8*u&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*u||(o.put(236,8),o.getLengthInBits()>=8*u));)o.put(17,8);return function(t,r){for(var e=0,n=0,o=0,i=new Array(r.length),a=new Array(r.length),u=0;u=0?h.getAt(s):0}}var v=0;for(g=0;gn)&&(t=n,r=e)}return r}())},f.createTableTag=function(t,r){t=t||2;var e="";e+='',e+="";for(var n=0;n";for(var o=0;o';e+=""}return e+="",e+="
"},f.createSvgTag=function(t,r,e,n){var o={};"object"==typeof arguments[0]&&(t=(o=arguments[0]).cellSize,r=o.margin,e=o.alt,n=o.title),t=t||2,r=void 0===r?4*t:r,(e="string"==typeof e?{text:e}:e||{}).text=e.text||null,e.id=e.text?e.id||"qrcode-description":null,(n="string"==typeof n?{text:n}:n||{}).text=n.text||null,n.id=n.text?n.id||"qrcode-title":null;var i,a,u,c,g=f.getModuleCount()*t+2*r,l="";for(c="l"+t+",0 0,"+t+" -"+t+",0 0,-"+t+"z ",l+=''+y(n.text)+"":"",l+=e.text?''+y(e.text)+"":"",l+='',l+='":r+=">";break;case"&":r+="&";break;case'"':r+=""";break;default:r+=n}}return r};return f.createASCII=function(t,r){if((t=t||1)<2)return function(t){t=void 0===t?2:t;var r,e,n,o,i,a=1*f.getModuleCount()+2*t,u=t,c=a-t,g={"██":"█","█ ":"▀"," █":"▄"," ":" "},l={"██":"▀","█ ":"▀"," █":" "," ":" "},h="";for(r=0;r=c?l[i]:g[i];h+="\n"}return a%2&&t>0?h.substring(0,h.length-a-1)+Array(a+1).join("▀"):h.substring(0,h.length-1)}(r);t-=1,r=void 0===r?2*t:r;var e,n,o,i,a=f.getModuleCount()*t+2*r,u=r,c=a-r,g=Array(t+1).join("██"),l=Array(t+1).join(" "),h="",s="";for(e=0;e>>8),r.push(255&a)):r.push(n)}}return r}};var r,e,n,o,i,a=1,u=2,f=4,c=8,g={L:1,M:0,Q:3,H:2},l=0,h=1,s=2,v=3,d=4,w=5,p=6,y=7,B=(r=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],e=1335,n=7973,i=function(t){for(var r=0;0!=t;)r+=1,t>>>=1;return r},(o={}).getBCHTypeInfo=function(t){for(var r=t<<10;i(r)-i(e)>=0;)r^=e<=0;)r^=n<5&&(e+=3+i-5)}for(n=0;n=256;)r-=255;return t[r]}};return n}();function k(t,r){if(void 0===t.length)throw t.length+"/"+r;var e=function(){for(var e=0;e>>7-r%8&1)},put:function(t,r){for(var n=0;n>>r-n-1&1))},getLengthInBits:function(){return r},putBit:function(e){var n=Math.floor(r/8);t.length<=n&&t.push(0),e&&(t[n]|=128>>>r%8),r+=1}};return e},M=function(t){var r=a,e=t,n={getMode:function(){return r},getLength:function(t){return e.length},write:function(t){for(var r=e,n=0;n+2>>8&255)+(255&n),t.put(n,13),e+=2}if(e>>8)},writeBytes:function(t,e,n){e=e||0,n=n||t.length;for(var o=0;o0&&(r+=","),r+=t[e];return r+="]"}};return r},S=function(t){var r=t,e=0,n=0,o=0,i={read:function(){for(;o<8;){if(e>=r.length){if(0==o)return-1;throw"unexpected end of file./"+o}var t=r.charAt(e);if(e+=1,"="==t)return o=0,-1;t.match(/^\s$/)||(n=n<<6|a(t.charCodeAt(0)),o+=6)}var i=n>>>o-8&255;return o-=8,i}},a=function(t){if(65<=t&&t<=90)return t-65;if(97<=t&&t<=122)return t-97+26;if(48<=t&&t<=57)return t-48+52;if(43==t)return 62;if(47==t)return 63;throw"c:"+t};return i},I=function(t,r,e){for(var n=function(t,r){var e=t,n=r,o=new Array(t*r),i={setPixel:function(t,r,n){o[r*e+t]=n},write:function(t){t.writeString("GIF87a"),t.writeShort(e),t.writeShort(n),t.writeByte(128),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(0),t.writeByte(255),t.writeByte(255),t.writeByte(255),t.writeString(","),t.writeShort(0),t.writeShort(0),t.writeShort(e),t.writeShort(n),t.writeByte(0);var r=a(2);t.writeByte(2);for(var o=0;r.length-o>255;)t.writeByte(255),t.writeBytes(r,o,255),o+=255;t.writeByte(r.length-o),t.writeBytes(r,o,r.length-o),t.writeByte(0),t.writeString(";")}},a=function(t){for(var r=1<>>r!=0)throw"length over";for(;c+r>=8;)f.writeByte(255&(t<>>=8-c,g=0,c=0;g|=t<0&&f.writeByte(g)}});h.write(r,n);var s=0,v=String.fromCharCode(o[s]);for(s+=1;s=6;)i(t>>>r-6),r-=6},o.flush=function(){if(r>0&&(i(t<<6-r),t=0,r=0),e%3!=0)for(var o=3-e%3,a=0;a>6,128|63&n):n<55296||n>=57344?r.push(224|n>>12,128|n>>6&63,128|63&n):(e++,n=65536+((1023&n)<<10|1023&t.charCodeAt(e)),r.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return r}(t)},function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports&&(module.exports=t())}((function(){return qrcode})); +//# sourceMappingURL=/sm/26b4b0d0b1e283d6b3ec9857ac597d7a60c76ac17be1ef4c965f03086de426bb.map \ No newline at end of file diff --git a/security-pack/assets/screenshot-1.png b/security-pack/assets/screenshot-1.png new file mode 100644 index 0000000..65525a1 Binary files /dev/null and b/security-pack/assets/screenshot-1.png differ diff --git a/security-pack/assets/screenshot-2.png b/security-pack/assets/screenshot-2.png new file mode 100644 index 0000000..d857e9a Binary files /dev/null and b/security-pack/assets/screenshot-2.png differ diff --git a/security-pack/assets/screenshot-3.png b/security-pack/assets/screenshot-3.png new file mode 100644 index 0000000..07932f6 Binary files /dev/null and b/security-pack/assets/screenshot-3.png differ diff --git a/security-pack/assets/screenshot-4.png b/security-pack/assets/screenshot-4.png new file mode 100644 index 0000000..338895b Binary files /dev/null and b/security-pack/assets/screenshot-4.png differ diff --git a/security-pack/assets/screenshot-5.png b/security-pack/assets/screenshot-5.png new file mode 100644 index 0000000..b39296b Binary files /dev/null and b/security-pack/assets/screenshot-5.png differ diff --git a/security-pack/assets/screenshot-6.png b/security-pack/assets/screenshot-6.png new file mode 100644 index 0000000..c80966f Binary files /dev/null and b/security-pack/assets/screenshot-6.png differ diff --git a/security-pack/assets/screenshot-7.png b/security-pack/assets/screenshot-7.png new file mode 100644 index 0000000..f66d579 Binary files /dev/null and b/security-pack/assets/screenshot-7.png differ diff --git a/security-pack/assets/screenshot-8.png b/security-pack/assets/screenshot-8.png new file mode 100644 index 0000000..deb63a4 Binary files /dev/null and b/security-pack/assets/screenshot-8.png differ diff --git a/security-pack/assets/screenshot-9.png b/security-pack/assets/screenshot-9.png new file mode 100644 index 0000000..7c36a5c Binary files /dev/null and b/security-pack/assets/screenshot-9.png differ diff --git a/security-pack/assets/security-pack-logo.png b/security-pack/assets/security-pack-logo.png new file mode 100644 index 0000000..b8eca74 Binary files /dev/null and b/security-pack/assets/security-pack-logo.png differ diff --git a/wp-security-pack/includes/index.php b/security-pack/data/index.php similarity index 57% rename from wp-security-pack/includes/index.php rename to security-pack/data/index.php index 0343009..91bbd2b 100644 --- a/wp-security-pack/includes/index.php +++ b/security-pack/data/index.php @@ -2,5 +2,5 @@ /** * Silence is golden. * - * @package WP_Security_Pack + * @package Security_Pack */ diff --git a/security-pack/includes/class-wpsp-activity-log.php b/security-pack/includes/class-wpsp-activity-log.php new file mode 100644 index 0000000..9239fd5 --- /dev/null +++ b/security-pack/includes/class-wpsp-activity-log.php @@ -0,0 +1,282 @@ +get_component( 'geo_blocking' ); + if ( $geo_blocking && $ip_address ) { + $country_code = $geo_blocking->get_country_code( $ip_address ); + } + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery + $result = $wpdb->insert( + $wpdb->prefix . 'wpsp_activity_log', + array( + 'event_type' => $event_type, + 'ip_address' => $ip_address ? $ip_address : '', + 'username' => $username, + 'user_agent' => $user_agent, + 'country_code' => $country_code, + 'details' => $details, + 'created_at' => current_time( 'mysql' ), + ), + array( '%s', '%s', '%s', '%s', '%s', '%s', '%s' ) + ); + + return $result ? $wpdb->insert_id : false; + } + + /** + * Get recent logs. + * + * @param array $args Query arguments. + * @return array + */ + public static function get_logs( $args = array() ) { + global $wpdb; + + $defaults = array( + 'limit' => 50, + 'offset' => 0, + 'event_type' => '', + 'ip_address' => '', + ); + + $args = wp_parse_args( $args, $defaults ); + $limit = absint( $args['limit'] ); + $offset = absint( $args['offset'] ); + + // Build query based on filters. Always order by created_at DESC for security logs. + if ( ! empty( $args['event_type'] ) && ! empty( $args['ip_address'] ) ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Security data must be real-time. + return $wpdb->get_results( + $wpdb->prepare( + "SELECT * FROM {$wpdb->prefix}wpsp_activity_log WHERE event_type = %s AND ip_address = %s ORDER BY created_at DESC LIMIT %d OFFSET %d", + $args['event_type'], + $args['ip_address'], + $limit, + $offset + ) + ); + } elseif ( ! empty( $args['event_type'] ) ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Security data must be real-time. + return $wpdb->get_results( + $wpdb->prepare( + "SELECT * FROM {$wpdb->prefix}wpsp_activity_log WHERE event_type = %s ORDER BY created_at DESC LIMIT %d OFFSET %d", + $args['event_type'], + $limit, + $offset + ) + ); + } elseif ( ! empty( $args['ip_address'] ) ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Security data must be real-time. + return $wpdb->get_results( + $wpdb->prepare( + "SELECT * FROM {$wpdb->prefix}wpsp_activity_log WHERE ip_address = %s ORDER BY created_at DESC LIMIT %d OFFSET %d", + $args['ip_address'], + $limit, + $offset + ) + ); + } + + // No filters. + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Security data must be real-time. + return $wpdb->get_results( + $wpdb->prepare( + "SELECT * FROM {$wpdb->prefix}wpsp_activity_log ORDER BY created_at DESC LIMIT %d OFFSET %d", + $limit, + $offset + ) + ); + } + + /** + * Get total log count. + * + * @param array $args Query arguments. + * @return int + */ + public static function get_log_count( $args = array() ) { + global $wpdb; + + // Build query based on filters. + if ( ! empty( $args['event_type'] ) && ! empty( $args['ip_address'] ) ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Security data must be real-time. + return (int) $wpdb->get_var( + $wpdb->prepare( + "SELECT COUNT(*) FROM {$wpdb->prefix}wpsp_activity_log WHERE event_type = %s AND ip_address = %s", + $args['event_type'], + $args['ip_address'] + ) + ); + } elseif ( ! empty( $args['event_type'] ) ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Security data must be real-time. + return (int) $wpdb->get_var( + $wpdb->prepare( + "SELECT COUNT(*) FROM {$wpdb->prefix}wpsp_activity_log WHERE event_type = %s", + $args['event_type'] + ) + ); + } elseif ( ! empty( $args['ip_address'] ) ) { + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Security data must be real-time. + return (int) $wpdb->get_var( + $wpdb->prepare( + "SELECT COUNT(*) FROM {$wpdb->prefix}wpsp_activity_log WHERE ip_address = %s", + $args['ip_address'] + ) + ); + } + + // No filters. + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Security data must be real-time. + return (int) $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}wpsp_activity_log" ); + } + + /** + * Get log statistics. + * + * @param int $days Number of days to look back. + * @return array + */ + public static function get_stats( $days = 30 ) { + global $wpdb; + + $cutoff = gmdate( 'Y-m-d H:i:s', strtotime( "-{$days} days" ) ); + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Security stats must be real-time. + $results = $wpdb->get_results( + $wpdb->prepare( + "SELECT event_type, COUNT(*) as count FROM {$wpdb->prefix}wpsp_activity_log WHERE created_at >= %s GROUP BY event_type", + $cutoff + ) + ); + + $stats = array( + 'login_success' => 0, + 'login_failed' => 0, + 'lockout' => 0, + 'ip_blocked' => 0, + 'geo_blocked' => 0, + 'total' => 0, + ); + + foreach ( $results as $row ) { + $stats[ $row->event_type ] = (int) $row->count; + $stats['total'] += (int) $row->count; + } + + return $stats; + } + + /** + * Cleanup old logs (cron job). + */ + public static function cleanup_old_logs() { + global $wpdb; + + $retention_days = Security_Pack::get_setting( 'log_retention_days', 30 ); + $cutoff = gmdate( 'Y-m-d H:i:s', strtotime( "-{$retention_days} days" ) ); + + // Delete old logs. + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Cleanup operation, caching not applicable. + $wpdb->query( + $wpdb->prepare( + "DELETE FROM {$wpdb->prefix}wpsp_activity_log WHERE created_at < %s", + $cutoff + ) + ); + + // Delete expired lockouts (lockout_until stores Unix timestamp as integer). + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Cleanup operation, caching not applicable. + $wpdb->query( + $wpdb->prepare( + "DELETE FROM {$wpdb->prefix}wpsp_lockouts WHERE lockout_until IS NOT NULL AND lockout_until > 0 AND lockout_until < %d", + time() + ) + ); + } + + /** + * Clear all logs. + * + * @return bool + */ + public static function clear_all_logs() { + global $wpdb; + + // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery,WordPress.DB.DirectDatabaseQuery.NoCaching -- Truncate for admin action. + return false !== $wpdb->query( "TRUNCATE TABLE {$wpdb->prefix}wpsp_activity_log" ); + } + + /** + * Get event type label. + * + * @param string $event_type Event type. + * @return string + */ + public static function get_event_label( $event_type ) { + $labels = array( + self::EVENT_LOGIN_SUCCESS => __( 'Login Success', 'security-pack' ), + self::EVENT_LOGIN_FAILED => __( 'Login Failed', 'security-pack' ), + self::EVENT_LOCKOUT => __( 'Lockout', 'security-pack' ), + self::EVENT_IP_BLOCKED => __( 'IP Blocked', 'security-pack' ), + self::EVENT_GEO_BLOCKED => __( 'Geo Blocked', 'security-pack' ), + self::EVENT_LOCKOUT_LIFTED => __( 'Lockout Lifted', 'security-pack' ), + ); + + return isset( $labels[ $event_type ] ) ? $labels[ $event_type ] : $event_type; + } +} diff --git a/wp-security-pack/includes/class-wpsp-admin.php b/security-pack/includes/class-wpsp-admin.php similarity index 70% rename from wp-security-pack/includes/class-wpsp-admin.php rename to security-pack/includes/class-wpsp-admin.php index 5971a64..7bf1541 100644 --- a/wp-security-pack/includes/class-wpsp-admin.php +++ b/security-pack/includes/class-wpsp-admin.php @@ -1,8 +1,8 @@ __( 'Status', 'wp-security-pack' ), - 'login' => __( 'Login Protection', 'wp-security-pack' ), - 'ip' => __( 'IP Control', 'wp-security-pack' ), - 'hardening' => __( 'Hardening', 'wp-security-pack' ), - 'headers' => __( 'Security Headers', 'wp-security-pack' ), - '2fa' => __( '2FA', 'wp-security-pack' ), - 'scanner' => __( 'Scanner', 'wp-security-pack' ), - 'logs' => __( 'Activity Log', 'wp-security-pack' ), - 'tools' => __( 'Tools', 'wp-security-pack' ), + 'status' => __( 'Status', 'security-pack' ), + 'login' => __( 'Login Protection', 'security-pack' ), + 'ip' => __( 'IP Control', 'security-pack' ), + 'hardening' => __( 'Hardening', 'security-pack' ), + 'headers' => __( 'Security Headers', 'security-pack' ), + '2fa' => __( '2FA', 'security-pack' ), + 'scanner' => __( 'Scanner', 'security-pack' ), + 'logs' => __( 'Activity Log', 'security-pack' ), + 'tools' => __( 'Tools', 'security-pack' ), ); foreach ( $submenus as $slug => $title ) { add_submenu_page( - 'wp-security-pack', - $title . ' - ' . __( 'WP Security Pack', 'wp-security-pack' ), + 'security-pack', + $title . ' - ' . __( 'Security Pack', 'security-pack' ), $title, 'manage_options', - 'status' === $slug ? 'wp-security-pack' : 'wp-security-pack&tab=' . $slug, + 'status' === $slug ? 'security-pack' : 'security-pack&tab=' . $slug, array( $this, 'render_settings_page' ) ); } @@ -105,7 +105,7 @@ class WPSP_Admin { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $page = isset( $_GET['page'] ) ? sanitize_text_field( wp_unslash( $_GET['page'] ) ) : ''; - if ( 'wp-security-pack' !== $page ) { + if ( 'security-pack' !== $page ) { return $submenu_file; } @@ -113,10 +113,10 @@ class WPSP_Admin { $tab = isset( $_GET['tab'] ) ? sanitize_text_field( wp_unslash( $_GET['tab'] ) ) : 'status'; if ( 'status' === $tab ) { - return 'wp-security-pack'; + return 'security-pack'; } - return 'wp-security-pack&tab=' . $tab; + return 'security-pack&tab=' . $tab; } /** @@ -128,8 +128,8 @@ class WPSP_Admin { public function plugin_action_links( $links ) { $settings_link = sprintf( '%s', - admin_url( 'admin.php?page=wp-security-pack' ), - __( 'Settings', 'wp-security-pack' ) + admin_url( 'admin.php?page=security-pack' ), + __( 'Settings', 'security-pack' ) ); array_unshift( $links, $settings_link ); return $links; @@ -150,7 +150,7 @@ class WPSP_Admin { $links[] = sprintf( '%s', 'https://arkhost.com/products-menu.php', - __( 'Get Hosting', 'wp-security-pack' ) + __( 'Get Hosting', 'security-pack' ) ); return $links; @@ -166,7 +166,7 @@ class WPSP_Admin { wp_add_dashboard_widget( 'wpsp_security_widget', - __( 'Security Status', 'wp-security-pack' ), + __( 'Security Status', 'security-pack' ), array( $this, 'render_dashboard_widget' ) ); } @@ -236,28 +236,28 @@ class WPSP_Admin {
%
-
+
-
+
-
+
-
+
__( 'Status', 'wp-security-pack' ), - 'login' => __( 'Login Protection', 'wp-security-pack' ), - 'ip' => __( 'IP Control', 'wp-security-pack' ), - 'hardening' => __( 'Hardening', 'wp-security-pack' ), - 'headers' => __( 'Security Headers', 'wp-security-pack' ), - '2fa' => __( '2FA', 'wp-security-pack' ), - 'scanner' => __( 'Scanner', 'wp-security-pack' ), - 'logs' => __( 'Activity Log', 'wp-security-pack' ), - 'tools' => __( 'Tools', 'wp-security-pack' ), + 'status' => __( 'Status', 'security-pack' ), + 'login' => __( 'Login Protection', 'security-pack' ), + 'ip' => __( 'IP Control', 'security-pack' ), + 'hardening' => __( 'Hardening', 'security-pack' ), + 'headers' => __( 'Security Headers', 'security-pack' ), + '2fa' => __( '2FA', 'security-pack' ), + 'scanner' => __( 'Scanner', 'security-pack' ), + 'logs' => __( 'Activity Log', 'security-pack' ), + 'tools' => __( 'Tools', 'security-pack' ), ); ?>
-

+