[wp-trac] [WordPress Trac] #38591: Filter for languages select on profile-page

WordPress Trac noreply at wordpress.org
Mon Dec 12 10:23:20 UTC 2016


#38591: Filter for languages select on profile-page
-------------------------+------------------------------
 Reporter:  neoxx        |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Users        |     Version:  4.7
 Severity:  normal       |  Resolution:  duplicate
 Keywords:               |     Focuses:  administration
-------------------------+------------------------------
Changes (by neoxx):

 * status:  new => closed
 * resolution:   => duplicate


Comment:

 filter has been added in #38788

 my implementation on the profile/user-edit page:


 {{{

 add_filter('get_available_languages', array($this,
 'get_available_languages'));

 /*
 remove languages select
 from profile page
 */

 function get_available_languages($languages) {
         if (in_array(
                 $GLOBALS['pagenow'],
                 array(
                         'user-edit.php',
                         'profile.php'
                 )
         ))
                 return false;

         return $languages;
 }
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38591#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list