Whitespace cleanup, TwentyTen <title> standardisation & gettext. See #9015
git-svn-id: http://svn.automattic.com/wordpress/trunk@13112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
392ee06071
commit
df2a293967
|
@ -46,15 +46,11 @@ $locale_file = TEMPLATEPATH . "/languages/$locale.php";
|
|||
if ( is_readable($locale_file) )
|
||||
require_once($locale_file);
|
||||
|
||||
|
||||
|
||||
// Get the page number
|
||||
function get_page_number() {
|
||||
if ( get_query_var('paged') )
|
||||
print ' | ' . __( 'Page ' , 'twentyten') . get_query_var('paged');
|
||||
} // end get_page_number
|
||||
|
||||
|
||||
echo ' | ' . __( 'Page ' , 'twentyten') . get_query_var('paged');
|
||||
}
|
||||
|
||||
// Control excerpt length
|
||||
function new_excerpt_length($length) {
|
||||
|
@ -63,7 +59,6 @@ function new_excerpt_length($length) {
|
|||
add_filter('excerpt_length', 'new_excerpt_length');
|
||||
|
||||
|
||||
|
||||
// Make a nice read more link on excerpts
|
||||
function new_excerpt_more($more) {
|
||||
return ' … <a href="'. get_permalink() . '">' . 'Continue reading <span class="meta-nav">→</span>' . '</a>';
|
||||
|
@ -71,7 +66,6 @@ function new_excerpt_more($more) {
|
|||
add_filter('excerpt_more', 'new_excerpt_more');
|
||||
|
||||
|
||||
|
||||
// Template for comments and pingbacks
|
||||
function twentyten_comment($comment, $args, $depth) {
|
||||
$GLOBALS ['comment'] = $comment; ?>
|
||||
|
@ -79,7 +73,7 @@ function twentyten_comment($comment, $args, $depth) {
|
|||
<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
|
||||
<div id="comment-<?php comment_ID(); ?>">
|
||||
<div class="comment-author vcard">
|
||||
<?php echo get_avatar($comment,$size='40'); ?>
|
||||
<?php echo get_avatar($comment, 40); ?>
|
||||
|
||||
<?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?>
|
||||
</div>
|
||||
|
@ -88,7 +82,7 @@ function twentyten_comment($comment, $args, $depth) {
|
|||
<br />
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),' ','') ?></div>
|
||||
<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),' ','') ?></div>
|
||||
|
||||
<div class="comment-body"><?php comment_text() ?></div>
|
||||
|
||||
|
@ -103,32 +97,24 @@ function twentyten_comment($comment, $args, $depth) {
|
|||
<?php }
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Make the Visual Editor styles match the theme's styles
|
||||
add_filter('mce_css', 'my_editor_style');
|
||||
function my_editor_style($url) {
|
||||
|
||||
if ( !empty($url) )
|
||||
$url .= ',';
|
||||
function my_editor_style($url) {
|
||||
if ( !empty($url) )
|
||||
$url .= ',';
|
||||
|
||||
// Change the path here if using sub-directory
|
||||
$url .= trailingslashit( get_stylesheet_directory_uri() ) . 'editor-style.css';
|
||||
|
||||
return $url;
|
||||
}
|
||||
|
||||
|
||||
add_filter('mce_css', 'my_editor_style');
|
||||
|
||||
// Remove inline styles on gallery shortcode
|
||||
|
||||
function remove_gallery_css() {
|
||||
return "<div class='gallery'>";
|
||||
}
|
||||
add_filter('gallery_style', 'remove_gallery_css');
|
||||
|
||||
|
||||
|
||||
// For category lists on category archives: Returns other categories except the current one (redundant)
|
||||
function cats_meow($glue) {
|
||||
$current_cat = single_cat_title( '', false );
|
||||
|
@ -146,8 +132,6 @@ function cats_meow($glue) {
|
|||
return trim(join( $glue, $cats ));
|
||||
} // end cats_meow
|
||||
|
||||
|
||||
|
||||
// For tag lists on tag archives: Returns other tags except the current one (redundant)
|
||||
function tag_ur_it($glue) {
|
||||
$current_tag = single_tag_title( '', '', false );
|
||||
|
@ -165,7 +149,6 @@ function tag_ur_it($glue) {
|
|||
return trim(join( $glue, $tags ));
|
||||
} // end tag_ur_it
|
||||
|
||||
|
||||
// Register widgetized areas
|
||||
function theme_widgets_init() {
|
||||
// Area 1
|
||||
|
@ -236,7 +219,5 @@ function theme_widgets_init() {
|
|||
|
||||
} // end theme_widgets_init
|
||||
|
||||
|
||||
|
||||
// Add all the groovy widget areas
|
||||
add_action( 'init', 'theme_widgets_init' );
|
||||
add_action( 'init', 'theme_widgets_init' );
|
|
@ -2,12 +2,19 @@
|
|||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<title><?php
|
||||
if ( is_single() ) { single_post_title(); print ' | '; bloginfo('name'); }
|
||||
elseif ( is_home() || is_front_page() ) { bloginfo('name'); print ' | '; bloginfo('description'); get_page_number(); }
|
||||
elseif ( is_page() ) { single_post_title(''); print ' | '; bloginfo('name'); }
|
||||
elseif ( is_search() ) { print 'Search results for ' . esc_html($s); get_page_number(); print ' | '; bloginfo('name'); }
|
||||
elseif ( is_404() ) { print 'Not Found | '; bloginfo('name'); }
|
||||
else { bloginfo('name'); wp_title('|'); get_page_number(); }
|
||||
if ( is_single() ) {
|
||||
single_post_title(); echo ' | '; bloginfo('name');
|
||||
} elseif ( is_home() || is_front_page() ) {
|
||||
bloginfo('name'); echo ' | '; bloginfo('description'); get_page_number();
|
||||
} elseif ( is_page() ) {
|
||||
single_post_title(''); echo ' | '; bloginfo('name');
|
||||
} elseif ( is_search() ) {
|
||||
printf(__('Search results for "%s"', 'twentyten'), esc_html($s)); get_page_number(); echo ' | '; bloginfo('name');
|
||||
} elseif ( is_404() ) {
|
||||
_e('Not Found', 'twentyten'); echo ' | '; bloginfo('name');
|
||||
} else {
|
||||
wp_title(''); echo ' | '; bloginfo('name'); get_page_number();
|
||||
}
|
||||
?></title>
|
||||
|
||||
<meta http-equiv="content-type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
|
||||
|
|
Loading…
Reference in New Issue