Make sure $footer_text is returned if( $pagenow !== 'user-new.php' ) to avoid blank admin footer text all around wp.

This commit is contained in:
Sven Lehnert
2016-09-10 10:54:35 +02:00
parent 8ba993754b
commit c4b90508df
+3 -3
View File
@@ -4,14 +4,14 @@
*** @Add community role to user creatino page
***/
add_action('admin_footer_text', 'um_add_custom_user_profile_fields');
function um_add_custom_user_profile_fields() {
function um_add_custom_user_profile_fields($footer_text) {
global $ultimatemember, $pagenow;
if( $pagenow !== 'user-new.php' )
return;
return $footer_text;
if( !current_user_can('manage_options') )
return false;
return $footer_text;
?>
<table id="table_my_custom_field" style="display:none;">