Skip to content

Commit

Permalink
Users: Add notice to use w.org email when inviting (#963)
Browse files Browse the repository at this point in the history
  • Loading branch information
timiwahalahti authored Oct 9, 2023
1 parent 6f3133e commit 0fae76f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion public_html/wp-content/mu-plugins/wcorg-misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,23 @@ function wcorg_country_list_mods( $countries ) {
}
add_filter( 'wcorg_get_countries', 'wcorg_country_list_mods' );

/**
* Tell the site administrators to use the WordPress.org account information when adding new users.
*/
function wcorg_user_new_wporg_credentials_notice() {
global $pagenow;

if ( 'user-new.php' !== $pagenow ) {
return;
}
?>
<div class="notice notice-info">
<p><?php echo wp_kses_post( __( '<strong>Use WordPress.org accounts to add and invite users</strong>. You should use the same email address that user has registered to WordPress.org with.' ) ); ?></p>
</div>
<?php
}
add_action( 'admin_notices', 'wcorg_user_new_wporg_credentials_notice' );

/**
* Fix malformed URLs for the `mu-plugins-private` folder.
*
Expand All @@ -692,4 +709,4 @@ function fix_mu_plugins_private_urls( string $url ) : string {

return str_replace( $search, $replace, $url );
}
add_filter( 'plugins_url', 'fix_mu_plugins_private_urls' );
add_filter( 'plugins_url', 'fix_mu_plugins_private_urls' );

0 comments on commit 0fae76f

Please sign in to comment.