Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pm_clone_translation_uri($master_post_id, $lang, $post_array, $id) {
- global $permalink_manager_uris;
- // Trigger the function only if duplicate is created in the metabox
- if(empty($_POST['action']) || $_POST['action'] !== 'make_duplicates') { return; }
- $permalink_manager_uris[$id] = (!empty($permalink_manager_uris[$master_post_id])) ? $permalink_manager_uris[$master_post_id] : Permalink_Manager_URI_Functions_Post::get_default_post_uri($id);
- update_option('permalink-manager-uris', $permalink_manager_uris);
- }
- add_action('icl_make_duplicate', 'pm_clone_translation_uri', 9999, 4);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement