Example #1
0
/**
 * Adds some custom fields to user profiles
 */
function add_user_meta()
{
    x_add_metadata_group('profile-information', 'user', array('label' => __('Extra Profile Information', 'pressbooks')));
    x_add_metadata_field('user_interface_lang', 'user', array('group' => 'profile-information', 'field_type' => 'select', 'values' => \PressBooks\L10n\get_dashboard_languages(), 'label' => __('Language', 'pressbooks')));
}
Example #2
0
 /**
  * @covers \PressBooks\L10n\get_dashboard_languages
  */
 public function test_get_dashboard_languages()
 {
     $get_dashboard_languages = \PressBooks\L10n\get_dashboard_languages();
     $this->assertTrue(is_array($get_dashboard_languages));
 }