diff --git a/wp-content/themes/twentyeleven/404.php b/wp-content/themes/twentyeleven/404.php index ae0ad04800be78002647de49b6fc2312d4f674b9..63437b9ae13683fceecb7e474e57347a1785b024 100644 --- a/wp-content/themes/twentyeleven/404.php +++ b/wp-content/themes/twentyeleven/404.php @@ -34,7 +34,7 @@ get_header(); ?> <?php /* translators: %1$s: smilie */ $archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'twentyeleven' ), convert_smilies( ':)' ) ) . '</p>'; - the_widget( 'WP_Widget_Archives', array('count' => 0 , 'dropdown' => 1 ), array( 'after_title' => '</h2>'.$archive_content ) ); + the_widget( 'WP_Widget_Archives', array( 'count' => 0, 'dropdown' => 1 ), array( 'after_title' => '</h2>' . $archive_content ) ); ?> <?php the_widget( 'WP_Widget_Tag_Cloud' ); ?> diff --git a/wp-content/themes/twentyeleven/archive.php b/wp-content/themes/twentyeleven/archive.php index 8eecf28ea7440fd27a1d7198a2ca292f6f6b4ca3..2f54972bd875dcfb81986cd9d89ea89b3d4384f5 100644 --- a/wp-content/themes/twentyeleven/archive.php +++ b/wp-content/themes/twentyeleven/archive.php @@ -5,7 +5,7 @@ * Used to display archive-type pages if nothing more specific matches a query. * For example, puts together date-based pages if no date.php file exists. * - * @link http://codex.wordpress.org/Template_Hierarchy + * @link https://codex.wordpress.org/Template_Hierarchy * * @package WordPress * @subpackage Twenty_Eleven @@ -69,4 +69,4 @@ get_header(); ?> </section><!-- #primary --> <?php get_sidebar(); ?> -<?php get_footer(); ?> \ No newline at end of file +<?php get_footer(); ?> diff --git a/wp-content/themes/twentyeleven/author.php b/wp-content/themes/twentyeleven/author.php index 28775d94b99421dac36c526d86429aac232b5742..274d5b87a46d922f9eb8267516479ae667166721 100644 --- a/wp-content/themes/twentyeleven/author.php +++ b/wp-content/themes/twentyeleven/author.php @@ -26,7 +26,7 @@ get_header(); ?> ?> <header class="page-header"> - <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1> + <h1 class="page-title author"><?php printf( __( 'Author Archives: %s', 'twentyeleven' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1> </header> <?php diff --git a/wp-content/themes/twentyeleven/content-aside.php b/wp-content/themes/twentyeleven/content-aside.php index e3e7334c8319f42a18022a3cf20e9e2bf4fccd5f..387403d62bcfb56f27119d7094c6571d49789bfb 100644 --- a/wp-content/themes/twentyeleven/content-aside.php +++ b/wp-content/themes/twentyeleven/content-aside.php @@ -4,7 +4,7 @@ * * Used on index and archive pages. * - * @link http://codex.wordpress.org/Post_Formats + * @link https://codex.wordpress.org/Post_Formats * * @package WordPress * @subpackage Twenty_Eleven diff --git a/wp-content/themes/twentyeleven/content-gallery.php b/wp-content/themes/twentyeleven/content-gallery.php index 4ae6561463c76f6d5d4145ba878fb501459d3be7..e88797811b9690bb8fd7b8d9475e89edfdb7297b 100644 --- a/wp-content/themes/twentyeleven/content-gallery.php +++ b/wp-content/themes/twentyeleven/content-gallery.php @@ -4,7 +4,7 @@ * * Used on index and archive pages. * - * @link http://codex.wordpress.org/Post_Formats + * @link https://codex.wordpress.org/Post_Formats * * @package WordPress * @subpackage Twenty_Eleven @@ -36,7 +36,7 @@ $images = twentyeleven_get_gallery_images(); if ( $images ) : $total_images = count( $images ); - $image = array_shift( $images ); + $image = reset( $images ); ?> <figure class="gallery-thumb"> <a href="<?php the_permalink(); ?>"><?php echo wp_get_attachment_image( $image, 'thumbnail' ); ?></a> diff --git a/wp-content/themes/twentyeleven/content-image.php b/wp-content/themes/twentyeleven/content-image.php index 3ed8ecdc09b67be4c7ddf1927e7a5e7161d63c08..24976908690f3efd97031b7a9119da56dfedfc6d 100644 --- a/wp-content/themes/twentyeleven/content-image.php +++ b/wp-content/themes/twentyeleven/content-image.php @@ -4,7 +4,7 @@ * * Used on index and archive pages. * - * @link http://codex.wordpress.org/Post_Formats + * @link https://codex.wordpress.org/Post_Formats * * @package WordPress * @subpackage Twenty_Eleven @@ -20,7 +20,7 @@ <?php if ( comments_open() && ! post_password_required() ) : ?> <div class="comments-link"> - <?php comments_popup_link( '<span class="leave-reply">' . __( "Reply", 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> + <?php comments_popup_link( '<span class="leave-reply">' . __( 'Reply', 'twentyeleven' ) . '</span>', _x( '1', 'comments number', 'twentyeleven' ), _x( '%', 'comments number', 'twentyeleven' ) ); ?> </div> <?php endif; ?> </header><!-- .entry-header --> diff --git a/wp-content/themes/twentyeleven/content-link.php b/wp-content/themes/twentyeleven/content-link.php index 39a8e1d170d95d31cd859bd74890004af7c239c7..04e673016eea75eba894b2107f38e28f6f36b1d5 100644 --- a/wp-content/themes/twentyeleven/content-link.php +++ b/wp-content/themes/twentyeleven/content-link.php @@ -4,7 +4,7 @@ * * Used on index and archive pages * - * @link http://codex.wordpress.org/Post_Formats + * @link https://codex.wordpress.org/Post_Formats * * @package WordPress * @subpackage Twenty_Eleven diff --git a/wp-content/themes/twentyeleven/content-status.php b/wp-content/themes/twentyeleven/content-status.php index 4d987d959206018f6f18f8bb2d5726ae66e3713c..afcf823d896a4ee5a45c6b893361b1fc51674b30 100644 --- a/wp-content/themes/twentyeleven/content-status.php +++ b/wp-content/themes/twentyeleven/content-status.php @@ -4,7 +4,7 @@ * * Used on index and archive pages * - * @link http://codex.wordpress.org/Post_Formats + * @link https://codex.wordpress.org/Post_Formats * * @package WordPress * @subpackage Twenty_Eleven diff --git a/wp-content/themes/twentyeleven/functions.php b/wp-content/themes/twentyeleven/functions.php index b713933ca776bf69341d670b9e740d79e4e839a2..3ae175650b1ef7d9990163f0cbce9d4461cb1d6f 100644 --- a/wp-content/themes/twentyeleven/functions.php +++ b/wp-content/themes/twentyeleven/functions.php @@ -9,8 +9,8 @@ * The first function, twentyeleven_setup(), sets up the theme by registering support * for various features in WordPress, such as post thumbnails, navigation menus, and the like. * - * When using a child theme (see http://codex.wordpress.org/Theme_Development and - * http://codex.wordpress.org/Child_Themes), you can override certain functions + * When using a child theme (see https://codex.wordpress.org/Theme_Development and + * https://codex.wordpress.org/Child_Themes), you can override certain functions * (those wrapped in a function_exists() call) by defining them first in your child theme's * functions.php file. The child theme's functions.php file is included before the parent * theme's file, so the child theme functions would be used. @@ -31,7 +31,7 @@ * } * </code> * - * For more information on hooks, actions, and filters, see http://codex.wordpress.org/Plugin_API. + * For more information on hooks, actions, and filters, see https://codex.wordpress.org/Plugin_API. * * @package WordPress * @subpackage Twenty_Eleven @@ -251,7 +251,7 @@ function twentyeleven_header_style() { ?> #site-title, #site-description { - position: absolute !important; + position: absolute; clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ clip: rect(1px, 1px, 1px, 1px); } @@ -261,7 +261,7 @@ function twentyeleven_header_style() { ?> #site-title a, #site-description { - color: #<?php echo $text_color; ?> !important; + color: #<?php echo $text_color; ?>; } <?php endif; ?> </style> @@ -332,14 +332,14 @@ function twentyeleven_admin_header_image() { ?> <?php $color = get_header_textcolor(); $image = get_header_image(); - if ( $color && $color != 'blank' ) - $style = ' style="color:#' . $color . '"'; - else - $style = ' style="display:none"'; + $style = 'display: none;'; + if ( $color && $color != 'blank' ) { + $style = 'color: #' . $color . ';'; + } ?> - <h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1> - <div id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></div> - <?php if ( $image ) : ?> + <h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>" tabindex="-1"><?php bloginfo( 'name' ); ?></a></h1> + <div id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></div> + <?php if ( $image ) : ?> <img src="<?php echo esc_url( $image ); ?>" alt="" /> <?php endif; ?> </div> @@ -390,7 +390,10 @@ endif; // twentyeleven_continue_reading_link * @return The filtered Read More text. */ function twentyeleven_auto_excerpt_more( $more ) { - return ' …' . twentyeleven_continue_reading_link(); + if ( ! is_admin() ) { + return ' …' . twentyeleven_continue_reading_link(); + } + return $more; } add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ); @@ -406,7 +409,7 @@ add_filter( 'excerpt_more', 'twentyeleven_auto_excerpt_more' ); * @return string The filtered "Continue Reading" link. */ function twentyeleven_custom_excerpt_more( $output ) { - if ( has_excerpt() && ! is_attachment() ) { + if ( has_excerpt() && ! is_attachment() && ! is_admin() ) { $output .= twentyeleven_continue_reading_link(); } return $output; @@ -443,7 +446,7 @@ function twentyeleven_widgets_init() { 'name' => __( 'Main Sidebar', 'twentyeleven' ), 'id' => 'sidebar-1', 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => "</aside>", + 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); @@ -453,7 +456,7 @@ function twentyeleven_widgets_init() { 'id' => 'sidebar-2', 'description' => __( 'The sidebar for the optional Showcase Template', 'twentyeleven' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => "</aside>", + 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); @@ -463,7 +466,7 @@ function twentyeleven_widgets_init() { 'id' => 'sidebar-3', 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => "</aside>", + 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); @@ -473,7 +476,7 @@ function twentyeleven_widgets_init() { 'id' => 'sidebar-4', 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => "</aside>", + 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); @@ -483,7 +486,7 @@ function twentyeleven_widgets_init() { 'id' => 'sidebar-5', 'description' => __( 'An optional widget area for your site footer', 'twentyeleven' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', - 'after_widget' => "</aside>", + 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) ); @@ -578,7 +581,7 @@ function twentyeleven_footer_sidebar_class() { } if ( $class ) - echo 'class="' . $class . '"'; + echo 'class="' . esc_attr( $class ) . '"'; } if ( ! function_exists( 'twentyeleven_comment' ) ) : @@ -714,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/wp-content/themes/twentyeleven/header.php b/wp-content/themes/twentyeleven/header.php index 6139bb6b252700870aac11db72a49fb052835c19..f9be4f52e0dd67dd1ead5d9215a4bd8873ccd2b3 100644 --- a/wp-content/themes/twentyeleven/header.php +++ b/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 ) ) ); ?></title> <link rel="profile" href="http://gmpg.org/xfn/11" /> @@ -111,7 +111,7 @@ $header_image_height = HEADER_IMAGE_HEIGHT; } ?> - <img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" /> + <img src="<?php header_image(); ?>" width="<?php echo esc_attr( $header_image_width ); ?>" height="<?php echo esc_attr( $header_image_height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /> <?php endif; // end check for featured image or standard header ?> </a> <?php endif; // end check for removed header image ?> diff --git a/wp-content/themes/twentyeleven/image.php b/wp-content/themes/twentyeleven/image.php index 7516b034c83b9fa2e2085ea003b092c167c02182..5c855904f67ac1cbbd9011e05b96b649521ff3cf 100644 --- a/wp-content/themes/twentyeleven/image.php +++ b/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/wp-content/themes/twentyeleven/inc/theme-customizer.js b/wp-content/themes/twentyeleven/inc/theme-customizer.js index ea19f4993285a287489b1da50198ae022638d56d..002fc97950aaaa7e05acbd08b6736755de672531 100644 --- a/wp-content/themes/twentyeleven/inc/theme-customizer.js +++ b/wp-content/themes/twentyeleven/inc/theme-customizer.js @@ -9,4 +9,22 @@ $( '#site-description' ).text( to ); } ); } ); + + // Header text color + wp.customize( 'header_textcolor', function( value ) { + value.bind( function( to ) { + if ( 'blank' === to ) { + $( '#site-title, #site-title a, #site-description' ).css( { + 'clip': 'rect(1px, 1px, 1px, 1px)', + 'position': 'absolute' + } ); + } else { + $( '#site-title, #site-title a, #site-description' ).css( { + 'clip': 'auto', + 'color': to, + 'position': 'relative' + } ); + } + } ); + } ); } )( jQuery ); \ No newline at end of file diff --git a/wp-content/themes/twentyeleven/inc/theme-options.php b/wp-content/themes/twentyeleven/inc/theme-options.php index 1235c497524dde70d1c1c2b3a050e14b690ea93c..e9078b7cfe9721fc0d92a86ab5e2372bb4f7dc71 100644 --- a/wp-content/themes/twentyeleven/inc/theme-options.php +++ b/wp-content/themes/twentyeleven/inc/theme-options.php @@ -117,7 +117,7 @@ function twentyeleven_theme_options_help() { '<p>' . __( 'Remember to click "Save Changes" to save any changes you have made to the theme options.', 'twentyeleven' ) . '</p>'; $sidebar = '<p><strong>' . __( 'For more information:', 'twentyeleven' ) . '</strong></p>' . - '<p>' . __( '<a href="http://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven' ) . '</p>' . + '<p>' . __( '<a href="https://codex.wordpress.org/Appearance_Theme_Options_Screen" target="_blank">Documentation on Theme Options</a>', 'twentyeleven' ) . '</p>' . '<p>' . __( '<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>', 'twentyeleven' ) . '</p>'; $screen = get_current_screen(); @@ -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() { <input type="hidden" id="default-color-<?php echo esc_attr( $scheme['value'] ); ?>" value="<?php echo esc_attr( $scheme['default_link_color'] ); ?>" /> <span> <img src="<?php echo esc_url( $scheme['thumbnail'] ); ?>" width="136" height="122" alt="" /> - <?php echo $scheme['label']; ?> + <?php echo esc_html( $scheme['label'] ); ?> </span> </label> </div> @@ -316,7 +316,7 @@ function twentyeleven_settings_field_layout() { <input type="radio" name="twentyeleven_theme_options[theme_layout]" value="<?php echo esc_attr( $layout['value'] ); ?>" <?php checked( $options['theme_layout'], $layout['value'] ); ?> /> <span> <img src="<?php echo esc_url( $layout['thumbnail'] ); ?>" width="136" height="122" alt="" /> - <?php echo $layout['label']; ?> + <?php echo esc_html( $layout['label'] ); ?> </span> </label> </div> @@ -499,15 +499,16 @@ function twentyeleven_layout_classes( $existing_classes ) { add_filter( 'body_class', 'twentyeleven_layout_classes' ); /** - * Implements Twenty Eleven theme options into Theme Customizer + * Implements Twenty Eleven theme options into Customizer * * @since Twenty Eleven 1.3 * - * @param object $wp_customize Theme Customizer object. + * @param object $wp_customize Customizer object. */ function twentyeleven_customize_register( $wp_customize ) { $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $options = twentyeleven_get_theme_options(); $defaults = twentyeleven_get_default_theme_options(); @@ -533,7 +534,7 @@ function twentyeleven_customize_register( $wp_customize ) { 'priority' => 5, ) ); - // Link Color (added to Color Scheme section in Theme Customizer) + // Link Color (added to Color Scheme section in Customizer) $wp_customize->add_setting( 'twentyeleven_theme_options[link_color]', array( 'default' => twentyeleven_get_default_link_color( $options['color_scheme'] ), 'type' => 'option', @@ -562,7 +563,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( @@ -574,13 +575,13 @@ function twentyeleven_customize_register( $wp_customize ) { add_action( 'customize_register', 'twentyeleven_customize_register' ); /** - * Bind JS handlers to make Theme Customizer preview reload changes asynchronously. + * Bind JS handlers to make Customizer preview reload changes asynchronously. * * Used with blogname and blogdescription. * * @since Twenty Eleven 1.3 */ function twentyeleven_customize_preview_js() { - wp_enqueue_script( 'twentyeleven-customizer', get_template_directory_uri() . '/inc/theme-customizer.js', array( 'customize-preview' ), '20120523', true ); + wp_enqueue_script( 'twentyeleven-customizer', get_template_directory_uri() . '/inc/theme-customizer.js', array( 'customize-preview' ), '20150401', true ); } -add_action( 'customize_preview_init', 'twentyeleven_customize_preview_js' ); \ No newline at end of file +add_action( 'customize_preview_init', 'twentyeleven_customize_preview_js' ); diff --git a/wp-content/themes/twentyeleven/inc/widgets.php b/wp-content/themes/twentyeleven/inc/widgets.php index 12bc745ace0a277bd354b25830effbc6ed975b66..7d60f7056a37882ad7ede32a3283708b8703913d 100644 --- a/wp-content/themes/twentyeleven/inc/widgets.php +++ b/wp-content/themes/twentyeleven/inc/widgets.php @@ -4,7 +4,7 @@ * * Handles displaying Aside, Link, Status, and Quote Posts available with Twenty Eleven. * - * @link http://codex.wordpress.org/Widgets_API#Developing_Widgets + * @link https://codex.wordpress.org/Widgets_API#Developing_Widgets * * @package WordPress * @subpackage Twenty_Eleven @@ -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']; ?> <ol> <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?> @@ -111,7 +111,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { </ol> <?php - echo $after_widget; + echo $args['after_widget']; // Reset the post globals as this query will have stomped on it wp_reset_postdata(); @@ -119,7 +119,7 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { // end check for ephemeral posts endif; - $cache[$args['widget_id']] = ob_get_flush(); + $cache[ $args['widget_id'] ] = ob_get_flush(); wp_cache_set( 'widget_twentyeleven_ephemera', $cache, 'widget' ); } @@ -171,4 +171,4 @@ class Twenty_Eleven_Ephemera_Widget extends WP_Widget { <input id="<?php echo esc_attr( $this->get_field_id( 'number' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'number' ) ); ?>" type="text" value="<?php echo esc_attr( $number ); ?>" size="3" /></p> <?php } -} \ No newline at end of file +} diff --git a/wp-content/themes/twentyeleven/index.php b/wp-content/themes/twentyeleven/index.php index 77ac27d4c95f6c97461bbe31205d59e4caacb96b..1dd72c8f627614a481cd61edcd32e21d32bcde34 100644 --- a/wp-content/themes/twentyeleven/index.php +++ b/wp-content/themes/twentyeleven/index.php @@ -6,7 +6,7 @@ * and one of the two required files for a theme (the other being style.css). * It is used to display a page when nothing more specific matches a query. * E.g., it puts together the home page when no home.php file exists. - * Learn more: http://codex.wordpress.org/Template_Hierarchy + * Learn more: https://codex.wordpress.org/Template_Hierarchy * * @package WordPress * @subpackage Twenty_Eleven @@ -49,4 +49,4 @@ get_header(); ?> </div><!-- #primary --> <?php get_sidebar(); ?> -<?php get_footer(); ?> \ No newline at end of file +<?php get_footer(); ?> diff --git a/wp-content/themes/twentyeleven/languages/twentyeleven.pot b/wp-content/themes/twentyeleven/languages/twentyeleven.pot index 64f0e724072796a52444f8f3316b2349f5e11fac..37e138bc1f4e0e459946dfe0aec9dec9c84ec444 100644 --- a/wp-content/themes/twentyeleven/languages/twentyeleven.pot +++ b/wp-content/themes/twentyeleven/languages/twentyeleven.pot @@ -1,14 +1,14 @@ -# Copyright (C) 2014 the WordPress team +# Copyright (C) 2015 the WordPress team # This file is distributed under the GNU General Public License v2 or later. msgid "" msgstr "" -"Project-Id-Version: Twenty Eleven 1.9\n" -"Report-Msgid-Bugs-To: http://wordpress.org/tags/twentyeleven\n" -"POT-Creation-Date: 2014-09-03 00:45:45+00:00\n" +"Project-Id-Version: Twenty Eleven 2.1\n" +"Report-Msgid-Bugs-To: http://wordpress.org/support/theme/twentyeleven\n" +"POT-Creation-Date: 2015-04-21 12:33:58+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2014-MO-DA HO:MI+ZONE\n" +"PO-Revision-Date: 2015-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -162,7 +162,7 @@ msgstr "" #: content-aside.php:46 content-featured.php:45 content-gallery.php:88 #: content-image.php:70 content-intro.php:19 content-link.php:46 #: content-page.php:21 content-quote.php:72 content-single.php:52 -#: content-status.php:59 content.php:82 functions.php:606 functions.php:634 +#: content-status.php:59 content.php:82 functions.php:609 functions.php:637 #: image.php:41 msgid "Edit" msgstr "" @@ -223,7 +223,7 @@ msgid "" "\" rel=\"author\">%6$s</a></span></span>" msgstr "" -#: content-image.php:41 functions.php:672 +#: content-image.php:41 functions.php:675 msgid "View all posts by %s" msgstr "" @@ -266,8 +266,6 @@ msgstr "" msgid "Featured" msgstr "" -#. #-#-#-#-# twentyeleven.pot (Twenty Eleven 1.9) #-#-#-#-# -#. Author URI of the plugin/theme #: footer.php:28 msgid "http://wordpress.org/" msgstr "" @@ -324,69 +322,69 @@ msgstr "" msgid "Hanoi Plant" msgstr "" -#: functions.php:443 +#: functions.php:446 msgid "Main Sidebar" msgstr "" -#: functions.php:452 +#: functions.php:455 msgid "Showcase Sidebar" msgstr "" -#: functions.php:454 +#: functions.php:457 msgid "The sidebar for the optional Showcase Template" msgstr "" -#: functions.php:462 +#: functions.php:465 msgid "Footer Area One" msgstr "" -#: functions.php:464 functions.php:474 functions.php:484 +#: functions.php:467 functions.php:477 functions.php:487 msgid "An optional widget area for your site footer" msgstr "" -#: functions.php:472 +#: functions.php:475 msgid "Footer Area Two" msgstr "" -#: functions.php:482 +#: functions.php:485 msgid "Footer Area Three" msgstr "" -#: functions.php:506 single.php:18 +#: functions.php:509 single.php:18 msgid "Post navigation" msgstr "" -#: functions.php:507 +#: functions.php:510 msgid "<span class=\"meta-nav\">←</span> Older posts" msgstr "" -#: functions.php:508 +#: functions.php:511 msgid "Newer posts <span class=\"meta-nav\">→</span>" msgstr "" -#: functions.php:606 +#: functions.php:609 msgid "Pingback:" msgstr "" #. translators: 1: comment author, 2: date and time -#: functions.php:623 +#: functions.php:626 msgid "%1$s on %2$s <span class=\"says\">said:</span>" msgstr "" #. translators: 1: date, 2: time -#: functions.php:629 +#: functions.php:632 msgid "%1$s at %2$s" msgstr "" -#: functions.php:638 +#: functions.php:641 msgid "Your comment is awaiting moderation." msgstr "" -#: functions.php:647 +#: functions.php:650 msgid "Reply <span>↓</span>" msgstr "" -#: functions.php:666 +#: functions.php:669 msgid "" "<span class=\"sep\">Posted on </span><a href=\"%1$s\" title=\"%2$s\" rel=" "\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></" @@ -431,11 +429,11 @@ msgid "" "in <a href=\"%6$s\" title=\"Return to %7$s\" rel=\"gallery\">%8$s</a>" msgstr "" -#: inc/theme-options.php:56 inc/theme-options.php:528 +#: inc/theme-options.php:56 inc/theme-options.php:529 msgid "Color Scheme" msgstr "" -#: inc/theme-options.php:62 inc/theme-options.php:545 +#: inc/theme-options.php:62 inc/theme-options.php:546 msgid "Link Color" msgstr "" @@ -488,7 +486,7 @@ msgstr "" #: inc/theme-options.php:120 msgid "" -"<a href=\"http://codex.wordpress.org/Appearance_Theme_Options_Screen\" " +"<a href=\"https://codex.wordpress.org/Appearance_Theme_Options_Screen\" " "target=\"_blank\">Documentation on Theme Options</a>" msgstr "" @@ -534,7 +532,7 @@ msgstr "" msgid "%s Theme Options" msgstr "" -#: inc/theme-options.php:552 +#: inc/theme-options.php:553 msgid "Layout" msgstr "" @@ -622,7 +620,7 @@ msgid "Twenty Eleven" msgstr "" #. Theme URI of the plugin/theme -msgid "http://wordpress.org/themes/twentyeleven" +msgid "https://wordpress.org/themes/twentyeleven/" msgstr "" #. Description of the plugin/theme @@ -644,6 +642,10 @@ msgstr "" msgid "the WordPress team" msgstr "" +#. Author URI of the plugin/theme +msgid "https://wordpress.org/" +msgstr "" + #. Template Name of the plugin/theme msgid "Showcase Template" msgstr "" diff --git a/wp-content/themes/twentyeleven/showcase.php b/wp-content/themes/twentyeleven/showcase.php index 8b076b6cf93f27df47ad2596f5f674fb759a1659..bc9e4c9ac950226797972edf9b1dca1d3edce61f 100644 --- a/wp-content/themes/twentyeleven/showcase.php +++ b/wp-content/themes/twentyeleven/showcase.php @@ -105,7 +105,7 @@ get_header(); ?> } ?> - <section class="featured-post <?php echo $feature_class; ?>" id="featured-post-<?php echo $counter_slider; ?>"> + <section class="featured-post <?php echo esc_attr( $feature_class ); ?>" id="featured-post-<?php echo esc_attr( $counter_slider ); ?>"> <?php /* @@ -135,20 +135,20 @@ get_header(); ?> <?php // Reset the counter so that we end up with matching elements - $counter_slider = 0; + $counter_slider = 0; // Begin from zero - rewind_posts(); + rewind_posts(); // Let's roll again. - while ( $featured->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 = ''; - ?> - <li><a href="#featured-post-<?php echo $counter_slider; ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>" <?php echo $class; ?>></a></li> + ?> + <li><a href="#featured-post-<?php echo esc_attr( $counter_slider ); ?>" title="<?php echo esc_attr( sprintf( __( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ) ); ?>"<?php echo $class; ?>></a></li> <?php endwhile; ?> </ul> </nav> diff --git a/wp-content/themes/twentyeleven/style.css b/wp-content/themes/twentyeleven/style.css index 756ad633ab11d67ab1a077578402425b69bb6e62..b8ec0bd0cad08e152c322b4ca8e8c6ec7f163d92 100644 --- a/wp-content/themes/twentyeleven/style.css +++ b/wp-content/themes/twentyeleven/style.css @@ -1,17 +1,17 @@ /* Theme Name: Twenty Eleven -Theme URI: http://wordpress.org/themes/twentyeleven +Theme URI: https://wordpress.org/themes/twentyeleven/ Author: the WordPress team -Author URI: http://wordpress.org/ +Author URI: https://wordpress.org/ Description: The 2011 theme for WordPress is sophisticated, lightweight, and adaptable. Make it yours with a custom menu, header image, and background -- then go further with available theme options for light or dark color scheme, custom link colors, and three layout choices. Twenty Eleven comes equipped with a Showcase page template that transforms your front page into a showcase to show off your best content, widget support galore (sidebar, three footer areas, and a Showcase page widget area), and a custom "Ephemera" widget to display your Aside, Link, Quote, or Status posts. Included are styles for print and for the admin editor, support for featured images (as custom header images on posts and pages and as large images on featured "sticky" posts), and special styles for six different post formats. -Version: 1.9 +Version: 2.1 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: dark, light, white, black, gray, one-column, two-columns, left-sidebar, right-sidebar, fixed-layout, responsive-layout, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready Text Domain: twentyeleven */ -/* =Reset default browser CSS. Based on work by Eric Meyer: http://meyerweb.com/eric/tools/css/reset/index.html +/* =Reset default browser CSS. Based on work by Eric Meyer. -------------------------------------------------------------- */ html, body, div, span, applet, object, iframe, @@ -493,12 +493,19 @@ a:hover { } /* Assistive text */ -.assistive-text { +.assistive-text, +.screen-reader-text { position: absolute !important; clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ clip: rect(1px, 1px, 1px, 1px); + overflow: hidden; + height: 1px; + width: 1px; } -#access a.assistive-text:focus { +#access a.assistive-text:focus, +.screen-reader-text:hover, +.screen-reader-text:active, +.screen-reader-text:focus { background: #eee; border-bottom: 1px solid #ddd; color: #1982d1; @@ -768,6 +775,9 @@ a:hover { .entry-summary { padding: 1.625em 0 0; } +.entry-content .more-link { + white-space: nowrap; +} .entry-content h1, .entry-content h2, .comment-content h1, @@ -1238,6 +1248,15 @@ blockquote.pull.alignright { padding: 0; } +/* =Standard +----------------------------------------------- */ + +.format-standard .wp-video, +.format-standard .wp-audio-shortcode, +.format-audio .wp-audio-shortcode, +.format-standard .video-player { + margin-bottom: 24px; +} /* =Quote ----------------------------------------------- */ @@ -2298,7 +2317,7 @@ p.comment-form-comment { /* Does the same thing as <meta name="viewport" content="width=device-width">, * but in the future W3C standard way. -ms- prefix is required for IE10+ to * render responsive styling in Windows 8 "snapped" views; IE10+ does not honor - * the meta tag. See http://core.trac.wordpress.org/ticket/25888. + * the meta tag. See https://core.trac.wordpress.org/ticket/25888. */ @-ms-viewport { width: device-width; @@ -2433,6 +2452,9 @@ p.comment-form-comment { #access ul { font-size: 12px; } + #branding .only-search + #access div { + padding-right: 0; + } article.intro .entry-content { font-size: 12px; } @@ -2747,4 +2769,4 @@ p.comment-form-comment { } #ie8 section.featured-post .attachment-small-feature { max-width: none; -} \ No newline at end of file +}