Skip to:
Content

BuddyPress.org

Changeset 5727


Ignore:
Timestamp:
02/11/2012 09:19:15 PM (15 years ago)
Author:
johnjamesjacoby
Message:

Use bp_get_option() in more places, and include bp-core-options.php in update wizard.

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-settings.php

    r5585 r5727  
    296296         * @since BuddyPress (r3203)
    297297         *
    298          * @uses get_option()
     298         * @uses bp_get_option()
    299299         * @uses esc_attr()
    300300         * @uses apply_filters()
    … …  
    307307
    308308                // Get the option and sanitize it
    309                 $value = get_option( $option, $default );
     309                $value = bp_get_option( $option, $default );
    310310
    311311                // Slug?
  • trunk/bp-core/admin/bp-core-update.php

    r5721 r5727  
    500500
    501501                $prefix              = '';
    502                 $permalink_structure = get_option( 'permalink_structure' );
     502                $permalink_structure = bp_get_option( 'permalink_structure' );
    503503                $structures          = array( '', $prefix . '/%year%/%monthnum%/%day%/%postname%/', $prefix . '/%year%/%monthnum%/%postname%/', $prefix . '/archives/%post_id%' );
    504504
  • trunk/bp-groups/bp-groups-notifications.php

    r5714 r5727  
    6767
    6868        $ud             = bp_core_get_core_userdata( $admin_id );
    69         $requesting_ud  = bp_core_get_core_userdata( $requesting_user_id );
    7069        $group_requests = bp_get_group_permalink( $group ) . 'admin/membership-requests';
    7170        $profile_link   = bp_core_get_user_domain( $requesting_user_id );
    … …  
    7574        // Set up and send the message
    7675        $to       = $ud->user_email;
    77         $sitename = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES );
     76        $sitename = wp_specialchars_decode( bp_get_option( 'blogname' ), ENT_QUOTES );
    7877        $subject  = '[' . $sitename . '] ' . sprintf( __( 'Membership request for group: %s', 'buddypress' ), $group->name );
    7978
  • trunk/bp-loader.php

    r5725 r5727  
    478478                                require( $this->plugin_dir . 'bp-core/bp-core-update.php'       );
    479479                                require( $this->plugin_dir . 'bp-core/bp-core-caps.php'         );
     480                                require( $this->plugin_dir . 'bp-core/bp-core-options.php'      );
    480481                                require( $this->plugin_dir . 'bp-core/admin/bp-core-update.php' );
    481482                        }
  • trunk/bp-members/bp-members-functions.php

    r5705 r5727  
    930930
    931931                if ( empty( $user_id ) ) {
    932                         $errors->add( 'registerfail', sprintf( __('<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !', 'buddypress' ), get_option( 'admin_email' ) ) );
     932                        $errors->add( 'registerfail', sprintf( __('<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !', 'buddypress' ), bp_get_option( 'admin_email' ) ) );
    933933                        return $errors;
    934934                }
    … …  
    11091109        $activate_url = esc_url( $activate_url );
    11101110
    1111         $from_name = ( '' == get_option( 'blogname' ) ) ? __( 'BuddyPress', 'buddypress' ) : esc_html( get_option( 'blogname' ) );
     1111        $from_name = ( '' == bp_get_option( 'blogname' ) ) ? __( 'BuddyPress', 'buddypress' ) : esc_html( bp_get_option( 'blogname' ) );
    11121112
    11131113        $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%1\$s\n\n", 'buddypress' ), $activate_url );
  • trunk/bp-members/bp-members-template.php

    r5710 r5727  
    11411141
    11421142                if ( is_multisite() ) {
    1143                         if ( in_array( $bp->site_options['registration'], array( 'all', 'user' ) ) )
     1143                        if ( in_array( $bp->site_options['registration'], array( 'all', 'user' ) ) ) {
    11441144                                $signup_allowed = true;
     1145                        }
    11451146
    11461147                } else {
    1147                         if ( get_option( 'users_can_register') )
     1148                        if ( bp_get_option( 'users_can_register') ) {
    11481149                                $signup_allowed = true;
     1150                        }
    11491151                }
    11501152
Note: See TracChangeset for help on using the changeset viewer.