Skip to:
Content

BuddyPress.org

Changeset 11237


Ignore:
Timestamp:
11/05/2016 12:13:46 AM (7 years ago)
Author:
tw2113
Message:

Adds PHPDocs to missed filters in the blogs component.

Location:
trunk/src/bp-blogs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/bp-blogs-activity.php

    r10971 r11237  
    625625        bp_blogs_record_activity( array(
    626626            'user_id'      => $recorded_blog->user_id,
     627
     628            /**
     629             * Filters the activity created blog primary link.
     630             *
     631             * @since 1.1.0
     632             *
     633             * @param string $value Blog primary link.
     634             * @param int    $value Blog ID.
     635             */
    627636            'primary_link' => apply_filters( 'bp_blogs_activity_created_blog_primary_link', bp_blogs_get_blogmeta( $recorded_blog->blog_id, 'url' ), $recorded_blog->blog_id ),
    628637            'type'         => 'new_blog',
  • trunk/src/bp-blogs/bp-blogs-functions.php

    r11150 r11237  
    6666    );
    6767
    68     // Filter and return.
     68    /**
     69     * Filters a set of blogs.
     70     *
     71     * @since 1.2.0
     72     *
     73     * @param array $blogs Array of blog data.
     74     * @param array $r     Parsed query arguments.
     75     */
    6976    return apply_filters( 'bp_blogs_get_blogs', $blogs, $r );
    7077}
     
    247254function bp_blogs_is_blog_recordable( $blog_id, $user_id = 0 ) {
    248255
     256    /**
     257     * Filters whether or not a blog is globally activity stream recordable.
     258     *
     259     * @since 1.7.0
     260     *
     261     * @param bool $value   Whether or not recordable. Default true.
     262     * @param int  $blog_id Current blog ID.
     263     */
    249264    $recordable_globally = apply_filters( 'bp_blogs_is_blog_recordable', true, $blog_id );
    250265
    251266    if ( !empty( $user_id ) ) {
     267        /**
     268         * Filters whether or not a blog is globally activity stream recordable for user.
     269         *
     270         * @since 1.7.0
     271         *
     272         * @param bool $recordable_globally Whether or not recordable.
     273         * @param int  $blog_id             Current blog ID.
     274         * @param int  $user_id             Current user ID.
     275         */
    252276        $recordable_for_user = apply_filters( 'bp_blogs_is_blog_recordable_for_user', $recordable_globally, $blog_id, $user_id );
    253277    } else {
     
    276300function bp_blogs_is_blog_trackable( $blog_id, $user_id = 0 ) {
    277301
     302    /**
     303     * Filters whether or not a blog is globally trackable.
     304     *
     305     * @since 1.7.0
     306     *
     307     * @param bool $value Whether or not trackable.
     308     * @param int  $blog_id Current blog ID.
     309     */
    278310    $trackable_globally = apply_filters( 'bp_blogs_is_blog_trackable', bp_blogs_is_blog_recordable( $blog_id, $user_id ), $blog_id );
    279311
    280312    if ( !empty( $user_id ) ) {
     313
     314        /**
     315         * Filters whether or not a blog is globally trackable for user.
     316         *
     317         * @since 1.7.0
     318         *
     319         * @param bool $value   Whether or not trackable.
     320         * @param int  $blog_id Current blog ID.
     321         * @param int  $user_id Current user ID.
     322         */
    281323        $trackable_for_user = apply_filters( 'bp_blogs_is_blog_trackable_for_user', $trackable_globally, $blog_id, $user_id );
    282324    } else {
     
    345387
    346388    $is_private = !empty( $_POST['blog_public'] ) && (int) $_POST['blog_public'] ? false : true;
     389
     390    /**
     391     * Filters whether or not a new blog is public.
     392     *
     393     * @since 1.5.0
     394     *
     395     * @param bool $is_private Whether or not blog is public.
     396     */
    347397    $is_private = !apply_filters( 'bp_is_new_blog_public', !$is_private );
    348398
     
    845895 */
    846896function bp_blogs_get_allowed_roles() {
     897
     898    /**
     899     * Filters the allowed roles a member must have to be recorded into bp_user_blogs pointer table.
     900     *
     901     * @since 2.1.0
     902     *
     903     * @param array $value Array of potential roles user needs.
     904     */
    847905    return apply_filters( 'bp_blogs_get_allowed_roles', array( 'contributor', 'author', 'editor', 'administrator' ) );
    848906}
  • trunk/src/bp-blogs/bp-blogs-template.php

    r11173 r11237  
    646646         * Filters the last active date of the current blog in the loop.
    647647         *
    648          * @since
     648         * @since 1.2.0
    649649         *
    650650         * @param string $last_activity Last active date.
     
    14021402        $output = '<li id="blog-create-nav">' . $create_blog_button . '</li>';
    14031403
     1404        /**
     1405         * Filters the Create A Site nav item output.
     1406         *
     1407         * @since 2.2.0
     1408         *
     1409         * @param string $output Nav item output.
     1410         */
    14041411        return apply_filters( 'bp_get_blog_create_nav_item', $output );
    14051412    }
  • trunk/src/bp-blogs/classes/class-bp-blogs-blog.php

    r11023 r11237  
    7676        global $wpdb;
    7777
     78        /**
     79         * Filters the blog user ID before save.
     80         *
     81         * @since 1.0.0
     82         *
     83         * @param int $value User ID.
     84         * @param int $value Site ID.
     85         */
    7886        $this->user_id = apply_filters( 'bp_blogs_blog_user_id_before_save', $this->user_id, $this->id );
     87
     88        /**
     89         * Filters the blog blog ID before save.
     90         *
     91         * @since 1.0.0
     92         *
     93         * @param int $value Blog ID.
     94         * @param int $value Site ID.
     95         */
    7996        $this->blog_id = apply_filters( 'bp_blogs_blog_id_before_save', $this->blog_id, $this->id );
    8097
Note: See TracChangeset for help on using the changeset viewer.