Changeset 5676
- Timestamp:
- 04/15/2015 02:33:11 AM (10 years ago)
- Location:
- trunk/src/includes
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/admin/admin.php
r5637 r5676 393 393 * @param string $cap Capability name 394 394 * @param int $user_id User id 395 * @param mixed$args Arguments395 * @param array $args Arguments 396 396 * @uses get_post() To get the post 397 397 * @uses apply_filters() Calls 'bbp_map_meta_caps' with caps, cap, user id and -
trunk/src/includes/common/classes.php
r5466 r5676 61 61 * @since bbPress (r2700) 62 62 * 63 * @param mixed$args Required. Supports these args:63 * @param array $args Required. Supports these args: 64 64 * - name: Unique name (for internal identification) 65 65 * - id: Unique ID (normally for custom post type) … … 71 71 * @uses BBP_Component::setup_actions() Setup the hooks and actions 72 72 */ 73 public function __construct( $args = '') {73 public function __construct( $args = array() ) { 74 74 if ( empty( $args ) ) { 75 75 return; … … 90 90 * @uses apply_filters() Calls 'bbp_{@link BBP_Component::name}_slug' 91 91 */ 92 private function setup_globals( $args = '') {92 private function setup_globals( $args = array() ) { 93 93 $this->name = $args['name']; 94 94 $this->id = apply_filters( 'bbp_' . $this->name . '_id', $args['id'] ); -
trunk/src/includes/common/functions.php
r5642 r5676 418 418 * @since bbPress (r2769) 419 419 * 420 * @param mixed$args Optional. The function supports these arguments (all420 * @param array $args Optional. The function supports these arguments (all 421 421 * default to true): 422 422 * - count_users: Count users? … … 451 451 * @return object Walked forum tree 452 452 */ 453 function bbp_get_statistics( $args = '') {453 function bbp_get_statistics( $args = array() ) { 454 454 455 455 // Parse arguments against default values … … 607 607 * @since bbPress (r2734) 608 608 * 609 * @param mixed$args Optional. If no args are there, then $_POST values are609 * @param array $args Optional. If no args are there, then $_POST values are 610 610 * used. 611 611 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_name' with the … … 617 617 * @return bool|array False on errors, values in an array on success 618 618 */ 619 function bbp_filter_anonymous_post_data( $args = '') {619 function bbp_filter_anonymous_post_data( $args = array() ) { 620 620 621 621 // Parse arguments against default values -
trunk/src/includes/common/template.php
r5563 r5676 1191 1191 * @since bbPress (r2815) 1192 1192 * 1193 * @param mixed$args This function supports these arguments:1193 * @param array $args This function supports these arguments: 1194 1194 * - action: The action being taken 1195 1195 * - context: The context the action is being taken from … … 1198 1198 * @uses apply_filters() Calls 'bbp_wp_login_action' with the url and args 1199 1199 */ 1200 function bbp_wp_login_action( $args = '') {1200 function bbp_wp_login_action( $args = array() ) { 1201 1201 1202 1202 // Parse arguments against default values … … 1363 1363 * @since bbPress (r2746) 1364 1364 * 1365 * @param mixed$args See {@link bbp_get_dropdown()} for arguments1366 */ 1367 function bbp_dropdown( $args = '') {1365 * @param array $args See {@link bbp_get_dropdown()} for arguments 1366 */ 1367 function bbp_dropdown( $args = array() ) { 1368 1368 echo bbp_get_dropdown( $args ); 1369 1369 } … … 1374 1374 * @since bbPress (r2746) 1375 1375 * 1376 * @param mixed$args The function supports these args:1376 * @param array $args The function supports these args: 1377 1377 * - post_type: Post type, defaults to bbp_get_forum_post_type() (bbp_forum) 1378 1378 * - selected: Selected ID, to not have any value as selected, pass … … 1409 1409 * @return string The dropdown 1410 1410 */ 1411 function bbp_get_dropdown( $args = '') {1411 function bbp_get_dropdown( $args = array() ) { 1412 1412 1413 1413 // Setup return value -
trunk/src/includes/common/widgets.php
r5561 r5676 59 59 * @since bbPress (r2827) 60 60 * 61 * @param mixed$args Arguments61 * @param array $args Arguments 62 62 * @param array $instance Instance 63 63 * @uses apply_filters() Calls 'bbp_login_widget_title' with the title … … 263 263 * @since bbPress (r3020) 264 264 * 265 * @param mixed$args Arguments265 * @param array $args Arguments 266 266 * @param array $instance Instance 267 267 * @uses apply_filters() Calls 'bbp_view_widget_title' with the title … … 533 533 * @since bbPress (r2653) 534 534 * 535 * @param mixed$args Arguments535 * @param array $args Arguments 536 536 * @param array $instance Instance 537 537 * @uses apply_filters() Calls 'bbp_forum_widget_title' with the title … … 713 713 * @since bbPress (r2653) 714 714 * 715 * @param mixed$args715 * @param array $args 716 716 * @param array $instance 717 717 * @uses apply_filters() Calls 'bbp_topic_widget_title' with the title … … 971 971 * @since bbPress (r4509) 972 972 * 973 * @param mixed$args Arguments973 * @param array $args Arguments 974 974 * @param array $instance Instance 975 975 * … … 1101 1101 * @since bbPress (r2653) 1102 1102 * 1103 * @param mixed$args1103 * @param array $args 1104 1104 * @param array $instance 1105 1105 * @uses apply_filters() Calls 'bbp_reply_widget_title' with the title -
trunk/src/includes/core/sub-actions.php
r5618 r5676 477 477 * @param string $cap Capability name 478 478 * @param int $user_id User id 479 * @param mixed$args Arguments479 * @param array $args Arguments 480 480 */ 481 481 function bbp_map_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) { -
trunk/src/includes/extend/buddypress/activity.php
r5466 r5676 242 242 * @return type Activity ID if successful, false if not 243 243 */ 244 public function delete_activity( $args = '') {244 public function delete_activity( $args = array() ) { 245 245 246 246 // Default activity args -
trunk/src/includes/forums/capabilities.php
r5079 r5676 38 38 * @param string $cap Capability name 39 39 * @param int $user_id User id 40 * @param mixed$args Arguments40 * @param array $args Arguments 41 41 * @uses get_post() To get the post 42 42 * @uses get_post_type_object() To get the post type object -
trunk/src/includes/forums/functions.php
r5658 r5676 1575 1575 * @since bbPress (r2908) 1576 1576 * 1577 * @param mixed$args Supports these arguments:1577 * @param array $args Supports these arguments: 1578 1578 * - forum_id: Forum id 1579 1579 * - last_topic_id: Last topic id … … 1591 1591 * @uses bbp_update_forum_topic_count_hidden() To update the hidden topic count 1592 1592 */ 1593 function bbp_update_forum( $args = '') {1593 function bbp_update_forum( $args = array() ) { 1594 1594 1595 1595 // Parse arguments against default values -
trunk/src/includes/forums/template.php
r5637 r5676 102 102 * @since bbPress (r2464) 103 103 * 104 * @param mixed$args All the arguments supported by {@link WP_Query}104 * @param array $args All the arguments supported by {@link WP_Query} 105 105 * @uses WP_Query To make query and get the forums 106 106 * @uses bbp_get_forum_post_type() To get the forum post type id … … 114 114 * @return object Multidimensional array of forum information 115 115 */ 116 function bbp_has_forums( $args = '') {116 function bbp_has_forums( $args = array() ) { 117 117 118 118 // Forum archive only shows root … … 677 677 * @since bbPress (r2747) 678 678 * 679 * @param mixed$args All the arguments supported by {@link WP_Query}679 * @param array $args All the arguments supported by {@link WP_Query} 680 680 * @uses bbp_get_forum_id() To get the forum id 681 681 * @uses current_user_can() To check if the current user is capable of … … 686 686 * @return mixed false if none, array of subs if yes 687 687 */ 688 function bbp_forum_get_subforums( $args = '') {688 function bbp_forum_get_subforums( $args = array() ) { 689 689 690 690 // Use passed integer as post_parent … … 739 739 * Output a list of forums (can be used to list subforums) 740 740 * 741 * @param mixed$args The function supports these args:741 * @param array $args The function supports these args: 742 742 * - before: To put before the output. Defaults to '<ul class="bbp-forums">' 743 743 * - after: To put after the output. Defaults to '</ul>' … … 755 755 * @uses bbp_get_forum_reply_count() To get forum reply count 756 756 */ 757 function bbp_list_forums( $args = '') {757 function bbp_list_forums( $args = array() ) { 758 758 759 759 // Define used variables … … 2036 2036 * @uses bbp_get_single_forum_description() Return the eventual output 2037 2037 */ 2038 function bbp_single_forum_description( $args = '') {2038 function bbp_single_forum_description( $args = array() ) { 2039 2039 echo bbp_get_single_forum_description( $args ); 2040 2040 } … … 2045 2045 * @since bbPress (r2860) 2046 2046 * 2047 * @param mixed$args This function supports these arguments:2047 * @param array $args This function supports these arguments: 2048 2048 * - forum_id: Forum id 2049 2049 * - before: Before the text … … 2061 2061 * @return string Filtered forum description 2062 2062 */ 2063 function bbp_get_single_forum_description( $args = '') {2063 function bbp_get_single_forum_description( $args = array() ) { 2064 2064 2065 2065 // Parse arguments against default values … … 2425 2425 * @uses bbp_get_form_forum_type() To get the topic's forum id 2426 2426 */ 2427 function bbp_form_forum_type_dropdown( $args = '') {2427 function bbp_form_forum_type_dropdown( $args = array() ) { 2428 2428 echo bbp_get_form_forum_type_dropdown( $args ); 2429 2429 } … … 2443 2443 * @return string HTML select list for selecting forum type 2444 2444 */ 2445 function bbp_get_form_forum_type_dropdown( $args = '') {2445 function bbp_get_form_forum_type_dropdown( $args = array() ) { 2446 2446 2447 2447 // Backpat for handling passing of a forum ID as integer … … 2517 2517 * @uses bbp_get_form_forum_status() To get the topic's forum id 2518 2518 */ 2519 function bbp_form_forum_status_dropdown( $args = '') {2519 function bbp_form_forum_status_dropdown( $args = array() ) { 2520 2520 echo bbp_get_form_forum_status_dropdown( $args ); 2521 2521 } … … 2535 2535 * @return string HTML select list for selecting forum status 2536 2536 */ 2537 function bbp_get_form_forum_status_dropdown( $args = '') {2537 function bbp_get_form_forum_status_dropdown( $args = array() ) { 2538 2538 2539 2539 // Backpat for handling passing of a forum ID … … 2609 2609 * @uses bbp_get_form_forum_visibility() To get the topic's forum id 2610 2610 */ 2611 function bbp_form_forum_visibility_dropdown( $args = '') {2611 function bbp_form_forum_visibility_dropdown( $args = array() ) { 2612 2612 echo bbp_get_form_forum_visibility_dropdown( $args ); 2613 2613 } … … 2627 2627 * @return string HTML select list for selecting forum visibility 2628 2628 */ 2629 function bbp_get_form_forum_visibility_dropdown( $args = '') {2629 function bbp_get_form_forum_visibility_dropdown( $args = array() ) { 2630 2630 2631 2631 // Backpat for handling passing of a forum ID -
trunk/src/includes/replies/capabilities.php
r5079 r5676 37 37 * @param string $cap Capability name 38 38 * @param int $user_id User id 39 * @param mixed$args Arguments39 * @param array $args Arguments 40 40 * @uses get_post() To get the post 41 41 * @uses get_post_type_object() To get the post type object -
trunk/src/includes/replies/functions.php
r5658 r5676 1200 1200 * @since bbPress (r2782) 1201 1201 * 1202 * @param mixed$args Supports these args:1202 * @param array $args Supports these args: 1203 1203 * - reply_id: reply id 1204 1204 * - author_id: Author id … … 1211 1211 * @return mixed False on failure, true on success 1212 1212 */ 1213 function bbp_update_reply_revision_log( $args = '') {1213 function bbp_update_reply_revision_log( $args = array() ) { 1214 1214 1215 1215 // Parse arguments against default values -
trunk/src/includes/replies/template.php
r5675 r5676 99 99 * @since bbPress (r2553) 100 100 * 101 * @param mixed$args All the arguments supported by {@link WP_Query}101 * @param array $args All the arguments supported by {@link WP_Query} 102 102 * @uses bbp_show_lead_topic() Are we showing the topic as a lead? 103 103 * @uses bbp_get_topic_id() To get the topic id … … 119 119 * @return object Multidimensional array of reply information 120 120 */ 121 function bbp_has_replies( $args = '') {121 function bbp_has_replies( $args = array() ) { 122 122 global $wp_rewrite; 123 123 … … 1203 1203 * @since bbPress (r2717) 1204 1204 * 1205 * @param mixed$args Optional. If it is an integer, it is used as reply id.1205 * @param array $args Optional. If it is an integer, it is used as reply id. 1206 1206 * @uses bbp_get_reply_author_link() To get the reply author link 1207 1207 */ 1208 function bbp_reply_author_link( $args = '') {1208 function bbp_reply_author_link( $args = array() ) { 1209 1209 echo bbp_get_reply_author_link( $args ); 1210 1210 } … … 1214 1214 * @since bbPress (r2717) 1215 1215 * 1216 * @param mixed$args Optional. If an integer, it is used as reply id.1216 * @param array $args Optional. If an integer, it is used as reply id. 1217 1217 * @uses bbp_get_reply_id() To get the reply id 1218 1218 * @uses bbp_is_reply_anonymous() To check if the reply is by an … … 1228 1228 * @return string Author link of reply 1229 1229 */ 1230 function bbp_get_reply_author_link( $args = '') {1230 function bbp_get_reply_author_link( $args = array() ) { 1231 1231 1232 1232 // Parse arguments against default values … … 1936 1936 * @since bbPress (r2740) 1937 1937 * 1938 * @param mixed$args See {@link bbp_get_reply_edit_link()}1938 * @param array $args See {@link bbp_get_reply_edit_link()} 1939 1939 * @uses bbp_get_reply_edit_link() To get the reply edit link 1940 1940 */ 1941 function bbp_reply_edit_link( $args = '') {1941 function bbp_reply_edit_link( $args = array() ) { 1942 1942 echo bbp_get_reply_edit_link( $args ); 1943 1943 } … … 1948 1948 * @since bbPress (r2740) 1949 1949 * 1950 * @param mixed$args This function supports these arguments:1950 * @param array $args This function supports these arguments: 1951 1951 * - id: Reply id 1952 1952 * - link_before: HTML before the link … … 1962 1962 * @return string Reply edit link 1963 1963 */ 1964 function bbp_get_reply_edit_link( $args = '') {1964 function bbp_get_reply_edit_link( $args = array() ) { 1965 1965 1966 1966 // Parse arguments against default values … … 2052 2052 * @since bbPress (r2740) 2053 2053 * 2054 * @param mixed$args See {@link bbp_get_reply_trash_link()}2054 * @param array $args See {@link bbp_get_reply_trash_link()} 2055 2055 * @uses bbp_get_reply_trash_link() To get the reply trash link 2056 2056 */ 2057 function bbp_reply_trash_link( $args = '') {2057 function bbp_reply_trash_link( $args = array() ) { 2058 2058 echo bbp_get_reply_trash_link( $args ); 2059 2059 } … … 2064 2064 * @since bbPress (r2740) 2065 2065 * 2066 * @param mixed$args This function supports these arguments:2066 * @param array $args This function supports these arguments: 2067 2067 * - id: Reply id 2068 2068 * - link_before: HTML before the link … … 2086 2086 * @return string Reply trash link 2087 2087 */ 2088 function bbp_get_reply_trash_link( $args = '') {2088 function bbp_get_reply_trash_link( $args = array() ) { 2089 2089 2090 2090 // Parse arguments against default values … … 2128 2128 * @since bbPress (r2740) 2129 2129 * 2130 * @param mixed$args See {@link bbp_get_reply_spam_link()}2130 * @param array $args See {@link bbp_get_reply_spam_link()} 2131 2131 * @uses bbp_get_reply_spam_link() To get the reply spam link 2132 2132 */ 2133 function bbp_reply_spam_link( $args = '') {2133 function bbp_reply_spam_link( $args = array() ) { 2134 2134 echo bbp_get_reply_spam_link( $args ); 2135 2135 } … … 2140 2140 * @since bbPress (r2740) 2141 2141 * 2142 * @param mixed$args This function supports these arguments:2142 * @param array $args This function supports these arguments: 2143 2143 * - id: Reply id 2144 2144 * - link_before: HTML before the link … … 2159 2159 * @return string Reply spam link 2160 2160 */ 2161 function bbp_get_reply_spam_link( $args = '') {2161 function bbp_get_reply_spam_link( $args = array() ) { 2162 2162 2163 2163 // Parse arguments against default values … … 2191 2191 * @since bbPress (r4521) 2192 2192 * 2193 * @param mixed$args See {@link bbp_get_reply_move_link()}2193 * @param array $args See {@link bbp_get_reply_move_link()} 2194 2194 * @uses bbp_get_reply_move_link() To get the reply move link 2195 2195 */ 2196 function bbp_reply_move_link( $args = '') {2196 function bbp_reply_move_link( $args = array() ) { 2197 2197 echo bbp_get_reply_move_link( $args ); 2198 2198 } … … 2205 2205 * @since bbPress (r4521) 2206 2206 * 2207 * @param mixed$args This function supports these arguments:2207 * @param array $args This function supports these arguments: 2208 2208 * - id: Reply id 2209 2209 * - link_before: HTML before the link … … 2224 2224 * @return string Reply move link 2225 2225 */ 2226 function bbp_get_reply_move_link( $args = '') {2226 function bbp_get_reply_move_link( $args = array() ) { 2227 2227 2228 2228 // Parse arguments against default values … … 2259 2259 * @since bbPress (r2756) 2260 2260 * 2261 * @param mixed$args See {@link bbp_get_topic_split_link()}2261 * @param array $args See {@link bbp_get_topic_split_link()} 2262 2262 * @uses bbp_get_topic_split_link() To get the topic split link 2263 2263 */ 2264 function bbp_topic_split_link( $args = '') {2264 function bbp_topic_split_link( $args = array() ) { 2265 2265 echo bbp_get_topic_split_link( $args ); 2266 2266 } … … 2273 2273 * @since bbPress (r2756) 2274 2274 * 2275 * @param mixed$args This function supports these arguments:2275 * @param array $args This function supports these arguments: 2276 2276 * - id: Reply id 2277 2277 * - link_before: HTML before the link … … 2292 2292 * @return string Topic split link 2293 2293 */ 2294 function bbp_get_topic_split_link( $args = '') {2294 function bbp_get_topic_split_link( $args = array() ) { 2295 2295 2296 2296 // Parse arguments against default values … … 2325 2325 * @since bbPress (r5507) 2326 2326 * 2327 * @param mixed$args See {@link bbp_get_reply_approve_link()}2327 * @param array $args See {@link bbp_get_reply_approve_link()} 2328 2328 * @uses bbp_get_reply_approve_link() To get the reply approve link 2329 2329 */ 2330 function bbp_reply_approve_link( $args = '') {2330 function bbp_reply_approve_link( $args = array() ) { 2331 2331 echo bbp_get_reply_approve_link( $args ); 2332 2332 } … … 2337 2337 * @since bbPress (r5507) 2338 2338 * 2339 * @param mixed$args This function supports these args:2339 * @param array $args This function supports these args: 2340 2340 * - id: Optional. Reply id 2341 2341 * - link_before: Before the link … … 2355 2355 * @return string Reply approve link 2356 2356 */ 2357 function bbp_get_reply_approve_link( $args = '') {2357 function bbp_get_reply_approve_link( $args = array() ) { 2358 2358 2359 2359 // Parse arguments against default values … … 2769 2769 * - selected: Override the selected option 2770 2770 */ 2771 function bbp_form_reply_status_dropdown( $args = '') {2771 function bbp_form_reply_status_dropdown( $args = array() ) { 2772 2772 echo bbp_get_form_reply_status_dropdown( $args ); 2773 2773 } … … 2787 2787 * - selected: Override the selected option 2788 2788 */ 2789 function bbp_get_form_reply_status_dropdown( $args = '') {2789 function bbp_get_form_reply_status_dropdown( $args = array() ) { 2790 2790 2791 2791 // Parse arguments against default values -
trunk/src/includes/search/template.php
r5505 r5676 18 18 * @since bbPress (r4579) 19 19 * 20 * @param mixed$args All the arguments supported by {@link WP_Query}20 * @param array $args All the arguments supported by {@link WP_Query} 21 21 * @uses bbp_get_view_all() Are we showing all results? 22 22 * @uses bbp_get_public_status_id() To get the public status id … … 39 39 * @return object Multidimensional array of search information 40 40 */ 41 function bbp_has_search_results( $args = '') {41 function bbp_has_search_results( $args = array() ) { 42 42 global $wp_rewrite; 43 43 -
trunk/src/includes/topics/capabilities.php
r5443 r5676 55 55 * @param string $cap Capability name 56 56 * @param int $user_id User id 57 * @param mixed$args Arguments57 * @param array $args Arguments 58 58 * @uses get_post() To get the post 59 59 * @uses get_post_type_object() To get the post type object … … 213 213 * @param string $cap Capability name 214 214 * @param int $user_id User id 215 * @param mixed$args Arguments215 * @param array $args Arguments 216 216 * @uses apply_filters() Filter capability map results 217 217 * @return array Actual capabilities for meta capability -
trunk/src/includes/topics/functions.php
r5669 r5676 2718 2718 * @since bbPress (r2782) 2719 2719 * 2720 * @param mixed$args Supports these args:2720 * @param array $args Supports these args: 2721 2721 * - topic_id: Topic id 2722 2722 * - author_id: Author id … … 2729 2729 * @return mixed False on failure, true on success 2730 2730 */ 2731 function bbp_update_topic_revision_log( $args = '') {2731 function bbp_update_topic_revision_log( $args = array() ) { 2732 2732 2733 2733 // Parse arguments against default values -
trunk/src/includes/topics/template.php
r5674 r5676 118 118 * @since bbPress (r2485) 119 119 * 120 * @param mixed$args All the arguments supported by {@link WP_Query}120 * @param array $args All the arguments supported by {@link WP_Query} 121 121 * @uses current_user_can() To check if the current user can edit other's topics 122 122 * @uses bbp_get_topic_post_type() To get the topic post type … … 139 139 * @return object Multidimensional array of topic information 140 140 */ 141 function bbp_has_topics( $args = '') {141 function bbp_has_topics( $args = array() ) { 142 142 global $wp_rewrite; 143 143 … … 835 835 * @since bbPress (r2966) 836 836 * 837 * @param mixed$args See {@link bbp_get_topic_pagination()}837 * @param array $args See {@link bbp_get_topic_pagination()} 838 838 * @uses bbp_get_topic_pagination() To get the topic pagination links 839 839 */ 840 function bbp_topic_pagination( $args = '') {840 function bbp_topic_pagination( $args = array() ) { 841 841 echo bbp_get_topic_pagination( $args ); 842 842 } … … 846 846 * @since bbPress (r2966) 847 847 * 848 * @param mixed$args This function supports these arguments:848 * @param array $args This function supports these arguments: 849 849 * - topic_id: Topic id 850 850 * - before: Before the links … … 865 865 * @return string Pagination links 866 866 */ 867 function bbp_get_topic_pagination( $args = '') {867 function bbp_get_topic_pagination( $args = array() ) { 868 868 global $wp_rewrite; 869 869 … … 1484 1484 * @uses bbp_get_topic_author_link() To get the topic author link 1485 1485 */ 1486 function bbp_topic_author_link( $args = '') {1486 function bbp_topic_author_link( $args = array() ) { 1487 1487 echo bbp_get_topic_author_link( $args ); 1488 1488 } … … 1508 1508 * @return string Author link of topic 1509 1509 */ 1510 function bbp_get_topic_author_link( $args = '') {1510 function bbp_get_topic_author_link( $args = array() ) { 1511 1511 1512 1512 // Parse arguments against default values … … 2338 2338 * 2339 2339 * @param int $topic_id Optional. Topic id 2340 * @param mixed$args See {@link bbp_get_topic_tag_list()}2340 * @param array $args See {@link bbp_get_topic_tag_list()} 2341 2341 * @uses bbp_get_topic_tag_list() To get the topic tag list 2342 2342 */ … … 2529 2529 * @since bbPress (r2727) 2530 2530 * 2531 * @param mixed$args See {@link bbp_get_topic_edit_link()}2531 * @param array $args See {@link bbp_get_topic_edit_link()} 2532 2532 * @uses bbp_get_topic_edit_link() To get the topic edit link 2533 2533 */ 2534 function bbp_topic_edit_link( $args = '') {2534 function bbp_topic_edit_link( $args = array() ) { 2535 2535 echo bbp_get_topic_edit_link( $args ); 2536 2536 } … … 2541 2541 * @since bbPress (r2727) 2542 2542 * 2543 * @param mixed$args This function supports these args:2543 * @param array $args This function supports these args: 2544 2544 * - id: Optional. Topic id 2545 2545 * - link_before: Before the link … … 2555 2555 * @return string Topic edit link 2556 2556 */ 2557 function bbp_get_topic_edit_link( $args = '') {2557 function bbp_get_topic_edit_link( $args = array() ) { 2558 2558 2559 2559 // Parse arguments against default values … … 2646 2646 * @since bbPress (r2727) 2647 2647 * 2648 * @param mixed$args See {@link bbp_get_topic_trash_link()}2648 * @param array $args See {@link bbp_get_topic_trash_link()} 2649 2649 * @uses bbp_get_topic_trash_link() To get the topic trash link 2650 2650 */ 2651 function bbp_topic_trash_link( $args = '') {2651 function bbp_topic_trash_link( $args = array() ) { 2652 2652 echo bbp_get_topic_trash_link( $args ); 2653 2653 } … … 2658 2658 * @since bbPress (r2727) 2659 2659 * 2660 * @param mixed$args This function supports these args:2660 * @param array $args This function supports these args: 2661 2661 * - id: Optional. Topic id 2662 2662 * - link_before: Before the link … … 2679 2679 * @return string Topic trash link 2680 2680 */ 2681 function bbp_get_topic_trash_link( $args = '') {2681 function bbp_get_topic_trash_link( $args = array() ) { 2682 2682 2683 2683 // Parse arguments against default values … … 2721 2721 * @since bbPress (r2727) 2722 2722 * 2723 * @param mixed$args See {@link bbp_get_topic_close_link()}2723 * @param array $args See {@link bbp_get_topic_close_link()} 2724 2724 * @uses bbp_get_topic_close_link() To get the topic close link 2725 2725 */ 2726 function bbp_topic_close_link( $args = '') {2726 function bbp_topic_close_link( $args = array() ) { 2727 2727 echo bbp_get_topic_close_link( $args ); 2728 2728 } … … 2733 2733 * @since bbPress (r2727) 2734 2734 * 2735 * @param mixed$args This function supports these args:2735 * @param array $args This function supports these args: 2736 2736 * - id: Optional. Topic id 2737 2737 * - link_before: Before the link … … 2750 2750 * @return string Topic close link 2751 2751 */ 2752 function bbp_get_topic_close_link( $args = '') {2752 function bbp_get_topic_close_link( $args = array() ) { 2753 2753 2754 2754 // Parse arguments against default values … … 2781 2781 * @since bbPress (r5504) 2782 2782 * 2783 * @param mixed$args See {@link bbp_get_topic_approve_link()}2783 * @param array $args See {@link bbp_get_topic_approve_link()} 2784 2784 * @uses bbp_get_topic_approve_link() To get the topic approve link 2785 2785 */ 2786 function bbp_topic_approve_link( $args = '') {2786 function bbp_topic_approve_link( $args = array() ) { 2787 2787 echo bbp_get_topic_approve_link( $args ); 2788 2788 } … … 2793 2793 * @since bbPress (r5504) 2794 2794 * 2795 * @param mixed$args This function supports these args:2795 * @param array $args This function supports these args: 2796 2796 * - id: Optional. Topic id 2797 2797 * - link_before: Before the link … … 2811 2811 * @return string Topic approve link 2812 2812 */ 2813 function bbp_get_topic_approve_link( $args = '') {2813 function bbp_get_topic_approve_link( $args = array() ) { 2814 2814 2815 2815 // Parse arguments against default values … … 2842 2842 * @since bbPress (r2754) 2843 2843 * 2844 * @param mixed$args See {@link bbp_get_topic_stick_link()}2844 * @param array $args See {@link bbp_get_topic_stick_link()} 2845 2845 * @uses bbp_get_topic_stick_link() To get the topic stick link 2846 2846 */ 2847 function bbp_topic_stick_link( $args = '') {2847 function bbp_topic_stick_link( $args = array() ) { 2848 2848 echo bbp_get_topic_stick_link( $args ); 2849 2849 } … … 2854 2854 * @since bbPress (r2754) 2855 2855 * 2856 * @param mixed$args This function supports these args:2856 * @param array $args This function supports these args: 2857 2857 * - id: Optional. Topic id 2858 2858 * - link_before: Before the link … … 2873 2873 * @return string Topic stick link 2874 2874 */ 2875 function bbp_get_topic_stick_link( $args = '') {2875 function bbp_get_topic_stick_link( $args = array() ) { 2876 2876 2877 2877 // Parse arguments against default values … … 2919 2919 * @since bbPress (r2756) 2920 2920 * 2921 * @param mixed$args2921 * @param array $args 2922 2922 * @uses bbp_get_topic_merge_link() To get the topic merge link 2923 2923 */ 2924 function bbp_topic_merge_link( $args = '') {2924 function bbp_topic_merge_link( $args = array() ) { 2925 2925 echo bbp_get_topic_merge_link( $args ); 2926 2926 } … … 2931 2931 * @since bbPress (r2756) 2932 2932 * 2933 * @param mixed$args This function supports these args:2933 * @param array $args This function supports these args: 2934 2934 * - id: Optional. Topic id 2935 2935 * - link_before: Before the link … … 2945 2945 * @return string Topic merge link 2946 2946 */ 2947 function bbp_get_topic_merge_link( $args = '') {2947 function bbp_get_topic_merge_link( $args = array() ) { 2948 2948 2949 2949 // Parse arguments against default values … … 2972 2972 * @since bbPress (r2727) 2973 2973 * 2974 * @param mixed$args See {@link bbp_get_topic_spam_link()}2974 * @param array $args See {@link bbp_get_topic_spam_link()} 2975 2975 * @uses bbp_get_topic_spam_link() Topic spam link 2976 2976 */ 2977 function bbp_topic_spam_link( $args = '') {2977 function bbp_topic_spam_link( $args = array() ) { 2978 2978 echo bbp_get_topic_spam_link( $args ); 2979 2979 } … … 2984 2984 * @since bbPress (r2727) 2985 2985 * 2986 * @param mixed$args This function supports these args:2986 * @param array $args This function supports these args: 2987 2987 * - id: Optional. Topic id 2988 2988 * - link_before: Before the link … … 3001 3001 * @return string Topic spam link 3002 3002 */ 3003 function bbp_get_topic_spam_link( $args = '') {3003 function bbp_get_topic_spam_link( $args = array() ) { 3004 3004 3005 3005 // Parse arguments against default values … … 3218 3218 * - selected: Override the selected option 3219 3219 */ 3220 function bbp_topic_type_select( $args = '') {3220 function bbp_topic_type_select( $args = array() ) { 3221 3221 echo bbp_get_form_topic_type_dropdown( $args ); 3222 3222 } … … 3233 3233 * - selected: Override the selected option 3234 3234 */ 3235 function bbp_form_topic_type_dropdown( $args = '') {3235 function bbp_form_topic_type_dropdown( $args = array() ) { 3236 3236 echo bbp_get_form_topic_type_dropdown( $args ); 3237 3237 } … … 3252 3252 * @uses bbp_is_topic_sticky() To check if the topic is a sticky 3253 3253 */ 3254 function bbp_get_form_topic_type_dropdown( $args = '') {3254 function bbp_get_form_topic_type_dropdown( $args = array() ) { 3255 3255 3256 3256 // Parse arguments against default values … … 3323 3323 * - selected: Override the selected option 3324 3324 */ 3325 function bbp_form_topic_status_dropdown( $args = '') {3325 function bbp_form_topic_status_dropdown( $args = array() ) { 3326 3326 echo bbp_get_form_topic_status_dropdown( $args ); 3327 3327 } … … 3341 3341 * - selected: Override the selected option 3342 3342 */ 3343 function bbp_get_form_topic_status_dropdown( $args = '') {3343 function bbp_get_form_topic_status_dropdown( $args = array() ) { 3344 3344 3345 3345 // Parse arguments against default values … … 3406 3406 * @uses bbp_get_single_topic_description() Return the eventual output 3407 3407 */ 3408 function bbp_single_topic_description( $args = '') {3408 function bbp_single_topic_description( $args = array() ) { 3409 3409 echo bbp_get_single_topic_description( $args ); 3410 3410 } … … 3415 3415 * @since bbPress (r2860) 3416 3416 * 3417 * @param mixed$args This function supports these arguments:3417 * @param array $args This function supports these arguments: 3418 3418 * - topic_id: Topic id 3419 3419 * - before: Before the text … … 3430 3430 * @return string Filtered topic description 3431 3431 */ 3432 function bbp_get_single_topic_description( $args = '') {3432 function bbp_get_single_topic_description( $args = array() ) { 3433 3433 3434 3434 // Parse arguments against default values -
trunk/src/includes/users/capabilities.php
r5591 r5676 18 18 * @param string $cap Capability name 19 19 * @param int $user_id User id 20 * @param mixed$args Arguments20 * @param array $args Arguments 21 21 * @uses apply_filters() Filter mapped results 22 22 * @return array Actual capabilities for meta capability -
trunk/src/includes/users/template.php
r5661 r5676 533 533 * @since bbPress (r2827) 534 534 * 535 * @param mixed$args Optional. See {@link bbp_get_admin_link()}535 * @param array $args Optional. See {@link bbp_get_admin_link()} 536 536 * @uses bbp_get_admin_link() To get the admin link 537 537 */ 538 function bbp_admin_link( $args = '') {538 function bbp_admin_link( $args = array() ) { 539 539 echo bbp_get_admin_link( $args ); 540 540 } … … 544 544 * @since bbPress (r2827) 545 545 * 546 * @param mixed$args Optional. This function supports these arguments:546 * @param array $args Optional. This function supports these arguments: 547 547 * - text: The text 548 548 * - before: Before the lnk … … 553 553 * @return The link 554 554 */ 555 function bbp_get_admin_link( $args = '') {555 function bbp_get_admin_link( $args = array() ) { 556 556 if ( ! current_user_can( 'moderate' ) ) { 557 557 return; … … 581 581 * @since bbPress (r3120) 582 582 * 583 * @param mixed$args Optional. If it is an integer, it is used as post id.583 * @param array $args Optional. If it is an integer, it is used as post id. 584 584 * @uses bbp_get_author_ip() To get the post author link 585 585 */ 586 function bbp_author_ip( $args = '') {586 function bbp_author_ip( $args = array() ) { 587 587 echo bbp_get_author_ip( $args ); 588 588 } … … 592 592 * @since bbPress (r3120) 593 593 * 594 * @param mixed$args Optional. If an integer, it is used as reply id.594 * @param array $args Optional. If an integer, it is used as reply id. 595 595 * @uses get_post_meta() To check if it's a topic page 596 596 * @return string Author link of reply 597 597 */ 598 function bbp_get_author_ip( $args = '') {598 function bbp_get_author_ip( $args = array() ) { 599 599 600 600 // Used as post id … … 859 859 * @since bbPress (r2652) 860 860 * 861 * @param mixed$args See {@link bbp_get_user_favorites_link()}861 * @param array $args See {@link bbp_get_user_favorites_link()} 862 862 * @param int $user_id Optional. User id 863 863 * @param bool $wrap Optional. If you want to wrap the link in <span id="favorite-toggle">. … … 875 875 * @since bbPress (r2652) 876 876 * 877 * @param mixed$args This function supports these arguments:877 * @param array $args This function supports these arguments: 878 878 * - subscribe: Favorite text 879 879 * - unsubscribe: Unfavorite text … … 896 896 * @return string User favorites link 897 897 */ 898 function bbp_get_user_favorites_link( $args = '', $user_id = 0, $wrap = true ) {898 function bbp_get_user_favorites_link( $args = array(), $user_id = 0, $wrap = true ) { 899 899 if ( ! bbp_is_favorites_active() ) { 900 900 return false; … … 1024 1024 * @since bbPress (r2668) 1025 1025 * 1026 * @param mixed$args See {@link bbp_get_user_subscribe_link()}1026 * @param array $args See {@link bbp_get_user_subscribe_link()} 1027 1027 * @param int $user_id Optional. User id 1028 1028 * @param bool $wrap Optional. If you want to wrap the link in <span id="subscription-toggle">. 1029 1029 * @uses bbp_get_user_subscribe_link() To get the subscribe link 1030 1030 */ 1031 function bbp_user_subscribe_link( $args = '', $user_id = 0, $wrap = true ) {1031 function bbp_user_subscribe_link( $args = array(), $user_id = 0, $wrap = true ) { 1032 1032 echo bbp_get_user_subscribe_link( $args, $user_id, $wrap ); 1033 1033 } … … 1037 1037 * @since bbPress (r2668) 1038 1038 * 1039 * @param mixed$args This function supports these arguments:1039 * @param array $args This function supports these arguments: 1040 1040 * - subscribe: Subscribe text 1041 1041 * - unsubscribe: Unsubscribe text … … 1062 1062 * @return string Permanent link to topic 1063 1063 */ 1064 function bbp_get_user_subscribe_link( $args = '', $user_id = 0, $wrap = true ) {1064 function bbp_get_user_subscribe_link( $args = array(), $user_id = 0, $wrap = true ) { 1065 1065 if ( ! bbp_is_subscriptions_active() ) { 1066 1066 return; … … 1682 1682 * @since bbPress (r2875) 1683 1683 * 1684 * @param mixed$args Optional. If it is an integer, it is used as post id.1684 * @param array $args Optional. If it is an integer, it is used as post id. 1685 1685 * @uses bbp_get_author_link() To get the post author link 1686 1686 */ 1687 function bbp_author_link( $args = '') {1687 function bbp_author_link( $args = array() ) { 1688 1688 echo bbp_get_author_link( $args ); 1689 1689 } … … 1693 1693 * @since bbPress (r2875) 1694 1694 * 1695 * @param mixed$args Optional. If an integer, it is used as reply id.1695 * @param array $args Optional. If an integer, it is used as reply id. 1696 1696 * @uses bbp_is_topic() To check if it's a topic page 1697 1697 * @uses bbp_get_topic_author_link() To get the topic author link … … 1708 1708 * @return string Author link of reply 1709 1709 */ 1710 function bbp_get_author_link( $args = '') {1710 function bbp_get_author_link( $args = array() ) { 1711 1711 1712 1712 $post_id = is_numeric( $args ) ? (int) $args : 0; … … 1797 1797 * @return bool 1798 1798 */ 1799 function bbp_user_can_view_forum( $args = '') {1799 function bbp_user_can_view_forum( $args = array() ) { 1800 1800 1801 1801 // Parse arguments against default values
Note: See TracChangeset
for help on using the changeset viewer.