PluginProbe
bbPress / 2.1.2
bbPress v2.1.2
trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.2.2 All 71 releases
bbpress / bbp-admin / bbp-users.php

bbp-users.php in bbPress 2.1.2, at bbp-admin/bbp-users.php

102 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * bbPress Users Admin Class
5 *
6 * @package bbPress
7 * @subpackage Administration
8 */
9
10 // Exit if accessed directly
11 if ( !defined( 'ABSPATH' ) ) exit;
12
13 if ( !class_exists( 'BBP_Users_Admin' ) ) :
14 /**
15 * Loads bbPress users admin area
16 *
17 * @package bbPress
18 * @subpackage Administration
19 * @since bbPress (r2464)
20 */
21 class BBP_Users_Admin {
22
23 /** Variables *************************************************************/
24
25 /** Functions *************************************************************/
26
27 /**
28 * The bbPress users admin loader
29 *
30 * @since bbPress (r2515)
31 *
32 * @uses BBP_Users_Admin::setup_globals() Setup the globals needed
33 * @uses BBP_Users_Admin::setup_actions() Setup the hooks and actions
34 */
35 function __construct() {
36 $this->setup_globals();
37 $this->setup_actions();
38 }
39
40 /**
41 * Setup the admin hooks, actions and filters
42 *
43 * @since bbPress (r2646)
44 * @access private
45 *
46 * @uses add_action() To add various actions
47 */
48 function setup_actions() {
49
50 // User profile edit/display actions
51 add_action( 'edit_user_profile', array( $this, 'user_profile_forums' ) );
52 add_action( 'show_user_profile', array( $this, 'user_profile_forums' ) );
53
54 // User profile save actions
55 add_action( 'personal_options_update', array( $this, 'user_profile_update' ) );
56 add_action( 'edit_user_profile_update', array( $this, 'user_profile_update' ) );
57 }
58
59 /**
60 * Admin globals
61 *
62 * @since bbPress (r2646)
63 * @access private
64 */
65 function setup_globals() { }
66
67 /**
68 * Add some general styling to the admin area
69 *
70 * @since bbPress (r2464)
71 *
72 * @uses bbp_get_forum_post_type() To get the forum post type
73 * @uses bbp_get_topic_post_type() To get the topic post type
74 * @uses bbp_get_reply_post_type() To get the reply post type
75 * @uses sanitize_html_class() To sanitize the classes
76 */
77 function admin_head() { }
78
79 /**
80 * Responsible for saving additional profile options and settings
81 *
82 * @since bbPress (r2464)
83 *
84 * @param $user_id The user id
85 * @uses do_action() Calls 'bbp_user_profile_update'
86 * @return bool Always false
87 */
88 function user_profile_update( $user_id ) { }
89
90 /**
91 * Responsible for saving additional profile options and settings
92 *
93 * @since bbPress (r2464)
94 *
95 * @param WP_User $profileuser User data
96 * @uses do_action() Calls 'bbp_user_profile_forums'
97 * @return bool Always false
98 */
99 function user_profile_forums( $profileuser ) { }
100 }
101 endif; // class exists
102