-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Milestone
Description
Let's get rid of this monstrosity:
function rcCheckUser() {
if ( current_user_can( 'read' ) ) {
if ( current_user_can( 'edit_posts' ) ) {
if ( current_user_can( 'upload_files' ) ) {
if ( current_user_can( 'moderate_comments' ) ) {
if ( current_user_can( 'switch_themes' ) ) {
//do nothing here for admin
} else {
add_filter( 'the_content', 'rcMetaDisplayEditor' );
}
} else {
add_filter( 'the_content', 'rcMetaDisplayAuthor' );
}
} else {
add_filter( 'the_content', 'rcMetaDisplayContributor' );
}
} else {
add_filter( 'the_content', 'rcMetaDisplaySubscriber' );
}
} else {
add_filter( 'the_content', 'rcMetaDisplayNone' );
}
}
add_action( 'loop_start', 'rcCheckUser' );Reactions are currently unavailable