Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/30/2023 05:56:44 AM (12 months 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-core/bp-core-template.php

    r13449 r13493  
    108108
    109109/**
    110  * Get the 'bp_options_title' property from the BP global.
    111  *
    112  * Not currently used in BuddyPress.
    113  *
    114  * @todo Deprecate.
    115  */
    116 function bp_get_options_title() {
    117     $bp = buddypress();
    118 
    119     if ( empty( $bp->bp_options_title ) ) {
    120         $bp->bp_options_title = __( 'Options', 'buddypress' );
    121     }
    122 
    123     echo apply_filters( 'bp_get_options_title', esc_attr( $bp->bp_options_title ) );
    124 }
    125 
    126 /**
    127110 * Get the directory title for a component.
    128111 *
     
    160143
    161144/** Avatars *******************************************************************/
    162 
    163 /**
    164  * Check to see if there is an options avatar.
    165  *
    166  * An options avatar is an avatar for something like a group, or a friend.
    167  * Basically an avatar that appears in the sub nav options bar.
    168  *
    169  * Not currently used in BuddyPress.
    170  *
    171  * @return bool $value Returns true if an options avatar has been set, otherwise false.
    172  */
    173 function bp_has_options_avatar() {
    174     return (bool) buddypress()->bp_options_avatar;
    175 }
    176 
    177 /**
    178  * Output the options avatar.
    179  *
    180  * Not currently used in BuddyPress.
    181  *
    182  * @todo Deprecate.
    183  */
    184 function bp_get_options_avatar() {
    185     echo apply_filters( 'bp_get_options_avatar', buddypress()->bp_options_avatar );
    186 }
    187 
    188 /**
    189  * Output a comment author's avatar.
    190  *
    191  * Not currently used in BuddyPress.
    192  */
    193 function bp_comment_author_avatar() {
    194     global $comment;
    195 
    196     echo apply_filters( 'bp_comment_author_avatar', bp_core_fetch_avatar( array(
    197         'item_id' => $comment->user_id,
    198         'type'    => 'thumb',
    199         'alt'     => sprintf(
    200             /* translators: %s: member name */
    201             __( 'Profile photo of %s', 'buddypress' ),
    202             bp_core_get_user_displayname( $comment->user_id )
    203         ),
    204     ) ) );
    205 }
    206 
    207 /**
    208  * Output a post author's avatar.
    209  *
    210  * Not currently used in BuddyPress.
    211  */
    212 function bp_post_author_avatar() {
    213     global $post;
    214 
    215     echo apply_filters( 'bp_post_author_avatar', bp_core_fetch_avatar( array(
    216         'item_id' => $post->post_author,
    217         'type'    => 'thumb',
    218         'alt'     => sprintf(
    219             /* translators: %s: member name */
    220             __( 'Profile photo of %s', 'buddypress' ),
    221             bp_core_get_user_displayname( $post->post_author )
    222         ),
    223     ) ) );
    224 }
    225145
    226146/**
     
    317237        return apply_filters( 'bp_get_avatar_to_crop_src', $src );
    318238    }
    319 
    320 /**
    321  * Output the avatar cropper <img> markup.
    322  *
    323  * No longer used in BuddyPress.
    324  *
    325  * @todo Deprecate.
    326  */
    327 function bp_avatar_cropper() {
    328 ?>
    329     <img id="avatar-to-crop" class="avatar" src="<?php echo esc_url( buddypress()->avatar_admin->image ); ?>" />
    330 <?php
    331 }
    332239
    333240/**
     
    494401        }
    495402    }
    496 }
    497 
    498 /**
    499  * Do the 'bp_styles' action, and call wp_print_styles().
    500  *
    501  * No longer used in BuddyPress.
    502  *
    503  * @todo Deprecate.
    504  */
    505 function bp_styles() {
    506     do_action( 'bp_styles' );
    507     wp_print_styles();
    508403}
    509404
     
    709604        return apply_filters( 'bp_get_search_default_text', $default_text, $component );
    710605    }
    711 
    712 /**
    713  * Fire the 'bp_custom_profile_boxes' action.
    714  *
    715  * No longer used in BuddyPress.
    716  *
    717  * @todo Deprecate.
    718  */
    719 function bp_custom_profile_boxes() {
    720     do_action( 'bp_custom_profile_boxes' );
    721 }
    722 
    723 /**
    724  * Fire the 'bp_custom_profile_sidebar_boxes' action.
    725  *
    726  * No longer used in BuddyPress.
    727  *
    728  * @todo Deprecate.
    729  */
    730 function bp_custom_profile_sidebar_boxes() {
    731     do_action( 'bp_custom_profile_sidebar_boxes' );
    732 }
    733606
    734607/**
     
    11281001    add_filter( 'bp_get_total_member_count', 'bp_core_number_format' );
    11291002
    1130 /**
    1131  * Output whether blog signup is allowed.
    1132  *
    1133  * @todo Deprecate. It doesn't make any sense to echo a boolean.
    1134  */
    1135 function bp_blog_signup_allowed() {
    1136     echo bp_get_blog_signup_allowed();
    1137 }
    11381003    /**
    11391004     * Is blog signup allowed?
Note: See TracChangeset for help on using the changeset viewer.