PeepSo_Helpers::get_user_fields( $user_id,  $any = false,  $args = array() )


Source Source

File: src/integrations/peepso/helpers/peepso-helpers.php

	public function get_user_fields( $user_id = 0, $any = false, $args = array() ) {
		$options    = array();
		$PeepSoUser = PeepSoUser::get_instance( $user_id );
		$PeepSoUser->profile_fields->load_fields();
		$fields = $PeepSoUser->profile_fields->get_fields();

		if ( true === $any ) {
			$options[- 1] = $args['uo_any_label'];
		}

		foreach ( $fields as $field ) {
			if ( 1 == $field->prop( 'published' ) ) {
				$options[ $field->prop( 'id' ) ] = $field->prop( 'title' );
			}
		};

		$options['peepso_is_profile_likable'] = __( 'Allow others to "like" my profile', 'uncanny-automator' );
		$options['peepso_hide_birthday_year'] = __( 'Hide my birthday year', 'uncanny-automator' );
		$options['usr_profile_acc']           = __( 'Who can see my profile', 'uncanny-automator' );
		$options['peepso_profile_post_acc']   = __( 'Who can post on my profile', 'uncanny-automator' );
		$options['peepso_hide_online_status'] = __( "Don't show my online status", 'uncanny-automator' );
		$options['peepso_gmt_offset']         = __( 'My timezone', 'uncanny-automator' );

		return $options;
	}