Skip to content

Commit

Permalink
Merge pull request #824 from Automattic/fix-815
Browse files Browse the repository at this point in the history
Add filter to "get_job_listing_types"
  • Loading branch information
kraftbj committed Feb 14, 2017
2 parents 18a088b + d137a54 commit e8d1737
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions wp-job-manager-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,19 @@ function get_job_listing_types( $fields = 'all' ) {
if ( ! get_option( 'job_manager_enable_types' ) ) {
return array();
} else {
return get_terms( "job_listing_type", array(
'orderby' => 'name',
'order' => 'ASC',
$args = array(
'fields' => $fields,
'hide_empty' => false,
'fields' => $fields
) );
'order' => 'ASC',
'orderby' => 'name'
);

$args = apply_filters( 'get_job_listing_types_args', $args );

// Prevent users from filtering the taxonomy
$args['taxonomy'] = 'job_listing_type';

return get_terms( $args );
}
}
endif;
Expand Down

0 comments on commit e8d1737

Please sign in to comment.