כלי זה מאפשר ליצור קוד מותאם אישית לפונקציית רישום מצבי עריכה register_post_status() עם כל הפרמטרים שלה. הזינו פרטים רלוונטיים בטופס, צרו קוד, העתיקו אותו והדביקו לתוסף/תבנית שלכם. למידע נוסף, שאלות, בקשות, תרומות והצעות נישואים גשו לפוסט באתר הראשי.
// Register Custom Status
function custom_draft_status() {
$args = array(
'label' => _x( 'draft', 'Status General Name', 'text_domain' ),
'label_count' => _n_noop( 'Draft (%s)', 'Drafts (%s)', 'text_domain' ),
'public' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
'exclude_from_search' => true,
);
register_post_status( 'draft', $args );
}
// Hook into the 'init' action
add_action( 'init', 'custom_draft_status', 0 );