Advertisement
IchBinsIstDochKlar

WPML switcher filter - 002

Apr 28th, 2014
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1. function wpml_filter_langs( $languages ) {
  2.  
  3.         if(did_action( 'wp_footer' ) === 0){
  4.                 foreach ( $languages as $k => $language ) {
  5.             if($language[$k]['active'] == 1){
  6.                 $languages[$k]['country_flag_url']      = NULL;
  7.                         $languages[$k]['native_name']       = NULL;
  8.                         $languages[$k]['translated_name']       = NULL;
  9.             }
  10.                 }
  11.         }
  12.                
  13. return $languages;
  14. }
  15. add_filter( 'icl_ls_languages', 'wpml_filter_langs' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement