$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) ? 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) { 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'])) { return sprintf(__('User account: %s with ID: `%s` has been deleted', 'all-in-one-wp-security-and-firewall'), $info['user_login'], $info['user_id']); } else { return sprintf(__('User account: `%s` with ID: `%s` has been deleted and all content has been reassigned to user with ID: `%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'])) { return sprintf(__('User account: %s with ID: `%s` has been removed from the blog with ID: `%s`', 'all-in-one-wp-security-and-firewall'), $info['user_login'], $info['user_id'], $info['blog_id']); } else { return sprintf(__('User account: `%s` with ID: `%s` has been removed from the blog with ID: `%s` and all content has been reassigned to user with ID: `%s`', 'all-in-one-wp-security-and-firewall'), $info['user_login'], $info['user_id'], $info['blog_id'], $info['reassign']); } } }