Prevent Registration Where Role is None?

Hmm – if they have no role, it may be that they are coming in through some other way and adding that action will not help. What plugins do you have active ? also are you sharing a wp user database with another system?

Dashboard RSS Widget Overhaul

I edited default-widgets.php – function wp_widget_rss_output () but it’s still not showing any changes. There is NO NEED TO MODIFY CORE FILES!!!! Especially with dashboard widgets where a very extensible API as been provided by WordPress. PS: I’m using WPMUDEV Dashboard Feeds plugin. This plugin changes the widget_options so that I can show my own … Read more

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