How to change “Draft” string for status of custom post type to “Unavailable”?

I was investigating the issue for this question, and one option is using the plugin Edit Flow.

It can be configured to display custom post_status in specific CPT’s, but further tests are necessary to see if it applies to this case.


Other option is using toscho’s Retranslate plugin, where you can define the string to be translated and the post_type: https://wordpress.stackexchange.com/a/3675/12615

It gets almost all the job done, because, curiously, there’s one string (the very first one of the screenshot) that don’t gets translated and one extra code is necessary:

add_filter( 'views_edit-employee', 'wpse_54330_custom_draft_translation', 10, 1);

function wpse_54330_custom_draft_translation( $views ) 
{
    $views['draft'] = str_replace('Draft', 'Unavailable', $views['draft']);
    return $views;
}

One caveat of this method is that just after “quick editing” the post status, the word Draft appears…

Leave a Comment