v1.0.2
This commit is contained in:
parent
b8e17df2db
commit
71b471e13e
19 changed files with 771 additions and 60 deletions
|
|
@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
/**
|
||||
* Class Two_Factor_Extended_CLI_Commands
|
||||
*
|
||||
* Provides WP-CLI commands for Two Factor Extended.
|
||||
* Provides WP-CLI commands for Two-Factor Extended.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -292,7 +292,7 @@ class Two_Factor_Extended_Compliance_Report {
|
|||
public function email_report( string $to, array $args = array() ): bool {
|
||||
$stats = $this->get_compliance_stats( $args );
|
||||
|
||||
$subject = __( 'Two Factor Extended - Compliance Report', 'two-factor-extended' );
|
||||
$subject = __( 'Two-Factor Extended - Compliance Report', 'two-factor-extended' );
|
||||
|
||||
$message = sprintf(
|
||||
/* translators: 1: Site name */
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ class Two_Factor_Extended_Dependency_Checker {
|
|||
?>
|
||||
<div class="notice notice-error">
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'Two Factor Extended', 'two-factor-extended' ); ?>:</strong>
|
||||
<strong><?php esc_html_e( 'Two-Factor Extended', 'two-factor-extended' ); ?>:</strong>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: Two Factor plugin link */
|
||||
|
|
@ -119,7 +119,7 @@ class Two_Factor_Extended_Dependency_Checker {
|
|||
?>
|
||||
<div class="notice notice-error">
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'Two Factor Extended', 'two-factor-extended' ); ?>:</strong>
|
||||
<strong><?php esc_html_e( 'Two-Factor Extended', 'two-factor-extended' ); ?>:</strong>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: Minimum WordPress version */
|
||||
|
|
@ -141,7 +141,7 @@ class Two_Factor_Extended_Dependency_Checker {
|
|||
?>
|
||||
<div class="notice notice-error">
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'Two Factor Extended', 'two-factor-extended' ); ?>:</strong>
|
||||
<strong><?php esc_html_e( 'Two-Factor Extended', 'two-factor-extended' ); ?>:</strong>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: Minimum PHP version */
|
||||
|
|
|
|||
|
|
@ -157,7 +157,15 @@ class Two_Factor_Extended_Enforcement {
|
|||
|
||||
// If site override is not allowed, return only network requirements.
|
||||
if ( empty( $network_settings['allow_site_override'] ) ) {
|
||||
return array_values( array_unique( $required ) );
|
||||
$network_required = array_values( array_unique( $required ) );
|
||||
|
||||
// Intersect with globally-available providers (Two Factor 0.16+).
|
||||
if ( class_exists( 'Two_Factor_Core' ) ) {
|
||||
$available = array_keys( Two_Factor_Core::get_providers() );
|
||||
$network_required = ! empty( $available ) ? array_values( array_intersect( $network_required, $available ) ) : $network_required;
|
||||
}
|
||||
|
||||
return $network_required;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -185,7 +193,19 @@ class Two_Factor_Extended_Enforcement {
|
|||
}
|
||||
}
|
||||
|
||||
return array_values( array_unique( $required ) );
|
||||
$required = array_values( array_unique( $required ) );
|
||||
|
||||
// Intersect with globally-available providers (Two Factor 0.16+).
|
||||
// If Two-Factor has disabled a provider site-wide, it cannot be enforced.
|
||||
if ( class_exists( 'Two_Factor_Core' ) ) {
|
||||
$available = array_keys( Two_Factor_Core::get_providers() );
|
||||
|
||||
if ( ! empty( $available ) ) {
|
||||
$required = array_values( array_intersect( $required, $available ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $required;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -316,7 +336,7 @@ class Two_Factor_Extended_Enforcement {
|
|||
?>
|
||||
<div class="notice notice-warning">
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'Two Factor Extended:', 'two-factor-extended' ); ?></strong>
|
||||
<strong><?php esc_html_e( 'Two-Factor Extended:', 'two-factor-extended' ); ?></strong>
|
||||
<?php
|
||||
printf(
|
||||
esc_html(
|
||||
|
|
@ -344,7 +364,7 @@ class Two_Factor_Extended_Enforcement {
|
|||
?>
|
||||
<div class="notice notice-error">
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'Two Factor Extended:', 'two-factor-extended' ); ?></strong>
|
||||
<strong><?php esc_html_e( 'Two-Factor Extended:', 'two-factor-extended' ); ?></strong>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: Required providers list */
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@ class Two_Factor_Extended_Network_Settings {
|
|||
|
||||
add_submenu_page(
|
||||
'settings.php',
|
||||
__( 'Two Factor Extended', 'two-factor-extended' ),
|
||||
__( 'Two Factor Extended', 'two-factor-extended' ),
|
||||
__( 'Two-Factor Extended', 'two-factor-extended' ),
|
||||
__( 'Two-Factor Extended', 'two-factor-extended' ),
|
||||
'manage_network_options',
|
||||
self::PAGE_SLUG,
|
||||
array( $this, 'render_network_page' )
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ class Two_Factor_Extended_Provider_Filter {
|
|||
?>
|
||||
<div class="notice notice-info inline">
|
||||
<p>
|
||||
<strong><?php esc_html_e( 'Two Factor Extended:', 'two-factor-extended' ); ?></strong>
|
||||
<strong><?php esc_html_e( 'Two-Factor Extended:', 'two-factor-extended' ); ?></strong>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: List of hidden providers */
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
/**
|
||||
* Class Two_Factor_Extended_REST_API
|
||||
*
|
||||
* Provides REST API endpoints for Two Factor Extended.
|
||||
* Provides REST API endpoints for Two-Factor Extended.
|
||||
*
|
||||
* @since 0.1.0
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ class Two_Factor_Extended_Settings {
|
|||
|
||||
// Main settings page with tabs (Settings, Audit Log, Compliance).
|
||||
add_options_page(
|
||||
__( 'Two Factor Extended', 'two-factor-extended' ),
|
||||
__( 'Two Factor Extended', 'two-factor-extended' ),
|
||||
__( 'Two-Factor Extended', 'two-factor-extended' ),
|
||||
__( 'Two-Factor Extended', 'two-factor-extended' ),
|
||||
'manage_options',
|
||||
self::PAGE_SLUG,
|
||||
array( $this, 'render_settings_page' )
|
||||
|
|
@ -92,8 +92,8 @@ class Two_Factor_Extended_Settings {
|
|||
|
||||
add_submenu_page(
|
||||
'settings.php',
|
||||
__( 'Two Factor Extended', 'two-factor-extended' ),
|
||||
__( 'Two Factor Extended', 'two-factor-extended' ),
|
||||
__( 'Two-Factor Extended', 'two-factor-extended' ),
|
||||
__( 'Two-Factor Extended', 'two-factor-extended' ),
|
||||
'manage_network_options',
|
||||
self::PAGE_SLUG,
|
||||
array( $this, 'render_network_settings_page' )
|
||||
|
|
@ -1406,7 +1406,7 @@ class Two_Factor_Extended_Settings {
|
|||
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h1><?php esc_html_e( 'Two Factor Extended - Audit Log', 'two-factor-extended' ); ?></h1>
|
||||
<h1><?php esc_html_e( 'Two-Factor Extended - Audit Log', 'two-factor-extended' ); ?></h1>
|
||||
|
||||
<div class="card">
|
||||
<h2><?php esc_html_e( 'Statistics', 'two-factor-extended' ); ?></h2>
|
||||
|
|
@ -1526,7 +1526,7 @@ class Two_Factor_Extended_Settings {
|
|||
|
||||
?>
|
||||
<div class="wrap">
|
||||
<h1><?php esc_html_e( 'Two Factor Extended - Compliance Report', 'two-factor-extended' ); ?></h1>
|
||||
<h1><?php esc_html_e( 'Two-Factor Extended - Compliance Report', 'two-factor-extended' ); ?></h1>
|
||||
|
||||
<div class="card">
|
||||
<h2><?php esc_html_e( 'Overview', 'two-factor-extended' ); ?></h2>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class Two_Factor_Extended {
|
|||
* @since 0.1.0
|
||||
* @var string
|
||||
*/
|
||||
private string $version = '1.0.1';
|
||||
private string $version = '1.0.2';
|
||||
|
||||
/**
|
||||
* Plugin directory path.
|
||||
|
|
|
|||
Loading…
Reference in a new issue