Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Oct 11th, 2018 60 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. function wpml_get_languages ($options = 'skip_missing=1&orderby=code&order=desc') {
  2.     $languages = icl_get_languages($options);
  3.     $currentID = get_queried_object_id();
  4.  
  5.     foreach ($languages as $key => $language) {
  6.         $id = icl_object_id($currentID, 'page', false, $language['language_code']);
  7.  
  8.         $status = get_post_status($id);
  9.  
  10.         if ($status !== 'publish') {
  11.             unset($languages[$key]);
  12.         }
  13.     }
  14.  
  15.     return array_values($languages);
  16. }
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