WP-PostRatings problem with admin_init
-
Hi
I have a site where I want to use your WP-PostRatings plugin. I also want to hide admin screens from subscribers.
WP-PostRatings works fine until I add the following to my functions.php
* Redirect back to homepage and not allow access to
* WP admin for Subscribers.
*/function themeblvd_redirect_admin(){
if ( ! current_user_can( ‘edit_posts’ ) ){
wp_redirect( site_url() );
exit;
}
}
add_action( ‘admin_init’, ‘themeblvd_redirect_admin’ );I’ve narrowed it down to this 1 issue, as soon as I add it it makes your plugin go horribly wrong.
I don’t think I know enough php to sort it out, so any advice would be much appreciated.
I’d really like to use your plugin, but I do need to hide admin screens from subscribers as well.
I’ve noticed similar things happen with other voting type plugins so I am suspecting I need to find a different way of hiding the admin..?
I see you respond very quickly to queries, so thanks for a great plugin and thanks for looking after it so well.
Julian Coates.
The topic ‘WP-PostRatings problem with admin_init’ is closed to new replies.