Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions includes/classes/Authentication/Passwords.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ public function register_setting() {
esc_html__( 'Require Strong Passwords', 'tenup' ),
[ $this, 'settings_ui' ],
'general',
'default',
array(
'label_for' => 'require-strong-passwords',
)
'default'
);
}

Expand Down Expand Up @@ -141,12 +138,21 @@ public function ms_settings() {
<tbody>
<tr>
<th scope="row">
<label for="require-strong-passwords"><?php esc_html_e( 'Require Strong Passwords', 'tenup' ); ?></label>
<?php esc_html_e( 'Require Strong Passwords', 'tenup' ); ?>
</th>
<td>
<input name="tenup_require_strong_passwords" <?php checked( 1, $require_strong_passwords ); ?> type="radio" id="require-strong-passwords-yes" value="1"> <label for="require-strong-passwords-yes"><?php esc_html_e( 'Yes', 'tenup' ); ?></label><br>
<input name="tenup_require_strong_passwords" <?php checked( 0, $require_strong_passwords ); ?> type="radio" id="require-strong-passwords-no" value="0"> <label for="require-strong-passwords-no"><?php esc_html_e( 'No', 'tenup' ); ?></label>
<p class="description"><?php esc_html_e( 'Require all users to use strong passwords.', 'tenup' ); ?></p>
<fieldset>
<legend class="screen-reader-text"><span><?php esc_html_e( 'Require Strong Passwords', 'tenup' ); ?></span></legend>
<label for="require-strong-passwords-yes">
<input name="tenup_require_strong_passwords" <?php checked( 1, $require_strong_passwords ); ?> type="radio" id="require-strong-passwords-yes" value="1">
<?php esc_html_e( 'Yes', 'tenup' ); ?>
</label><br>
<label for="require-strong-passwords-no">
<input name="tenup_require_strong_passwords" <?php checked( 0, $require_strong_passwords ); ?> type="radio" id="require-strong-passwords-no" value="0">
<?php esc_html_e( 'No', 'tenup' ); ?>
</label>
<p class="description"><?php esc_html_e( 'Require all users to use strong passwords.', 'tenup' ); ?></p>
</fieldset>
</td>
</tr>
</tbody>
Expand All @@ -163,9 +169,18 @@ public function settings_ui() {
$require_strong_passwords = $this->require_strong_passwords();

?>
<input name="tenup_require_strong_passwords" <?php checked( 1, $require_strong_passwords ); ?> type="radio" id="require-strong-passwords-yes" value="1"> <label for="require-strong-passwords-yes"><?php esc_html_e( 'Yes', 'tenup' ); ?></label><br>
<input name="tenup_require_strong_passwords" <?php checked( 0, $require_strong_passwords ); ?> type="radio" id="require-strong-passwords-no" value="0"> <label for="require-strong-passwords-no"><?php esc_html_e( 'No', 'tenup' ); ?></label>
<p class="description"><?php esc_html_e( 'Require all users to use strong passwords.', 'tenup' ); ?></p>
<fieldset>
<legend class="screen-reader-text"><span><?php esc_html_e( 'Require Strong Passwords', 'tenup' ); ?></span></legend>
<label for="require-strong-passwords-yes">
<input name="tenup_require_strong_passwords" <?php checked( 1, $require_strong_passwords ); ?> type="radio" id="require-strong-passwords-yes" value="1">
<?php esc_html_e( 'Yes', 'tenup' ); ?>
</label><br>
<label for="require-strong-passwords-no">
<input name="tenup_require_strong_passwords" <?php checked( 0, $require_strong_passwords ); ?> type="radio" id="require-strong-passwords-no" value="0">
<?php esc_html_e( 'No', 'tenup' ); ?>
</label>
<p class="description"><?php esc_html_e( 'Require all users to use strong passwords.', 'tenup' ); ?></p>
</fieldset>
<?php
}

Expand Down
56 changes: 23 additions & 33 deletions includes/classes/Comments/Comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,27 +113,18 @@ public function single_site_setting() {
public function disable_comments_setting_field_output() {
$disable_comments = $this->comments_are_disabled();
?>

<input id="tenup-disable-comments-yes" name="tenup_disable_comments" type="radio" value="yes"
<?php
checked( $disable_comments, true );
disabled( $this->is_ui_disabled() );
?>
/>
<label for="tenup-disable-comments-yes">
<?php esc_html_e( 'Yes', 'tenup' ); ?>
</label><br>

<input id="tenup-disable-comments-no" name="tenup_disable_comments" type="radio" value="no"
<?php
checked( $disable_comments, false );
disabled( $this->is_ui_disabled() );
?>
/>
<label for="tenup-disable-comments-no">
<?php esc_html_e( 'No', 'tenup' ); ?>
</label>
<p class="description"><?php esc_html_e( 'This will remove all the comments related Ui from the admin and frontend.', 'tenup' ); ?></p>
<fieldset>
<legend class="screen-reader-text"><span><?php esc_html_e( 'Disable Comments', 'tenup' ); ?></span></legend>
<label for="tenup-disable-comments-yes">
<input id="tenup-disable-comments-yes" name="tenup_disable_comments" type="radio" value="yes" <?php checked( $disable_comments, true ); ?> <?php disabled( $this->is_ui_disabled() ); ?>>
<?php esc_html_e( 'Yes', 'tenup' ); ?>
</label><br>
<label for="tenup-disable-comments-no">
<input id="tenup-disable-comments-no" name="tenup_disable_comments" type="radio" value="no" <?php checked( $disable_comments, false ); ?> <?php disabled( $this->is_ui_disabled() ); ?>>
<?php esc_html_e( 'No', 'tenup' ); ?>
</label>
<p class="description"><?php esc_html_e( 'This will remove all the comments related Ui from the admin and frontend.', 'tenup' ); ?></p>
</fieldset>
<?php
}

Expand All @@ -152,18 +143,17 @@ public function disable_comments_settings() {
<tr>
<th scope="row"><?php esc_html_e( 'Disable Comments', 'tenup' ); ?></th>
<td>
<input name="tenup_disable_comments"
<?php
checked( $disable_comments, true );
disabled( $this->is_ui_disabled() );
?>
type="radio" id="tenup_disable_comments_yes" value="yes"> <label for="tenup_disable_comments_yes"><?php esc_html_e( 'Yes', 'tenup' ); ?></label><br>
<input name="tenup_disable_comments"
<?php
checked( $disable_comments, false );
disabled( $this->is_ui_disabled() );
?>
type="radio" id="tenup_disable_comments_no" value="no"> <label for="tenup_disable_comments_no"><?php esc_html_e( 'No', 'tenup' ); ?></label>
<fieldset>
<legend class="screen-reader-text"><span><?php esc_html_e( 'Disable Comments', 'tenup' ); ?></span></legend>
<label for="tenup_disable_comments_yes">
<input name="tenup_disable_comments" <?php checked( $disable_comments, true ); ?> <?php disabled( $this->is_ui_disabled() ); ?> type="radio" id="tenup_disable_comments_yes" value="yes">
<?php esc_html_e( 'Yes', 'tenup' ); ?>
</label><br>
<label for="tenup_disable_comments_no">
<input name="tenup_disable_comments" <?php checked( $disable_comments, false ); ?> <?php disabled( $this->is_ui_disabled() ); ?> type="radio" id="tenup_disable_comments_no" value="no">
<?php esc_html_e( 'No', 'tenup' ); ?>
</label>
</fieldset>
</td>
</tr>
</tbody>
Expand Down
11 changes: 4 additions & 7 deletions includes/classes/Gutenberg/Gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ public function disable_gutenberg_editor_setting() {
esc_html__( 'Use Classic Editor', 'tenup' ),
[ $this, 'gutenberg_settings_ui' ],
'writing',
'default',
array(
'label_for' => 'disable-gutenberg-editor',
)
'default'
);
}

Expand All @@ -61,10 +58,10 @@ public function gutenberg_settings_ui() {
?>
<fieldset>
<legend class="screen-reader-text"><?php esc_html_e( 'Gutenberg Editor Settings', 'tenup' ); ?></legend>
<p>
<label for="disable-gutenberg-editor">
<input id="disable-gutenberg-editor" name="<?php echo esc_attr( $this->get_disable_gutenberg_key() ); ?>" type="checkbox" value="1" <?php checked( $disable_editor, 1 ); ?> />
</p>
<p class="description"><?php esc_html_e( 'Disables Gutenberg, the new editor introduced in WordPress 5.0, in favor of the prior writing experience.', 'tenup' ); ?></p>
<?php esc_html_e( 'Disables Gutenberg, the new editor introduced in WordPress 5.0, in favor of the prior writing experience.', 'tenup' ); ?>
</label>
</fieldset>
<?php
}
Expand Down
11 changes: 4 additions & 7 deletions includes/classes/PostPasswords/PostPasswords.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ public function password_protection_setting() {
esc_html__( 'Enable Password Protected Content', 'tenup' ),
[ $this, 'settings_ui' ],
'writing',
'default',
array(
'label_for' => 'password-protect',
)
'default'
);
}

Expand All @@ -61,10 +58,10 @@ public function settings_ui() {
?>
<fieldset>
<legend class="screen-reader-text"><?php esc_html_e( 'Password Protected Content', 'tenup' ); ?></legend>
<p>
<label for="password-protect">
<input id="password-protect" name="tenup_password_protect" type="checkbox" value="1" <?php checked( $password_protect, 1 ); ?> />
</p>
<p class="description"><?php esc_html_e( 'Enables password protected content. WordPress default password protected post functionality is insecure and does not work with page caching.', 'tenup' ); ?></p>
<?php esc_html_e( 'Enables password protected content. WordPress default password protected post functionality is insecure and does not work with page caching.', 'tenup' ); ?>
</label>
</fieldset>
<?php
}
Expand Down
36 changes: 23 additions & 13 deletions includes/classes/SSO/SSO.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,17 @@ public function ms_settings() {
<tr>
<th scope="row"><?php esc_html_e( 'Allow Fueled SSO', 'tenup' ); ?></th>
<td>
<input name="tenup_allow_sso" <?php checked( 'yes', $setting ); ?> type="radio" id="tenup_allow_sso_yes" value="yes"> <label for="tenup_allow_sso_yes"><?php esc_html_e( 'Yes', 'tenup' ); ?></label><br>
<input name="tenup_allow_sso" <?php checked( 'no', $setting ); ?> type="radio" id="tenup_allow_sso_no" value="no"> <label for="tenup_allow_sso_no"><?php esc_html_e( 'No', 'tenup' ); ?></label>
<fieldset>
<legend class="screen-reader-text"><span><?php esc_html_e( 'Allow Fueled SSO', 'tenup' ); ?></span></legend>
<label for="tenup_allow_sso_yes">
<input name="tenup_allow_sso" <?php checked( 'yes', $setting ); ?> type="radio" id="tenup_allow_sso_yes" value="yes">
<?php esc_html_e( 'Yes', 'tenup' ); ?>
</label><br>
<label for="tenup_allow_sso_no">
<input name="tenup_allow_sso" <?php checked( 'no', $setting ); ?> type="radio" id="tenup_allow_sso_no" value="no">
<?php esc_html_e( 'No', 'tenup' ); ?>
</label>
</fieldset>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -157,17 +166,18 @@ public function validate_sso_setting( $value ) {
public function sso_setting_field_output() {
$allow_sso = $this->get_setting();
?>

<input id="tenup-allow-sso-yes" name="tenup_allow_sso" type="radio" value="yes"<?php checked( $allow_sso, 'yes' ); ?> />
<label for="tenup-allow-sso-yes">
<?php esc_html_e( 'Yes', 'tenup' ); ?>
</label><br>

<input id="tenup-allow-sso-no" name="tenup_allow_sso" type="radio" value="no"<?php checked( $allow_sso, 'no' ); ?> />
<label for="tenup-allow-sso-no">
<?php esc_html_e( 'No', 'tenup' ); ?>
</label>
<p class="description"><?php esc_html_e( 'This allows members of Fueled on your project team to log in via SSO. This is extremely important to streamline maintenance of your website.', '10up' ); ?></p>
<fieldset>
<legend class="screen-reader-text"><span><?php esc_html_e( 'Allow Fueled SSO', 'tenup' ); ?></span></legend>
<label for="tenup-allow-sso-yes">
<input id="tenup-allow-sso-yes" name="tenup_allow_sso" type="radio" value="yes" <?php checked( $allow_sso, 'yes' ); ?>>
<?php esc_html_e( 'Yes', 'tenup' ); ?>
</label><br>
<label for="tenup-allow-sso-no">
<input id="tenup-allow-sso-no" name="tenup_allow_sso" type="radio" value="no" <?php checked( $allow_sso, 'no' ); ?>>
<?php esc_html_e( 'No', 'tenup' ); ?>
</label>
<p class="description"><?php esc_html_e( 'This allows members of Fueled on your project team to log in via SSO. This is extremely important to streamline maintenance of your website.', '10up' ); ?></p>
</fieldset>
<?php
}

Expand Down
13 changes: 11 additions & 2 deletions includes/classes/SupportMonitor/Monitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,17 @@ public function sanitize_settings( $settings ) {
public function enable_field() {
$value = $this->get_setting( 'enable_support_monitor' );
?>
<input name="tenup_support_monitor_settings[enable_support_monitor]" <?php checked( 'yes', $value ); ?><?php disabled( defined( 'SUPPORT_MONITOR_ENABLE' ) || $this->is_local_environment() ); ?> type="radio" id="tenup_enable_support_monitor_yes" value="yes"> <label for="tenup_enable_support_monitor_yes"><?php esc_html_e( 'Yes', 'tenup' ); ?></label><br>
<input name="tenup_support_monitor_settings[enable_support_monitor]" <?php checked( 'no', $value ); ?><?php disabled( defined( 'SUPPORT_MONITOR_ENABLE' ) || $this->is_local_environment() ); ?> type="radio" id="tenup_enable_support_monitor_no" value="no"> <label for="tenup_enable_support_monitor_no"><?php esc_html_e( 'No', 'tenup' ); ?></label>
<fieldset>
<legend class="screen-reader-text"><span><?php esc_html_e( 'Enable Support Monitor', 'tenup' ); ?></span></legend>
<label for="tenup_enable_support_monitor_yes">
<input name="tenup_support_monitor_settings[enable_support_monitor]" <?php checked( 'yes', $value ); ?><?php disabled( defined( 'SUPPORT_MONITOR_ENABLE' ) ); ?> type="radio" id="tenup_enable_support_monitor_yes" value="yes">
<?php esc_html_e( 'Yes', 'tenup' ); ?>
</label><br>
<label for="tenup_enable_support_monitor_no">
<input name="tenup_support_monitor_settings[enable_support_monitor]" <?php checked( 'no', $value ); ?><?php disabled( defined( 'SUPPORT_MONITOR_ENABLE' ) ); ?> type="radio" id="tenup_enable_support_monitor_no" value="no">
<?php esc_html_e( 'No', 'tenup' ); ?>
</label>
</fieldset>
<?php
}

Expand Down
Loading