Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/09/2014 12:54:33 AM (9 years ago)
Author:
tw2113
Message:

Add hook documentation for the Blogs component

Fixes #5939

File:
1 edited

Legend:

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

    r9194 r9218  
    5252    }
    5353
     54    /**
     55     * Fires after the registry of the default blog component activity actions.
     56     *
     57     * @since BuddyPress (1.1.0)
     58     */
    5459    do_action( 'bp_blogs_register_activity_actions' );
    5560}
     
    8287    }
    8388
     89    /**
     90     * Filters the new blog activity action for the new blog.
     91     *
     92     * @since BuddyPress (2.0.0)
     93     *
     94     * @param string $action   Constructed activity action.
     95     * @param obj    $activity Activity data object.
     96     */
    8497    return apply_filters( 'bp_blogs_format_activity_action_new_blog', $action, $activity );
    8598}
     
    151164    }
    152165
     166    /**
     167     * Filters the new blog post action for the new blog.
     168     *
     169     * @since BuddyPress (2.0.0)
     170     *
     171     * @param string $action   Constructed activity action.
     172     * @param obj    $activity Activity data object.
     173     */
    153174    return apply_filters( 'bp_blogs_format_activity_action_new_blog_post', $action, $activity );
    154175}
     
    218239    }
    219240
     241    /**
     242     * Filters the new blog comment action for the new blog.
     243     *
     244     * @since BuddyPress (2.0.0)
     245     *
     246     * @param string $action   Constructed activity action.
     247     * @param obj    $activity Activity data object.
     248     */
    220249    return apply_filters( 'bp_blogs_format_activity_action_new_blog_comment', $action, $activity );
    221250}
     
    299328
    300329    if ( ! empty( $r['action'] ) ) {
     330
     331        /**
     332         * Filters the action associated with activity for activity stream.
     333         *
     334         * @since BuddyPress (1.2.0)
     335         *
     336         * @param string $value Action for the activity stream.
     337         */
    301338        $r['action'] = apply_filters( 'bp_blogs_record_activity_action', $r['action'] );
    302339    }
    303340
    304341    if ( ! empty( $r['content'] ) ) {
     342
     343        /**
     344         * Filters the content associated with activity for activity stream.
     345         *
     346         * @since BuddyPress (1.2.0)
     347         *
     348         * @param string $value Generated excerpt from content for the activity stream.
     349         * @param string $value Content for the activity stream.
     350         * @param array  $r     Array of arguments used for the activity stream item.
     351         */
    305352        $r['content'] = apply_filters( 'bp_blogs_record_activity_content', bp_create_excerpt( $r['content'] ), $r['content'], $r );
    306353    }
     
    532579    add_action( 'comment_post', 'bp_blogs_record_comment', 10, 2 );
    533580
     581    /**
     582     * Fires after activity comments have been synced and posted as blog comments.
     583     *
     584     * @since BuddyPress (2.0.0)
     585     *
     586     * @param int    $comment_id      The activity ID for the posted activity comment.
     587     * @param array  $args            Array of args used for the comment syncing.
     588     * @param object $parent_activity Parameters of the blog post parent activity item.
     589     * @param object $user            User data object for the blog comment.
     590     */
    534591    do_action( 'bp_blogs_sync_add_from_activity_comment', $comment_id, $args, $parent_activity, $user );
    535592}
Note: See TracChangeset for help on using the changeset viewer.