Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/05/2015 04:48:11 AM (10 years ago)
Author:
tw2113
Message:

Adds hooks documentation for bp-core-moderation.php.

See #5940.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-moderation.php

    r9396 r9594  
    6565function bp_core_check_for_moderation( $user_id = 0, $title = '', $content = '' ) {
    6666
    67     // Allow for moderation check to be skipped
     67    /**
     68     * Filters whether or not to bypass checking for moderation keys and too many links.
     69     *
     70     * @since BuddyPress (2.2.0)
     71     *
     72     * @param bool   $value   Whether or not to bypass checking. Default false.
     73     * @param int    $user_id Topic of reply author ID.
     74     * @param string $title   The title of the content.
     75     * @param string $content $the content being posted.
     76     */
    6877    if ( apply_filters( 'bp_bypass_check_for_moderation', false, $user_id, $title, $content ) ) {
    6978        return true;
     
    112121        // Allow for bumping the max to include the user's URL
    113122        if ( ! empty( $_post['url'] ) ) {
     123
     124            /**
     125             * Filters the maximum amount of links allowed to include the user's URL.
     126             *
     127             * @since BuddyPress (1.6.0)
     128             *
     129             * @param string $num_links How many links found.
     130             * @param string $value     User's url.
     131             */
    114132            $num_links = apply_filters( 'comment_max_links_url', $num_links, $_post['url'] );
    115133        }
     
    181199function bp_core_check_for_blacklist( $user_id = 0, $title = '', $content = '' ) {
    182200
    183     // Allow for blacklist check to be skipped
     201    /**
     202     * Filters whether or not to bypass checking for blocked keys.
     203     *
     204     * @since BuddyPress (2.2.0)
     205     *
     206     * @param bool   $value   Whether or not to bypass checking. Default false.
     207     * @param int    $user_id Topic of reply author ID.
     208     * @param string $title   The title of the content.
     209     * @param string $content $the content being posted.
     210     */
    184211    if ( apply_filters( 'bp_bypass_check_for_blacklist', false, $user_id, $title, $content ) ) {
    185212        return true;
     
    273300    $retval = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] );
    274301
     302    /**
     303     * Filters the current user's IP address.
     304     *
     305     * @since BuddyPress (1.6.0)
     306     *
     307     * @param string $retval Current user's IP Address.
     308     */
    275309    return apply_filters( 'bp_core_current_user_ip', $retval );
    276310}
     
    292326    }
    293327
     328    /**
     329     * Filters the current user's user-agent.
     330     *
     331     * @since BuddyPress (1.6.0)
     332     *
     333     * @param string $retval Current user's user-agent
     334     */
    294335    return apply_filters( 'bp_core_current_user_ua', $retval );
    295336}
Note: See TracChangeset for help on using the changeset viewer.