Changeset 3109
- Timestamp:
- 05/06/2011 10:45:55 AM (15 years ago)
- Location:
- branches/plugin
- Files:
-
- 1 added
- 10 edited
-
bbp-includes/bbp-general-template.php (modified) (4 diffs)
-
bbp-includes/bbp-shortcodes.php (modified) (2 diffs)
-
bbp-includes/bbp-topic-template.php (modified) (2 diffs)
-
bbp-themes/bbp-twentyten/bbpress/form-anonymous.php (modified) (1 diff)
-
bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php (modified) (6 diffs)
-
bbp-themes/bbp-twentyten/bbpress/nav-breadcrumb.php (added)
-
bbp-themes/bbp-twentyten/css/bbpress.css (modified) (1 diff)
-
bbp-themes/bbp-twentyten/single-forum.php (modified) (1 diff)
-
bbp-themes/bbp-twentyten/single-reply.php (modified) (1 diff)
-
bbp-themes/bbp-twentyten/single-topic.php (modified) (1 diff)
-
bbp-themes/bbp-twentyten/taxonomy-topic-tag.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-general-template.php
r3108 r3109 1088 1088 * @uses bbp_get_breadcrumb() To get the breadcrumb 1089 1089 */ 1090 function bbp_title_breadcrumb( $sep = ' ←' ) {1090 function bbp_title_breadcrumb( $sep = ' › ' ) { 1091 1091 echo bbp_get_breadcrumb( $sep ); 1092 1092 } … … 1100 1100 * @uses bbp_get_breadcrumb() To get the breadcrumb 1101 1101 */ 1102 function bbp_breadcrumb( $sep = ' ←', $current_page = true ) {1102 function bbp_breadcrumb( $sep = ' › ', $current_page = true ) { 1103 1103 echo bbp_get_breadcrumb( $sep ); 1104 1104 } … … 1124 1124 * @return string Breadcrumbs 1125 1125 */ 1126 function bbp_get_breadcrumb( $sep = ' ←', $current_page = true ) {1126 function bbp_get_breadcrumb( $sep = ' › ', $current_page = true ) { 1127 1127 global $post, $bbp; 1128 1128 … … 1168 1168 $breadcrumbs[] = get_the_title(); 1169 1169 1170 // Allow the separator of the breadcrumb to be easily changed 1171 $sep = apply_filters( 'bbp_breadcrumb_separator', $sep ); 1172 1170 1173 // Build the trail 1171 if ( !empty( $breadcrumbs ) ) 1172 $trail = implode( ' ' . $sep . ' ', $breadcrumbs ); 1173 else 1174 $trail = ''; 1174 $trail = !empty( $breadcrumbs ) ? implode( $sep, $breadcrumbs ) : ''; 1175 1175 1176 1176 return apply_filters( 'bbp_get_breadcrumb', $trail ); -
branches/plugin/bbp-includes/bbp-shortcodes.php
r3095 r3109 192 192 // Start output buffer 193 193 $this->_ob_start(); 194 195 // Display breadcrumb if a subforum 196 if ( bbp_get_forum_parent( $forum_id ) ) 197 bbp_get_template_part( 'bbpress/nav', 'breadcrumb' ); 194 198 195 199 // Check forum caps … … 356 360 // Start output buffer 357 361 $this->_ob_start(); 362 363 // Breadcrumb 364 bbp_get_template_part( 'bbpress/nav', 'breadcrumb' ); 358 365 359 366 // Check forum caps -
branches/plugin/bbp-includes/bbp-topic-template.php
r3101 r3109 1719 1719 1720 1720 $defaults = array( 1721 'before' => '< p>' . __( 'Tagged:', 'bbpress' ) . ' ',1721 'before' => '<div class="bbp-topic-tags"><p>' . __( 'Tagged:', 'bbpress' ) . ' ', 1722 1722 'sep' => ', ', 1723 'after' => '</p> '1723 'after' => '</p></div>' 1724 1724 ); 1725 1725 … … 2566 2566 } 2567 2567 2568 /** Topic Tags ****************************************************************/ 2569 2570 /** 2571 * Output the id of the current tag 2572 * 2573 * @since bbPress (r3109) 2574 * 2575 * @uses bbp_get_topic_tag_id() 2576 */ 2577 function bbp_topic_tag_id() { 2578 echo bbp_get_topic_tag_id(); 2579 } 2580 /** 2581 * Return the id of the current tag 2582 * 2583 * @since bbPress (r3109) 2584 * 2585 * @uses get_term_by() 2586 * @uses get_query_var() 2587 * @uses apply_filters() 2588 * 2589 * @return string Term Name 2590 */ 2591 function bbp_get_topic_tag_id() { 2592 2593 // Get the term 2594 $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); 2595 2596 // Add before and after if description exists 2597 if ( !empty( $term->term_id ) ) 2598 $retval = $term->term_id; 2599 2600 // No id 2601 else 2602 $retval = ''; 2603 2604 return apply_filters( 'bbp_get_topic_tag_id', $retval ); 2605 } 2606 2607 /** 2608 * Output the name of the current tag 2609 * 2610 * @since bbPress (r3109) 2611 * 2612 * @uses bbp_get_topic_tag_name() 2613 */ 2614 function bbp_topic_tag_name() { 2615 echo bbp_get_topic_tag_name(); 2616 } 2617 /** 2618 * Return the name of the current tag 2619 * 2620 * @since bbPress (r3109) 2621 * 2622 * @uses get_term_by() 2623 * @uses get_query_var() 2624 * @uses apply_filters() 2625 * 2626 * @return string Term Name 2627 */ 2628 function bbp_get_topic_tag_name() { 2629 2630 // Get the term 2631 $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); 2632 2633 // Add before and after if description exists 2634 if ( !empty( $term->name ) ) 2635 $retval = $term->name; 2636 2637 // No name 2638 else 2639 $retval = ''; 2640 2641 return apply_filters( 'bbp_get_topic_tag_name', $retval ); 2642 } 2643 2644 /** 2645 * Output the slug of the current tag 2646 * 2647 * @since bbPress (r3109) 2648 * 2649 * @uses bbp_get_topic_tag_slug() 2650 */ 2651 function bbp_topic_tag_slug() { 2652 echo bbp_get_topic_tag_slug(); 2653 } 2654 /** 2655 * Return the slug of the current tag 2656 * 2657 * @since bbPress (r3109) 2658 * 2659 * @uses get_term_by() 2660 * @uses get_query_var() 2661 * @uses apply_filters() 2662 * 2663 * @return string Term Name 2664 */ 2665 function bbp_get_topic_tag_slug() { 2666 2667 // Get the term 2668 $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); 2669 2670 // Add before and after if description exists 2671 if ( !empty( $term->slug ) ) 2672 $retval = $term->slug; 2673 2674 // No slug 2675 else 2676 $retval = ''; 2677 2678 return apply_filters( 'bbp_get_topic_tag_slug', $retval ); 2679 } 2680 2681 /** 2682 * Output the description of the current tag 2683 * 2684 * @since bbPress (r3109) 2685 * 2686 * @uses bbp_get_topic_tag_description() 2687 */ 2688 function bbp_topic_tag_description( $args = array() ) { 2689 echo bbp_get_topic_tag_description( $args ); 2690 } 2691 /** 2692 * Return the description of the current tag 2693 * 2694 * @since bbPress (r3109) 2695 * 2696 * @uses get_term_by() 2697 * @uses get_query_var() 2698 * @uses apply_filters() 2699 * 2700 * @return string Term Name 2701 */ 2702 function bbp_get_topic_tag_description( $args = array() ) { 2703 global $bbp; 2704 2705 $defaults = array( 2706 'before' => '<div class="bbp-topic-tag-description"><p>', 2707 'after' => '</p></div>' 2708 ); 2709 $r = wp_parse_args( $args, $defaults ); 2710 extract( $r ); 2711 2712 // Get the term 2713 $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); 2714 2715 // Add before and after if description exists 2716 if ( !empty( $term->description ) ) 2717 $retval = $before . $term->description . $after; 2718 2719 // No description, no HTML 2720 else 2721 $retval = ''; 2722 2723 return apply_filters( 'bbp_get_topic_tag_description', $retval, $args ); 2724 } 2725 2568 2726 /** Forms *********************************************************************/ 2569 2727 -
branches/plugin/bbp-themes/bbp-twentyten/bbpress/form-anonymous.php
r2943 r3109 10 10 ?> 11 11 12 <?php if ( bbp_is_anonymous() || ( bbp_is_topic_edit() && bbp_is_topic_anonymous() ) || ( bbp_is_reply_edit() && bbp_is_reply_anonymous() ) ) : ?>12 <?php if ( bbp_is_anonymous() || ( bbp_is_topic_edit() && bbp_is_topic_anonymous() ) || ( bbp_is_reply_edit() && bbp_is_reply_anonymous() ) ) : ?> 13 13 14 <fieldset>15 <legend><?php ( bbp_is_topic_edit() || bbp_is_reply_edit() ) ? _e( 'Author information', 'bbpress' ) : _e( 'Your information:', 'bbpress' ); ?></legend>16 <p>17 <label for="bbp_anonymous_author"><?php _e( 'Name (required):', 'bbpress' ); ?></label><br />18 <input type="text" id="bbp_anonymous_author" value="<?php bbp_is_topic_edit() ? bbp_topic_author() : bbp_is_reply_edit() ? bbp_reply_author() : bbp_current_anonymous_user_data( 'name' ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_name" />19 </p>14 <fieldset> 15 <legend><?php ( bbp_is_topic_edit() || bbp_is_reply_edit() ) ? _e( 'Author information', 'bbpress' ) : _e( 'Your information:', 'bbpress' ); ?></legend> 16 <p> 17 <label for="bbp_anonymous_author"><?php _e( 'Name (required):', 'bbpress' ); ?></label><br /> 18 <input type="text" id="bbp_anonymous_author" value="<?php bbp_is_topic_edit() ? bbp_topic_author() : bbp_is_reply_edit() ? bbp_reply_author() : bbp_current_anonymous_user_data( 'name' ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_name" /> 19 </p> 20 20 21 <p>22 <label for="bbp_anonymous_email"><?php _e( 'Mail (will not be published) (required):', 'bbpress' ); ?></label><br />23 <input type="text" id="bbp_anonymous_email" value="<?php echo ( bbp_is_topic_edit() || bbp_is_reply_edit() ) ? get_post_meta( $post->ID, '_bbp_anonymous_email', true ) : bbp_get_current_anonymous_user_data( 'email' ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_email" />24 </p>21 <p> 22 <label for="bbp_anonymous_email"><?php _e( 'Mail (will not be published) (required):', 'bbpress' ); ?></label><br /> 23 <input type="text" id="bbp_anonymous_email" value="<?php echo ( bbp_is_topic_edit() || bbp_is_reply_edit() ) ? get_post_meta( $post->ID, '_bbp_anonymous_email', true ) : bbp_get_current_anonymous_user_data( 'email' ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_email" /> 24 </p> 25 25 26 <p>27 <label for="bbp_anonymous_website"><?php _e( 'Website:', 'bbpress' ); ?></label><br />28 <input type="text" id="bbp_anonymous_website" value="<?php bbp_is_topic_edit() ? bbp_topic_author_url() : bbp_is_reply_edit() ? bbp_reply_author_url() : bbp_current_anonymous_user_data( 'website' ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_website" />29 </p>30 </fieldset>26 <p> 27 <label for="bbp_anonymous_website"><?php _e( 'Website:', 'bbpress' ); ?></label><br /> 28 <input type="text" id="bbp_anonymous_website" value="<?php bbp_is_topic_edit() ? bbp_topic_author_url() : bbp_is_reply_edit() ? bbp_reply_author_url() : bbp_current_anonymous_user_data( 'website' ); ?>" tabindex="<?php bbp_tab_index(); ?>" size="40" name="bbp_anonymous_website" /> 29 </p> 30 </fieldset> 31 31 32 <?php endif; ?>32 <?php endif; ?> -
branches/plugin/bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php
r2943 r3109 8 8 */ 9 9 10 //@todo - remove $term variable references 11 $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); 10 ?> 12 11 13 ?>14 12 <?php if ( current_user_can( 'edit_topic_tags' ) ) : ?> 15 13 16 <div id="edit-topic-tag-<?php echo $term->term_id; ?>" class="bbp-topic-tag-form">14 <div id="edit-topic-tag-<?php bbp_topic_tag_id(); ?>" class="bbp-topic-tag-form"> 17 15 18 16 <fieldset> 19 17 20 <legend><?php printf( __( 'Manage Tag: "%s"', 'bbpress' ), $term->name); ?></legend>18 <legend><?php printf( __( 'Manage Tag: "%s"', 'bbpress' ), bbp_get_topic_tag_name() ); ?></legend> 21 19 22 20 <fieldset id="tag-rename"> … … 36 34 <div class="alignleft"> 37 35 <label for="tag-name"><?php _e( 'Name:', 'bbpress' ); ?></label> 38 <input type="text" name="tag-name" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( $term->name); ?>" />36 <input type="text" name="tag-name" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( bbp_get_topic_tag_slug() ); ?>" /> 39 37 </div> 40 38 41 39 <div class="alignleft"> 42 40 <label for="tag-name"><?php _e( 'Slug:', 'bbpress' ); ?></label> 43 <input type="text" name="tag-slug" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( apply_filters( 'editable_slug', $term->slug) ); ?>" />41 <input type="text" name="tag-slug" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( apply_filters( 'editable_slug', bbp_get_topic_tag_slug() ) ); ?>" /> 44 42 </div> 45 43 … … 47 45 <input type="submit" name="submit" tabindex="<?php bbp_tab_index(); ?>" value="<?php esc_attr_e( 'Update', 'bbpress' ); ?>" /><br /> 48 46 49 <input type="hidden" name="tag-id" value="<?php echo esc_attr( $term->term_id); ?>" />47 <input type="hidden" name="tag-id" value="<?php bbp_get_topic_tag_id(); ?>" /> 50 48 <input type="hidden" name="action" value="bbp-update-topic-tag" /> 51 49 52 <?php wp_nonce_field( 'update-tag_' . $term->term_id); ?>50 <?php wp_nonce_field( 'update-tag_' . bbp_get_topic_tag_id() ); ?> 53 51 54 52 </div> … … 74 72 <div class="alignright"> 75 73 <input type="submit" name="submit" tabindex="<?php bbp_tab_index(); ?>" value="<?php esc_attr_e( 'Merge', 'bbpress' ); ?>" 76 onclick="return confirm('<?php echo esc_js( sprintf( __( 'Are you sure you want to merge the "%s" tag into the tag you specified?', 'bbpress' ), $term->name) ); ?>');" />74 onclick="return confirm('<?php echo esc_js( sprintf( __( 'Are you sure you want to merge the "%s" tag into the tag you specified?', 'bbpress' ), bbp_get_topic_tag_name() ) ); ?>');" /> 77 75 78 <input type="hidden" name="tag-id" value="<?php echo $term->term_id; ?>" />76 <input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" /> 79 77 <input type="hidden" name="action" value="bbp-merge-topic-tag" /> 80 78 81 <?php wp_nonce_field( 'merge-tag_' . $term->term_id); ?>79 <?php wp_nonce_field( 'merge-tag_' . bbp_get_topic_tag_id() ); ?> 82 80 </div> 83 81 </form> … … 96 94 <div class="bbp-template-notice"> 97 95 <p><?php _e( 'Deleting a tag cannot be undone.', 'bbpress' ); ?></p> 98 <p><?php _e( 'Any links to this tag will no longer function.', 'bbpress' ); ?></p> 96 <p><?php _e( 'Any links to this tag will no longer function.', 'bbpress' ); ?></p> 99 97 </div> 100 98 … … 103 101 <div class="alignright"> 104 102 <input type="submit" name="submit" tabindex="<?php bbp_tab_index(); ?>" value="<?php _e( 'Delete', 'bbpress' ); ?>" 105 onclick="return confirm('<?php echo esc_js( sprintf( __( 'Are you sure you want to delete the "%s" tag? This is permanent and cannot be undone.', 'bbpress' ), $term->name) ); ?>');" />103 onclick="return confirm('<?php echo esc_js( sprintf( __( 'Are you sure you want to delete the "%s" tag? This is permanent and cannot be undone.', 'bbpress' ), bbp_get_topic_tag_name() ) ); ?>');" /> 106 104 107 <input type="hidden" name="tag-id" value="<?php echo $term->term_id; ?>" />105 <input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" /> 108 106 <input type="hidden" name="action" value="bbp-delete-topic-tag" /> 109 107 110 <?php wp_nonce_field( 'delete-tag_' . $term->term_id); ?>108 <?php wp_nonce_field( 'delete-tag_' . bbp_get_topic_tag_id() ); ?> 111 109 </div> 112 110 </form> -
branches/plugin/bbp-themes/bbp-twentyten/css/bbpress.css
r3103 r3109 30 30 #main table.bbp-replies { 31 31 clear: left; 32 } 33 34 /* =Breadcrumb and Tags 35 -------------------------------------------------------------- */ 36 37 div.bbp-breadcrumb { 38 float: left; 39 } 40 41 div.bbp-breadcrumb, 42 div.bbp-topic-tags { 43 font-size: 12px; 44 } 45 46 #content div.bbp-breadcrumb p, 47 #content div.bbp-topic-tags p { 48 margin-bottom: 10px 49 } 50 51 div.bbp-topic-tags { 52 float: right; 32 53 } 33 54 -
branches/plugin/bbp-themes/bbp-twentyten/single-forum.php
r3057 r3109 22 22 23 23 <div id="forum-<?php bbp_forum_id(); ?>" class="bbp-forum-info"> 24 <h1 class="entry-title"><?php bbp_ title_breadcrumb(); ?></h1>24 <h1 class="entry-title"><?php bbp_forum_title(); ?></h1> 25 25 <div class="entry-content"> 26 27 <?php if ( bbp_get_forum_parent() ) bbp_get_template_part( 'bbpress/nav', 'breadcrumb' ); ?> 26 28 27 29 <?php the_content(); ?> -
branches/plugin/bbp-themes/bbp-twentyten/single-reply.php
r2943 r3109 20 20 21 21 <div id="bbp-reply-wrapper-<?php bbp_reply_id(); ?>" class="bbp-reply-wrapper"> 22 <h1 class="entry-title"><?php bbp_title_breadcrumb(); ?></h1> 22 <h1 class="entry-title"><?php bbp_reply_title(); ?></h1> 23 24 <?php bbp_get_template_part( 'bbpress/nav', 'breadcrumb' ); ?> 25 23 26 <div class="entry-content"> 24 27 -
branches/plugin/bbp-themes/bbp-twentyten/single-topic.php
r3057 r3109 22 22 23 23 <div id="bbp-topic-wrapper-<?php bbp_topic_id(); ?>" class="bbp-topic-wrapper"> 24 <h1 class="entry-title"><?php bbp_t itle_breadcrumb(); ?></h1>24 <h1 class="entry-title"><?php bbp_topic_title(); ?></h1> 25 25 <div class="entry-content"> 26 27 <?php bbp_get_template_part( 'bbpress/nav', 'breadcrumb' ); ?> 26 28 27 29 <?php bbp_topic_tag_list(); ?> -
branches/plugin/bbp-themes/bbp-twentyten/taxonomy-topic-tag.php
r3057 r3109 7 7 * @subpackage Theme 8 8 */ 9 10 //@todo - remove $term variable references11 $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );12 9 13 10 ?> … … 21 18 22 19 <div id="topic-tag" class="bbp-topic-tag"> 23 <h1 class="entry-title"><?php printf( __( 'Topic Tag: %s', 'bbpress' ), '<span>' . $term->name. '</span>' ); ?></h1>20 <h1 class="entry-title"><?php printf( __( 'Topic Tag: %s', 'bbpress' ), '<span>' . bbp_get_topic_tag_name() . '</span>' ); ?></h1> 24 21 25 22 <div class="entry-content"> 26 23 27 <?php term_description(); ?>24 <?php bbp_topic_tag_description(); ?> 28 25 29 <?php bbp_get_template_part( 'bbpress/pagination', 'topics' );?>26 <?php if ( bbp_has_topics() ) : ?> 30 27 31 <?php bbp_get_template_part( 'bbpress/loop','topics' ); ?>28 <?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?> 32 29 33 <?php bbp_get_template_part( 'bbpress/pagination','topics' ); ?>30 <?php bbp_get_template_part( 'bbpress/loop', 'topics' ); ?> 34 31 35 <?php bbp_get_template_part( 'bbpress/form', 'topic-tag' ); ?> 32 <?php bbp_get_template_part( 'bbpress/pagination', 'topics' ); ?> 33 34 <?php bbp_get_template_part( 'bbpress/form', 'topic-tag' ); ?> 35 36 <?php else : ?> 37 38 <?php bbp_get_template_part( 'bbpress/no', 'topics' ); ?> 39 40 <?php endif; ?> 36 41 37 42 </div>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)