Changeset 10497 for trunk/src/bp-core/bp-core-functions.php
- Timestamp:
- 02/03/2016 05:01:13 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r10491 r10497 83 83 * 84 84 * The filter is intended primarily for use in multinetwork installations. 85 * 86 * @since 1.2.6 85 87 * 86 88 * @global object $wpdb WordPress database object. … … 171 173 * Format numbers the BuddyPress way. 172 174 * 175 * @since 1.2.0 176 * 173 177 * @param int $number The number to be formatted. 174 178 * @param bool $decimals Whether to use decimals. See {@link number_format_i18n()}. … … 251 255 * are applied. 252 256 * 253 * @since r7704257 * @since 2.0.0 254 258 * 255 259 * @param string|array $args Value to merge with $defaults. … … 777 781 * with the new method. 778 782 * 783 * @since 1.0.0 784 * 779 785 * @param string $slug The slug of the component being added to the root list. 780 786 */ … … 816 822 /** 817 823 * Create WordPress pages to be used as BP component directories. 824 * 825 * @since 1.5.0 818 826 */ 819 827 function bp_core_create_root_component_page() { … … 842 850 * 843 851 * For example, it would stop someone creating a blog with the slug "groups". 852 * 853 * @since 1.0.0 844 854 * 845 855 * @todo Deprecate? … … 918 928 * Eg: http://example.com OR https://example.com 919 929 * 930 * @since 1.0.0 931 * 920 932 * @uses get_blog_option() WordPress function to fetch blog meta. 921 933 * … … 938 950 /** 939 951 * Perform a status-safe wp_redirect() that is compatible with BP's URI parser. 952 * 953 * @since 1.0.0 940 954 * 941 955 * @uses wp_safe_redirect() … … 988 1002 /** 989 1003 * Get the path of the current site. 1004 * 1005 * @since 1.0.0 990 1006 * 991 1007 * @global object $current_site … … 1065 1081 * an interval of 3 minutes will be represented by "3 minutes ago", as will an 1066 1082 * interval of 3 minutes 59 seconds. 1083 * 1084 * @since 1.0.0 1067 1085 * 1068 1086 * @uses apply_filters() Filter 'bp_core_time_since_pre' to bypass BP's calculations. … … 1265 1283 * Add a feedback (error/success) message to the WP cookie so it can be displayed after the page reloads. 1266 1284 * 1285 * @since 1.0.0 1286 * 1267 1287 * @param string $message Feedback message to be displayed. 1268 1288 * @param string $type Message type. 'updated', 'success', 'error', 'warning'. … … 1301 1321 * so that the message is not shown to the user multiple times. 1302 1322 * 1323 * @since 1.1.0 1324 * 1303 1325 * @uses setcookie() Sets a cookie value for the user. 1304 1326 */ … … 1333 1355 * The hook action 'template_notices' is used to call this function, it is not 1334 1356 * called directly. 1357 * 1358 * @since 1.1.0 1335 1359 */ 1336 1360 function bp_core_render_message() { … … 1381 1405 * site. 1382 1406 * 1407 * @since 1.0.0 1408 * 1383 1409 * @uses bp_update_user_meta() BP function to update user metadata in the 1384 1410 * usermeta table. … … 1437 1463 * Format last activity string based on time since date given. 1438 1464 * 1465 * @since 1.0.0 1466 * 1439 1467 * @uses bp_core_time_since() This function will return an English 1440 1468 * representation of the time elapsed. … … 1757 1785 * add_action( bp_core_admin_hook(), 'myplugin_dashboard_panel_setup' ); 1758 1786 * 1787 * @since 1.5.0 1788 * 1759 1789 * @return string $hook The proper hook ('network_admin_menu' or 'admin_menu'). 1760 1790 */ … … 1928 1958 * Set the "is_directory" global. 1929 1959 * 1960 * @since 1.5.0 1961 * 1930 1962 * @param bool $is_directory Optional. Default: false. 1931 1963 * @param string $component Optional. Component name. Default: the current … … 1952 1984 * Set the "is_item_admin" global. 1953 1985 * 1986 * @since 1.5.0 1987 * 1954 1988 * @param bool $is_item_admin Optional. Default: false. 1955 1989 * @param string $component Optional. Component name. Default: the current … … 1975 2009 /** 1976 2010 * Set the "is_item_mod" global. 2011 * 2012 * @since 1.5.0 1977 2013 * 1978 2014 * @param bool $is_item_mod Optional. Default: false. … … 2139 2175 * Load the buddypress translation file for current language. 2140 2176 * 2177 * @since 1.0.2 2178 * 2141 2179 * @see load_textdomain() for a description of return values. 2142 2180 * … … 2181 2219 /** 2182 2220 * A JavaScript-free implementation of the search functions in BuddyPress. 2221 * 2222 * @since 1.0.1 2183 2223 * 2184 2224 * @param string $slug The slug to redirect to for searching. … … 2255 2295 /** 2256 2296 * Print the generation time in the footer of the site. 2297 * 2298 * @since 1.0.0 2257 2299 */ 2258 2300 function bp_core_print_generation_time() { … … 2618 2660 * @since 2.5.0 2619 2661 * 2620 * @param string $ post_type Email post type name.2662 * @param string $value Email post type name. 2621 2663 */ 2622 2664 return apply_filters( 'bp_get_email_post_type', buddypress()->email_post_type ); … … 2637 2679 * @since 2.5.0 2638 2680 * 2639 * @param string[] $labelsAssociative array (name => label).2681 * @param array $value Associative array (name => label). 2640 2682 */ 2641 2683 return apply_filters( 'bp_get_email_post_type_labels', array( … … 2672 2714 * @since 2.5.0 2673 2715 * 2674 * @param string[] $featuresSupported features.2716 * @param array $value Supported features. 2675 2717 */ 2676 2718 return apply_filters( 'bp_get_email_post_type_supports', array( … … 2708 2750 * @since 2.5.0 2709 2751 * 2710 * @param string $ taxonomyEmail type taxonomy name.2752 * @param string $value Email type taxonomy name. 2711 2753 */ 2712 2754 return apply_filters( 'bp_get_email_tax_type', buddypress()->email_taxonomy_type ); … … 2718 2760 * @since 2.5.0 2719 2761 * 2720 * @return string[]2762 * @return array 2721 2763 */ 2722 2764 function bp_get_email_tax_type_labels() { … … 2727 2769 * @since 2.5.0 2728 2770 * 2729 * @param string[] $labelsAssociative array (name => label).2771 * @param array $value Associative array (name => label). 2730 2772 */ 2731 2773 return apply_filters( 'bp_get_email_tax_type_labels', array( … … 2813 2855 * @param string $email_type Unique identifier for a particular type of email. 2814 2856 * @param array $args Arguments used with get_posts() to fetch a post object. 2815 * @param WP_Post []All posts retrieved by get_posts( $args ). May only contain $post.2857 * @param WP_Post $post All posts retrieved by get_posts( $args ). May only contain $post. 2816 2858 */ 2817 2859 $post = apply_filters( 'bp_get_email_post', $post[0], $email_type, $args, $post ); … … 2832 2874 * 2833 2875 * @param BP_Email $email An object representing a single email, ready for mailing. 2834 * @param WP_Post $post Post object containing the contents of the email.2835 2876 * @param string $email_type Unique identifier for a particular type of email. 2836 2877 * @param array $args Arguments used with get_posts() to fetch a post object. 2837 * @param WP_Post []All posts retrieved by get_posts( $args ). May only contain $post.2878 * @param WP_Post $post All posts retrieved by get_posts( $args ). May only contain $post. 2838 2879 */ 2839 2880 $retval = apply_filters( 'bp_get_email', $email, $email_type, $args, $post ); … … 2855 2896 * @since 2.5.0 2856 2897 * 2857 * @param string $email_type Type of email being sent.2858 * @param string|array|int|WP_User $to Either a email address, user ID, WP_User object,2859 * or an array containing any combination of the above.2860 * @param array $args {2898 * @param string $email_type Type of email being sent. 2899 * @param string|array|int|WP_User $to Either a email address, user ID, WP_User object, 2900 * or an array containg the address and name. 2901 * @param array $args { 2861 2902 * Optional. Array of extra. parameters. 2862 2903 * … … 2877 2918 } 2878 2919 2879 // wp_mail() is a pluggable function. Has it been re-defined by another plugin?2920 // Since wp_mail() is a pluggable function, has it been re-defined by another plugin? 2880 2921 if ( is_null( $is_default_wpmail ) ) { 2881 2922 try { … … 2944 2985 * @since 2.5.0 2945 2986 * 2946 * @param string $deliver_class The email delivery class name.2947 * @param string $email_typeType of email being sent.2948 * @param string[]|string $toArray or comma-separated list of email addresses to the email to.2949 * @param array $args {2987 * @param string $deliver_class The email delivery class name. 2988 * @param string $email_type Type of email being sent. 2989 * @param array|string $to Array or comma-separated list of email addresses to the email to. 2990 * @param array $args { 2950 2991 * Optional. Array of extra parameters. 2951 2992 * … … 2962 3003 2963 3004 if ( is_wp_error( $status ) ) { 3005 2964 3006 /** 2965 3007 * Fires after BuddyPress has tried - and failed - to send an email. … … 2969 3011 * @param WP_Error $status A WP_Error object describing why the email failed to send. The contents 2970 3012 * will vary based on the email delivery class you are using. 2971 * @param BP_Email $email The email we tried to send.3013 * @param BP_Email $email The email we tried to send. 2972 3014 */ 2973 3015 do_action( 'bp_send_email_failure', $status, $email ); 2974 3016 2975 3017 } else { 3018 2976 3019 /** 2977 3020 * Fires after BuddyPress has succesfully sent an email. … … 2979 3022 * @since 2.5.0 2980 3023 * 2981 * @param bool $status True if the email was sent successfully.2982 * @param BP_Email $email The email sent.3024 * @param bool $status True if the email was sent successfully. 3025 * @param BP_Email $email The email sent. 2983 3026 */ 2984 3027 do_action( 'bp_send_email_success', $status, $email ); … … 3030 3073 * 3031 3074 * @param WP_Post $object Post to get email template for. 3032 * @return string[]3075 * @return array 3033 3076 */ 3034 3077 function bp_email_get_template( WP_Post $object ) { … … 3040 3083 * @since 2.5.0 3041 3084 * 3042 * @param string[] $templates 3085 * @param array $value Array of possible template paths. 3086 * @param WP_Post $object WP_Post object. 3043 3087 */ 3044 3088 return apply_filters( 'bp_email_get_template', array(
Note: See TracChangeset
for help on using the changeset viewer.