This function has been deprecated. BuddyPress 1.5.0 instead.

bp_dtheme_deprecated()

Contains functions which were moved out of BP-Default’s functions.php in BuddyPress 1.5.

Description

Source

File: bp-core/deprecated/buddypress/1.5.php

501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
function bp_dtheme_deprecated() {
    if ( !function_exists( 'bp_dtheme_wp_pages_filter' ) ) :
    /**
     * In BuddyPress 1.2.x, this function filtered the dropdown on the
     * Settings > Reading screen for selecting the page to show on front to
     * include "Activity Feed." As of 1.5.x, it is no longer required.
     *
     * @deprecated BuddyPress 1.5.0
     * @deprecated No longer required.
     * @param string $page_html A list of pages as a dropdown (select list)
     * @return string
     * @see wp_dropdown_pages()
     * @since BuddyPress 1.2.0
     */
    function bp_dtheme_wp_pages_filter( $page_html ) {
        _deprecated_function( __FUNCTION__, '1.5', "No longer required." );
        return $page_html;
    }
    endif;
 
    if ( !function_exists( 'bp_dtheme_page_on_front_update' ) ) :
    /**
     * In BuddyPress 1.2.x, this function hijacked the saving of page on front setting to save the activity feed setting.
     * As of 1.5.x, it is no longer required.
     *
     * @deprecated BuddyPress 1.5.0
     * @deprecated No longer required.
     * @param string $oldvalue Previous value of get_option( 'page_on_front' )
     * @param string $oldvalue New value of get_option( 'page_on_front' )
     * @return false|string
     * @since BuddyPress 1.2.0
     */
    function bp_dtheme_page_on_front_update( $oldvalue, $newvalue ) {
        _deprecated_function( __FUNCTION__, '1.5', "No longer required." );
        if ( !is_admin() || !bp_current_user_can( 'bp_moderate' ) )
            return false;
 
        return $oldvalue;
    }
    endif;
 
    if ( !function_exists( 'bp_dtheme_page_on_front_template' ) ) :
    /**
     * In BuddyPress 1.2.x, this function loaded the activity feed template if the front page display settings allow.
     * As of 1.5.x, it is no longer required.
     *
     * @deprecated BuddyPress 1.5.0
     * @deprecated No longer required.
     * @param string $template Absolute path to the page template
     * @return string
     * @since BuddyPress 1.2.0
     */
    function bp_dtheme_page_on_front_template( $template ) {
        _deprecated_function( __FUNCTION__, '1.5', "No longer required." );
        return $template;
    }
    endif;
 
    if ( !function_exists( 'bp_dtheme_fix_get_posts_on_activity_front' ) ) :
    /**
     * In BuddyPress 1.2.x, this forced the page ID as a string to stop the get_posts query from kicking up a fuss.
     * As of 1.5.x, it is no longer required.
     *
     * @deprecated BuddyPress 1.5.0
     * @deprecated No longer required.
     * @since BuddyPress 1.2.0
     */
    function bp_dtheme_fix_get_posts_on_activity_front() {
        _deprecated_function( __FUNCTION__, '1.5', "No longer required." );
    }
    endif;
 
    if ( !function_exists( 'bp_dtheme_fix_the_posts_on_activity_front' ) ) :
    /**
     * In BuddyPress 1.2.x, this was used as part of the code that set the activity feed to be on the front page.
     * As of 1.5.x, it is no longer required.
     *
     * @deprecated BuddyPress 1.5.0
     * @deprecated No longer required.
     * @param array $posts Posts as retrieved by WP_Query
     * @return array
     * @since BuddyPress 1.2.5
     */
    function bp_dtheme_fix_the_posts_on_activity_front( $posts ) {
        _deprecated_function( __FUNCTION__, '1.5', "No longer required." );
        return $posts;
    }
    endif;
 
    if ( !function_exists( 'bp_dtheme_add_blog_comments_js' ) ) :
    /**
     * In BuddyPress 1.2.x, this added the JavaScript needed for blog comment replies.
     * As of 1.5.x, we recommend that you enqueue the comment-reply JavaScript in your theme's header.php.
     *
     * @deprecated BuddyPress 1.5.0
     * @deprecated Enqueue the comment-reply script in your theme's header.php.
     * @since BuddyPress 1.2.0
     */
    function bp_dtheme_add_blog_comments_js() {
        _deprecated_function( __FUNCTION__, '1.5', "Enqueue the comment-reply script in your theme's header.php." );
        if ( is_singular() && bp_is_blog_page() && get_option( 'thread_comments' ) )
            wp_enqueue_script( 'comment-reply' );
    }
    endif;
}

Changelog

Changelog
Version Description
BuddyPress 1.5.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.