Skip to:
Content

BuddyPress.org


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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    }
Note: See TracChangeset for help on using the changeset viewer.