mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-08 08:31:48 +01:00
More Twenty Eleven cleanup and add the comment-awaiting-moderation class. see #17198. see #15206 for history on the CSS class.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2b71bba9c2
commit
bb306c3442
@ -72,11 +72,10 @@ if ( ! function_exists( 'twentyeleven_setup' ) ):
|
|||||||
*/
|
*/
|
||||||
function twentyeleven_setup() {
|
function twentyeleven_setup() {
|
||||||
|
|
||||||
/**
|
/* Make Twenty Eleven available for translation.
|
||||||
* Make theme available for translation
|
* Translations can be added to the /languages/ directory.
|
||||||
* Translations can be filed in the /languages/ directory
|
|
||||||
* If you're building a theme based on Twenty Eleven, use a find and replace
|
* If you're building a theme based on Twenty Eleven, use a find and replace
|
||||||
* to change 'twentyeleven' to the name of your theme in all the template files
|
* to change 'twentyeleven' to the name of your theme in all the template files.
|
||||||
*/
|
*/
|
||||||
load_theme_textdomain( 'twentyeleven', TEMPLATEPATH . '/languages' );
|
load_theme_textdomain( 'twentyeleven', TEMPLATEPATH . '/languages' );
|
||||||
|
|
||||||
@ -85,27 +84,17 @@ function twentyeleven_setup() {
|
|||||||
if ( is_readable( $locale_file ) )
|
if ( is_readable( $locale_file ) )
|
||||||
require_once( $locale_file );
|
require_once( $locale_file );
|
||||||
|
|
||||||
/**
|
// Load up our theme options page and related code.
|
||||||
* Load up our theme options page
|
|
||||||
*/
|
|
||||||
require( dirname( __FILE__ ) . '/inc/theme-options.php' );
|
require( dirname( __FILE__ ) . '/inc/theme-options.php' );
|
||||||
|
|
||||||
/**
|
// Grab Twenty Eleven's Epherma widget.
|
||||||
* Grab Twenty Eleven's Custom Widgets
|
|
||||||
*/
|
|
||||||
require( dirname( __FILE__ ) . '/inc/widgets.php' );
|
require( dirname( __FILE__ ) . '/inc/widgets.php' );
|
||||||
|
|
||||||
/**
|
// Add default posts and comments RSS feed links to <head>.
|
||||||
* Add default posts and comments RSS feed links to head
|
|
||||||
*/
|
|
||||||
add_theme_support( 'automatic-feed-links' );
|
add_theme_support( 'automatic-feed-links' );
|
||||||
|
|
||||||
/**
|
// This theme uses wp_nav_menu() in one location.
|
||||||
* This theme uses wp_nav_menu() in one location.
|
register_nav_menu( 'primary', __( 'Primary Menu', 'twentyeleven' ) );
|
||||||
*/
|
|
||||||
register_nav_menus( array(
|
|
||||||
'primary' => __( 'Primary Menu', 'twentyeleven' ),
|
|
||||||
) );
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add support for an Aside Post Format
|
* Add support for an Aside Post Format
|
||||||
@ -476,25 +465,21 @@ function twentyeleven_footer_sidebar_class() {
|
|||||||
if ( is_active_sidebar( 'sidebar-5' ) )
|
if ( is_active_sidebar( 'sidebar-5' ) )
|
||||||
$count++;
|
$count++;
|
||||||
|
|
||||||
|
$class = '';
|
||||||
|
|
||||||
switch ( $count ) {
|
switch ( $count ) {
|
||||||
case '1':
|
case '1':
|
||||||
$class = 'one';
|
$class = 'one';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '2':
|
case '2':
|
||||||
$class = 'two';
|
$class = 'two';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '3':
|
case '3':
|
||||||
$class = 'three';
|
$class = 'three';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
|
||||||
$class = '';
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( '' != $class )
|
if ( $class )
|
||||||
echo 'class="' . $class . '"';
|
echo 'class="' . $class . '"';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -545,7 +530,7 @@ function twentyeleven_comment( $comment, $args, $depth ) {
|
|||||||
</div><!-- .comment-author .vcard -->
|
</div><!-- .comment-author .vcard -->
|
||||||
|
|
||||||
<?php if ( $comment->comment_approved == '0' ) : ?>
|
<?php if ( $comment->comment_approved == '0' ) : ?>
|
||||||
<em><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>
|
<em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyeleven' ); ?></em>
|
||||||
<br />
|
<br />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user