Plugin Directory


Ignore:
Timestamp:
10/02/2026 04:56:21 PM (4 weeks ago)
Author:
wpformation
Message:

Login Armor 2.8.0: fixes from a complete check-up of 2.7.10 (two-factor recovery, login log schema repair, hidden URL recovery, system files rule, WP-CLI --user, accessibility)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • login-armor/trunk/includes/ActivityLog/ActivityLog.php

    r3722536 r3725161  
    116116         */
    117117        public static function create_table(): void {
     118                require_once ABSPATH . 'wp-admin/includes/upgrade.php';
     119                dbDelta( self::table_statement() );
     120        }
     121
     122        /**
     123         * The CREATE TABLE statement of the activity table.
     124         *
     125         * Split out of create_table() in 2.8.0 so the schema check
     126         * (LoginArmor::missing_schema_columns()) reads the same columns.
     127         */
     128        public static function table_statement(): string {
    118129                global $wpdb;
    119130
    … …  
    121132                $table           = $wpdb->prefix . 'login_armor_activity';
    122133
    123                 $sql = "CREATE TABLE {$table} (
     134                return "CREATE TABLE {$table} (
    124135                        id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
    125136                        user_id bigint(20) UNSIGNED NOT NULL,
    … …  
    141152                        KEY row_hash (row_hash)
    142153                ) $charset_collate;";
    143 
    144                 require_once ABSPATH . 'wp-admin/includes/upgrade.php';
    145                 dbDelta( $sql );
    146154        }
    147155
Note: See TracChangeset for help on using the changeset viewer.