-
-
Save weskoop/4649526 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hides Yoast SEO Plugin Field Columns for Author users and below | |
// @since Jan, 2013 | |
// @author R. Dall | |
function my_columns_filter( $columns ) { | |
if( ! current_user_can( 'edit_users' ) ) | |
unset( $columns['wpseo-score'], $columns['wpseo-title'], $columns['wpseo-metadesc'], $columns['wpseo-focuskw'] ); | |
return $columns; | |
} | |
// Filter pages, post, CPT | |
add_filter( 'manage_edit-page_columns', 'my_columns_filter',10, 1 ); | |
add_filter( 'manage_edit-post_columns', 'my_columns_filter',10, 1 ); | |
add_filter( 'manage_edit-surgeon_columns', 'my_columns_filter',10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment