Skip to:
Content

BuddyPress.org

Changeset 12008


Ignore:
Timestamp:
04/28/2018 01:32:52 AM (18 months ago)
Author:
tw2113
Message:

add/touchup documentation to a lot of Nouveau actions and filters

Location:
trunk/src
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/buddypress-functions.php

    r12002 r12008  
    117117        }
    118118
     119        /**
     120         * Fires after all of the BuddyPress Nouveau includes have been loaded. Passed by reference.
     121         *
     122         * @since 3.0.0
     123         *
     124         * @param BP_Nouveau $value Current BP_Nouveau instance.
     125         */
    119126        do_action_ref_array( 'bp_nouveau_includes', array( &$this ) );
    120127    }
     
    128135        $width         = 1300;
    129136        $top_offset    = 150;
     137
     138        /** This filter is documented in bp-core/bp-core-avatars.php. */
    130139        $avatar_height = apply_filters( 'bp_core_avatar_full_height', $top_offset );
    131140
     
    215224        }
    216225
     226        /**
     227         * Filters the BuddyPress Nouveau CSS dependencies.
     228         *
     229         * @since 3.0.0
     230         *
     231         * @param array $value Array of style dependencies. Default Dashicons.
     232         */
    217233        $css_dependencies = apply_filters( 'bp_nouveau_css_dependencies', array( 'dashicons' ) );
    218234
     235        /**
     236         * Filters the styles to enqueue for BuddyPress Nouveau.
     237         *
     238         * This filter provides a multidimensional array that will map to arguments used for wp_enqueue_style().
     239         * The primary index should have the stylesheet handle to use, and be assigned an array that has indexes for
     240         * file location, dependencies, and version.
     241         *
     242         * @since 3.0.0
     243         *
     244         * @param array $value Array of styles to enqueue.
     245         */
    219246        $styles = apply_filters( 'bp_nouveau_enqueue_styles', array(
    220247            'bp-nouveau' => array(
     
    270297        unset( $dependencies[ $bp_confirm ] );
    271298
     299        /**
     300         * Filters the scripts to enqueue for BuddyPress Nouveau.
     301         *
     302         * This filter provides a multidimensional array that will map to arguments used for wp_register_script().
     303         * The primary index should have the script handle to use, and be assigned an array that has indexes for
     304         * file location, dependencies, version and if it should load in the footer or not.
     305         *
     306         * @since 3.0.0
     307         *
     308         * @param array $value Array of scripts to register.
     309         */
    272310        $scripts = apply_filters( 'bp_nouveau_register_scripts', array(
    273311            'bp-nouveau' => array(
     
    337375        }
    338376
     377        /**
     378         * Fires after all of the BuddyPress Nouveau scripts have been enqueued.
     379         *
     380         * @since 3.0.0
     381         */
    339382        do_action( 'bp_nouveau_enqueue_scripts' );
    340383    }
     
    390433        }
    391434
    392         // Set the supported components
     435        /**
     436         * Filters the supported BuddyPress Nouveau components.
     437         *
     438         * @since 3.0.0
     439         *
     440         * @param array $value Array of supported components.
     441         */
    393442        $supported_objects = (array) apply_filters( 'bp_nouveau_supported_components', bp_core_get_packaged_component_ids() );
    394443        $object_nonces     = array();
     
    421470         * @since 3.0.0
    422471         *
    423          * @param array $value Array of key/value pairs for AJAX usage.
     472         * @param array $params Array of key/value pairs for AJAX usage.
    424473         */
    425474        wp_localize_script( 'bp-nouveau', 'BP_Nouveau', apply_filters( 'bp_core_get_js_strings', $params ) );
     
    442491         * Filters whether or not we are looking at a directory to determine if to return early.
    443492         *
    444          * @since 2.2.0
     493         * @since 3.0.0
    445494         *
    446495         * @param bool $value Whether or not we are viewing a directory.
  • trunk/src/bp-templates/bp-nouveau/buddypress/assets/_attachments/avatars/index.php

    r11719 r12008  
    3838        <button type="button" class="button edit" id="bp-delete-avatar"><?php esc_html_e( 'Delete Group Profile Photo', 'buddypress' ); ?></button>
    3939    <# } else { #>
    40         <?php do_action( 'bp_attachments_avatar_delete_template' ); ?>
     40        <?php
     41            /**
     42             * Fires inside the avatar delete frontend template markup if no other data.object condition is met.
     43             *
     44             * @since 3.0.0
     45             */
     46            do_action( 'bp_attachments_avatar_delete_template' ); ?>
    4147    <# } #>
    4248</script>
    4349
    44 <?php do_action( 'bp_attachments_avatar_main_template' ); ?>
     50<?php
     51    /**
     52     * Fires after the avatar main frontend template markup.
     53     *
     54     * @since 3.0.0
     55     */
     56    do_action( 'bp_attachments_avatar_main_template' ); ?>
  • trunk/src/bp-templates/bp-nouveau/buddypress/assets/_attachments/cover-images/index.php

    r11719 r12008  
    2727        <button type="button" class="button edit" id="bp-delete-cover-image"><?php esc_html_e( 'Delete Group Cover Image', 'buddypress' ); ?></button>
    2828    <# } else { #>
    29         <?php do_action( 'bp_attachments_cover_image_delete_template' ); ?>
     29        <?php
     30            /**
     31             * Fires inside the cover image delete frontend template markup if no other data.object condition is met.
     32             *
     33             * @since 3.0.0
     34             */
     35            do_action( 'bp_attachments_cover_image_delete_template' ); ?>
    3036    <# } #>
    3137</script>
    3238
    33 <?php do_action( 'bp_attachments_cover_image_main_template' ); ?>
     39<?php
     40    /**
     41     * Fires after the cover image main frontend template markup.
     42     *
     43     * @since 3.0.0
     44     */
     45    do_action( 'bp_attachments_cover_image_main_template' ); ?>
  • trunk/src/bp-templates/bp-nouveau/includes/activity/ajax.php

    r11903 r12008  
    439439        wp_send_json_success( array_map( 'bp_nouveau_prepare_group_for_js', $groups['groups'] ) );
    440440    } else {
     441
     442        /**
     443         * Filters the response for custom activity objects.
     444         *
     445         * @since 3.0.0
     446         *
     447         * @param array $response Array of custom response objects to send to AJAX return.
     448         * @param array $value    Activity object type from $_POST global.
     449         */
    441450        $response = apply_filters( 'bp_nouveau_get_activity_custom_objects', $response, $_POST['type'] );
    442451    }
     
    544553        'message'      => sprintf( __( 'Update posted <a href="%s" class="just-posted">View activity</a>', 'buddypress' ), esc_url( bp_activity_get_permalink( $activity_id ) ) ),
    545554        'activity'     => $acivity,
     555
     556        /**
     557         * Filters whether or not an AJAX post update is private.
     558         *
     559         * @since 3.0.0
     560         *
     561         * @param string/bool $is_private Privacy status for the update.
     562         */
    546563        'is_private'   => apply_filters( 'bp_nouveau_ajax_post_update_is_private', $is_private ),
    547564        'is_directory' => bp_is_activity_directory(),
  • trunk/src/bp-templates/bp-nouveau/includes/activity/functions.php

    r12002 r12008  
    9090
    9191    /**
    92      * Filter to include specific Action buttons.
     92     * Filters the included, specific, Action buttons.
    9393     *
    9494     * @since 3.0.0
     
    145145        }
    146146
     147        /**
     148         * Filters the activity objects to apply for localized javascript data.
     149         *
     150         * @since 3.0.0
     151         *
     152         * @param array $activity_objects Array of activity objects.
     153         */
    147154        $activity_params['objects'] = apply_filters( 'bp_nouveau_activity_objects', $activity_objects );
    148155    }
     
    276283
    277284    /**
     285     * Filters the activity directory navigation items.
     286     *
    278287     * Use this filter to introduce your custom nav items for the activity directory.
    279288     *
     
    418427
    419428        // Leave other components do their specific stuff if needed.
     429        /**
     430         * Filters the classes to be applied to the newest activity item.
     431         *
     432         * Leave other components do their specific stuff if needed.
     433         *
     434         * @since 3.0.0
     435         *
     436         * @param array  $my_classes Array of classes to output to class attribute.
     437         * @param string $scope      Current scope for the activity type.
     438         */
    420439        $my_classes = (array) apply_filters( 'bp_nouveau_activity_scope_newest_class', $my_classes, $scope );
    421440
     
    444463
    445464    /**
    446      * Filter to edit the activity widget arguments
     465     * Filter to edit the activity widget arguments.
    447466     *
    448467     * @since 3.0.0
    449468     *
    450      * @param  array $args The activity arguments.
     469     * @param array $args The activity arguments.
    451470     */
    452471    return apply_filters( 'bp_nouveau_activity_widget_query', $args );
  • trunk/src/bp-templates/bp-nouveau/includes/activity/template-tags.php

    r11989 r12008  
    1818     * Fires at the begining of the templates BP injected content.
    1919     *
    20      * @since 2.3.0 (BuddyPress)
     20     * @since 2.3.0
    2121     */
    2222    do_action( 'bp_before_directory_activity' );
     
    2525     * Fires before the activity directory display content.
    2626     *
    27      * @since 1.2.0 (BuddyPress)
     27     * @since 1.2.0
    2828     */
    2929    do_action( 'bp_before_directory_activity_content' );
     
    176176     * Fires after the display of an activity entry content.
    177177     *
    178      * @since 1.2.0 (BuddyPress)
     178     * @since 1.2.0
    179179     */
    180180    do_action( 'bp_activity_entry_content' );
     
    196196     * Fires at the end of the activity entry meta data area.
    197197     *
    198      * @since 1.2.0 (BuddyPress)
     198     * @since 1.2.0
    199199     */
    200200    do_action( 'bp_activity_entry_meta' );
     
    586586     * Filters the opening tag for the template that lists activity comments.
    587587     *
    588      * @since 1.6.0 (BuddyPress)
     588     * @since 1.6.0
    589589     *
    590590     * @param string $value Opening tag for the HTML markup to use.
     
    600600         * Fires before the display of an activity comment.
    601601         *
    602          * @since 1.5.0 (BuddyPress)
     602         * @since 1.5.0
    603603         */
    604604        do_action( 'bp_before_activity_comment' );
     
    609609         * Fires after the display of an activity comment.
    610610         *
    611          * @since 1.5.0 (BuddyPress)
     611         * @since 1.5.0
    612612         */
    613613        do_action( 'bp_after_activity_comment' );
     
    619619     * Filters the closing tag for the template that list activity comments.
    620620     *
    621      * @since 1.6.0 (BuddyPress)
     621     * @since 1.6.0
    622622     *
    623623     * @param string $value Closing tag for the HTML markup to use.
     
    672672     * Fires after the activity entry comment form.
    673673     *
    674      * @since 1.5.0 (BuddyPress)
     674     * @since 1.5.0
    675675     */
    676676    do_action( 'bp_activity_entry_comments' );
     
    691691     * Fires after the defualt comment action options display.
    692692     *
    693      * @since 1.6.0 (BuddyPress)
     693     * @since 1.6.0
    694694     */
    695695    do_action( 'bp_activity_comment_options' );
  • trunk/src/bp-templates/bp-nouveau/includes/activity/widgets.php

    r11900 r12008  
    2121     */
    2222    public function __construct() {
     23
     24        /**
     25         * Filters the widget options for the BP_Latest_Activities widget.
     26         *
     27         * @since 3.0.0
     28         *
     29         * @param array $value Array of widget options.
     30         */
    2331        $widget_ops = apply_filters(
    2432            'bp_latest_activities', array(
     
    6169        }
    6270
    63         // Allow title to be filtered
     71        /**
     72         * Filters the BP_Latest_Activities widget title.
     73         *
     74         * @since 3.0.0
     75         *
     76         * @param string $title    The widget title.
     77         * @param array  $instance The settings for the particular instance of the widget.
     78         * @param string $id_base  Root ID for all widgets of this type.
     79         */
    6480        $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    6581
  • trunk/src/bp-templates/bp-nouveau/includes/ajax.php

    r11903 r12008  
    7676        }
    7777
     78        /**
     79         * Filters the browser URL for the template loader.
     80         *
     81         * @since 3.0.0
     82         *
     83         * @param string $feed_url Template feed url.
     84         * @param string $scope    Current component scope.
     85         */
    7886        $result['feed_url'] = apply_filters( 'bp_nouveau_ajax_object_template_loader', $feed_url, $scope );
    7987    }
     
    114122
    115123    $template_path = bp_locate_template( array( $template_part ), false );
     124
     125    /**
     126     * Filters the server path for the template loader.
     127     *
     128     * @since 3.0.0
     129     *
     130     * @param string Template file path.
     131     */
    116132    $template_path = apply_filters( 'bp_nouveau_object_template_path', $template_path );
    117133
  • trunk/src/bp-templates/bp-nouveau/includes/blogs/template-tags.php

    r11899 r12008  
    1919     * Fires at the begining of the templates BP injected content.
    2020     *
    21      * @since 2.3.0 (BuddyPress)
     21     * @since 2.3.0
    2222     */
    2323    do_action( 'bp_before_directory_blogs_page' );
     
    2626     * Fires before the display of the blogs.
    2727     *
    28      * @since 1.5.0 (BuddyPress)
     28     * @since 1.5.0
    2929     */
    3030    do_action( 'bp_before_directory_blogs' );
     
    3333     * Fires before the display of the blogs listing content.
    3434     *
    35      * @since 3.0.0 (BuddyPress)
     35     * @since 3.0.0
    3636     */
    3737    do_action( 'bp_before_directory_blogs_content' );
     
    4040     * Fires before the display of the blogs list tabs.
    4141     *
    42      * @since 2.3.0 (BuddyPress)
     42     * @since 2.3.0
    4343     */
    4444    do_action( 'bp_before_directory_blogs_tabs' );
     
    5454     * Fires inside and displays the blogs content.
    5555     *
    56      * @since 3.0.0 (BuddyPress)
     56     * @since 3.0.0
    5757     */
    5858    do_action( 'bp_directory_blogs_content' );
     
    6161     * Fires after the display of the blogs listing content.
    6262     *
    63      * @since 3.0.0 (BuddyPress)
     63     * @since 3.0.0
    6464     */
    6565    do_action( 'bp_after_directory_blogs_content' );
     
    6868     * Fires at the bottom of the blogs directory template file.
    6969     *
    70      * @since 1.5.0 (BuddyPress)
     70     * @since 1.5.0
    7171     */
    7272    do_action( 'bp_after_directory_blogs' );
     
    7575     * Fires at the bottom of the blogs directory template file.
    7676     *
    77      * @since 2.3.0 (BuddyPress)
     77     * @since 2.3.0
    7878     */
    7979    do_action( 'bp_after_directory_blogs_page' );
     
    114114     * Fires after the listing of a blog item in the blogs loop.
    115115     *
    116      * @since 1.2.0 (BuddyPress)
     116     * @since 1.2.0
    117117     */
    118118    do_action( 'bp_directory_blogs_item' );
  • trunk/src/bp-templates/bp-nouveau/includes/classes.php

    r11900 r12008  
    224224        }
    225225
     226        /**
     227         * Filters the nav widget args for the BP_Nouveau_Object_Nav_Widget widget.
     228         *
     229         * @since 3.0.0
     230         *
     231         * @param array $value Array of arguments {
     232         *     @param bool $bp_nouveau_widget_title Whether or not to assign a title for the widget.
     233         * }
     234         */
    226235        $item_nav_args = wp_parse_args( $instance, apply_filters( 'bp_nouveau_object_nav_widget_args', array(
    227236            'bp_nouveau_widget_title' => true,
     
    242251        }
    243252
     253        /**
     254         * Filters the BP_Nouveau_Object_Nav_Widget widget title.
     255         *
     256         * @since 3.0.0
     257         *
     258         * @param string $title    The widget title.
     259         * @param array  $instance The settings for the particular instance of the widget.
     260         * @param string $id_base  Root ID for all widgets of this type.
     261         */
    244262        $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    245263
  • trunk/src/bp-templates/bp-nouveau/includes/customizer.php

    r11899 r12008  
    2828    ) );
    2929
     30    /**
     31     * Filters the BuddyPress Nouveau customizer sections and their arguments.
     32     *
     33     * @since 3.0.0
     34     *
     35     * @param array $value Array of Customizer sections.
     36     */
    3037    $sections = apply_filters( 'bp_nouveau_customizer_sections', array(
    3138        'bp_nouveau_general_settings' => array(
     
    6673    }
    6774
     75    /**
     76     * Filters the BuddyPress Nouveau customizer settings and their arguments.
     77     *
     78     * @since 3.0.0
     79     *
     80     * @param array $value Array of Customizer settings.
     81     */
    6882    $settings = apply_filters( 'bp_nouveau_customizer_settings', array(
    6983        'bp_nouveau_appearance[avatar_style]' => array(
     
    208222    }
    209223
     224    /**
     225     * Filters the BuddyPress Nouveau customizer controls and their arguments.
     226     *
     227     * @since 3.0.0
     228     *
     229     * @param array $value Array of Customizer controls.
     230     */
    210231    $controls = apply_filters( 'bp_nouveau_customizer_controls', array(
    211232        'bp_site_avatars' => array(
     
    350371    );
    351372
     373    /**
     374     * Fires after Nouveau enqueues its required javascript.
     375     *
     376     * @since 3.0.0
     377     */
    352378    do_action( 'bp_nouveau_customizer_enqueue_scripts' );
    353379}
  • trunk/src/bp-templates/bp-nouveau/includes/functions.php

    r11977 r12008  
    363363 */
    364364function bp_nouveau_current_user_can( $capability = '' ) {
     365    /**
     366     * Filters whether or not the current user can perform an action for BuddyPress Nouveau.
     367     *
     368     * @since 3.0.0
     369     *
     370     * @param bool   $value      Whether or not the user is logged in.
     371     * @param string $capability Current capability being checked.
     372     * @param int    $value      Current logged in user ID.
     373     */
    365374    return apply_filters( 'bp_nouveau_current_user_can', is_user_logged_in(), $capability, bp_loggedin_user_id() );
    366375}
     
    386395    // Get the hook output.
    387396    ob_start();
     397
     398    /**
     399     * Fires at the start of the output for `bp_nouveau_parse_hooked_dir_nav()`.
     400     *
     401     * This hook is variable and depends on the hook parameter passed in.
     402     *
     403     * @since 3.0.0
     404     */
    388405    do_action( $hook );
    389406    $output = ob_get_clean();
     
    452469
    453470    ob_start();
     471
     472    /**
     473     * Fires at the start of the output for `bp_nouveau_parse_hooked_options()`.
     474     *
     475     * This hook is variable and depends on the hook parameter passed in.
     476     *
     477     * @since 3.0.0
     478     */
    454479    do_action( $hook );
    455480
     
    881906function bp_nouveau_get_user_feedback( $feedback_id = '' ) {
    882907    /**
    883      * Filter to add your custom feedback messages
     908     * Filters the BuddyPress Nouveau feedback messages.
     909     *
     910     * Use this filter to add your custom feedback messages.
     911     *
     912     * @since 3.0.0
    884913     *
    885914     * @param array $value The list of feedback messages.
  • trunk/src/bp-templates/bp-nouveau/includes/groups/classes.php

    r11899 r12008  
    229229                'slug'                => $this->group->slug,
    230230                'position'            => -1,
     231                /** This filter is documented in bp-groups/classes/class-bp-groups-component.php. */
    231232                'default_subnav_slug' => apply_filters( 'bp_groups_default_extension', defined( 'BP_GROUPS_DEFAULT_EXTENSION' ) ? BP_GROUPS_DEFAULT_EXTENSION : 'home' ),
    232233            ),
  • trunk/src/bp-templates/bp-nouveau/includes/groups/functions.php

    r11968 r12008  
    208208    }
    209209
     210    /**
     211     * Filters the response value for potential group invite data for use with javascript.
     212     *
     213     * @since 3.0.0
     214     *
     215     * @param array   $response Array of invite data.
     216     * @param WP_User $user User object.
     217     */
    210218    return apply_filters( 'bp_nouveau_prepare_group_potential_invites_for_js', $response, $user );
    211219}
     
    601609     * Fires after inside the group header item meta section.
    602610     *
    603      * @since 1.2.0 (BuddyPress)
     611     * @since 1.2.0
    604612     */
    605613    do_action( 'bp_group_header_meta' );
     
    843851    }
    844852
     853    /**
     854     * Filters the BuddyPress Nouveau template hierarchy after resetting front template for groups.
     855     *
     856     * @since 3.0.0
     857     *
     858     * @param array $templates Array of templates.
     859     */
    845860    return apply_filters( '_bp_nouveau_group_reset_front_template', $templates );
    846861}
     
    896911    }
    897912
     913    /**
     914     * Filters the found template parts for the group template part locating functionality.
     915     *
     916     * @since 3.0.0
     917     *
     918     * @param array $templates Array of found templates.
     919     */
    898920    return bp_locate_template( apply_filters( 'bp_nouveau_group_locate_template_part', $templates ), false, true );
    899921}
     
    916938
    917939        /**
    918          * Let plugins adding an action to bp_get_template_part get it from here
     940         * Let plugins adding an action to bp_get_template_part get it from here.
     941         *
     942         * This is a variable hook that is dependent on the template part slug.
     943         *
     944         * @since 3.0.0
    919945         *
    920946         * @param string $slug Template part slug requested.
     
    10021028    add_filter( 'bp_before_has_members_parse_args', 'bp_nouveau_group_members_widget_overrides', 10, 1 );
    10031029
     1030    /**
     1031     * Fires after BuddyPress Nouveau groups have added their home widget filters.
     1032     *
     1033     * @since 3.0.0
     1034     */
    10041035    do_action( 'bp_nouveau_groups_add_home_widget_filters' );
    10051036}
     
    10151046    remove_filter( 'bp_before_has_members_parse_args', 'bp_nouveau_group_members_widget_overrides', 10, 1 );
    10161047
     1048    /**
     1049     * Fires after BuddyPress Nouveau groups have removed their home widget filters.
     1050     *
     1051     * @since 3.0.0
     1052     */
    10171053    do_action( 'bp_nouveau_groups_remove_home_widget_filters' );
    10181054}
  • trunk/src/bp-templates/bp-nouveau/includes/groups/template-tags.php

    r11996 r12008  
    1919     * Fires at the begining of the templates BP injected content.
    2020     *
    21      * @since 2.3.0 (BuddyPress)
     21     * @since 2.3.0
    2222     */
    2323    do_action( 'bp_before_directory_groups_page' );
     
    2626     * Fires before the display of the groups.
    2727     *
    28      * @since 1.1.0 (BuddyPress)
     28     * @since 1.1.0
    2929     */
    3030    do_action( 'bp_before_directory_groups' );
     
    3333     * Fires before the display of the groups content.
    3434     *
    35      * @since 1.1.0 (BuddyPress)
     35     * @since 1.1.0
    3636     */
    3737    do_action( 'bp_before_directory_groups_content' );
     
    4848     * Fires and displays the group content.
    4949     *
    50      * @since 1.1.0 (BuddyPress)
     50     * @since 1.1.0
    5151     */
    5252    do_action( 'bp_directory_groups_content' );
     
    5555     * Fires after the display of the groups content.
    5656     *
    57      * @since 1.1.0 (BuddyPress)
     57     * @since 1.1.0
    5858     */
    5959    do_action( 'bp_after_directory_groups_content' );
     
    6262     * Fires after the display of the groups.
    6363     *
    64      * @since 1.1.0 (BuddyPress)
     64     * @since 1.1.0
    6565     */
    6666    do_action( 'bp_after_directory_groups' );
     
    6969     * Fires at the bottom of the groups directory template file.
    7070     *
    71      * @since 1.5.0 (BuddyPress)
     71     * @since 1.5.0
    7272     */
    7373    do_action( 'bp_after_directory_groups_page' );
     
    174174     * Fires before the send invites content.
    175175     *
    176      * @since 1.1.0 (BuddyPress)
     176     * @since 1.1.0
    177177     */
    178178    do_action( 'bp_before_group_send_invites_content' );
     
    497497     * Fires inside the action section of an individual group listing item.
    498498     *
    499      * @since 1.1.0 (BuddyPress)
     499     * @since 1.1.0
    500500     */
    501501    do_action( 'bp_directory_groups_actions' );
     
    11471147     * Fires before the display of the group home body.
    11481148     *
    1149      * @since 1.2.0 (BuddyPress)
     1149     * @since 1.2.0
    11501150     */
    11511151    do_action( 'bp_before_group_body' );
     
    12101210     * Fires after the display of the group home body.
    12111211     *
    1212      * @since 1.2.0 (BuddyPress)
     1212     * @since 1.2.0
    12131213     */
    12141214    do_action( 'bp_after_group_body' );
     
    12301230     * Fires before the display of a group's header.
    12311231     *
    1232      * @since 1.2.0 (BuddyPress)
     1232     * @since 1.2.0
    12331233     */
    12341234    do_action( 'bp_before_group_header' );
     
    12401240     * Fires after the display of a group's header.
    12411241     *
    1242      * @since 1.2.0 (BuddyPress)
     1242     * @since 1.2.0
    12431243     */
    12441244    do_action( 'bp_after_group_header' );
  • trunk/src/bp-templates/bp-nouveau/includes/members/functions.php

    r11900 r12008  
    216216    }
    217217
     218    /**
     219     * Filters the BuddyPress Nouveau template hierarchy after resetting front template for members.
     220     *
     221     * @since 3.0.0
     222     *
     223     * @param array $templates Array of templates.
     224     */
    218225    return apply_filters( '_bp_nouveau_member_reset_front_template', $templates );
    219226}
     
    285292    }
    286293
     294    /**
     295     * Filters the found template parts for the member template part locating functionality.
     296     *
     297     * @since 3.0.0
     298     *
     299     * @param array $templates Array of found templates.
     300     */
    287301    return bp_locate_template( apply_filters( 'bp_nouveau_member_locate_template_part', $templates ), false, true );
    288302}
     
    305319
    306320        /**
    307          * Let plugins adding an action to bp_get_template_part get it from here
     321         * Let plugins adding an action to bp_get_template_part get it from here.
     322         *
     323         * @since 3.0.0
    308324         *
    309325         * @param string $slug Template part slug requested.
     
    402418    add_filter( 'bp_before_has_members_parse_args', 'bp_nouveau_member_members_widget_overrides', 10, 1 );
    403419
     420    /**
     421     * Fires after Nouveau adds its members home widget filters.
     422     *
     423     * @since 3.0.0
     424     */
    404425    do_action( 'bp_nouveau_members_add_home_widget_filters' );
    405426}
     
    415436    remove_filter( 'bp_before_has_members_parse_args', 'bp_nouveau_member_members_widget_overrides', 10, 1 );
    416437
     438    /**
     439     * Fires after Nouveau removes its members home widget filters.
     440     *
     441     * @since 3.0.0
     442     */
    417443    do_action( 'bp_nouveau_members_remove_home_widget_filters' );
    418444}
     
    428454 */
    429455function bp_nouveau_get_wp_profile_fields( $user = null ) {
    430     // Leave a chance to plugins to avoid showing the contact methods they're adding on front end.
     456    /**
     457     * Filters the contact methods to be included in the WP Profile fields for a specific user.
     458     *
     459     * Provide a chance for plugins to avoid showing the contact methods they're adding on front end.
     460     *
     461     * @since 3.0.0
     462     *
     463     * @param array   $value Array of user contact methods.
     464     * @param WP_User $user  WordPress user to get contact methods for.
     465     */
    431466    $contact_methods = (array) apply_filters( 'bp_nouveau_get_wp_profile_field', wp_get_user_contact_methods( $user ), $user );
    432467
  • trunk/src/bp-templates/bp-nouveau/includes/members/template-tags.php

    r11985 r12008  
    1919     * Fires at the begining of the templates BP injected content.
    2020     *
    21      * @since 2.3.0 (BuddyPress)
     21     * @since 2.3.0
    2222     */
    2323    do_action( 'bp_before_directory_members_page' );
     
    2626     * Fires before the display of the members.
    2727     *
    28      * @since 1.1.0 (BuddyPress)
     28     * @since 1.1.0
    2929     */
    3030    do_action( 'bp_before_directory_members' );
     
    3333     * Fires before the display of the members content.
    3434     *
    35      * @since 1.1.0 (BuddyPress)
     35     * @since 1.1.0
    3636     */
    3737    do_action( 'bp_before_directory_members_content' );
     
    4040     * Fires before the display of the members list tabs.
    4141     *
    42      * @since 1.8.0 (BuddyPress)
     42     * @since 1.8.0
    4343     */
    4444    do_action( 'bp_before_directory_members_tabs' );
     
    5555     * Fires and displays the members content.
    5656     *
    57      * @since 1.1.0 (BuddyPress)
     57     * @since 1.1.0
    5858     */
    5959    do_action( 'bp_directory_members_content' );
     
    6262     * Fires after the display of the members content.
    6363     *
    64      * @since 1.1.0 (BuddyPress)
     64     * @since 1.1.0
    6565     */
    6666    do_action( 'bp_after_directory_members_content' );
     
    6969     * Fires after the display of the members.
    7070     *
    71      * @since 1.1.0 (BuddyPress)
     71     * @since 1.1.0
    7272     */
    7373    do_action( 'bp_after_directory_members' );
     
    7676     * Fires at the bottom of the members directory template file.
    7777     *
    78      * @since 1.5.0 (BuddyPress)
     78     * @since 1.5.0
    7979     */
    8080    do_action( 'bp_after_directory_members_page' );
     
    150150     * Fires in the member header actions section.
    151151     *
    152      * @since 1.2.6 (BuddyPress)
     152     * @since 1.2.6
    153153     */
    154154    do_action( 'bp_member_header_actions' );
     
    200200     * Fires inside the members action HTML markup to display actions.
    201201     *
    202      * @since 1.1.0 (BuddyPress)
     202     * @since 1.1.0
    203203     */
    204204    do_action( $action );
     
    603603     * Fires before the display of member body content.
    604604     *
    605      * @since 1.2.0 (BuddyPress)
     605     * @since 1.2.0
    606606     */
    607607    do_action( 'bp_before_member_body' );
     
    637637     * Fires after the display of member body content.
    638638     *
    639      * @since 1.2.0 (BuddyPress)
     639     * @since 1.2.0
    640640     */
    641641    do_action( 'bp_after_member_body' );
     
    659659     * Fires before the display of a member's header.
    660660     *
    661      * @since 1.2.0 (BuddyPress)
     661     * @since 1.2.0
    662662     */
    663663    do_action( 'bp_before_member_header' );
     
    669669     * Fires after the display of a member's header.
    670670     *
    671      * @since 1.2.0 (BuddyPress)
     671     * @since 1.2.0
    672672     */
    673673    do_action( 'bp_after_member_header' );
     
    926926    function bp_nouveau_get_wp_profile_field_id() {
    927927        $field = bp_nouveau()->members->wp_profile_current;
     928
     929        /**
     930         * Filters the WP profile field ID used for BuddyPress Nouveau.
     931         *
     932         * @since 3.0.0
     933         *
     934         * @param string $id Field ID.
     935         */
    928936        return apply_filters( 'bp_nouveau_get_wp_profile_field_id', $field->id );
    929937    }
     
    947955    function bp_nouveau_get_wp_profile_field_label() {
    948956        $field = bp_nouveau()->members->wp_profile_current;
     957
     958        /**
     959         * Filters the WP profile field label used for BuddyPress Nouveau.
     960         *
     961         * @since 3.0.0
     962         *
     963         * @param string $label Field label.
     964         */
    949965        return apply_filters( 'bp_nouveau_get_wp_profile_field_label', $field->label );
    950966    }
     
    963979         * Filters a WP profile field value.
    964980         *
    965          * @param string $data The profile field value.
     981         * @since 3.0.0
     982         *
     983         * @param string $data The profile field data value.
    966984         */
    967985        apply_filters( 'bp_nouveau_get_wp_profile_field_data', $data ),
  • trunk/src/bp-templates/bp-nouveau/includes/messages/ajax.php

    r11903 r12008  
    6868
    6969    // Trim @ from usernames
     70    /**
     71     * Filters the results of trimming of `@` characters from usernames for who is set to receive a message.
     72     *
     73     * @since 3.0.0
     74     *
     75     * @param array $value Array of trimmed usernames.
     76     * @param array $value Array of un-trimmed usernames submitted.
     77     */
    7078    $recipients = apply_filters( 'bp_messages_recipients', array_map( function( $username ) {
    7179        return trim( $username, '@' );
  • trunk/src/bp-templates/bp-nouveau/includes/messages/functions.php

    r11899 r12008  
    365365    }
    366366
     367    /**
     368     * Filters the message date for BuddyPress Nouveau display.
     369     *
     370     * @since 3.0.0
     371     *
     372     * @param string $value           Internationalization-ready formatted date value.
     373     * @param mixed  $calculated_time Calculated time.
     374     * @param string $date            Date value.
     375     * @param string $date_format     Format to convert the calcuated date to.
     376     */
    367377    return apply_filters( 'bp_nouveau_get_message_date', date_i18n( $date_format, $calculated_time, true ), $calculated_time, $date, $date_format );
    368378}
  • trunk/src/bp-templates/bp-nouveau/includes/template-tags.php

    r11989 r12008  
    2828    $hook = join( '_', $pieces );
    2929
     30    /**
     31     * Fires inside the `bp_nouveau_hook()` function.
     32     *
     33     * @since 3.0.0
     34     */
    3035    do_action( $hook );
    3136}
     
    208213             * Filters the 'template_notices' feedback message content.
    209214             *
    210              * @since 1.5.5 (BuddyPress)
     215             * @since 1.5.5
    211216             *
    212217             * @param string $template_message Feedback message content.
     
    285290
    286291    if ( ! empty( $feedback['before'] ) ) {
     292
     293        /**
     294         * Fires before display of a feedback message to the user.
     295         *
     296         * This is a dynamic filter that is dependent on the "before" value provided by bp_nouveau_get_user_feedback().
     297         *
     298         * @since 3.0.0
     299         */
    287300        do_action( $feedback['before'] );
    288301    }
     
    291304
    292305    bp_get_template_part(
     306
    293307        /**
    294308         * Filter here if you wish to use a different templates than the notice one.
     
    302316
    303317    if ( ! empty( $feedback['after'] ) ) {
     318
     319        /**
     320         * Fires before display of a feedback message to the user.
     321         *
     322         * This is a dynamic filter that is dependent on the "after" value provided by bp_nouveau_get_user_feedback().
     323         *
     324         * @since 3.0.0
     325         */
    304326        do_action( $feedback['after'] );
    305327    }
     
    324346     * Fires before the start of the component loop.
    325347     *
     348     * This is a variable hook that is dependent on the current component.
     349     *
    326350     * @since 1.2.0
    327351     */
     
    343367    /**
    344368     * Fires after the finish of the component loop.
     369     *
     370     * This is a variable hook that is dependent on the current component.
    345371     *
    346372     * @since 1.2.0
     
    636662     * Filter arguments for full-size avatars.
    637663     *
    638      * @param array $args
     664     * @since 3.0.0
     665     *
     666     * @param array $args {
     667     *     @param string $type   Avatar type.
     668     *     @param int    $width  Avatar width value.
     669     *     @param int    $height Avatar height value.
     670     * }
    639671     */
    640672    return apply_filters( 'bp_nouveau_avatar_args', array(
     
    13971429
    13981430        } else {
     1431            /**
     1432             * Filters the BuddyPress Nouveau single item setting ID.
     1433             *
     1434             * @since 3.0.0
     1435             *
     1436             * @param string $value Setting ID.
     1437             */
    13991438            $customizer_option = apply_filters( 'bp_nouveau_single_item_display_settings_id', '' );
    14001439        }
     
    14371476        $class = array_map( 'sanitize_html_class', $classes );
    14381477
     1478        /**
     1479         * Filters the final results for BuddyPress Nouveau container classes.
     1480         *
     1481         * This filter will return a single string of concatenated classes to be used.
     1482         *
     1483         * @since 3.0.0
     1484         *
     1485         * @param string $value   Concatenated classes.
     1486         * @param array  $classes Array of classes that were concatenated.
     1487         */
    14391488        return apply_filters( 'bp_nouveau_get_container_classes', join( ' ', $class ), $classes );
    14401489    }
     
    15021551        $class = array_map( 'sanitize_html_class', $classes );
    15031552
     1553        /**
     1554         * Filters the final results for BuddyPress Nouveau single item nav classes.
     1555         *
     1556         * This filter will return a single string of concatenated classes to be used.
     1557         *
     1558         * @since 3.0.0
     1559         *
     1560         * @param string $value   Concatenated classes.
     1561         * @param array  $classes Array of classes that were concatenated.
     1562         */
    15041563        return apply_filters( 'bp_nouveau_get_single_item_nav_classes', join( ' ', $class ), $classes );
    15051564    }
     
    15521611        $class = array_map( 'sanitize_html_class', $classes );
    15531612
     1613        /**
     1614         * Filters the final results for BuddyPress Nouveau single item subnav classes.
     1615         *
     1616         * This filter will return a single string of concatenated classes to be used.
     1617         *
     1618         * @since 3.0.0
     1619         *
     1620         * @param string $value   Concatenated classes.
     1621         * @param array  $classes Array of classes that were concatenated.
     1622         */
    15541623        return apply_filters( 'bp_nouveau_get_single_item_subnav_classes', join( ' ', $class ), $classes );
    15551624    }
     
    15831652        $class = array_map( 'sanitize_html_class', $classes );
    15841653
     1654        /**
     1655         * Filters the final results for BuddyPress Nouveau group creation step classes.
     1656         *
     1657         * This filter will return a single string of concatenated classes to be used.
     1658         *
     1659         * @since 3.0.0
     1660         *
     1661         * @param string $value   Concatenated classes.
     1662         * @param array  $classes Array of classes that were concatenated.
     1663         */
    15851664        return apply_filters( 'bp_nouveau_get_group_create_steps_classes', join( ' ', $class ), $classes );
    15861665    }
     
    16061685        $object = 'dir';
    16071686    } else {
     1687
     1688        /**
     1689         * Filters the search primary object if no other was found.
     1690         *
     1691         * @since 3.0.0
     1692         *
     1693         * @param string $object Search object.
     1694         */
    16081695        $object = apply_filters( 'bp_nouveau_get_search_primary_object', $object );
    16091696    }
     
    16361723        $objects['secondary'] = bp_current_action();
    16371724    } else {
     1725
     1726        /**
     1727         * Filters the search objects if no others were found.
     1728         *
     1729         * @since 3.0.0
     1730         *
     1731         * @param array $objects Search objects.
     1732         */
    16381733        $objects = apply_filters( 'bp_nouveau_get_search_objects', $objects );
    16391734    }
     
    17361831             * Fires before the display of the activity syndication options.
    17371832             *
    1738              * @since 1.2.0 (BuddyPress)
     1833             * @since 1.2.0
    17391834             */
    17401835            do_action( 'bp_activity_syndication_options' );
     
    17441839             * Fires inside the unordered list displaying blog sub-types.
    17451840             *
    1746              * @since 1.5.0 (BuddyPress)
     1841             * @since 1.5.0
    17471842             */
    17481843            do_action( 'bp_blogs_directory_blog_sub_types' );
     
    17521847             * Fires inside the groups directory group types.
    17531848             *
    1754              * @since 1.2.0 (BuddyPress)
     1849             * @since 1.2.0
    17551850             */
    17561851            do_action( 'bp_groups_directory_group_types' );
     
    17601855             * Fires inside the members directory member sub-types.
    17611856             *
    1762              * @since 1.5.0 (BuddyPress)
     1857             * @since 1.5.0
    17631858             */
    17641859            do_action( 'bp_members_directory_member_sub_types' );
     
    17681863         * Fires inside the syndication options list, after the RSS option.
    17691864         *
    1770          * @since 1.2.0 (BuddyPress)
     1865         * @since 1.2.0
    17711866         */
    17721867        do_action( 'bp_group_activity_syndication_options' );
     
    18381933
    18391934        if ( isset( $ids[ $component['object'] ] ) ) {
     1935
     1936            /**
     1937             * Filters the container ID for BuddyPress Nouveau filters.
     1938             *
     1939             * @since 3.0.0
     1940             *
     1941             * @param string $value ID based on current component object.
     1942             */
    18401943            return apply_filters( 'bp_nouveau_get_filter_container_id', $ids[ $component['object'] ] );
    18411944        }
     
    18731976
    18741977        if ( isset( $ids[ $component['object'] ] ) ) {
     1978
     1979            /**
     1980             * Filters the filter ID for BuddyPress Nouveau filters.
     1981             *
     1982             * @since 3.0.0
     1983             *
     1984             * @param string $value ID based on current component object.
     1985             */
    18751986            return apply_filters( 'bp_nouveau_get_filter_id', $ids[ $component['object'] ] );
    18761987        }
     
    19032014        }
    19042015
     2016        /**
     2017         * Filters the label for BuddyPress Nouveau filters.
     2018         *
     2019         * @since 3.0.0
     2020         *
     2021         * @param string $label Label for BuddyPress Nouveau filter.
     2022         */
    19052023        return apply_filters( 'bp_nouveau_get_filter_label', $label );
    19062024    }
     
    22342352     * Fires and displays any extra member registration details fields.
    22352353     *
    2236      * @since 1.9.0 (BuddyPress)
     2354     * This is a variable hook that depends on the current section.
     2355     *
     2356     * @since 1.9.0
    22372357     */
    22382358    do_action( "bp_{$section}_fields" );
     
    22532373
    22542374    if ( ! empty( $submit_data['before'] ) ) {
     2375
     2376        /**
     2377         * Fires before display of the submit button.
     2378         *
     2379         * This is a dynamic filter that is dependent on the "before" value provided by bp_nouveau_get_submit_button().
     2380         *
     2381         * @since 3.0.0
     2382         */
    22552383        do_action( $submit_data['before'] );
    22562384    }
     
    22672395
    22682396    if ( ! empty( $submit_data['after'] ) ) {
     2397
     2398        /**
     2399         * Fires before display of the submit button.
     2400         *
     2401         * This is a dynamic filter that is dependent on the "after" value provided by bp_nouveau_get_submit_button().
     2402         *
     2403         * @since 3.0.0
     2404         */
    22692405        do_action( $submit_data['after'] );
    22702406    }
  • trunk/src/class-buddypress.php

    r11981 r12008  
    400400
    401401        /** Post types and taxonomies *****************************************/
     402
     403        /**
     404         * Filters the post type slug for the email component.
     405         *
     406         * since 2.5.0
     407         *
     408         * @param string $value Email post type slug.
     409         */
    402410        $this->email_post_type     = apply_filters( 'bp_email_post_type', 'bp-email' );
     411
     412        /**
     413         * Filters the taxonomy slug for the email type component.
     414         *
     415         * @since 2.5.0
     416         *
     417         * @param string $value Email type taxonomy slug.
     418         */
    403419        $this->email_taxonomy_type = apply_filters( 'bp_email_tax_type', 'bp-email-type' );
    404420    }
Note: See TracChangeset for help on using the changeset viewer.