issue with save post action in quick edit
-
hi ,
first of all thanks for ur awesome plugin.i have my function work with save_post_{post-type} action :
function set_default_category($post_ID, $post) { if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return; } // Check permissions if ('lesson' == $post->post_type) { if (!current_user_can('edit_post', $post_ID)) { return; } } $series = wp_get_post_terms($post_ID, 'series', ["fields" => "ids"])[0]; //Check if category is set if (empty($series)) { return; } // Get the terms using the seris id $metaSeries = get_term_meta($series); $inst = (int) $metaSeries['instrument_select'][0]; $gen = (int) $metaSeries['genre_select'][0]; // Set the terms using the slug! wp_set_object_terms($post_ID, $inst, 'instrument'); wp_set_object_terms($post_ID, $gen, 'genre'); } add_action('save_post_lesson', 'set_default_category', 10, 2);
it works on edit post page , but in quick edit it dosent work !
whats problem?
edit:
mention that when i disable plugin everything works fine.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘issue with save post action in quick edit’ is closed to new replies.