Skip to:
Content

bbPress.org

Changeset 5676


Ignore:
Timestamp:
04/15/2015 02:33:11 AM (10 years ago)
Author:
johnjamesjacoby
Message:

All: Update default values for $args parameters from empty strings to empty arrays.

This is a micro-optimization to avoid unnecessary calls to wp_parse_str() inside bbp_parse_args().

Location:
trunk/src/includes
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/admin.php

    r5637 r5676  
    393393     * @param string $cap Capability name
    394394     * @param int $user_id User id
    395      * @param mixed $args Arguments
     395     * @param array $args Arguments
    396396     * @uses get_post() To get the post
    397397     * @uses apply_filters() Calls 'bbp_map_meta_caps' with caps, cap, user id and
  • trunk/src/includes/common/classes.php

    r5466 r5676  
    6161     * @since bbPress (r2700)
    6262     *
    63      * @param mixed $args Required. Supports these args:
     63     * @param array $args Required. Supports these args:
    6464     *  - name: Unique name (for internal identification)
    6565     *  - id: Unique ID (normally for custom post type)
     
    7171     * @uses BBP_Component::setup_actions() Setup the hooks and actions
    7272     */
    73     public function __construct( $args = '' ) {
     73    public function __construct( $args = array() ) {
    7474        if ( empty( $args ) ) {
    7575            return;
     
    9090     * @uses apply_filters() Calls 'bbp_{@link BBP_Component::name}_slug'
    9191     */
    92     private function setup_globals( $args = '' ) {
     92    private function setup_globals( $args = array() ) {
    9393        $this->name = $args['name'];
    9494        $this->id   = apply_filters( 'bbp_' . $this->name . '_id',   $args['id']   );
  • trunk/src/includes/common/functions.php

    r5642 r5676  
    418418 * @since bbPress (r2769)
    419419 *
    420  * @param mixed $args Optional. The function supports these arguments (all
     420 * @param array $args Optional. The function supports these arguments (all
    421421 *                     default to true):
    422422 *  - count_users: Count users?
     
    451451 * @return object Walked forum tree
    452452 */
    453 function bbp_get_statistics( $args = '' ) {
     453function bbp_get_statistics( $args = array() ) {
    454454
    455455    // Parse arguments against default values
     
    607607 * @since bbPress (r2734)
    608608 *
    609  * @param mixed $args Optional. If no args are there, then $_POST values are
     609 * @param array $args Optional. If no args are there, then $_POST values are
    610610 *                     used.
    611611 * @uses apply_filters() Calls 'bbp_pre_anonymous_post_author_name' with the
     
    617617 * @return bool|array False on errors, values in an array on success
    618618 */
    619 function bbp_filter_anonymous_post_data( $args = '' ) {
     619function bbp_filter_anonymous_post_data( $args = array() ) {
    620620
    621621    // Parse arguments against default values
  • trunk/src/includes/common/template.php

    r5563 r5676  
    11911191 * @since bbPress (r2815)
    11921192 *
    1193  * @param mixed $args This function supports these arguments:
     1193 * @param array $args This function supports these arguments:
    11941194 *  - action: The action being taken
    11951195 *  - context: The context the action is being taken from
     
    11981198 * @uses apply_filters() Calls 'bbp_wp_login_action' with the url and args
    11991199 */
    1200 function bbp_wp_login_action( $args = '' ) {
     1200function bbp_wp_login_action( $args = array() ) {
    12011201
    12021202    // Parse arguments against default values
     
    13631363 * @since bbPress (r2746)
    13641364 *
    1365  * @param mixed $args See {@link bbp_get_dropdown()} for arguments
    1366  */
    1367 function bbp_dropdown( $args = '' ) {
     1365 * @param array $args See {@link bbp_get_dropdown()} for arguments
     1366 */
     1367function bbp_dropdown( $args = array() ) {
    13681368    echo bbp_get_dropdown( $args );
    13691369}
     
    13741374     * @since bbPress (r2746)
    13751375     *
    1376      * @param mixed $args The function supports these args:
     1376     * @param array $args The function supports these args:
    13771377     *  - post_type: Post type, defaults to bbp_get_forum_post_type() (bbp_forum)
    13781378     *  - selected: Selected ID, to not have any value as selected, pass
     
    14091409     * @return string The dropdown
    14101410     */
    1411     function bbp_get_dropdown( $args = '' ) {
     1411    function bbp_get_dropdown( $args = array() ) {
    14121412
    14131413        // Setup return value
  • trunk/src/includes/common/widgets.php

    r5561 r5676  
    5959     * @since bbPress (r2827)
    6060     *
    61      * @param mixed $args Arguments
     61     * @param array $args Arguments
    6262     * @param array $instance Instance
    6363     * @uses apply_filters() Calls 'bbp_login_widget_title' with the title
     
    263263     * @since bbPress (r3020)
    264264     *
    265      * @param mixed $args Arguments
     265     * @param array $args Arguments
    266266     * @param array $instance Instance
    267267     * @uses apply_filters() Calls 'bbp_view_widget_title' with the title
     
    533533     * @since bbPress (r2653)
    534534     *
    535      * @param mixed $args Arguments
     535     * @param array $args Arguments
    536536     * @param array $instance Instance
    537537     * @uses apply_filters() Calls 'bbp_forum_widget_title' with the title
     
    713713     * @since bbPress (r2653)
    714714     *
    715      * @param mixed $args
     715     * @param array $args
    716716     * @param array $instance
    717717     * @uses apply_filters() Calls 'bbp_topic_widget_title' with the title
     
    971971     * @since bbPress (r4509)
    972972     *
    973      * @param mixed $args     Arguments
     973     * @param array $args     Arguments
    974974     * @param array $instance Instance
    975975     *
     
    11011101     * @since bbPress (r2653)
    11021102     *
    1103      * @param mixed $args
     1103     * @param array $args
    11041104     * @param array $instance
    11051105     * @uses apply_filters() Calls 'bbp_reply_widget_title' with the title
  • trunk/src/includes/core/sub-actions.php

    r5618 r5676  
    477477 * @param string $cap Capability name
    478478 * @param int $user_id User id
    479  * @param mixed $args Arguments
     479 * @param array $args Arguments
    480480 */
    481481function bbp_map_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {
  • trunk/src/includes/extend/buddypress/activity.php

    r5466 r5676  
    242242     * @return type Activity ID if successful, false if not
    243243     */
    244     public function delete_activity( $args = '' ) {
     244    public function delete_activity( $args = array() ) {
    245245
    246246        // Default activity args
  • trunk/src/includes/forums/capabilities.php

    r5079 r5676  
    3838 * @param string $cap Capability name
    3939 * @param int $user_id User id
    40  * @param mixed $args Arguments
     40 * @param array $args Arguments
    4141 * @uses get_post() To get the post
    4242 * @uses get_post_type_object() To get the post type object
  • trunk/src/includes/forums/functions.php

    r5658 r5676  
    15751575 * @since bbPress (r2908)
    15761576 *
    1577  * @param mixed $args Supports these arguments:
     1577 * @param array $args Supports these arguments:
    15781578 *  - forum_id: Forum id
    15791579 *  - last_topic_id: Last topic id
     
    15911591 * @uses bbp_update_forum_topic_count_hidden() To update the hidden topic count
    15921592 */
    1593 function bbp_update_forum( $args = '' ) {
     1593function bbp_update_forum( $args = array() ) {
    15941594
    15951595    // Parse arguments against default values
  • trunk/src/includes/forums/template.php

    r5637 r5676  
    102102 * @since bbPress (r2464)
    103103 *
    104  * @param mixed $args All the arguments supported by {@link WP_Query}
     104 * @param array $args All the arguments supported by {@link WP_Query}
    105105 * @uses WP_Query To make query and get the forums
    106106 * @uses bbp_get_forum_post_type() To get the forum post type id
     
    114114 * @return object Multidimensional array of forum information
    115115 */
    116 function bbp_has_forums( $args = '' ) {
     116function bbp_has_forums( $args = array() ) {
    117117
    118118    // Forum archive only shows root
     
    677677 * @since bbPress (r2747)
    678678 *
    679  * @param mixed $args All the arguments supported by {@link WP_Query}
     679 * @param array $args All the arguments supported by {@link WP_Query}
    680680 * @uses bbp_get_forum_id() To get the forum id
    681681 * @uses current_user_can() To check if the current user is capable of
     
    686686 * @return mixed false if none, array of subs if yes
    687687 */
    688 function bbp_forum_get_subforums( $args = '' ) {
     688function bbp_forum_get_subforums( $args = array() ) {
    689689
    690690    // Use passed integer as post_parent
     
    739739 * Output a list of forums (can be used to list subforums)
    740740 *
    741  * @param mixed $args The function supports these args:
     741 * @param array $args The function supports these args:
    742742 *  - before: To put before the output. Defaults to '<ul class="bbp-forums">'
    743743 *  - after: To put after the output. Defaults to '</ul>'
     
    755755 * @uses bbp_get_forum_reply_count() To get forum reply count
    756756 */
    757 function bbp_list_forums( $args = '' ) {
     757function bbp_list_forums( $args = array() ) {
    758758
    759759    // Define used variables
     
    20362036 * @uses bbp_get_single_forum_description() Return the eventual output
    20372037 */
    2038 function bbp_single_forum_description( $args = '' ) {
     2038function bbp_single_forum_description( $args = array() ) {
    20392039    echo bbp_get_single_forum_description( $args );
    20402040}
     
    20452045     * @since bbPress (r2860)
    20462046     *
    2047      * @param mixed $args This function supports these arguments:
     2047     * @param array $args This function supports these arguments:
    20482048     *  - forum_id: Forum id
    20492049     *  - before: Before the text
     
    20612061     * @return string Filtered forum description
    20622062     */
    2063     function bbp_get_single_forum_description( $args = '' ) {
     2063    function bbp_get_single_forum_description( $args = array() ) {
    20642064
    20652065        // Parse arguments against default values
     
    24252425 * @uses bbp_get_form_forum_type() To get the topic's forum id
    24262426 */
    2427 function bbp_form_forum_type_dropdown( $args = '' ) {
     2427function bbp_form_forum_type_dropdown( $args = array() ) {
    24282428    echo bbp_get_form_forum_type_dropdown( $args );
    24292429}
     
    24432443     * @return string HTML select list for selecting forum type
    24442444     */
    2445     function bbp_get_form_forum_type_dropdown( $args = '' ) {
     2445    function bbp_get_form_forum_type_dropdown( $args = array() ) {
    24462446
    24472447        // Backpat for handling passing of a forum ID as integer
     
    25172517 * @uses bbp_get_form_forum_status() To get the topic's forum id
    25182518 */
    2519 function bbp_form_forum_status_dropdown( $args = '' ) {
     2519function bbp_form_forum_status_dropdown( $args = array() ) {
    25202520    echo bbp_get_form_forum_status_dropdown( $args );
    25212521}
     
    25352535     * @return string HTML select list for selecting forum status
    25362536     */
    2537     function bbp_get_form_forum_status_dropdown( $args = '' ) {
     2537    function bbp_get_form_forum_status_dropdown( $args = array() ) {
    25382538
    25392539        // Backpat for handling passing of a forum ID
     
    26092609 * @uses bbp_get_form_forum_visibility() To get the topic's forum id
    26102610 */
    2611 function bbp_form_forum_visibility_dropdown( $args = '' ) {
     2611function bbp_form_forum_visibility_dropdown( $args = array() ) {
    26122612    echo bbp_get_form_forum_visibility_dropdown( $args );
    26132613}
     
    26272627     * @return string HTML select list for selecting forum visibility
    26282628     */
    2629     function bbp_get_form_forum_visibility_dropdown( $args = '' ) {
     2629    function bbp_get_form_forum_visibility_dropdown( $args = array() ) {
    26302630
    26312631        // Backpat for handling passing of a forum ID
  • trunk/src/includes/replies/capabilities.php

    r5079 r5676  
    3737 * @param string $cap Capability name
    3838 * @param int $user_id User id
    39  * @param mixed $args Arguments
     39 * @param array $args Arguments
    4040 * @uses get_post() To get the post
    4141 * @uses get_post_type_object() To get the post type object
  • trunk/src/includes/replies/functions.php

    r5658 r5676  
    12001200 * @since bbPress (r2782)
    12011201 *
    1202  * @param mixed $args Supports these args:
     1202 * @param array $args Supports these args:
    12031203 *  - reply_id: reply id
    12041204 *  - author_id: Author id
     
    12111211 * @return mixed False on failure, true on success
    12121212 */
    1213 function bbp_update_reply_revision_log( $args = '' ) {
     1213function bbp_update_reply_revision_log( $args = array() ) {
    12141214
    12151215    // Parse arguments against default values
  • trunk/src/includes/replies/template.php

    r5675 r5676  
    9999 * @since bbPress (r2553)
    100100 *
    101  * @param mixed $args All the arguments supported by {@link WP_Query}
     101 * @param array $args All the arguments supported by {@link WP_Query}
    102102 * @uses bbp_show_lead_topic() Are we showing the topic as a lead?
    103103 * @uses bbp_get_topic_id() To get the topic id
     
    119119 * @return object Multidimensional array of reply information
    120120 */
    121 function bbp_has_replies( $args = '' ) {
     121function bbp_has_replies( $args = array() ) {
    122122    global $wp_rewrite;
    123123
     
    12031203 * @since bbPress (r2717)
    12041204 *
    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.
    12061206 * @uses bbp_get_reply_author_link() To get the reply author link
    12071207 */
    1208 function bbp_reply_author_link( $args = '' ) {
     1208function bbp_reply_author_link( $args = array() ) {
    12091209    echo bbp_get_reply_author_link( $args );
    12101210}
     
    12141214     * @since bbPress (r2717)
    12151215     *
    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.
    12171217     * @uses bbp_get_reply_id() To get the reply id
    12181218     * @uses bbp_is_reply_anonymous() To check if the reply is by an
     
    12281228     * @return string Author link of reply
    12291229     */
    1230     function bbp_get_reply_author_link( $args = '' ) {
     1230    function bbp_get_reply_author_link( $args = array() ) {
    12311231
    12321232        // Parse arguments against default values
     
    19361936 * @since bbPress (r2740)
    19371937 *
    1938  * @param mixed $args See {@link bbp_get_reply_edit_link()}
     1938 * @param array $args See {@link bbp_get_reply_edit_link()}
    19391939 * @uses bbp_get_reply_edit_link() To get the reply edit link
    19401940 */
    1941 function bbp_reply_edit_link( $args = '' ) {
     1941function bbp_reply_edit_link( $args = array() ) {
    19421942    echo bbp_get_reply_edit_link( $args );
    19431943}
     
    19481948     * @since bbPress (r2740)
    19491949     *
    1950      * @param mixed $args This function supports these arguments:
     1950     * @param array $args This function supports these arguments:
    19511951     *  - id: Reply id
    19521952     *  - link_before: HTML before the link
     
    19621962     * @return string Reply edit link
    19631963     */
    1964     function bbp_get_reply_edit_link( $args = '' ) {
     1964    function bbp_get_reply_edit_link( $args = array() ) {
    19651965
    19661966        // Parse arguments against default values
     
    20522052 * @since bbPress (r2740)
    20532053 *
    2054  * @param mixed $args See {@link bbp_get_reply_trash_link()}
     2054 * @param array $args See {@link bbp_get_reply_trash_link()}
    20552055 * @uses bbp_get_reply_trash_link() To get the reply trash link
    20562056 */
    2057 function bbp_reply_trash_link( $args = '' ) {
     2057function bbp_reply_trash_link( $args = array() ) {
    20582058    echo bbp_get_reply_trash_link( $args );
    20592059}
     
    20642064     * @since bbPress (r2740)
    20652065     *
    2066      * @param mixed $args This function supports these arguments:
     2066     * @param array $args This function supports these arguments:
    20672067     *  - id: Reply id
    20682068     *  - link_before: HTML before the link
     
    20862086     * @return string Reply trash link
    20872087     */
    2088     function bbp_get_reply_trash_link( $args = '' ) {
     2088    function bbp_get_reply_trash_link( $args = array() ) {
    20892089
    20902090        // Parse arguments against default values
     
    21282128 * @since bbPress (r2740)
    21292129 *
    2130  * @param mixed $args See {@link bbp_get_reply_spam_link()}
     2130 * @param array $args See {@link bbp_get_reply_spam_link()}
    21312131 * @uses bbp_get_reply_spam_link() To get the reply spam link
    21322132 */
    2133 function bbp_reply_spam_link( $args = '' ) {
     2133function bbp_reply_spam_link( $args = array() ) {
    21342134    echo bbp_get_reply_spam_link( $args );
    21352135}
     
    21402140     * @since bbPress (r2740)
    21412141     *
    2142      * @param mixed $args This function supports these arguments:
     2142     * @param array $args This function supports these arguments:
    21432143     *  - id: Reply id
    21442144     *  - link_before: HTML before the link
     
    21592159     * @return string Reply spam link
    21602160     */
    2161     function bbp_get_reply_spam_link( $args = '' ) {
     2161    function bbp_get_reply_spam_link( $args = array() ) {
    21622162
    21632163        // Parse arguments against default values
     
    21912191 * @since bbPress (r4521)
    21922192 *
    2193  * @param mixed $args See {@link bbp_get_reply_move_link()}
     2193 * @param array $args See {@link bbp_get_reply_move_link()}
    21942194 * @uses bbp_get_reply_move_link() To get the reply move link
    21952195 */
    2196 function bbp_reply_move_link( $args = '' ) {
     2196function bbp_reply_move_link( $args = array() ) {
    21972197    echo bbp_get_reply_move_link( $args );
    21982198}
     
    22052205     * @since bbPress (r4521)
    22062206     *
    2207      * @param mixed $args This function supports these arguments:
     2207     * @param array $args This function supports these arguments:
    22082208     *  - id: Reply id
    22092209     *  - link_before: HTML before the link
     
    22242224     * @return string Reply move link
    22252225     */
    2226     function bbp_get_reply_move_link( $args = '' ) {
     2226    function bbp_get_reply_move_link( $args = array() ) {
    22272227
    22282228        // Parse arguments against default values
     
    22592259 * @since bbPress (r2756)
    22602260 *
    2261  * @param mixed $args See {@link bbp_get_topic_split_link()}
     2261 * @param array $args See {@link bbp_get_topic_split_link()}
    22622262 * @uses bbp_get_topic_split_link() To get the topic split link
    22632263 */
    2264 function bbp_topic_split_link( $args = '' ) {
     2264function bbp_topic_split_link( $args = array() ) {
    22652265    echo bbp_get_topic_split_link( $args );
    22662266}
     
    22732273     * @since bbPress (r2756)
    22742274     *
    2275      * @param mixed $args This function supports these arguments:
     2275     * @param array $args This function supports these arguments:
    22762276     *  - id: Reply id
    22772277     *  - link_before: HTML before the link
     
    22922292     * @return string Topic split link
    22932293     */
    2294     function bbp_get_topic_split_link( $args = '' ) {
     2294    function bbp_get_topic_split_link( $args = array() ) {
    22952295
    22962296        // Parse arguments against default values
     
    23252325 * @since bbPress (r5507)
    23262326 *
    2327  * @param mixed $args See {@link bbp_get_reply_approve_link()}
     2327 * @param array $args See {@link bbp_get_reply_approve_link()}
    23282328 * @uses bbp_get_reply_approve_link() To get the reply approve link
    23292329 */
    2330 function bbp_reply_approve_link( $args = '' ) {
     2330function bbp_reply_approve_link( $args = array() ) {
    23312331    echo bbp_get_reply_approve_link( $args );
    23322332}
     
    23372337     * @since bbPress (r5507)
    23382338     *
    2339      * @param mixed $args This function supports these args:
     2339     * @param array $args This function supports these args:
    23402340     *  - id: Optional. Reply id
    23412341     *  - link_before: Before the link
     
    23552355     * @return string Reply approve link
    23562356     */
    2357     function bbp_get_reply_approve_link( $args = '' ) {
     2357    function bbp_get_reply_approve_link( $args = array() ) {
    23582358
    23592359        // Parse arguments against default values
     
    27692769 *  - selected: Override the selected option
    27702770 */
    2771 function bbp_form_reply_status_dropdown( $args = '' ) {
     2771function bbp_form_reply_status_dropdown( $args = array() ) {
    27722772    echo bbp_get_form_reply_status_dropdown( $args );
    27732773}
     
    27872787     *  - selected: Override the selected option
    27882788     */
    2789     function bbp_get_form_reply_status_dropdown( $args = '' ) {
     2789    function bbp_get_form_reply_status_dropdown( $args = array() ) {
    27902790
    27912791        // Parse arguments against default values
  • trunk/src/includes/search/template.php

    r5505 r5676  
    1818 * @since bbPress (r4579)
    1919 *
    20  * @param mixed $args All the arguments supported by {@link WP_Query}
     20 * @param array $args All the arguments supported by {@link WP_Query}
    2121 * @uses bbp_get_view_all() Are we showing all results?
    2222 * @uses bbp_get_public_status_id() To get the public status id
     
    3939 * @return object Multidimensional array of search information
    4040 */
    41 function bbp_has_search_results( $args = '' ) {
     41function bbp_has_search_results( $args = array() ) {
    4242    global $wp_rewrite;
    4343
  • trunk/src/includes/topics/capabilities.php

    r5443 r5676  
    5555 * @param string $cap Capability name
    5656 * @param int $user_id User id
    57  * @param mixed $args Arguments
     57 * @param array $args Arguments
    5858 * @uses get_post() To get the post
    5959 * @uses get_post_type_object() To get the post type object
     
    213213 * @param string $cap Capability name
    214214 * @param int $user_id User id
    215  * @param mixed $args Arguments
     215 * @param array $args Arguments
    216216 * @uses apply_filters() Filter capability map results
    217217 * @return array Actual capabilities for meta capability
  • trunk/src/includes/topics/functions.php

    r5669 r5676  
    27182718 * @since bbPress (r2782)
    27192719 *
    2720  * @param mixed $args Supports these args:
     2720 * @param array $args Supports these args:
    27212721 *  - topic_id: Topic id
    27222722 *  - author_id: Author id
     
    27292729 * @return mixed False on failure, true on success
    27302730 */
    2731 function bbp_update_topic_revision_log( $args = '' ) {
     2731function bbp_update_topic_revision_log( $args = array() ) {
    27322732
    27332733    // Parse arguments against default values
  • trunk/src/includes/topics/template.php

    r5674 r5676  
    118118 * @since bbPress (r2485)
    119119 *
    120  * @param mixed $args All the arguments supported by {@link WP_Query}
     120 * @param array $args All the arguments supported by {@link WP_Query}
    121121 * @uses current_user_can() To check if the current user can edit other's topics
    122122 * @uses bbp_get_topic_post_type() To get the topic post type
     
    139139 * @return object Multidimensional array of topic information
    140140 */
    141 function bbp_has_topics( $args = '' ) {
     141function bbp_has_topics( $args = array() ) {
    142142    global $wp_rewrite;
    143143
     
    835835 * @since bbPress (r2966)
    836836 *
    837  * @param mixed $args See {@link bbp_get_topic_pagination()}
     837 * @param array $args See {@link bbp_get_topic_pagination()}
    838838 * @uses bbp_get_topic_pagination() To get the topic pagination links
    839839 */
    840 function bbp_topic_pagination( $args = '' ) {
     840function bbp_topic_pagination( $args = array() ) {
    841841    echo bbp_get_topic_pagination( $args );
    842842}
     
    846846     * @since bbPress (r2966)
    847847     *
    848      * @param mixed $args This function supports these arguments:
     848     * @param array $args This function supports these arguments:
    849849     *  - topic_id: Topic id
    850850     *  - before: Before the links
     
    865865     * @return string Pagination links
    866866     */
    867     function bbp_get_topic_pagination( $args = '' ) {
     867    function bbp_get_topic_pagination( $args = array() ) {
    868868        global $wp_rewrite;
    869869
     
    14841484 * @uses bbp_get_topic_author_link() To get the topic author link
    14851485 */
    1486 function bbp_topic_author_link( $args = '' ) {
     1486function bbp_topic_author_link( $args = array() ) {
    14871487    echo bbp_get_topic_author_link( $args );
    14881488}
     
    15081508     * @return string Author link of topic
    15091509     */
    1510     function bbp_get_topic_author_link( $args = '' ) {
     1510    function bbp_get_topic_author_link( $args = array() ) {
    15111511
    15121512        // Parse arguments against default values
     
    23382338 *
    23392339 * @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()}
    23412341 * @uses bbp_get_topic_tag_list() To get the topic tag list
    23422342 */
     
    25292529 * @since bbPress (r2727)
    25302530 *
    2531  * @param mixed $args See {@link bbp_get_topic_edit_link()}
     2531 * @param array $args See {@link bbp_get_topic_edit_link()}
    25322532 * @uses bbp_get_topic_edit_link() To get the topic edit link
    25332533 */
    2534 function bbp_topic_edit_link( $args = '' ) {
     2534function bbp_topic_edit_link( $args = array() ) {
    25352535    echo bbp_get_topic_edit_link( $args );
    25362536}
     
    25412541     * @since bbPress (r2727)
    25422542     *
    2543      * @param mixed $args This function supports these args:
     2543     * @param array $args This function supports these args:
    25442544     *  - id: Optional. Topic id
    25452545     *  - link_before: Before the link
     
    25552555     * @return string Topic edit link
    25562556     */
    2557     function bbp_get_topic_edit_link( $args = '' ) {
     2557    function bbp_get_topic_edit_link( $args = array() ) {
    25582558
    25592559        // Parse arguments against default values
     
    26462646 * @since bbPress (r2727)
    26472647 *
    2648  * @param mixed $args See {@link bbp_get_topic_trash_link()}
     2648 * @param array $args See {@link bbp_get_topic_trash_link()}
    26492649 * @uses bbp_get_topic_trash_link() To get the topic trash link
    26502650 */
    2651 function bbp_topic_trash_link( $args = '' ) {
     2651function bbp_topic_trash_link( $args = array() ) {
    26522652    echo bbp_get_topic_trash_link( $args );
    26532653}
     
    26582658     * @since bbPress (r2727)
    26592659     *
    2660      * @param mixed $args This function supports these args:
     2660     * @param array $args This function supports these args:
    26612661     *  - id: Optional. Topic id
    26622662     *  - link_before: Before the link
     
    26792679     * @return string Topic trash link
    26802680     */
    2681     function bbp_get_topic_trash_link( $args = '' ) {
     2681    function bbp_get_topic_trash_link( $args = array() ) {
    26822682
    26832683        // Parse arguments against default values
     
    27212721 * @since bbPress (r2727)
    27222722 *
    2723  * @param mixed $args See {@link bbp_get_topic_close_link()}
     2723 * @param array $args See {@link bbp_get_topic_close_link()}
    27242724 * @uses bbp_get_topic_close_link() To get the topic close link
    27252725 */
    2726 function bbp_topic_close_link( $args = '' ) {
     2726function bbp_topic_close_link( $args = array() ) {
    27272727    echo bbp_get_topic_close_link( $args );
    27282728}
     
    27332733     * @since bbPress (r2727)
    27342734     *
    2735      * @param mixed $args This function supports these args:
     2735     * @param array $args This function supports these args:
    27362736     *  - id: Optional. Topic id
    27372737     *  - link_before: Before the link
     
    27502750     * @return string Topic close link
    27512751     */
    2752     function bbp_get_topic_close_link( $args = '' ) {
     2752    function bbp_get_topic_close_link( $args = array() ) {
    27532753
    27542754        // Parse arguments against default values
     
    27812781 * @since bbPress (r5504)
    27822782 *
    2783  * @param mixed $args See {@link bbp_get_topic_approve_link()}
     2783 * @param array $args See {@link bbp_get_topic_approve_link()}
    27842784 * @uses bbp_get_topic_approve_link() To get the topic approve link
    27852785 */
    2786 function bbp_topic_approve_link( $args = '' ) {
     2786function bbp_topic_approve_link( $args = array() ) {
    27872787    echo bbp_get_topic_approve_link( $args );
    27882788}
     
    27932793     * @since bbPress (r5504)
    27942794     *
    2795      * @param mixed $args This function supports these args:
     2795     * @param array $args This function supports these args:
    27962796     *  - id: Optional. Topic id
    27972797     *  - link_before: Before the link
     
    28112811     * @return string Topic approve link
    28122812     */
    2813     function bbp_get_topic_approve_link( $args = '' ) {
     2813    function bbp_get_topic_approve_link( $args = array() ) {
    28142814
    28152815        // Parse arguments against default values
     
    28422842 * @since bbPress (r2754)
    28432843 *
    2844  * @param mixed $args See {@link bbp_get_topic_stick_link()}
     2844 * @param array $args See {@link bbp_get_topic_stick_link()}
    28452845 * @uses bbp_get_topic_stick_link() To get the topic stick link
    28462846 */
    2847 function bbp_topic_stick_link( $args = '' ) {
     2847function bbp_topic_stick_link( $args = array() ) {
    28482848    echo bbp_get_topic_stick_link( $args );
    28492849}
     
    28542854     * @since bbPress (r2754)
    28552855     *
    2856      * @param mixed $args This function supports these args:
     2856     * @param array $args This function supports these args:
    28572857     *  - id: Optional. Topic id
    28582858     *  - link_before: Before the link
     
    28732873     * @return string Topic stick link
    28742874     */
    2875     function bbp_get_topic_stick_link( $args = '' ) {
     2875    function bbp_get_topic_stick_link( $args = array() ) {
    28762876
    28772877        // Parse arguments against default values
     
    29192919 * @since bbPress (r2756)
    29202920 *
    2921  * @param mixed $args
     2921 * @param array $args
    29222922 * @uses bbp_get_topic_merge_link() To get the topic merge link
    29232923 */
    2924 function bbp_topic_merge_link( $args = '' ) {
     2924function bbp_topic_merge_link( $args = array() ) {
    29252925    echo bbp_get_topic_merge_link( $args );
    29262926}
     
    29312931     * @since bbPress (r2756)
    29322932     *
    2933      * @param mixed $args This function supports these args:
     2933     * @param array $args This function supports these args:
    29342934     *  - id: Optional. Topic id
    29352935     *  - link_before: Before the link
     
    29452945     * @return string Topic merge link
    29462946     */
    2947     function bbp_get_topic_merge_link( $args = '' ) {
     2947    function bbp_get_topic_merge_link( $args = array() ) {
    29482948
    29492949        // Parse arguments against default values
     
    29722972 * @since bbPress (r2727)
    29732973 *
    2974  * @param mixed $args See {@link bbp_get_topic_spam_link()}
     2974 * @param array $args See {@link bbp_get_topic_spam_link()}
    29752975 * @uses bbp_get_topic_spam_link() Topic spam link
    29762976 */
    2977 function bbp_topic_spam_link( $args = '' ) {
     2977function bbp_topic_spam_link( $args = array() ) {
    29782978    echo bbp_get_topic_spam_link( $args );
    29792979}
     
    29842984     * @since bbPress (r2727)
    29852985     *
    2986      * @param mixed $args This function supports these args:
     2986     * @param array $args This function supports these args:
    29872987     *  - id: Optional. Topic id
    29882988     *  - link_before: Before the link
     
    30013001     * @return string Topic spam link
    30023002     */
    3003     function bbp_get_topic_spam_link( $args = '' ) {
     3003    function bbp_get_topic_spam_link( $args = array() ) {
    30043004
    30053005        // Parse arguments against default values
     
    32183218 *  - selected: Override the selected option
    32193219 */
    3220 function bbp_topic_type_select( $args = '' ) {
     3220function bbp_topic_type_select( $args = array() ) {
    32213221    echo bbp_get_form_topic_type_dropdown( $args );
    32223222}
     
    32333233 *  - selected: Override the selected option
    32343234 */
    3235 function bbp_form_topic_type_dropdown( $args = '' ) {
     3235function bbp_form_topic_type_dropdown( $args = array() ) {
    32363236    echo bbp_get_form_topic_type_dropdown( $args );
    32373237}
     
    32523252     * @uses bbp_is_topic_sticky() To check if the topic is a sticky
    32533253     */
    3254     function bbp_get_form_topic_type_dropdown( $args = '' ) {
     3254    function bbp_get_form_topic_type_dropdown( $args = array() ) {
    32553255
    32563256        // Parse arguments against default values
     
    33233323 *  - selected: Override the selected option
    33243324 */
    3325 function bbp_form_topic_status_dropdown( $args = '' ) {
     3325function bbp_form_topic_status_dropdown( $args = array() ) {
    33263326    echo bbp_get_form_topic_status_dropdown( $args );
    33273327}
     
    33413341     *  - selected: Override the selected option
    33423342     */
    3343     function bbp_get_form_topic_status_dropdown( $args = '' ) {
     3343    function bbp_get_form_topic_status_dropdown( $args = array() ) {
    33443344
    33453345        // Parse arguments against default values
     
    34063406 * @uses bbp_get_single_topic_description() Return the eventual output
    34073407 */
    3408 function bbp_single_topic_description( $args = '' ) {
     3408function bbp_single_topic_description( $args = array() ) {
    34093409    echo bbp_get_single_topic_description( $args );
    34103410}
     
    34153415     * @since bbPress (r2860)
    34163416     *
    3417      * @param mixed $args This function supports these arguments:
     3417     * @param array $args This function supports these arguments:
    34183418     *  - topic_id: Topic id
    34193419     *  - before: Before the text
     
    34303430     * @return string Filtered topic description
    34313431     */
    3432     function bbp_get_single_topic_description( $args = '' ) {
     3432    function bbp_get_single_topic_description( $args = array() ) {
    34333433
    34343434        // Parse arguments against default values
  • trunk/src/includes/users/capabilities.php

    r5591 r5676  
    1818 * @param string $cap Capability name
    1919 * @param int $user_id User id
    20  * @param mixed $args Arguments
     20 * @param array $args Arguments
    2121 * @uses apply_filters() Filter mapped results
    2222 * @return array Actual capabilities for meta capability
  • trunk/src/includes/users/template.php

    r5661 r5676  
    533533 * @since bbPress (r2827)
    534534 *
    535  * @param mixed $args Optional. See {@link bbp_get_admin_link()}
     535 * @param array $args Optional. See {@link bbp_get_admin_link()}
    536536 * @uses bbp_get_admin_link() To get the admin link
    537537 */
    538 function bbp_admin_link( $args = '' ) {
     538function bbp_admin_link( $args = array() ) {
    539539    echo bbp_get_admin_link( $args );
    540540}
     
    544544     * @since bbPress (r2827)
    545545     *
    546      * @param mixed $args Optional. This function supports these arguments:
     546     * @param array $args Optional. This function supports these arguments:
    547547     *  - text: The text
    548548     *  - before: Before the lnk
     
    553553     * @return The link
    554554     */
    555     function bbp_get_admin_link( $args = '' ) {
     555    function bbp_get_admin_link( $args = array() ) {
    556556        if ( ! current_user_can( 'moderate' ) ) {
    557557            return;
     
    581581 * @since bbPress (r3120)
    582582 *
    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.
    584584 * @uses bbp_get_author_ip() To get the post author link
    585585 */
    586 function bbp_author_ip( $args = '' ) {
     586function bbp_author_ip( $args = array() ) {
    587587    echo bbp_get_author_ip( $args );
    588588}
     
    592592     * @since bbPress (r3120)
    593593     *
    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.
    595595     * @uses get_post_meta() To check if it's a topic page
    596596     * @return string Author link of reply
    597597     */
    598     function bbp_get_author_ip( $args = '' ) {
     598    function bbp_get_author_ip( $args = array() ) {
    599599
    600600        // Used as post id
     
    859859 * @since bbPress (r2652)
    860860 *
    861  * @param mixed $args See {@link bbp_get_user_favorites_link()}
     861 * @param array $args See {@link bbp_get_user_favorites_link()}
    862862 * @param int $user_id Optional. User id
    863863 * @param bool $wrap Optional. If you want to wrap the link in <span id="favorite-toggle">.
     
    875875     * @since bbPress (r2652)
    876876     *
    877      * @param mixed $args This function supports these arguments:
     877     * @param array $args This function supports these arguments:
    878878     *  - subscribe: Favorite text
    879879     *  - unsubscribe: Unfavorite text
     
    896896     * @return string User favorites link
    897897     */
    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 ) {
    899899        if ( ! bbp_is_favorites_active() ) {
    900900            return false;
     
    10241024 * @since bbPress (r2668)
    10251025 *
    1026  * @param mixed $args See {@link bbp_get_user_subscribe_link()}
     1026 * @param array $args See {@link bbp_get_user_subscribe_link()}
    10271027 * @param int $user_id Optional. User id
    10281028 * @param bool $wrap Optional. If you want to wrap the link in <span id="subscription-toggle">.
    10291029 * @uses bbp_get_user_subscribe_link() To get the subscribe link
    10301030 */
    1031 function bbp_user_subscribe_link( $args = '', $user_id = 0, $wrap = true ) {
     1031function bbp_user_subscribe_link( $args = array(), $user_id = 0, $wrap = true ) {
    10321032    echo bbp_get_user_subscribe_link( $args, $user_id, $wrap );
    10331033}
     
    10371037     * @since bbPress (r2668)
    10381038     *
    1039      * @param mixed $args This function supports these arguments:
     1039     * @param array $args This function supports these arguments:
    10401040     *  - subscribe: Subscribe text
    10411041     *  - unsubscribe: Unsubscribe text
     
    10621062     * @return string Permanent link to topic
    10631063     */
    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 ) {
    10651065        if ( ! bbp_is_subscriptions_active() ) {
    10661066            return;
     
    16821682 * @since bbPress (r2875)
    16831683 *
    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.
    16851685 * @uses bbp_get_author_link() To get the post author link
    16861686 */
    1687 function bbp_author_link( $args = '' ) {
     1687function bbp_author_link( $args = array() ) {
    16881688    echo bbp_get_author_link( $args );
    16891689}
     
    16931693     * @since bbPress (r2875)
    16941694     *
    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.
    16961696     * @uses bbp_is_topic() To check if it's a topic page
    16971697     * @uses bbp_get_topic_author_link() To get the topic author link
     
    17081708     * @return string Author link of reply
    17091709     */
    1710     function bbp_get_author_link( $args = '' ) {
     1710    function bbp_get_author_link( $args = array() ) {
    17111711
    17121712        $post_id = is_numeric( $args ) ? (int) $args : 0;
     
    17971797 * @return bool
    17981798 */
    1799 function bbp_user_can_view_forum( $args = '' ) {
     1799function bbp_user_can_view_forum( $args = array() ) {
    18001800
    18011801    // Parse arguments against default values
Note: See TracChangeset for help on using the changeset viewer.