Skip to:
Content

BuddyPress.org

Ticket #1506: site-options.diff

File site-options.diff, 2.2 KB (added by wpmuguru, 17 years ago)
  • trunk/bp-themes/bp-default/functions.php

     
    5454                return $fullname[0];
    5555}
    5656
     57<<<<<<< .mine
     58function bp_dtheme_warn_deactivated() {
     59        echo "<div class='updated fade'><h3>" . __( 'BuddyPress is not active, please change themes', 'buddypress') .  "</h3></div>";
     60}
     61
     62=======
    5763function bp_dtheme_add_blog_comments_js() {
    5864        if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
    5965}
     
    101107<?php
    102108}
    103109
     110>>>>>>> .r2205
    104111function bp_dtheme_remove_redundant() {
    105112        global $bp;
    106113
    107114        /* Remove the redundant "My Posts and My Comments" options since we can use filters on the activity stream. */
    108         bp_core_remove_subnav_item( $bp->blogs->slug, 'recent-posts' );
    109         bp_core_remove_subnav_item( $bp->blogs->slug, 'recent-comments' );
     115        if( isset( $bp ) ) {
     116                bp_core_remove_subnav_item( $bp->blogs->slug, 'recent-posts' );
     117                bp_core_remove_subnav_item( $bp->blogs->slug, 'recent-comments' );
     118        } elseif( is_admin( ) ) {
     119                add_action( 'admin_notices', 'bp_dtheme_warn_deactivated' );
     120        }
    110121}
    111122add_action( 'init', 'bp_dtheme_remove_redundant' );
    112123
  • trunk/bp-core/bp-core-wpabstraction.php

     
    2828                return "{$prefix}spam = 0 AND {$prefix}deleted = 0 AND {$prefix}user_status = 0";
    2929}
    3030
    31 if ( !function_exists( 'get_site_option' ) ) {
    32         function get_site_option( $option_value ) {
    33                 return get_option( $option_value );
    34         }
    35 }
    36 
    37 if ( !function_exists( 'add_site_option' ) ) {
    38         function add_site_option( $option_name, $option_value ) {
    39                 return add_option( $option_name, $option_value );
    40         }
    41 }
    42 
    43 if ( !function_exists( 'update_site_option' ) ) {
    44         function update_site_option( $option_name, $option_value ) {
    45                 return update_option( $option_name, $option_value );
    46         }
    47 }
    48 
    4931if ( !function_exists( 'get_blog_option' ) ) {
    5032        function get_blog_option( $blog_id, $option_name ) {
    5133                return get_option( $option_name );