這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Custom Status

描述

Add new statuses to post, page and custom-post, by simple user interface.

New statuses are listed in drop-down list for “edit-status” menu for post.

In the drop-down list you can view all custom status (status created from register_post_status() function too)

This plugin add 3 new hook :

  • {$post_type}_save_action : add/edit “save” actions in minor-publish section for publish metabox

  • {$post_type}_available_statuses : change/remove statuses in status dropdown list in minor-publish section for publish metabox

  • {$post_type}_publish_action : edit publish action label in publish section for publish metabox

安裝

Use standard wordpress installation.

常見問題

  • Q: When click “publish” button, my custom status is lost.

  • A: You use “save” button to save post preserving custom status. Else use save_post hook to set correct status when publish

  • Q: Some custom status are not modifiable. Why?

  • A: Coded defined custom status are not modifiable from user interface.

  • Q: I want publish post in a custom status.

  • A: You can use save_post Hook. This function to do this, and define new flow for your posts.

    function my_personal_flow($post_id) {
    if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )   return;

    // more security check…

    if (($_POST[‘original_post_status’]==’draft’) && ($_POST[‘post_status’]==’publish’) )
    $new_post[‘post_status’]=’planned’;
    if (($_POST[‘original_post_status’]==’planned’) && ($_POST[‘post_status’]==’publish’) )
    $new_post[‘post_status’]=’executed’;
    if (($_POST[‘original_post_status’]==’executed’) && ($_POST[‘post_status’]==’publish’) ) $new_post[‘post_status’]=’approved’;
    if (($_POST[‘original_post_status’]==’approved’) && ($_POST[‘post_status’]==’publish’) ) $new_post[‘post_status’]=’approved’;
    remove_action( ‘save_post’, ‘my_personal_flow’ ); // to remove loop!!
    wp_update_post($new_post);
    add_action( ‘save_post’, ‘my_personal_flow’ ); // to add filter for next save!!
    }
    add_action(‘save_post’,’my_personal_flow’);

評價

There are no reviews for this plugin.

貢獻者及開發者

“Custom Status” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 Custom Status 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.3
– some bug fix
– fix using Event+

1.2
– fix hook to labeling save button
– fix hook to labeling publish button

Fix some bug