Skip to content

Instantly share code, notes, and snippets.

@jrfnl

jrfnl/settings.php Secret

Created Mar 5, 2021
Embed
What would you like to do?
51423 fix up - src/wp-admin/network/settings.php
$limited_email_domains = get_site_option( 'limited_email_domains' );
$limited_email_domains_string = '';
if ( is_array( $limited_email_domains ) ) {
$limited_email_domains_string = implode( "\n", $limited_email_domains );
} elseif (is_string($limited_email_domains) ) {
$limited_email_domains_string = str_replace( ' ', "\n", $limited_email_domains );
}
?>
<textarea name="limited_email_domains" id="limited_email_domains" aria-describedby="limited-email-domains-desc" cols="45" rows="5">
<?php echo esc_textarea( $limited_email_domains_string ); ?></textarea>
<p class="description" id="limited-email-domains-desc">
<?php _e( 'If you want to limit site registrations to certain domains. One domain per line.' ); ?>
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment