Created
February 8, 2019 07:53
-
-
Save yousufansa/5531f20b337ea1307758183747ec30ed to your computer and use it in GitHub Desktop.
Jobhunt - Add Author Name On Company Admin Table
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
if ( ! function_exists( 'jh_child_columns_head_only_companys' ) ) { | |
function jh_child_columns_head_only_companys($defaults) { | |
$defaults['author'] = esc_html__( 'Author', 'jobhunt-child' ); | |
return $defaults; | |
} | |
} | |
add_filter('manage_edit-company_columns', 'jh_child_columns_head_only_companys', 10); | |
if ( ! function_exists( 'jh_child_columns_content_only_companys' ) ) { | |
function jh_child_columns_content_only_companys($column_name, $post_ID) { | |
if ($column_name == 'author') { | |
echo get_post_author( $post_ID ); | |
} | |
} | |
} | |
add_action('manage_edit-company_custom_column', 'jh_child_columns_content_only_companys', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment