Changeset 1535 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/functions.php
- Timestamp:
- 05/03/2015 09:50:53 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-forums/functions.php
r1521 r1535 5 5 * @package WPBBP 6 6 */ 7 8 /** 9 * Sets up theme defaults and registers support for various WordPress features. 10 */ 11 function wporg_support_setup() { 12 load_theme_textdomain( 'wporg-forums' ); 13 } 14 add_action( 'after_setup_theme', 'wporg_support_setup' ); 7 15 8 16 /** … … 42 50 43 51 // Separator 44 $args['sep'] = is_rtl() ? __( '«', ' bbpress' ) : __( '»', 'bbpress' );52 $args['sep'] = is_rtl() ? __( '«', 'wporg-forums' ) : __( '»', 'wporg-forums' ); 45 53 $args['pad_sep'] = 1; 46 54 $args['sep_before'] = '<span class="bbp-breadcrumb-sep">' ; … … 56 64 // Forum root 57 65 $args['include_root'] = true; 58 $args['root_text'] = 'WordPress Support';66 $args['root_text'] = __( 'WordPress Support', 'wporg-forums' ); 59 67 60 68 // Current … … 76 84 */ 77 85 function wporg_support_custom_views() { 78 bbp_register_view( 'all-topics', __( 'All Topics' ), array( 'order' => 'DESC' ), false );79 // bbp_register_view( 'support-forum-no', __( 'Not Resolved' ), array( 'post_status' => 'closed' ), false );80 // bbp_register_view( 'taggedmodlook', __( 'Tagged modlook' ), array( 'topic-tag' => 'modlook' ) );86 bbp_register_view( 'all-topics', __( 'All Topics', 'wporg-forums' ), array( 'order' => 'DESC' ), false ); 87 // bbp_register_view( 'support-forum-no', __( 'Not Resolved', 'wporg-forums' ), array( 'post_status' => 'closed' ), false ); 88 // bbp_register_view( 'taggedmodlook', __( 'Tagged modlook', 'wporg-forums' ), array( 'topic-tag' => 'modlook' ) ); 81 89 } 82 90 add_action( 'bbp_register_views', 'wporg_support_custom_views' ); … … 110 118 <form role="search" method="get" id="searchform" action=""> 111 119 <div> 112 <h3><?php _e( 'Forum Search', ' bbporg'); ?></h3>113 <label class="screen-reader-text hidden" for="ts"><?php _e( 'Search for:', ' bbporg' ); ?></label>120 <h3><?php _e( 'Forum Search', 'wporg-forums' ); ?></h3> 121 <label class="screen-reader-text hidden" for="ts"><?php _e( 'Search for:', 'wporg-forums' ); ?></label> 114 122 <input type="text" value="<?php echo bb_base_topic_search_query(); ?>" name="ts" id="ts" /> 115 <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', ' bbporg' ); ?>" />123 <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'wporg-forums' ); ?>" /> 116 124 </div> 117 125 </form> … … 125 133 <form role="search" method="get" id="searchform" action=""> 126 134 <div> 127 <h3><?php _e( 'Reply Search', ' bbporg'); ?></h3>128 <label class="screen-reader-text hidden" for="rs"><?php _e( 'Search for:', ' bbporg' ); ?></label>135 <h3><?php _e( 'Reply Search', 'wporg-forums' ); ?></h3> 136 <label class="screen-reader-text hidden" for="rs"><?php _e( 'Search for:', 'wporg-forums' ); ?></label> 129 137 <input type="text" value="<?php echo bb_base_reply_search_query(); ?>" name="rs" id="rs" /> 130 <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', ' bbporg' ); ?>" />138 <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'wporg-forums' ); ?>" /> 131 139 </div> 132 140 </form> … … 140 148 <form role="search" method="get" id="searchform" action=""> 141 149 <div> 142 <h3><?php _e( 'Plugin Search', ' bbporg'); ?></h3>143 <label class="screen-reader-text hidden" for="ps"><?php _e( 'Search for:', ' bbporg' ); ?></label>150 <h3><?php _e( 'Plugin Search', 'wporg-forums' ); ?></h3> 151 <label class="screen-reader-text hidden" for="ps"><?php _e( 'Search for:', 'wporg-forums' ); ?></label> 144 152 <input type="text" value="<?php echo bb_base_plugin_search_query(); ?>" name="ps" id="ts" /> 145 <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', ' bbporg' ); ?>" />153 <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'wporg-forums' ); ?>" /> 146 154 </div> 147 155 </form> … … 206 214 207 215 // Singular/Plural 208 $voice_count = sprintf( _n( '%s participant', '%s participants', $voice_count, ' bbpress' ), bbp_number_format( $voice_count ) );216 $voice_count = sprintf( _n( '%s participant', '%s participants', $voice_count, 'wporg-forums' ), bbp_number_format( $voice_count ) ); 209 217 $last_reply = bbp_get_topic_last_active_id( $topic_id ); 210 218 … … 215 223 <?php if ( !empty( $voice_count ) ) : ?><li class="voice-count"><?php echo $voice_count; ?></li><?php endif; ?> 216 224 <?php if ( !empty( $last_reply ) ) : ?> 217 <li class="topic-freshness-author"><?php printf( __( 'Last reply from: %s', ' bbporg' ), bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_reply, 'size' => '15' ) ) ); ?></li>225 <li class="topic-freshness-author"><?php printf( __( 'Last reply from: %s', 'wporg-forums' ), bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_reply, 'size' => '15' ) ) ); ?></li> 218 226 <?php endif; ?> 219 <?php if ( !empty( $time_since ) ) : ?><li class="topic-freshness-time"><?php printf( __( 'Last activity: %s', ' bbporg' ), $time_since ); ?></li><?php endif; ?>227 <?php if ( !empty( $time_since ) ) : ?><li class="topic-freshness-time"><?php printf( __( 'Last activity: %s', 'wporg-forums' ), $time_since ); ?></li><?php endif; ?> 220 228 <?php if ( is_user_logged_in() ) : ?> 221 229 <?php $_topic_id = bbp_is_reply_edit() ? bbp_get_reply_topic_id() : $topic_id; ?> … … 240 248 // Has replies 241 249 if ( !empty( $reply_count ) ) { 242 $reply_text = sprintf( _n( '%s reply', '%s replies', $reply_count, ' bbpress' ), bbp_number_format( $reply_count ) );250 $reply_text = sprintf( _n( '%s reply', '%s replies', $reply_count, 'wporg-forums' ), bbp_number_format( $reply_count ) ); 243 251 } 244 252 … … 250 258 // Forum has no last active data 251 259 } else { 252 $topic_text = sprintf( _n( '%s topic', '%s topics', $topic_count, ' bbpress' ), bbp_number_format( $topic_count ) );260 $topic_text = sprintf( _n( '%s topic', '%s topics', $topic_count, 'wporg-forums' ), bbp_number_format( $topic_count ) ); 253 261 } 254 262 ?> … … 258 266 <?php if ( !empty( $reply_count ) ) : ?><li class="reply-count"><?php echo $reply_text; ?></li><?php endif; ?> 259 267 <?php if ( !empty( $last_active ) ) : ?> 260 <li class="forum-freshness-author"><?php printf( __( 'Last post by: %s', ' bbporg' ), bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_active ) ) ); ?></li>268 <li class="forum-freshness-author"><?php printf( __( 'Last post by: %s', 'wporg-forums' ), bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_active ) ) ); ?></li> 261 269 <?php endif; ?> 262 <?php if ( !empty( $time_since ) ) : ?><li class="forum-freshness-time"><?php printf( __( 'Last activity: %s', ' bbporg' ), $time_since ); ?></li><?php endif; ?>270 <?php if ( !empty( $time_since ) ) : ?><li class="forum-freshness-time"><?php printf( __( 'Last activity: %s', 'wporg-forums' ), $time_since ); ?></li><?php endif; ?> 263 271 <?php if ( is_user_logged_in() ) : ?> 264 272 <li class="forum-subscribe"><?php bbp_forum_subscription_link( array( 'forum_id' => $forum_id ) ); ?></li>
Note: See TracChangeset
for help on using the changeset viewer.