Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/30/2023 05:56:44 AM (3 years ago)
Author:
imath
Message:

Deprecate all functions having a @todo Deprecate inline comment

Fixes #8909

File:
1 edited

Legend:

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

    r13491 r13493  
    613613
    614614/**
    615  * Output the activities title.
    616  *
    617  * @since 1.0.0
    618  *
    619  * @todo Deprecate.
    620  */
    621 function bp_activities_title() {
    622     echo bp_get_activities_title();
    623 }
    624 
    625     /**
    626      * Return the activities title.
    627      *
    628      * @since 1.0.0
    629      *
    630      * @global string $bp_activity_title
    631      * @todo Deprecate.
    632      *
    633      * @return string The activities title.
    634      */
    635     function bp_get_activities_title() {
    636         global $bp_activity_title;
    637 
    638         /**
    639          * Filters the activities title for the activity template.
    640          *
    641          * @since 1.0.0
    642          *
    643          * @param string $bp_activity_title The title to be displayed.
    644          */
    645         return apply_filters( 'bp_get_activities_title', $bp_activity_title );
    646     }
    647 
    648 /**
    649  * {@internal Missing Description}
    650  *
    651  * @since 1.0.0
    652  *
    653  * @todo Deprecate.
    654  */
    655 function bp_activities_no_activity() {
    656     echo bp_get_activities_no_activity();
    657 }
    658 
    659     /**
    660      * {@internal Missing Description}
    661      *
    662      * @since 1.0.0
    663      *
    664      * @global string $bp_activity_no_activity
    665      * @todo Deprecate.
    666      *
    667      * @return string
    668      */
    669     function bp_get_activities_no_activity() {
    670         global $bp_activity_no_activity;
    671 
    672         /**
    673          * Filters the text used when there is no activity to display.
    674          *
    675          * @since 1.0.0
    676          *
    677          * @param string $bp_activity_no_activity Text to display for no activity.
    678          */
    679         return apply_filters( 'bp_get_activities_no_activity', $bp_activity_no_activity );
    680     }
    681 
    682 /**
    683615 * Output the activity ID.
    684616 *
     
    20511983 * @since 1.2.0
    20521984 *
    2053  * @todo deprecate $args param
    2054  *
    2055  * @param array|string $args See {@link bp_activity_get_comments} for description.
    2056  */
    2057 function bp_activity_comments( $args = '' ) {
    2058     echo bp_activity_get_comments( $args );
     1985 * @param array|string $deprecated See {@link bp_activity_get_comments} for description.
     1986 */
     1987function bp_activity_comments( $deprecated = '' ) {
     1988    // Deprecated notice about $args.
     1989    if ( ! empty( $deprecated ) ) {
     1990        _deprecated_argument(
     1991            __FUNCTION__,
     1992            '12.0.0',
     1993            sprintf(
     1994                /* translators: 1: the name of the function. 2: the name of the file. */
     1995                __( '%1$s no longer accepts arguments. See the inline documentation at %2$s for more details.', 'buddypress' ),
     1996                __FUNCTION__,
     1997                __FILE__
     1998            )
     1999        );
     2000    }
     2001
     2002    echo bp_activity_get_comments();
    20592003}
    20602004
     
    20642008     * @since 1.2.0
    20652009     *
    2066      * @todo deprecate $args param
    20672010     * @todo Given that checks for children already happen in bp_activity_recurse_comments(),
    20682011     *       this function can probably be streamlined or removed.
     
    20702013     * @global BP_Activity_Template $activities_template The main activity template loop class.
    20712014     *
    2072      * @param string $args Unused. Left over from an earlier implementation.
     2015     * @param string $deprecated Unused. Left over from an earlier implementation.
    20732016     * @return bool
    20742017     */
    2075     function bp_activity_get_comments( $args = '' ) {
     2018    function bp_activity_get_comments( $deprecated = '' ) {
    20762019        global $activities_template;
     2020
     2021        // Deprecated notice about $args.
     2022        if ( ! empty( $deprecated ) ) {
     2023            _deprecated_argument(
     2024                __FUNCTION__,
     2025                '12.0.0',
     2026                sprintf(
     2027                    /* translators: 1: the name of the function. 2: the name of the file. */
     2028                    __( '%1$s no longer accepts arguments. See the inline documentation at %2$s for more details.', 'buddypress' ),
     2029                    __FUNCTION__,
     2030                    __FILE__
     2031                )
     2032            );
     2033        }
    20772034
    20782035        if ( empty( $activities_template->activity->children ) ) {
Note: See TracChangeset for help on using the changeset viewer.