Changeset 5717 for trunk/bp-core/admin/bp-core-update.php
- Timestamp:
- 02/11/2012 06:03:19 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/admin/bp-core-update.php
r5683 r5717 369 369 370 370 <?php if ( $page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&show_option_none=" . __( '- Select -', 'buddypress' ) . $existing_blog_page ) ) : ?> 371 371 372 <p><input type="radio" name="bp_pages[blogs]" value="page" /> <?php _e( 'Use an existing page:', 'buddypress' ); ?><?php echo $page_dropdown ?></p> 373 372 374 <?php endif ?> 373 375 </td> … … 487 489 <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> 488 490 489 <?php if ( $members_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&show_option_none=" . __( '- Select -', 'buddypress' ) . $existing_pages['members'] ) ) : ?> 491 <?php if ( $members_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['members']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 492 490 493 <p><label><input type="radio" name="bp_pages[members]" <?php checked( !empty( $existing_pages['members'] ) ); ?> value="page" /> <?php _e( 'Use an existing page:', 'buddypress' ); ?> <?php echo $members_page_dropdown ?></label></p> 494 491 495 <?php endif ?> 492 496 </td> … … 503 507 <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> 504 508 505 <?php if ( $activity_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&s how_option_none=" . __( '- Select -', 'buddypress' ) . $existing_pages['activity']) ) : ?>509 <?php if ( $activity_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['activity']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 506 510 <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> 507 511 <?php endif ?> … … 521 525 <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> 522 526 523 <?php if ( $groups_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&s how_option_none=" . __( '- Select -', 'buddypress' ) . $existing_pages['groups']) ) : ?>527 <?php if ( $groups_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['groups']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 524 528 <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> 525 529 <?php endif ?> … … 539 543 <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> 540 544 541 <?php if ( $forums_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&s how_option_none=" . __( '- Select -', 'buddypress' ) . $existing_pages['forums']) ) : ?>545 <?php if ( $forums_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['forums']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 542 546 <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> 543 547 <?php endif ?> … … 558 562 <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> 559 563 560 <?php if ( $blogs_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&s how_option_none=" . __( '- Select -', 'buddypress' ) . $existing_pages['blogs']) ) : ?>564 <?php if ( $blogs_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['blogs']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 561 565 <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> 562 566 <?php endif ?> … … 574 578 <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> 575 579 576 <?php if ( $register_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&s how_option_none=" . __( '- Select -', 'buddypress' ) . $existing_pages['register']) ) : ?>580 <?php if ( $register_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['register']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 577 581 <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> 578 582 <?php endif ?> … … 588 592 <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> 589 593 590 <?php if ( $activate_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&s how_option_none=" . __( '- Select -', 'buddypress' ) . $existing_pages['activate']) ) : ?>594 <?php if ( $activate_page_dropdown = wp_dropdown_pages( "name=bp-blogs-page&echo=0&selected={$existing_pages['activate']}&show_option_none=" . __( '- Select -', 'buddypress' ) ) ) : ?> 591 595 <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> 592 596 <?php endif ?> … … 614 618 $prefix = ''; 615 619 $permalink_structure = get_option( 'permalink_structure' ); 616 $using_permalinks = ( !empty( $permalink_structure ) ) ? true : false;617 620 $structures = array( '', $prefix . '/%year%/%monthnum%/%day%/%postname%/', $prefix . '/%year%/%monthnum%/%postname%/', $prefix . '/archives/%post_id%' ); 618 621 619 622 // If we're using permalinks already, adjust text accordingly 620 if ( $permalink_structure)623 if ( !empty( $permalink_structure ) ) 621 624 $permalink_setup_text = __( 'Congratulations! You are already using pretty permalinks, which BuddyPress requires. If you\'d like to change your settings, you may do so now. If you\'re happy with your current settings, click Save & Next to continue.', 'buddypress' ); 622 625 else … … 667 670 $installed_plugins = get_plugins(); 668 671 $installed_themes = get_themes(); 672 $bp_themes = array(); 669 673 670 674 $template_pack_installed = false; 671 $bp_autotheme_installed = false;672 675 $bp_theme_installed = false; 673 676 … … 692 695 $themes = get_themes(); 693 696 694 if ( !empty( $themes[$current_theme]['Screenshot'] ) ) 697 if ( !empty( $themes[$current_theme]['Screenshot'] ) ) { 695 698 $screenshot = trailingslashit( get_stylesheet_directory_uri() ) . $themes[$current_theme]['Screenshot']; 696 ?>699 } ?> 697 700 698 701 <script type="text/javascript"> … … 918 921 919 922 function step_components_save() { 923 920 924 if ( isset( $_POST['submit'] ) && isset( $_POST['bp_components'] ) ) { 925 921 926 check_admin_referer( 'bpwizard_components' ); 922 927 … … 924 929 925 930 // Settings form submitted, now save the settings. 926 foreach ( (array) $_POST['bp_components'] as $key => $value )931 foreach ( (array) $_POST['bp_components'] as $key => $value ) { 927 932 $active_components[$key] = 1; 933 } 928 934 929 935 bp_update_option( 'bp-active-components', $active_components ); … … 951 957 $existing_pages = bp_core_update_get_page_meta( 'bp-pages' ); 952 958 953 foreach ( (array) $existing_pages as $page_id )959 foreach ( (array) $existing_pages as $page_id ) { 954 960 wp_delete_post( $page_id, true ); 961 } 955 962 956 963 $blog_pages = $this->setup_pages( (array)$_POST['bp_pages'] ); … … 1364 1371 wp_enqueue_style( 'bp-admin-css', apply_filters( 'bp_core_admin_css', plugins_url( '/buddypress' ) . '/bp-core/css/admin.css' ), array(), '20110723' ); 1365 1372 wp_enqueue_script( 'bp-update-js', apply_filters( 'bp_core_update_js', plugins_url( '/buddypress' ) . '/bp-core/js/update.js' ), array( 'jquery' ), '20110723' ); 1366 1367 1373 } 1368 1374
Note: See TracChangeset
for help on using the changeset viewer.