Created
February 20, 2017 11:57
-
-
Save kish2011/5c2f5f1e0af8b0d3477bc93749a6d31a to your computer and use it in GitHub Desktop.
Add the Featured Company fields to the admin
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
/* Add the Featured Company fields to the admin */ | |
add_filter( 'job_manager_job_listing_data_fields', 'admin_add_featured_company_field' ); | |
function admin_add_featured_company_field( $fields ) { | |
global $post; | |
$current_user = wp_get_current_user(); | |
if ( $current_user->has_cap( 'manage_job_listings' ) ) { | |
$fields['_company_featured'] = array( | |
'label' => __( 'Featured Company', 'wp-job-manager' ), | |
'type' => 'checkbox', | |
'description' => __( 'Featured Companies will be set, and can be styled differently.', 'wp-job-manager' ), | |
'priority' => 8 | |
); | |
} | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment