diff --git a/src/wp-content/themes/twentyeleven/404.php b/src/wp-content/themes/twentyeleven/404.php
index ae0ad04800..63437b9ae1 100644
--- a/src/wp-content/themes/twentyeleven/404.php
+++ b/src/wp-content/themes/twentyeleven/404.php
@@ -34,7 +34,7 @@ get_header(); ?>
' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'twentyeleven' ), convert_smilies( ':)' ) ) . '
';
- the_widget( 'WP_Widget_Archives', array('count' => 0 , 'dropdown' => 1 ), array( 'after_title' => ''.$archive_content ) );
+ the_widget( 'WP_Widget_Archives', array( 'count' => 0, 'dropdown' => 1 ), array( 'after_title' => '' . $archive_content ) );
?>
diff --git a/src/wp-content/themes/twentyeleven/author.php b/src/wp-content/themes/twentyeleven/author.php
index 28775d94b9..274d5b87a4 100644
--- a/src/wp-content/themes/twentyeleven/author.php
+++ b/src/wp-content/themes/twentyeleven/author.php
@@ -26,7 +26,7 @@ get_header(); ?>
?>
diff --git a/src/wp-content/themes/twentyeleven/functions.php b/src/wp-content/themes/twentyeleven/functions.php
index 483b88df50..74e0b20c88 100644
--- a/src/wp-content/themes/twentyeleven/functions.php
+++ b/src/wp-content/themes/twentyeleven/functions.php
@@ -330,16 +330,16 @@ if ( ! function_exists( 'twentyeleven_admin_header_image' ) ) :
function twentyeleven_admin_header_image() { ?>
-
-
-
+ $color = get_header_textcolor();
+ $image = get_header_image();
+ $style = 'display: none;';
+ if ( $color && $color != 'blank' ) {
+ $style = 'color: #' . $color . ';';
+ }
+ ?>
+
+
+
@@ -446,7 +446,7 @@ function twentyeleven_widgets_init() {
'name' => __( 'Main Sidebar', 'twentyeleven' ),
'id' => 'sidebar-1',
'before_widget' => '",
+ 'after_widget' => '',
'before_title' => '',
) );
@@ -456,7 +456,7 @@ function twentyeleven_widgets_init() {
'id' => 'sidebar-2',
'description' => __( 'The sidebar for the optional Showcase Template', 'twentyeleven' ),
'before_widget' => '",
+ 'after_widget' => '',
'before_title' => '',
) );
@@ -466,7 +466,7 @@ function twentyeleven_widgets_init() {
'id' => 'sidebar-3',
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
'before_widget' => '",
+ 'after_widget' => '',
'before_title' => '',
) );
@@ -476,7 +476,7 @@ function twentyeleven_widgets_init() {
'id' => 'sidebar-4',
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
'before_widget' => '",
+ 'after_widget' => '',
'before_title' => '',
) );
@@ -486,7 +486,7 @@ function twentyeleven_widgets_init() {
'id' => 'sidebar-5',
'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ),
'before_widget' => '",
+ 'after_widget' => '',
'before_title' => '',
) );
@@ -581,7 +581,7 @@ function twentyeleven_footer_sidebar_class() {
}
if ( $class )
- echo 'class="' . $class . '"';
+ echo 'class="' . esc_attr( $class ) . '"';
}
if ( ! function_exists( 'twentyeleven_comment' ) ) :
@@ -717,7 +717,7 @@ function twentyeleven_get_gallery_images() {
if ( function_exists( 'get_post_galleries' ) ) {
$galleries = get_post_galleries( get_the_ID(), false );
if ( isset( $galleries[0]['ids'] ) )
- $images = explode( ',', $galleries[0]['ids'] );
+ $images = explode( ',', $galleries[0]['ids'] );
} else {
$pattern = get_shortcode_regex();
preg_match( "/$pattern/s", get_the_content(), $match );
diff --git a/src/wp-content/themes/twentyeleven/header.php b/src/wp-content/themes/twentyeleven/header.php
index f48e4cf74f..f9be4f52e0 100644
--- a/src/wp-content/themes/twentyeleven/header.php
+++ b/src/wp-content/themes/twentyeleven/header.php
@@ -40,7 +40,7 @@
// Add a page number if necessary:
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
- echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
+ echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ) );
?>
@@ -111,7 +111,7 @@
$header_image_height = HEADER_IMAGE_HEIGHT;
}
?>
-
+
diff --git a/src/wp-content/themes/twentyeleven/image.php b/src/wp-content/themes/twentyeleven/image.php
index 7516b034c8..5c855904f6 100644
--- a/src/wp-content/themes/twentyeleven/image.php
+++ b/src/wp-content/themes/twentyeleven/image.php
@@ -66,7 +66,7 @@ get_header(); ?>
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
else
// or get the URL of the first image attachment
- $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
+ $next_attachment_url = get_attachment_link( $attachments[0]->ID );
} else {
// or, if there's only 1 image, get the URL of the image
$next_attachment_url = wp_get_attachment_url();
diff --git a/src/wp-content/themes/twentyeleven/inc/theme-options.php b/src/wp-content/themes/twentyeleven/inc/theme-options.php
index b63d058cc7..59f5140ee6 100644
--- a/src/wp-content/themes/twentyeleven/inc/theme-options.php
+++ b/src/wp-content/themes/twentyeleven/inc/theme-options.php
@@ -218,7 +218,7 @@ function twentyeleven_get_default_theme_options() {
);
if ( is_rtl() )
- $default_theme_options['theme_layout'] = 'sidebar-content';
+ $default_theme_options['theme_layout'] = 'sidebar-content';
/**
* Filter the Twenty Eleven default options.
@@ -277,7 +277,7 @@ function twentyeleven_settings_field_color_scheme() {
-
+
@@ -316,7 +316,7 @@ function twentyeleven_settings_field_layout() {
/>
-
+
@@ -562,7 +562,7 @@ function twentyeleven_customize_register( $wp_customize ) {
$layouts = twentyeleven_layouts();
$choices = array();
foreach ( $layouts as $layout ) {
- $choices[$layout['value']] = $layout['label'];
+ $choices[ $layout['value'] ] = $layout['label'];
}
$wp_customize->add_control( 'twentyeleven_theme_options[theme_layout]', array(
diff --git a/src/wp-content/themes/twentyeleven/inc/widgets.php b/src/wp-content/themes/twentyeleven/inc/widgets.php
index 12bc745ace..94326a1f62 100644
--- a/src/wp-content/themes/twentyeleven/inc/widgets.php
+++ b/src/wp-content/themes/twentyeleven/inc/widgets.php
@@ -22,9 +22,9 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
$this->WP_Widget( 'widget_twentyeleven_ephemera', __( 'Twenty Eleven Ephemera', 'twentyeleven' ), $widget_ops );
$this->alt_option_name = 'widget_twentyeleven_ephemera';
- add_action( 'save_post', array(&$this, 'flush_widget_cache' ) );
- add_action( 'deleted_post', array(&$this, 'flush_widget_cache' ) );
- add_action( 'switch_theme', array(&$this, 'flush_widget_cache' ) );
+ add_action( 'save_post', array( &$this, 'flush_widget_cache' ) );
+ add_action( 'deleted_post', array( &$this, 'flush_widget_cache' ) );
+ add_action( 'switch_theme', array( &$this, 'flush_widget_cache' ) );
}
/**
@@ -38,14 +38,14 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
function widget( $args, $instance ) {
$cache = wp_cache_get( 'widget_twentyeleven_ephemera', 'widget' );
- if ( !is_array( $cache ) )
+ if ( ! is_array( $cache ) )
$cache = array();
if ( ! isset( $args['widget_id'] ) )
$args['widget_id'] = null;
- if ( isset( $cache[$args['widget_id']] ) ) {
- echo $cache[$args['widget_id']];
+ if ( isset( $cache[ $args['widget_id'] ] ) ) {
+ echo $cache[ $args['widget_id'] ];
return;
}
@@ -53,25 +53,25 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
extract( $args, EXTR_SKIP );
/** This filter is documented in wp-includes/default-widgets.php */
- $title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base);
+ $args['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Ephemera', 'twentyeleven' ) : $instance['title'], $instance, $this->id_base );
if ( ! isset( $instance['number'] ) )
$instance['number'] = '10';
- if ( ! $number = absint( $instance['number'] ) )
- $number = 10;
+ if ( ! $args['number'] = absint( $instance['number'] ) )
+ $args['number'] = 10;
$ephemera_args = array(
- 'order' => 'DESC',
- 'posts_per_page' => $number,
- 'no_found_rows' => true,
- 'post_status' => 'publish',
- 'post__not_in' => get_option( 'sticky_posts' ),
- 'tax_query' => array(
+ 'order' => 'DESC',
+ 'posts_per_page' => $args['number'],
+ 'no_found_rows' => true,
+ 'post_status' => 'publish',
+ 'post__not_in' => get_option( 'sticky_posts' ),
+ 'tax_query' => array(
array(
'taxonomy' => 'post_format',
- 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-status', 'post-format-quote' ),
- 'field' => 'slug',
+ 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-status', 'post-format-quote' ),
+ 'field' => 'slug',
'operator' => 'IN',
),
),
@@ -79,10 +79,10 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
$ephemera = new WP_Query( $ephemera_args );
if ( $ephemera->have_posts() ) :
- echo $before_widget;
- echo $before_title;
- echo $title; // Can set this with a widget option, or omit altogether
- echo $after_title;
+ echo $args['before_widget'];
+ echo $args['before_title'];
+ echo $args['title'];
+ echo $args['after_title'];
?>
have_posts() ) : $ephemera->the_post(); ?>
@@ -111,7 +111,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget {
}
?>
-
+
have_posts() ) : $featured->the_post();
- $counter_slider++;
+ while ( $featured->have_posts() ) : $featured->the_post();
+ $counter_slider++;
if ( 1 == $counter_slider )
- $class = 'class="active"';
+ $class = ' class="active"';
else
$class = '';
- ?>
- >
+ ?>
+ >