[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-includes/routes/ -> profile.php (summary)

Routes: GP_Route_Profile class

File Size: 230 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

GP_Route_Profile:: (6 methods):
  profile_get()
  profile_view()
  get_recent_translation_sets()
  locales_known()
  get_permissions()
  get_translation_set()


Class: GP_Route_Profile  - X-Ref

Core class used to implement the profile route.

profile_get()   X-Ref
Displays the profile page, requires a user to be logged in.


profile_view( $user = '' )   X-Ref
Displays the profile page for a given user.

param: string $user A user nicename.

get_recent_translation_sets( $user, $amount = 5 )   X-Ref
Gets an array of recent translation sets the user has worked on.

return: array $translation_sets An array of translation set objects
param: WP_User $user   A user object.
param: int     $amount Number of recent translations to return.

locales_known( $user )   X-Ref
Gets an array of locales the user has contributed to.

return: array $locales An array of locale objects
param: WP_User $user   A user object.

get_permissions( $user )   X-Ref
Retrieve a users permissions.

return: array Array of permissions
param: WP_User $user The user object.

get_translation_set( $set )   X-Ref
Gets an object representing the project id, project url and translation set name of the supplied set.

return: object
param: GP_Translation_set $set   A translation set object.



Generated: Thu Apr 25 01:01:24 2024 Cross-referenced by PHPXref 0.7.1