Changeset 10149 for trunk/src/bp-members/bp-members-functions.php
- Timestamp:
- 09/27/2015 05:43:55 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-functions.php
r10022 r10149 1 1 <?php 2 3 2 /** 4 3 * BuddyPress Member Functions. … … 10 9 */ 11 10 12 // Exit if accessed directly 11 // Exit if accessed directly. 13 12 defined( 'ABSPATH' ) || exit; 14 13 … … 16 15 * Check for the existence of a Members directory page. 17 16 * 18 * @since BuddyPress (1.5.0)17 * @since 1.5.0 19 18 * 20 19 * @return bool True if found, otherwise false. … … 148 147 * Filters the results of the user query. 149 148 * 150 * @since BuddyPress (1.2.0)149 * @since 1.2.0 151 150 * 152 151 * @param array $retval Array of users for the current query. … … 187 186 * Filters the domain for the passed user. 188 187 * 189 * @since BuddyPress (1.0.1)188 * @since 1.0.1 190 189 * 191 190 * @param string $domain Domain for the passed user. … … 217 216 * Filters the userdata for a passed user. 218 217 * 219 * @since BuddyPress (1.2.0)218 * @since 1.2.0 220 219 * 221 220 * @param array $userdata Array of user data for a passed user. … … 242 241 * Return the user ID based on a user's user_login. 243 242 * 244 * @since BuddyPress (1.0.0)243 * @since 1.0.0 245 244 * 246 245 * @param string $username user_login to check. … … 258 257 * Filters the ID of a user, based on user_login. 259 258 * 260 * @since BuddyPress (1.0.1)259 * @since 1.0.1 261 260 * 262 261 * @param int|null $value ID of the user or null. … … 269 268 * Return the user ID based on a user's user_nicename. 270 269 * 271 * @since BuddyPress (1.2.3)270 * @since 1.2.3 272 271 * 273 272 * @param string $user_nicename user_nicename to check. … … 285 284 * Filters the user ID based on user_nicename. 286 285 * 287 * @since BuddyPress (1.2.3)286 * @since 1.2.3 288 287 * 289 288 * @param int|null $value ID of the user or null. … … 368 367 * Filters the username based on originally provided user ID. 369 368 * 370 * @since BuddyPress (1.0.1)369 * @since 1.0.1 371 370 * 372 371 * @param string $username Username determined by user ID. … … 381 380 * sanitized and unique slug to a user is needed. 382 381 * 383 * @since BuddyPress (1.5.0)382 * @since 1.5.0 384 383 * 385 384 * @todo Refactor to use a WP core function, if possible. … … 433 432 * Filters the user_nicename based on originally provided user ID. 434 433 * 435 * @since BuddyPress (1.5.0)434 * @since 1.5.0 436 435 * 437 436 * @param string $username User nice name determined by user ID. … … 468 467 * Filters the user email for user based on user ID. 469 468 * 470 * @since BuddyPress (1.0.1)469 * @since 1.0.1 471 470 * 472 471 * @param string $email Email determined for the user. … … 513 512 * Filters the link text for the passed in user. 514 513 * 515 * @since BuddyPress (1.2.0)514 * @since 1.2.0 516 515 * 517 516 * @param string $value Link text based on passed parameters. … … 527 526 * display_name, and then user_nicename. 528 527 * 529 * @since BuddyPress (2.0.0)528 * @since 2.0.0 530 529 * 531 530 * @param array $user_ids … … 640 639 * Filters the display name for the passed in user. 641 640 * 642 * @since BuddyPress (1.0.1)641 * @since 1.0.1 643 642 * 644 643 * @param string $fullname Display name for the user. … … 665 664 * Filters the user link for the user based on user email address. 666 665 * 667 * @since BuddyPress (1.0.1)666 * @since 1.0.1 668 667 * 669 668 * @param string|bool $value URL for the user if found, otherwise false. … … 691 690 * Filters the user link for the user based on username. 692 691 * 693 * @since BuddyPress (1.0.1)692 * @since 1.0.1 694 693 * 695 694 * @param string|bool $value URL for the user if found, otherwise false. … … 721 720 * Filters the total number of members for the installation. 722 721 * 723 * @since BuddyPress (1.2.0)722 * @since 1.2.0 724 723 * 725 724 * @param int $count Total number of members. … … 757 756 * Filters the total number of members for the installation limited to those with last_activity. 758 757 * 759 * @since BuddyPress (1.6.0)758 * @since 1.6.0 760 759 * 761 760 * @param int $count Total number of active members. … … 773 772 * - bp_core_mark_user_ham_admin() (from wp-admin) 774 773 * 775 * @since BuddyPress (1.6.0)774 * @since 1.6.0 776 775 * 777 776 * @param int $user_id The ID of the user being spammed/hammed. … … 845 844 * Fires at end of processing spammer in Dashboard if not multisite and user is spam. 846 845 * 847 * @since BuddyPress (1.5.0)846 * @since 1.5.0 848 847 * 849 848 * @param int $value user ID. … … 855 854 * Fires at end of processing spammer in Dashboard if not multisite and user is not spam. 856 855 * 857 * @since BuddyPress (1.5.0)856 * @since 1.5.0 858 857 * 859 858 * @param int $value user ID. … … 874 873 * Fires at the end of the process spammer process if the user is spam. 875 874 * 876 * @since BuddyPress (1.5.0)875 * @since 1.5.0 877 876 * 878 877 * @param int $value Displayed user ID. … … 884 883 * Fires at the end of the process spammer process if the user is not spam. 885 884 * 886 * @since BuddyPress (1.5.0)885 * @since 1.5.0 887 886 * 888 887 * @param int $value Displayed user ID. … … 894 893 * Fires at the end of the process for hanlding spammer status. 895 894 * 896 * @since BuddyPress (1.5.5)895 * @since 1.5.5 897 896 * 898 897 * @param int $user_id ID of the processed user. … … 910 909 * Hook to WP's make_spam_user and run our custom BP spam functions. 911 910 * 912 * @since BuddyPress (1.6.0)911 * @since 1.6.0 913 912 * 914 913 * @param int $user_id The user ID passed from the make_spam_user hook. … … 922 921 * Hook to WP's make_ham_user and run our custom BP spam functions. 923 922 * 924 * @since BuddyPress (1.6.0)923 * @since 1.6.0 925 924 * 926 925 * @param int $user_id The user ID passed from the make_ham_user hook. … … 989 988 * Filters whether a user is marked as a spammer. 990 989 * 991 * @since BuddyPress (1.6.0)990 * @since 1.6.0 992 991 * 993 992 * @param bool $is_spammer Whether or not user is marked as spammer. … … 1054 1053 * Filters whether a user is marked as deleted. 1055 1054 * 1056 * @since BuddyPress (1.6.0)1055 * @since 1.6.0 1057 1056 * 1058 1057 * @param bool $is_deleted Whether or not user is marked as deleted. … … 1064 1063 * Check whether a user is "active", ie neither deleted nor spammer. 1065 1064 * 1066 * @since BuddyPress (1.6.0)1065 * @since 1.6.0 1067 1066 * 1068 1067 * @uses is_user_logged_in() To check if user is logged in … … 1104 1103 * Check whether user is not active. 1105 1104 * 1106 * @since BuddyPress (1.6.0)1105 * @since 1.6.0 1107 1106 * 1108 1107 * @todo No need for the user fallback checks, since they're done in … … 1136 1135 * Update a user's last activity. 1137 1136 * 1138 * @since BuddyPress (1.9.0)1137 * @since 1.9.0 1139 1138 * 1140 1139 * @param int $user_id ID of the user being updated. … … 1180 1179 * the data from the proper location. 1181 1180 * 1182 * @since BuddyPress (2.0.0)1181 * @since 2.0.0 1183 1182 * 1184 1183 * @access private For internal use only. … … 1215 1214 * the data in the proper location. 1216 1215 * 1217 * @since BuddyPress (2.0.0)1216 * @since 2.0.0 1218 1217 * 1219 1218 * @access private For internal use only. … … 1251 1250 * Filters the last activity for a given user. 1252 1251 * 1253 * @since BuddyPress (1.9.0)1252 * @since 1.9.0 1254 1253 * 1255 1254 * @param string $activity Time of last activity, in 'Y-m-d H:i:s' format or … … 1266 1265 * be called directly from the BuddyPress Tools panel. 1267 1266 * 1268 * @since BuddyPress (2.0.0)1267 * @since 2.0.0 1269 1268 */ 1270 1269 function bp_last_activity_migrate() { … … 1347 1346 * Fires before the processing of an account deletion. 1348 1347 * 1349 * @since BuddyPress (1.6.0)1348 * @since 1.6.0 1350 1349 * 1351 1350 * @param int $user_id ID of the user account being deleted. … … 1369 1368 * Fires after the deletion of an account. 1370 1369 * 1371 * @since BuddyPress (1.6.0)1370 * @since 1.6.0 1372 1371 * 1373 1372 * @param int $user_id ID of the user account that was deleted. … … 1381 1380 * Delete a user's avatar when the user is deleted. 1382 1381 * 1383 * @since BuddyPress (1.9.0)1382 * @since 1.9.0 1384 1383 * 1385 1384 * @param int $user_id ID of the user who is about to be deleted. … … 1420 1419 * then simply redirect them to the home page and stop them from logging in. 1421 1420 * 1422 * @since BuddyPress (1.1.2)1421 * @since 1.1.2 1423 1422 * 1424 1423 * @param WP_User|WP_Error $user Either the WP_User object or the WP_Error … … 1556 1555 * Filters the array of default illegal usernames. 1557 1556 * 1558 * @since BuddyPress (1.2.2)1557 * @since 1.2.2 1559 1558 * 1560 1559 * @param array $value Merged and unique array of illegal usernames. … … 1571 1570 * Filters the array of default illegal names. 1572 1571 * 1573 * @since BuddyPress (1.2.5)1572 * @since 1.2.5 1574 1573 * 1575 1574 * @param array $value Merged and unique array of illegal names. … … 1588 1587 * - If there's an email domain whitelest, is the current domain on it? 1589 1588 * 1590 * @since BuddyPress (1.6.2)1589 * @since 1.6.2 1591 1590 * 1592 1591 * @param string $user_email The email being checked. … … 1638 1637 * parses, adding the appropriate error messages to the WP_Error object. 1639 1638 * 1640 * @since BuddyPress (1.7.0)1639 * @since 1.7.0 1641 1640 * 1642 1641 * @see bp_core_validate_email_address() … … 1691 1690 * Filters the username before being validated. 1692 1691 * 1693 * @since BuddyPress (1.5.5)1692 * @since 1.5.5 1694 1693 * 1695 1694 * @param string $user_name Username to validate. … … 1761 1760 * Filters the result of the user signup validation. 1762 1761 * 1763 * @since BuddyPress (1.2.2)1762 * @since 1.2.2 1764 1763 * 1765 1764 * @param array $result Results of user validation including errors, if any. … … 1786 1785 * Filters the validated blog url and title provided at signup. 1787 1786 * 1788 * @since BuddyPress (1.2.2)1787 * @since 1.2.2 1789 1788 * 1790 1789 * @param array $value Array with the new site data and error messages. … … 1858 1857 * Filters if BuddyPress should send an activation key for a new signup. 1859 1858 * 1860 * @since BuddyPress (1.2.3)1859 * @since 1.2.3 1861 1860 * 1862 1861 * @param bool $value Whether or not to send the activation key. … … 1877 1876 * Fires at the end of the process to sign up a user. 1878 1877 * 1879 * @since BuddyPress (1.2.2)1878 * @since 1.2.2 1880 1879 * 1881 1880 * @param bool|WP_Error $user_id True on success, WP_Error on failure. … … 1914 1913 * backwards compatibility. 1915 1914 * 1916 * @since BuddyPress (1.2.2)1915 * @since 1.2.2 1917 1916 * 1918 1917 * @param void $value … … 2024 2023 * Fires if the user has already been created. 2025 2024 * 2026 * @since BuddyPress (1.2.2)2025 * @since 1.2.2 2027 2026 * 2028 2027 * @param int $user_id ID of the user being checked. … … 2068 2067 * Fires at the end of the user activation process. 2069 2068 * 2070 * @since BuddyPress (1.2.2)2069 * @since 1.2.2 2071 2070 * 2072 2071 * @param int $user_id ID of the user being checked. … … 2082 2081 * Migrate signups from pre-2.0 configuration to wp_signups. 2083 2082 * 2084 * @since BuddyPress (2.0.1)2083 * @since 2.0.1 2085 2084 */ 2086 2085 function bp_members_migrate_signups() { … … 2214 2213 * Filters the avatar storage directory for use during registration. 2215 2214 * 2216 * @since BuddyPress (1.1.1)2215 * @since 1.1.1 2217 2216 * 2218 2217 * @param array $value Array of path and URL values for created storage directory. … … 2245 2244 * Filters the user email that the validation email will be sent to. 2246 2245 * 2247 * @since BuddyPress (1.5.0)2246 * @since 1.5.0 2248 2247 * 2249 2248 * @param string $user_email User email the notification is being sent to. … … 2255 2254 * Filters the validation email subject that will be sent to user. 2256 2255 * 2257 * @since BuddyPress (1.5.0)2256 * @since 1.5.0 2258 2257 * 2259 2258 * @param string $subject Email validation subject text. … … 2265 2264 * Filters the validation email message that will be sent to user. 2266 2265 * 2267 * @since BuddyPress (1.5.0)2266 * @since 1.5.0 2268 2267 * 2269 2268 * @param string $message Email validation message text. … … 2278 2277 * Fires after the sending of activation email to a newly registered user. 2279 2278 * 2280 * @since BuddyPress (1.5.0)2279 * @since 1.5.0 2281 2280 * 2282 2281 * @param string $subject Subject for the sent email. … … 2292 2291 * Display a "resend email" link when an unregistered user attempts to log in. 2293 2292 * 2294 * @since BuddyPress (1.2.2)2293 * @since 1.2.2 2295 2294 * 2296 2295 * @param WP_User|WP_Error $user Either the WP_User or the WP_Error object. … … 2353 2352 * On the login screen, resends the activation email for a user. 2354 2353 * 2355 * @since BuddyPress (2.0.0)2354 * @since 2.0.0 2356 2355 * 2357 2356 * @see bp_core_signup_disable_inactive() … … 2424 2423 * This is important as the $bp->loggedin_user object is setup at priority 4. 2425 2424 * 2426 * @since BuddyPress (1.8.0)2425 * @since 1.8.0 2427 2426 */ 2428 2427 function bp_stop_live_spammer() { … … 2458 2457 * Filters the url used for redirection for a logged in user marked as spam. 2459 2458 * 2460 * @since BuddyPress (1.8.0)2459 * @since 1.8.0 2461 2460 * 2462 2461 * @param string $value URL to redirect user to. … … 2474 2473 * Show a custom error message when a logged-in user is marked as a spammer. 2475 2474 * 2476 * @since BuddyPress (1.8.0)2475 * @since 1.8.0 2477 2476 */ 2478 2477 function bp_live_spammer_login_error() { … … 2491 2490 * Register a member type. 2492 2491 * 2493 * @since BuddyPress (2.2.0)2492 * @since 2.2.0 2494 2493 * 2495 2494 * @param string $member_type Unique string identifier for the member type. … … 2531 2530 * - '_none' is used internally to denote an item that should not apply to any member types. 2532 2531 * 2533 * @since BuddyPress (2.4.0)2532 * @since 2.4.0 2534 2533 * 2535 2534 * @param array $illegal_names Array of illegal names. … … 2572 2571 * Fires after a member type is registered. 2573 2572 * 2574 * @since BuddyPress (2.2.0)2573 * @since 2.2.0 2575 2574 * 2576 2575 * @param string $member_type Member type identifier. … … 2585 2584 * Retrieve a member type object by name. 2586 2585 * 2587 * @since BuddyPress (2.2.0)2586 * @since 2.2.0 2588 2587 * 2589 2588 * @param string $member_type The name of the member type. … … 2604 2603 * Get a list of all registered member type objects. 2605 2604 * 2606 * @since BuddyPress (2.2.0)2605 * @since 2.2.0 2607 2606 * 2608 2607 * @see bp_register_member_type() for accepted arguments. … … 2629 2628 * filtering functions have access to the entire member type objects. 2630 2629 * 2631 * @since BuddyPress (2.2.0)2630 * @since 2.2.0 2632 2631 * 2633 2632 * @param array $types Member type objects, keyed by name. … … 2647 2646 * Set type for a member. 2648 2647 * 2649 * @since BuddyPress (2.2.0)2648 * @since 2.2.0 2650 2649 * 2651 2650 * @param int $user_id ID of the user. … … 2670 2669 * Fires just after a user's member type has been changed. 2671 2670 * 2672 * @since BuddyPress (2.2.0)2671 * @since 2.2.0 2673 2672 * 2674 2673 * @param int $user_id ID of the user whose member type has been updated. … … 2685 2684 * Remove type for a member. 2686 2685 * 2687 * @since BuddyPress (2.3.0)2686 * @since 2.3.0 2688 2687 * 2689 2688 * @param int $user_id ID of the user. … … 2707 2706 * Fires just after a user's member type has been removed. 2708 2707 * 2709 * @since BuddyPress (2.3.0)2708 * @since 2.3.0 2710 2709 * 2711 2710 * @param int $user_id ID of the user whose member type has been updated. … … 2721 2720 * Get type for a member. 2722 2721 * 2723 * @since BuddyPress (2.2.0)2722 * @since 2.2.0 2724 2723 * 2725 2724 * @param int $user_id ID of the user. … … 2754 2753 * Filters a user's member type(s). 2755 2754 * 2756 * @since BuddyPress (2.2.0)2755 * @since 2.2.0 2757 2756 * 2758 2757 * @param string $type Member type. … … 2766 2765 * Check whether the given user has a certain member type. 2767 2766 * 2768 * @since BuddyPress (2.3.0)2767 * @since 2.3.0 2769 2768 * 2770 2769 * @param int $user_id $user_id ID of the user. … … 2792 2791 * Delete a user's member type when the user when the user is deleted. 2793 2792 * 2794 * @since BuddyPress (2.2.0)2793 * @since 2.2.0 2795 2794 * 2796 2795 * @param int $user_id ID of the user. … … 2807 2806 * Get the "current" member type, if one is provided, in member directories. 2808 2807 * 2809 * @since BuddyPress (2.3.0)2808 * @since 2.3.0 2810 2809 * 2811 2810 * @return string
Note: See TracChangeset
for help on using the changeset viewer.