Ledger Nano X - The secure hardware wallet
SHARE
TWEET

WPML - Advanced Translation Editor

mbis May 22nd, 2020 (edited) 925 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function pm_regenerate_uri_after_wpml_translation_completed($post_id, $postdata, $job) {
  2.     global $permalink_manager_uris;
  3.  
  4.     if(!class_exists('Permalink_Manager_URI_Functions_Post')) { return; }
  5.  
  6.     // Get the default custom permalink based on a permastructure set with Permalink Manager
  7.     $permalink_manager_uris[$post_id] = Permalink_Manager_URI_Functions_Post::get_default_post_uri($post_id);
  8.  
  9.     // Save the update
  10.     update_option('permalink-manager-uris', $permalink_manager_uris);
  11. }
  12. add_action('icl_pro_translation_completed', 'pm_regenerate_uri_after_wpml_translation_completed', 99, 3);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top