Changeset 5978
- Timestamp:
- 04/13/2012 12:59:21 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-functions.php
r5927 r5978 240 240 241 241 // Get current theme info 242 $ct = current_theme_info(); 242 // Backward-compatibility with WP < 3.4 will be removed in a future release 243 if ( bp_get_major_wp_version() >= 3.4 ) { 244 $ct = wp_get_theme(); 245 } else { 246 $ct = current_theme_info(); 247 } 243 248 244 249 // The best way to remove this notice is to add a "buddypress" tag to -
trunk/bp-core/admin/bp-core-update.php
r5868 r5978 32 32 $this->steps = $this->add_steps(); 33 33 } 34 34 35 35 function current_step() { 36 36 if ( isset( $_POST['step'] ) ) { … … 135 135 136 136 // Update or Setup 137 $type = ( 'update' == bp_get_maintenance_mode() ) ? __( 'Update', 'buddypress' ) : __( 'Setup', 'buddypress' ); 138 137 $type = ( 'update' == bp_get_maintenance_mode() ) ? __( 'Update', 'buddypress' ) : __( 'Setup', 'buddypress' ); 138 139 139 ?> 140 140 … … 341 341 <td> 342 342 <p><label><input type="radio" name="bp_pages[members]" <?php checked( empty( $existing_pages['members'] ) ); ?> value="<?php echo $members_slug; ?>" /> <?php _e( 'Automatically create a page at:', 'buddypress' ) ?> <?php echo home_url( $members_slug ); ?>/</label></p> 343 343 344 344 <?php if ( $members_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['members']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 345 345 … … 359 359 <td> 360 360 <p><label><input type="radio" name="bp_pages[groups]" <?php checked( empty( $existing_pages['groups'] ) ); ?> value="<?php echo $groups_slug; ?>" /> <?php _e( 'Automatically create a page at:', 'buddypress' ); ?> <?php echo home_url( $groups_slug ); ?>/</label></p> 361 361 362 362 <?php if ( $groups_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['groups']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 363 363 <p><label><input type="radio" name="bp_pages[groups]" <?php checked( !empty( $existing_pages['groups'] ) ); ?> value="page" /> <?php _e( 'Use an existing page:', 'buddypress' ); ?> <?php echo $groups_page_dropdown ?></label></p> … … 378 378 <td> 379 379 <p><label><input type="radio" name="bp_pages[blogs]" <?php checked( empty( $existing_pages['blogs'] ) ); ?> value="<?php echo $blogs_slug; ?>" /> <?php _e( 'Automatically create a page at:', 'buddypress' ); ?> <?php echo home_url( $blogs_slug ); ?>/</label></p> 380 380 381 381 <?php if ( $blogs_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['blogs']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 382 382 <p><label><input type="radio" name="bp_pages[blogs]" <?php checked( !empty( $existing_pages['blogs'] ) ); ?> value="page" /> <?php _e( 'Use an existing page:', 'buddypress' ); ?> <?php echo $blogs_page_dropdown ?></label></p> … … 396 396 <td> 397 397 <p><label><input type="radio" name="bp_pages[activity]" <?php checked( empty( $existing_pages['activity'] ) ); ?> value="<?php echo $activity_slug; ?>" /> <?php _e( 'Automatically create a page at:', 'buddypress' ); ?> <?php echo home_url( $activity_slug ); ?>/</label></p> 398 398 399 399 <?php if ( $activity_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['activity']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 400 400 <p><label><input type="radio" name="bp_pages[activity]" <?php checked( !empty( $existing_pages['activity'] ) ); ?> value="page" /> <?php _e( 'Use an existing page:', 'buddypress' ); ?> <?php echo $activity_page_dropdown ?></label></p> … … 414 414 <td> 415 415 <p><label><input type="radio" name="bp_pages[forums]" <?php checked( empty( $existing_pages['forums'] ) ); ?> value="<?php echo $forums_slug; ?>" /> <?php _e( 'Automatically create a page at:', 'buddypress' ); ?> <?php echo home_url( $forums_slug ); ?>/</label></p> 416 416 417 417 <?php if ( $forums_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['forums']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 418 418 <p><label><input type="radio" name="bp_pages[forums]" <?php checked( !empty( $existing_pages['forums'] ) ); ?> value="page" /> <?php _e( 'Use an existing page:', 'buddypress' ); ?> <?php echo $forums_page_dropdown ?></label></p> … … 430 430 <td> 431 431 <p><label><input type="radio" name="bp_pages[register]" <?php checked( empty( $existing_pages['register'] ) ); ?> value="<?php echo $register_slug; ?>" /> <?php _e( 'Automatically create a page at:', 'buddypress' ) ?> <?php echo home_url( $register_slug ) ?>/</label></p> 432 432 433 433 <?php if ( $register_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['register']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 434 434 <p><label><input type="radio" name="bp_pages[register]" <?php checked( !empty( $existing_pages['register'] ) ); ?> value="page" /> <?php _e( 'Use an existing page:', 'buddypress' ); ?> <?php echo $register_page_dropdown ?></label></p> … … 444 444 <td> 445 445 <p><label><input type="radio" name="bp_pages[activate]" <?php checked( empty( $existing_pages['activate'] ) ); ?> value="<?php echo $activation_slug; ?>" /> <?php _e( 'Automatically create a page at:', 'buddypress' ); ?> <?php echo home_url( $activation_slug ); ?>/</label></p> 446 446 447 447 <?php if ( $activate_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['activate']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 448 448 <p><label><input type="radio" name="bp_pages[activate]" <?php checked( !empty( $existing_pages['activate'] ) ); ?> value="page" /> <?php _e( 'Use an existing page:', 'buddypress' ); ?> <?php echo $activate_page_dropdown ?></label></p> … … 518 518 519 519 $installed_plugins = get_plugins(); 520 $installed_themes = get_themes(); 520 521 // Backward-compatibility with WP < 3.4 will be removed in a future release 522 if ( bp_get_major_wp_version() >= 3.4 ) { 523 $installed_themes = wp_get_themes(); 524 } else { 525 $installed_themes = get_themes(); 526 } 527 521 528 $bp_themes = array(); 522 529 … … 540 547 541 548 // Get theme screenshot 542 $current_theme = get_current_theme(); 549 // Backward-compatibility with WP < 3.4 will be removed in a future release 550 if ( bp_get_major_wp_version() >= 3.4 ) { 551 $current_theme = wp_get_theme(); 552 } else { 553 $current_theme = get_current_theme(); 554 } 555 543 556 $screenshot = ''; 544 $themes = get_themes(); 545 546 if ( !empty( $themes[$current_theme]['Screenshot'] ) ) { 547 $screenshot = trailingslashit( get_stylesheet_directory_uri() ) . $themes[$current_theme]['Screenshot']; 557 558 if ( !empty( $installed_themes[$current_theme]['Screenshot'] ) ) { 559 $screenshot = trailingslashit( get_stylesheet_directory_uri() ) . $installad_themes[$current_theme]['Screenshot']; 548 560 } ?> 549 561 … … 882 894 function step_theme_save() { 883 895 global $bp; 884 896 885 897 if ( isset( $_POST['submit'] ) && isset( $_POST['theme'] ) ) { 886 898 check_admin_referer( 'bpwizard_theme' ); … … 1033 1045 function reset_cookie() { 1034 1046 @setcookie( 'bp-wizard-step', '', time() - 3600, COOKIEPATH ); 1035 } 1047 } 1036 1048 } 1037 1049 … … 1040 1052 * 1041 1053 * @global type $bp 1042 * @return boolean 1054 * @return boolean 1043 1055 */ 1044 1056 function bp_get_wizard() { -
trunk/bp-core/bp-core-wpabstraction.php
r5977 r5978 11 11 // Exit if accessed directly 12 12 if ( !defined( 'ABSPATH' ) ) exit; 13 14 /** 15 * Parse the WordPress core version number into the major release 16 * 17 * @since BuddyPress (1.5.2) 18 * @global string $wp_version 19 * @return string 20 */ 21 function bp_get_major_wp_version() { 22 global $wp_version; 23 24 return (float) $wp_version; 25 } 13 26 14 27 /** -
trunk/bp-themes/bp-default/functions.php
r5927 r5978 88 88 89 89 // This theme allows users to set a custom background 90 add_custom_background( 'bp_dtheme_custom_background_style' ); 90 // Backward-compatibility with WP < 3.4 will be removed in a future release 91 if ( bp_get_major_wp_version() >= 3.4 ) { 92 $custom_background_args = array( 93 'wp-head-callback' => 'bp_dtheme_custom_background_style' 94 ); 95 add_theme_support( 'custom-background', $custom_background_args ); 96 } else { 97 add_custom_background( 'bp_dtheme_custom_background_style' ); 98 } 91 99 92 100 // Add custom header support if allowed … … 104 112 105 113 // Add a way for the custom header to be styled in the admin panel that controls custom headers. 106 add_custom_image_header( 'bp_dtheme_header_style', 'bp_dtheme_admin_header_style' ); 114 // Backward-compatibility with WP < 3.4 will be removed in a future release 115 if ( bp_get_major_wp_version() >= 3.4 ) { 116 $custom_header_args = array( 117 'wp-head-callback' => 'bp_dtheme_header_style', 118 'admin-head-callback' => 'bp_dtheme_admin_header_style' 119 ); 120 add_theme_support( 'custom-header', $custom_header_args ); 121 } else { 122 add_custom_image_header( 'bp_dtheme_header_style', 'bp_dtheme_admin_header_style' ); 123 } 107 124 } 108 125
Note: See TracChangeset
for help on using the changeset viewer.