Custom admin email for new user registration

Yes, you can Change email address by using wp_mail function. You can check this how to do this http://www.butlerblog.com/2011/07/14/changing-the-wp_mail-from-address-with-a-plugin/ Use this plugin for user management it supports email address when new user registers https://wordpress.org/plugins/wp-members/ Use this code in your functions.php file. function so174837_registration_email_alert( $user_id ) { $user = get_userdata( $user_id ); $email = $user->user_email; $message … Read more

WP List Table custom quick edit box – post meta data missing and columns change on submit

I just run in the same error when adding extra columns to the default post types. The offending line was the $pagenow check. Quick Edit uses admin-ajax.php so it doesn’t renders the custom columns when it’s done. This doesn’t work: if( ‘edit.php’ == $pagenow && is_admin() ) { add_action( ‘admin_init’, array( $this, ‘init_id_column’ ), 999 … Read more

Add my own button next to “Screen options” and “Help” in the admin

The HTML echo ‘<div id=”screen-meta-links”>’; echo ‘ <div id=”contextual-help-link-wrap” class=”hide-if-no-js screen-meta-toggle”>’; echo ‘ <a href=”#” id=”your-own-button” class=”show-settings”>Text for your button</a>’; echo ‘ </div>’; echo ‘</div>’; echo ‘<br style=”clera:both” />’; echo ‘<div id=”your-button-content” class=”your-button-hide”>’; // your content goes here echo ‘</div>’; And you need some custom JavaScript jQuery(document).ready( function($){ $( ‘.your-button-hide’ ).each( function(e){ $( this ).hide(); … Read more

How to obtain the user ID of the current profile being edited in WP-Admin?

There is a global variable called … $user_id available on that page. Always. From user-edit.php: $user_id = (int) $user_id; $current_user = wp_get_current_user(); if ( ! defined( ‘IS_PROFILE_PAGE’ ) ) define( ‘IS_PROFILE_PAGE’, ( $user_id == $current_user->ID ) ); if ( ! $user_id && IS_PROFILE_PAGE ) $user_id = $current_user->ID; elseif ( ! $user_id && ! IS_PROFILE_PAGE ) … Read more

Plugin to remove Admin menu items based on user role?

Update: reading mike’s answer again got me thinking that you can add a new capability to a role and use that as you removal condition, so: // first add your role the capability like so // get the “author” role object $role = get_role( ‘administrator’ ); // add “see_all_menus” to this role object $role->add_cap( ‘see_all_menus’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)