Control Users listed in Users List on dashboard

WordPress doesn’t know which user created which, so first you need to store the creator’s data in the newly created user meta so you can so something like this: add_action( ‘user_register’, ‘Store_creator’ ); function Store_creator($user_id){ $creator = wp_get_current_user(); //only do this when none admin creates the user if ( $creator->roles[0] == ‘administrator’ ) return; update_user_meta($user_id,’_creator’,$creator->ID); … Read more

Parsing post->ID in included plugin file

First issue- you can’t access any data because your AJAX request is an entirely separate request from the one that loaded the page you’re making the request from. This is not unique to WordPress. You have to pass the data you want to operate on along with your AJAX request. Second issue- calling your plugin … Read more

Prevent users in the backend from seeing WP/Plugin notifications and update annoucements?

Add this to your functions.php. if ( !current_user_can( ‘edit_users’ ) ) { //Change the edit_user” to whatever capability you need to retain the notifications add_action( ‘init’, create_function( ‘$a’, “remove_action( ‘init’, ‘wp_version_check’ );” ), 2 ); add_filter( ‘pre_option_update_core’, create_function( ‘$a’, “return null;” ) ); } Or if you want to show the notification to a specific … Read more

WordPress Admin very slow

First i recommend you to use Chrome Ctrl+Shift+j -> Timeline, click record button and refresh admin page and in that timeline you will see what caused the longest load. if HTML then php/sql part is slow, but maybe some javascript causes slow load. Second – one by one disable plugins and test loading time.

Top toolbar is not showing in wordpress admin panel

I’ve a solution of my problem. I used chrome developer tool to find out the differences between the sites in my server and in my localhost. While inspecting the source I found following error- <div class=”inside”> <br> <b>Fatal error</b>: Out of memory (allocated 43778048) (tried to allocate 132605 bytes) in <b>/home/easyitca/public_html/samples/movierez/wp-includes/wp-db.php</b> on line <b>787</b><br> </div> … Read more

[Multisite]How can I update custom blog option?

As per the Codex on update_blog_option: Switches to the blog id specified, runs update_option() and then restores to the current blog. If $refresh is true then it will refresh the blog details. Not tested, but I think your problem is trying to update elements of the array instead of the whole thing: $the_options = get_blog_option($blog_id, … Read more