$info['event'], 'rule_name' => $info['rule_name'], 'rule_family' => $info['rule_family'], ); break; } // Add a link to the rule, if present if (isset($info['location'])) { $output .= "

".__('Configure this rule', 'all-in-one-wp-security-and-firewall').''; } return is_array($output) ? wp_json_encode($output) : $output; } /** * Return the text version of 'password_reset' event * * @param array $info * @return string */ public static function password_reset_to_text($info) { /* translators: %s: User login */ return sprintf(__('Password for user account: `%s` successfully changed', 'all-in-one-wp-security-and-firewall'), $info['user_login']); } /** * Return the text version of 'user_deleted' event * * @param array $info * @return string */ public static function user_deleted_to_text($info) { if (empty($info['reassign'])) { /* translators: 1: User login, 2: User ID */ return sprintf(__('User account: %1$s with ID: `%2$s` has been deleted', 'all-in-one-wp-security-and-firewall'), $info['user_login'], $info['user_id']); } else { /* translators: 1: User login, 2: User ID, 3: Reassign */ return sprintf(__('User account: `%1$s` with ID: `%2$s` has been deleted and all content has been reassigned to user with ID: `%3$s`', 'all-in-one-wp-security-and-firewall'), $info['user_login'], $info['user_id'], $info['reassign']); } } /** * Return the text version of 'user_removed' event * * @param array $info * @return string */ public static function user_removed_to_text($info) { if (empty($info['reassign'])) { /* translators: 1: User login, 2: User ID, 3: Blog ID */ return sprintf(__('User account: %1$s with ID: `%2$s` has been removed from the blog with ID: `%3$s`', 'all-in-one-wp-security-and-firewall'), $info['user_login'], $info['user_id'], $info['blog_id']); } else { /* translators: 1: User login, 2: User ID, 3: Blog ID, 4: Reassign */ return sprintf(__('User account: `%1$s` with ID: `%2$s` has been removed from the blog with ID: `%3$s` and all content has been reassigned to user with ID: `%4$s`', 'all-in-one-wp-security-and-firewall'), $info['user_login'], $info['user_id'], $info['blog_id'], $info['reassign']); } } }