Changeset 5747
- Timestamp:
- 02/13/2012 03:26:12 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/functions.php
r5737 r5747 59 59 */ 60 60 function bp_dtheme_setup() { 61 global $bp;62 61 63 62 // Load the AJAX functions for the theme … … 66 65 // This theme styles the visual editor with editor-style.css to match the theme style. 67 66 add_editor_style(); 67 68 // This theme comes with all the BuddyPress goodies 69 add_theme_support( 'buddypress' ); 68 70 69 71 // This theme uses post thumbnails … … 208 210 wp_enqueue_style( 'bp-default-responsive', get_template_directory_uri() . '/_inc/css/responsive.css', array( 'bp-default-main' ), $version ); 209 211 210 if ( is_rtl() ) 212 if ( is_rtl() ) { 211 213 wp_enqueue_style( 'bp-default-responsive-rtl', get_template_directory_uri() . '/_inc/css/responsive-rtl.css', array( 'bp-default-responsive' ), $version ); 214 } 212 215 } 213 216 } … … 376 379 */ 377 380 function bp_dtheme_widgets_init() { 378 // Register the widget columns 381 379 382 // Area 1, located in the sidebar. Empty by default. 380 383 register_sidebar( array( … … 585 588 * Used when the custom menus haven't been configured. 586 589 * 587 * @global object $bp Global BuddyPress settings object588 590 * @param array Menu arguments from wp_nav_menu() 589 591 * @see wp_nav_menu() … … 591 593 */ 592 594 function bp_dtheme_main_nav( $args ) { 593 global $bp;594 595 595 $pages_args = array( 596 596 'depth' => 0, … … 626 626 * Applies BuddyPress customisations to the post comment form. 627 627 * 628 * @global string $user_identity The display name of the user629 628 * @param array $default_labels The default options for strings, fields etc in the form 630 629 * @see comment_form() … … 632 631 */ 633 632 function bp_dtheme_comment_form( $default_labels ) { 634 global $user_identity;635 633 636 634 $commenter = wp_get_current_commenter(); 637 $req = get_option( 'require_name_email' );638 $aria_req = ( $req ? " aria-required='true'" : '' );639 $fields = array(635 $req = get_option( 'require_name_email' ); 636 $aria_req = ( $req ? " aria-required='true'" : '' ); 637 $fields = array( 640 638 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name', 'buddypress' ) . ( $req ? '<span class="required"> *</span>' : '' ) . '</label> ' . 641 639 '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>', … … 714 712 */ 715 713 function bp_dtheme_sidebar_login_redirect_to() { 716 $redirect_to = apply_filters( 'bp_no_access_redirect', !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '' ); 717 ?> 714 $redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : ''; 715 $redirect_to = apply_filters( 'bp_no_access_redirect', $redirect_to ); ?> 716 718 717 <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> 718 719 719 <?php 720 720 } … … 726 726 * Display navigation to next/previous pages when applicable 727 727 * 728 * @global unknown$wp_query728 * @global WP_Query $wp_query 729 729 * @param string $nav_id DOM ID for this navigation 730 730 * @since 1.5 … … 733 733 global $wp_query; 734 734 735 if ( $wp_query->max_num_pages > 1 ) : ?> 735 if ( !empty( $wp_query->max_num_pages ) && $wp_query->max_num_pages > 1 ) : ?> 736 736 737 <div id="<?php echo $nav_id; ?>" class="navigation"> 737 738 <div class="alignleft"><?php next_posts_link( __( '← Previous Entries', 'buddypress' ) ); ?></div> 738 739 <div class="alignright"><?php previous_posts_link( __( 'Next Entries →', 'buddypress' ) ); ?></div> 739 740 </div><!-- #<?php echo $nav_id; ?> --> 741 740 742 <?php endif; 741 743 }
Note: See TracChangeset
for help on using the changeset viewer.