Up to certain degree I have managed to make the post status to change and saved.
But I can’t seems to add a label above the listings list on the backend.
And the listing whose status I’ve changed doesn’t appear on the frontend, when user see his listings list.
Here’s the code I use. Any additional hint? ??
add_filter( 'job_listing_post_statuses', 'reject_status');
function reject_status($a){
$a['rejected'] = _x( 'Rejected', 'post status', 'wp-job-manager' );
return $a;
}
// Register Custom Status
if ( ! function_exists('custom_post_status') ) {
// Register Custom Status
add_action( 'init', 'custom_post_status', 0 );
function custom_post_status() {
$args = array(
'label' => _x( 'Rejected', 'Status General Name', 'wp_job_manager' ),
'label_count' => _n_noop( 'Rejected (%s)', 'Rejected (%s)', 'wp_job_manager' ),
);
register_post_status( 'Rejected', $args );
}
`