Tagged: auto-draft, auto-save
- This topic has 3 replies, 2 voices, and was last updated 7 years, 3 months ago by
Steve.
-
AuthorPosts
-
-
November 8, 2014 at 3:15 am #2671
ajayphpMemberwith custom post type, do not want the post new item created as Auto-draft mode, save post only if Save button submitted , how to?
in my project with custom post type, i have to save record only if save ,
not required as auto draft, the problem is wordpress is that it consider every post type is post,, lots of time we do not want auto draft and auto save. -
November 9, 2014 at 8:19 am #2678
-
November 9, 2014 at 9:44 am #2687
ajayphpMemberStill i am learning the hw to use piklist:
add_filter(‘piklist_post_types’, ‘supercode_post_types’);
function supercode_post_types($post_types)
{
$post_types[‘supercode’] = array(
‘labels’ => piklist(‘post_type_labels’, ‘Keywords’)
,’title’ => __(‘Enter Keyword Title’)
,’supports’ => array(
‘title’
,’editor’
)
,’public’ => true
,’rewrite’ => array(
‘slug’ => ‘keywords’
)
,’capability_type’ => ‘post’
,’edit_columns’ => array(
‘title’ => __(‘Keyword’)
,’author’ => __(‘User’)
)
,’hide_post_row_actions’ => array(
‘trash’
,’edit’
,’quick-edit’
)
,’hide_meta_box’ => array(
‘slug’
,’author’
)
,’menu_icon’ => plugins_url(‘supercode/parts/img/cell-icon.png’)
,’page_icon’ => plugins_url(‘supercode/parts/img/mobile-icon.png’)
,’admin_body_class’ => array (
‘piklist-demonstration’
,’piklist-sample’
)
,’status’ => array(
‘draft’ => array(
‘label’ => ‘Pending Save’
)
,’estimate’ => array(
‘label’ => ‘Request for Estimate’
)
,’quoted’ => array(
‘label’ => ‘Quoted’
)
)
);return $post_types;
} -
November 10, 2014 at 11:04 am #2714
SteveKeymaster@ajayphp– Thank you for posting your code. I don’t see a bug. If you want to disable “post revisions” and “autosave”, this is the WordPress way to do it >
-
-
AuthorPosts
- You must be logged in to reply to this topic.