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 … Read more

Changing post status in one click

You can create your custom button in a function and hook it into post_submitbox_misc_actions and this will add it right above the publish button. To change the status use wp_update_post in an Ajax function. Give it a try and post back with your code if you run into any problems. UPDATE: add_action(‘post_submitbox_misc_actions’, ‘send_for_correction_button’); function send_for_correction_button() … Read more

register_post_status and show_in_admin_all_list

This solves my problem: register_post_status(‘my_custom_post_status’, array( ‘label’ => __(‘The Label’, ‘domain’), ‘public’ => !is_admin(), ‘exclude_from_search’ => true, ‘show_in_admin_all_list’ => false, ‘label_count’ => //blablabla )); !is_admin() makes the status only public on the frontpage. If you find a better solution please post it here!

Custom column for changing post status via ajax

here you go: <?php /* Plugin Name: ajaxed-status Plugin URI: http://en.bainternet.info Description: answer to : Custom column for changing post status via ajax http://wordpress.stackexchange.com/questions/33442/custom-column-for-changing-post-status-via-ajax Version: 1.0 Author: Bainternet Author URI: http://en.bainternet.info */ if ( !class_exists(‘ajaxed_status’)){ class ajaxed_status { //constarctor public function __construct() { global $pagenow,$typenow; //&& $typenow ==’page’ if (is_admin() && $pagenow==’edit.php’){ add_filter(‘admin_footer’,array($this,’insert_ajax_status_script’)); } add_filter( … Read more

Why doesn’t wp_update_post() update the post_status field?

Answer couldn’t be simpler. As pointed out by Otto at the wp-hackers list, problem was me not setting post_date_gmt when using wp_update_post(). Final code looks like this: if ( $post_date < strtotime( “tomorrow” ) ) { $status=”publish”; $newpostdata[‘post_status’] = $status; $newpostdata[‘post_date’] = date( ‘Y-m-d H:i:s’, $post_date ); // Also pass ‘post_date_gmt’ so that WP plays … Read more

how to assign a status/mark to post?

You can create your own meta box with a checkbox and only select posts that where checked: Add metabox code /* Define the custom box */ add_action( ‘add_meta_boxes’, ‘my_slider_add_custom_box’ ); /* Do something with the data entered */ add_action( ‘save_post’, ‘my_slider_save_postdata’ ); /* Adds a box to the main column on the Post and Page … Read more