Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pm_generate_uri_after_post_saved($post_id, $type, $args, $form, $action) {
- if(class_exists('Permalink_Manager_URI_Functions') && $type == 'insert_post') {
- $custom_uri = Permalink_Manager_URI_Functions_Post::get_default_post_uri($post_id, false, true);
- Permalink_Manager_URI_Functions::save_single_uri($post_id, $custom_uri, false, true);
- }
- }
- add_action('acfe/form/submit/post', 'pm_generate_uri_after_post_saved', 9, 5);
- function pm_generate_uri_after_term_saved($term_id, $type, $args, $form, $action) {
- if(class_exists('Permalink_Manager_URI_Functions') && $type == 'insert_term') {
- $custom_uri = Permalink_Manager_URI_Functions_Tax::get_default_term_uri($term_id, false, true);
- Permalink_Manager_URI_Functions::save_single_uri($term_id, $custom_uri, true, true);
- }
- }
- add_action('acfe/form/submit/term', 'pm_generate_uri_after_term_saved', 9, 5);
Add Comment
Please, Sign In to add comment