User-Profile-Pages
[ class tree: User-Profile-Pages ] [ index: User-Profile-Pages ] [ all elements ]

Procedural File: up-user-page.php

Source Location: /up-user-page.php



Page Details:

A WordPress plugin to add a 'profile page' for each user. They can add text to their page, and choose from several account statistics to display.








UP_PLUGIN_NAME [line 20]

UP_PLUGIN_NAME = 'user_profile_pages'
The Plugin's name. Used whenever it references itself.


[ Top ]




all_stats_fields [line 544]

void all_stats_fields( )

Echoes checkboxes for all 'statistic' fields in the admin dashboard's options page.

I18n'd




Tags:

since:  0.0.2


[ Top ]



up_action_admin_menu_fn [line 489]

void up_action_admin_menu_fn( )

Adds a top-level menu to the administrator dashboard.

Hooks on action: admin_menu

I18n'd




Tags:

since:  0.0.2


[ Top ]



up_action_admin_settings_fn [line 506]

void up_action_admin_settings_fn( )

Creates the options page for the admin dashboard.

Hooks on action: admin_init

I18n'd




Tags:

since:  0.0.2


[ Top ]



up_action_generate_rewrite_rules_fn [line 168]

void up_action_generate_rewrite_rules_fn( Object $wp_rewrite)

Creates the url rewrite rules necessary to display the users' profiles on index.php/user-profile/[Parameter]

Hooks on action: generate_rewrite_rules




Tags:

since:  0.0.2


Parameters

Object   $wp_rewrite   WordPress' rewrite rules
[ Top ]



up_action_process_option_update_fn [line 769]

void up_action_process_option_update_fn( )

Saves submitted user profile page settings into the database.

Uses usermeta table

Hooks on actions: personal_options_update, edit_user_profile_update




Tags:

since:  0.0.2


[ Top ]



up_action_show_user_profile_fn [line 683]

void up_action_show_user_profile_fn( )

Echoes the dashboard user profile page options.

Hooks on actions: show_user_profile, edit_user_profile

I18n'd




Tags:

since:  0.0.2


[ Top ]



up_admin_page_fn [line 650]

void up_admin_page_fn( )

Echoes the plugin's admin dashboard option page

I18n'd, access-restricted




Tags:

since:  0.0.2


[ Top ]



up_admin_settings_generic_checkbox_fn [line 632]

void up_admin_settings_generic_checkbox_fn( [Array $field_identifiers = array( 'generic_name', 'generic_id' )])

Echoes a checkbox for the provided form variable



Tags:

since:  0.0.3


Parameters

Array   $field_identifiers   An array containing the element name at position 0, and id at position 1
[ Top ]



up_admin_settings_stat_text_fn [line 603]

void up_admin_settings_stat_text_fn( )

Echoes description of the statistics section of the plugin's admin dashboard options page.

I18n'd




Tags:

since:  0.0.2


[ Top ]



up_admin_settings_title_text_fn [line 617]

void up_admin_settings_title_text_fn( )

Echoes the description of the general settings section of the plugin's admin dashboard options page.

I18n'd




Tags:

since:  0.0.2


[ Top ]



up_admin_validate_fn [line 530]

void up_admin_validate_fn( $input)

Sanitizes the input from the admin dashboard.

Input is all checkboxes, anyway, so this is not needed.




Tags:

since:  0.0.3


Parameters

   $input  
[ Top ]



up_all_stats_fields_user [line 568]

void up_all_stats_fields_user( )

Echoes checkboxes for all 'statistic' fields for the end-user's profile options page.

I18n'd




Tags:

since:  0.0.2


[ Top ]



up_filter_get_avatar_fn [line 229]

String up_filter_get_avatar_fn( String $avatar, Object $user_info, integer $image_id, String $avatar_url)

Wraps the users' avatars in a link to their profile page.

Hooks on filter: get_avatar




Tags:

return:  The user's avatar, replete with wrapping link to their profile page.
since:  0.0.2


Parameters

String   $avatar   The current HTML for the user's avatar.
Object   $user_info   A WordPress User object
integer   $image_id   The avatar's image id. Unused by this function.
String   $avatar_url   The URL to the user's avatar. Unused by this function.
[ Top ]



up_filter_get_the_author_url_fn [line 257]

String up_filter_get_the_author_url_fn( String $author_url, integer $author_id)

Replaces the "author URL" with a link to the author's profile page.

Hooks on filter: get_the_author_url




Tags:

return:  The URL to the author's profile page.
since:  0.0.2


Parameters

String   $author_url   The current author URL
integer   $author_id   The author's user ID
[ Top ]



up_filter_parse_query_fn [line 194]

Object up_filter_parse_query_fn( Object $q)

Determines if the current page is the 'User-Profile' page.

Adds a query variable 'up_profile_page_activate'=>TRUE if the request page is a user profile page. This allows other functions to react appropriately.

Hooks on filter: parse_query




Tags:

return:  WordPress' Query Object, modified.
since:  0.0.2


Parameters

Object   $q   WordPress' Query Object
[ Top ]



up_filter_plugin_action_links_fn [line 813]

void up_filter_plugin_action_links_fn( $links, $file)

Adds "settings" to the left of "Activate/Deactivate | Edit" on the plugin list page.

Hooks on filter: plugin_action_links

I18n'd




Tags:

since:  0.0.4


Parameters

   $links  
   $file  
[ Top ]



up_filter_plugin_row_meta_fn [line 835]

void up_filter_plugin_row_meta_fn( $meta_links, $file)

Adds "E-mail Support" to the right of "Version #.#.# | By Author | Visit plugin site" on the plugin list page.

Hooks on filter: plugin_row_meta

I18n'd




Tags:

since:  0.0.4


Parameters

   $meta_links  
   $file  
[ Top ]



up_filter_query_vars_fn [line 150]

Array up_filter_query_vars_fn( Array $qvars)

Adds 'username' to the list of query vars that WordPress will register.

Hooks on filter: query_vars




Tags:

return:  Modified $qvars array with 'username' appended
since:  0.0.2


Parameters

Array   $qvars   WordPress' list of query variables
[ Top ]



up_filter_the_posts_fn [line 426]

Array up_filter_the_posts_fn( Array $posts)

Overwrites a 'page's content with a user's profile.

If the page viewed is the "user profile" page that the plugin created. Otherwise, this function does not modify the post.

Hooks on filter: the_posts

I18n'd




Tags:

return:  with $posts[0]'s properties overwritten to display a user's profile.
since:  0.0.2


Parameters

Array   $posts   All the posts to display on the page
[ Top ]



up_hide_comment_template_fn [line 789]

void up_hide_comment_template_fn( $file)

Makes the comment section invisible on user profile pages.

Points to "up-no-comments.php," an empy page, as the 'comment template.'

Hooks on filter: comments_template




Tags:

since:  0.0.2


Parameters

   $file  
[ Top ]



up_install [line 38]

void up_install( )

Installs and initializes the 'user-profile-pages' plugin.

Sets up options in wp_options database table, and creates the 'user profile' WordPress Page that the plugin needs. If the plugin is being re-activated, and 'restore defaults on re-activation' was checked, this will restore settings to the default values.

Hooks on plugin activation (register_activation_hook(..))

I18n'd




Tags:

since:  0.0.2


[ Top ]



up_make_user_list [line 401]

String up_make_user_list( )

Generates the HTML code to display when a profile page is viewed with NO user specified and NO user logged in.

I18n'd




Tags:

return:  HTML code
since:  0.0.2


[ Top ]



up_make_user_profile [line 275]

String up_make_user_profile( Object $user_info)

Generates the HTML code to display a user's profile page.

I18n'd




Tags:

return:  The HTML code for the users' profile page.
since:  0.0.2


Parameters

Object   $user_info   A WordPress User object
[ Top ]



up_make_user_profile_stats [line 321]

String up_make_user_profile_stats( Object $user_info)

Generates the HTML code to display a user's statistics.

Generated stats can only be shown if they are one of the stats the admin has enabled in the dashboard. Nothing, not even a header, will be returned if there are no stats to show.

I18n'd




Tags:

return:  The HTML code to display the user's statistics
since:  0.0.2


Parameters

Object   $user_info   A WordPress User object
[ Top ]



up_process_user_profile_text [line 372]

String up_process_user_profile_text( integer $user_id, Object $user_info)

Filters the user's 'profile page' text blurb, replacing [tags] with their actual values.

[biography], [aim], [yim], [gtalk], [email], [website], [website_link], and [display_name] are valid. All of those are I18n'd, so the specific string may vary by language. (I18n'd)




Tags:

return:  The filtered profile page blurb
since:  0.0.2


Parameters

integer   $user_id   The given users's ID
Object   $user_info   A WordPress User object
[ Top ]



up_remove [line 109]

void up_remove( )

Removes the 'user-profile-pages' plugin.

Deletes UPP-specific rows from the wp_options table, and deletes the "User Profile" page that the plugin created.

Hooks on deactivation (register_deactivation_hook(...))




Tags:

since:  0.0.2


[ Top ]



up_update_all_stats_fields_user [line 741]

void up_update_all_stats_fields_user( )

Saves submitted user profile page statistic settings into the database

Uses usermeta table




Tags:

since:  0.0.2


[ Top ]



Documentation generated on Wed, 20 Oct 2010 15:55:46 -0500 by phpDocumentor 1.4.3