Created
February 17, 2015 01:37
-
-
Save designbuildtest/10f89d2e0a354918e151 to your computer and use it in GitHub Desktop.
CPT Orberby Manage Column
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
| function myplugin_custom_manage_affiliation_columns( $columns ) { | |
| unset( $columns['author'] ); | |
| unset( $columns['date'] ); | |
| $columns['menu_order_affiliation'] = __( 'Order' ); | |
| return $columns; | |
| } | |
| add_filter( 'manage_edit-affiliation_columns', 'myplugin_custom_manage_affiliation_columns' ); | |
| function myplugin_affiliation_menu_order_column( $name ) { | |
| global $post; | |
| switch ( $name ) { | |
| case 'menu_order_affiliation': | |
| $order = $post->menu_order; | |
| esc_attr_e( $order ); | |
| break; | |
| } | |
| } | |
| add_action( 'manage_affiliation_posts_custom_column','myplugin_affiliation_menu_order_column' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment