Add jshintrc to qunit.

props jorbin.
see #25187.

Built from https://develop.svn.wordpress.org/trunk@25992


git-svn-id: http://core.svn.wordpress.org/trunk@25925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-10-30 14:39:10 +00:00
parent 26d4fdf58d
commit d0cfa40983
56 changed files with 1396 additions and 504 deletions

View File

@ -9397,10 +9397,20 @@ a.widget-control-edit {
/* zh_CN: Enlarge font-size. */ /* zh_CN: Enlarge font-size. */
.locale-zh-cn #sort-buttons { font-size: 1em !important; } .locale-zh-cn #sort-buttons { font-size: 1em !important; }
/* de_DE: Text needs more space for translation */
.locale-de-de .inline-edit-row fieldset label span.title {
width: 7em; /* default 5em */
}
.locale-de-de .inline-edit-row fieldset label span.input-text-wrap {
margin-left: 7em; /* default 5em */
}
/* ru_RU: Text needs more room to breathe. */ /* ru_RU: Text needs more room to breathe. */
.locale-ru-ru .inline-edit-row fieldset label span.title { .locale-ru-ru .inline-edit-row fieldset label span.title {
width: auto; /* default 5em */ width: 8em; /* default 5em */
min-width: 5em; }
.locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap {
margin-left: 8em; /* default 5em */
} }
.locale-ru-ru.press-this .posting { .locale-ru-ru.press-this .posting {
margin-right: 257px; /* default 212px + 45px */ margin-right: 257px; /* default 212px + 45px */

File diff suppressed because one or more lines are too long

View File

@ -557,7 +557,7 @@ if ( 'page' == $post_type ) {
/** /**
* Fires after 'normal' context meta boxes have been output for the 'page' post type. * Fires after 'normal' context meta boxes have been output for the 'page' post type.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param WP_Post $post Post object. * @param WP_Post $post Post object.
*/ */
@ -567,7 +567,7 @@ else {
/** /**
* Fires after 'normal' context meta boxes have been output for all post types other than 'page'. * Fires after 'normal' context meta boxes have been output for all post types other than 'page'.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param WP_Post $post Post object. * @param WP_Post $post Post object.
*/ */

View File

@ -49,7 +49,8 @@ if ( !defined('ABSPATH') )
<?php <?php
if ( ! empty( $comment->comment_author_url ) && 'http://' != $comment->comment_author_url ) { if ( ! empty( $comment->comment_author_url ) && 'http://' != $comment->comment_author_url ) {
$link = '<a href="' . $comment->comment_author_url . '" rel="external nofollow" target="_blank">' . __('visit site') . '</a>'; $link = '<a href="' . $comment->comment_author_url . '" rel="external nofollow" target="_blank">' . __('visit site') . '</a>';
printf( __( 'URL (%s):' ), apply_filters('get_comment_author_link', $link ) ); /** This filter is documented in wp-includes/comment-template.php */
printf( __( 'URL (%s):' ), apply_filters( 'get_comment_author_link', $link ) );
} else { } else {
_e( 'URL:' ); _e( 'URL:' );
} ?></td> } ?></td>
@ -127,9 +128,17 @@ $date = date_i18n( $datef, strtotime( $comment->comment_date ) );
<div id="postbox-container-2" class="postbox-container"> <div id="postbox-container-2" class="postbox-container">
<?php <?php
/** This action is documented in wp-admin/edit-form-advanced.php */
do_action( 'add_meta_boxes', 'comment', $comment );
do_action('add_meta_boxes', 'comment', $comment); /**
do_action('add_meta_boxes_comment', $comment); * Fires when comment-specific meta boxes are added.
*
* @since 3.0.0
*
* @param object $comment Comment object.
*/
do_action( 'add_meta_boxes_comment', $comment );
do_meta_boxes(null, 'normal', $comment); do_meta_boxes(null, 'normal', $comment);

View File

@ -2135,7 +2135,7 @@ class WP_Automatic_Updater {
// If the update transient is empty, use the update we just performed // If the update transient is empty, use the update we just performed
if ( ! $next_user_core_update ) if ( ! $next_user_core_update )
$next_user_core_update = $core_update; $next_user_core_update = $core_update;
$newer_version_available = ( 'upgrade' == $next_user_core_update->response && version_compare( $next_user_core_update->version, $core_update, '>' ) ); $newer_version_available = ( 'upgrade' == $next_user_core_update->response && version_compare( $next_user_core_update->version, $core_update->version, '>' ) );
/** /**
* Filter whether to send an email following an automatic background core update. * Filter whether to send an email following an automatic background core update.

View File

@ -1062,6 +1062,7 @@ function wp_nav_menu_locations_meta_box() {
* *
* @since 2.7.0 * @since 2.7.0
* @deprecated 3.7.0 * @deprecated 3.7.0
* @see Core_Upgrader
*/ */
function wp_update_core($current, $feedback = '') { function wp_update_core($current, $feedback = '') {
_deprecated_function( __FUNCTION__, '3.7', 'new Core_Upgrader();' ); _deprecated_function( __FUNCTION__, '3.7', 'new Core_Upgrader();' );
@ -1084,6 +1085,7 @@ function wp_update_core($current, $feedback = '') {
* *
* @since 2.5.0 * @since 2.5.0
* @deprecated 3.7.0 * @deprecated 3.7.0
* @see Plugin_Upgrader
*/ */
function wp_update_plugin($plugin, $feedback = '') { function wp_update_plugin($plugin, $feedback = '') {
_deprecated_function( __FUNCTION__, '3.7', 'new Plugin_Upgrader();' ); _deprecated_function( __FUNCTION__, '3.7', 'new Plugin_Upgrader();' );
@ -1097,14 +1099,15 @@ function wp_update_plugin($plugin, $feedback = '') {
} }
/** /**
* This was once used to kick-off the Plugin Updater. * This was once used to kick-off the Theme Updater.
* *
* Deprecated in favor of instantating a Plugin_Upgrader instance directly, * Deprecated in favor of instantating a Theme_Upgrader instance directly,
* and calling the 'upgrade' method. * and calling the 'upgrade' method.
* Unused since 2.8.0. * Unused since 2.8.0.
* *
* @since 2.7.0 * @since 2.7.0
* @deprecated 3.7.0 * @deprecated 3.7.0
* @see Theme_Upgrader
*/ */
function wp_update_theme($theme, $feedback = '') { function wp_update_theme($theme, $feedback = '') {
_deprecated_function( __FUNCTION__, '3.7', 'new Theme_Upgrader();' ); _deprecated_function( __FUNCTION__, '3.7', 'new Theme_Upgrader();' );

View File

@ -150,8 +150,10 @@ function wp_generate_attachment_metadata( $attachment_id, $file ) {
update_post_meta( $attachment_id, '_thumbnail_id', $sub_attachment_id ); update_post_meta( $attachment_id, '_thumbnail_id', $sub_attachment_id );
} }
} }
// remove the blob of binary data from the array // remove the blob of binary data from the array
unset( $metadata['image']['data'] ); if ( isset( $metadata['image']['data'] ) )
unset( $metadata['image']['data'] );
return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id ); return apply_filters( 'wp_generate_attachment_metadata', $metadata, $attachment_id );
} }

View File

@ -247,7 +247,7 @@ add_action( 'update_option_page_on_front', 'update_home_siteurl', 10, 2 );
/** /**
* Shorten an URL, to be used as link text * Shorten an URL, to be used as link text
* *
* @since 1.2.1 * @since 1.2.0
* *
* @param string $url * @param string $url
* @return string * @return string

View File

@ -266,20 +266,45 @@ function get_theme_feature_list( $api = true ) {
* *
* @since 2.8.0 * @since 2.8.0
* *
* @param string $action * @param string $action The requested action. Likely values are 'theme_information',
* @param array|object $args Optional. Arguments to serialize for the Theme Info API. * 'feature_list', or 'query_themes'.
* @param array|object $args Optional. Arguments to serialize for the Theme Info API.
* @return mixed * @return mixed
*/ */
function themes_api($action, $args = null) { function themes_api( $action, $args = null ) {
if ( is_array($args) ) if ( is_array($args) )
$args = (object)$args; $args = (object)$args;
if ( !isset($args->per_page) ) if ( !isset($args->per_page) )
$args->per_page = 24; $args->per_page = 24;
/**
$args = apply_filters('themes_api_args', $args, $action); //NOTE: Ensure that an object is returned via this filter. * Filter arguments used to query for installer pages from the WordPress.org Themes API.
$res = apply_filters('themes_api', false, $action, $args); //NOTE: Allows a theme to completely override the builtin WordPress.org API. *
* Important: An object MUST be returned to this filter.
*
* @since 2.8.0
*
* @param object $args Arguments used to query for installer pages from the WordPress.org Themes API.
* @param string $action Requested action. Likely values are 'theme_information',
* 'feature_list', or 'query_themes'.
*/
$args = apply_filters( 'themes_api_args', $args, $action );
/**
* Filter whether to override the WordPress.org Themes API.
*
* Returning a value of true to this filter allows a theme to completely
* override the built-in WordPress.org API.
*
* @since 2.8.0
*
* @param bool $bool Whether to override the WordPress.org Themes API. Default false.
* @param string $action Requested action. Likely values are 'theme_information',
* 'feature_list', or 'query_themes'.
* @param object $args Arguments used to query for installer pages from the Themes API.
*/
$res = apply_filters( 'themes_api', false, $action, $args );
if ( ! $res ) { if ( ! $res ) {
$url = $http_url = 'http://api.wordpress.org/themes/info/1.0/'; $url = $http_url = 'http://api.wordpress.org/themes/info/1.0/';
@ -308,5 +333,15 @@ function themes_api($action, $args = null) {
} }
} }
return apply_filters('themes_api_result', $res, $action, $args); /**
* Filter the returned WordPress.org Themes API response.
*
* @since 2.8.0
*
* @param array|object $res WordPress.org Themes API response.
* @param string $action Requested action. Likely values are 'theme_information',
* 'feature_list', or 'query_themes'.
* @param object $args Arguments used to query for installer pages from the WordPress.org Themes API.
*/
return apply_filters( 'themes_api_result', $res, $action, $args );
} }

View File

@ -39,7 +39,8 @@ get_current_screen()->set_help_sidebar(
); );
if ( $_POST ) { if ( $_POST ) {
do_action( 'wpmuadminedit' , '' ); /** This action is documented in wp-admin/network/edit.php */
do_action( 'wpmuadminedit' );
check_admin_referer( 'siteoptions' ); check_admin_referer( 'siteoptions' );
@ -64,7 +65,11 @@ if ( $_POST ) {
update_site_option( $option_name, $value ); update_site_option( $option_name, $value );
} }
// Update more options here /**
* Fires after the network options are updated.
*
* @since MU
*/
do_action( 'update_wpmu_options' ); do_action( 'update_wpmu_options' );
wp_redirect( add_query_arg( 'updated', 'true', network_admin_url( 'settings.php' ) ) ); wp_redirect( add_query_arg( 'updated', 'true', network_admin_url( 'settings.php' ) ) );
@ -285,6 +290,21 @@ if ( isset( $_GET['updated'] ) ) {
<td> <td>
<?php <?php
$menu_perms = get_site_option( 'menu_items' ); $menu_perms = get_site_option( 'menu_items' );
/**
* Filter available network-wide administration menu options.
*
* Options returned to this filter are output as individual checkboxes that, when selected,
* enable site administrator access to the specified administration menu in certain contexts.
*
* Adding options for specific menus here hinges on the appropriate checks and capabilities
* being in place in the site dashboard on the other side. For instance, when the single
* default option, 'plugins' is enabled, site administrators are granted access to the Plugins
* screen in their individual sites' dashboards.
*
* @since MU
*
* @param array $admin_menus The menu items available.
*/
$menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) ); $menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) );
foreach ( (array) $menu_items as $key => $val ) { foreach ( (array) $menu_items as $key => $val ) {
echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[$key] ) ? checked( $menu_perms[$key], '1', false ) : '' ) . " /> " . esc_html( $val ) . "</label><br/>"; echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[$key] ) ? checked( $menu_perms[$key], '1', false ) : '' ) . " /> " . esc_html( $val ) . "</label><br/>";
@ -294,8 +314,13 @@ if ( isset( $_GET['updated'] ) ) {
</tr> </tr>
</table> </table>
<?php do_action( 'wpmu_options' ); // Add more options here ?> <?php
/**
* Fires at the end of the Network Settings form, before the submit button.
*
* @since MU
*/
do_action( 'wpmu_options' ); ?>
<?php submit_button(); ?> <?php submit_button(); ?>
</form> </form>
</div> </div>

View File

@ -45,6 +45,7 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
// If not a subdomain install, make sure the domain isn't a reserved word // If not a subdomain install, make sure the domain isn't a reserved word
if ( ! is_subdomain_install() ) { if ( ! is_subdomain_install() ) {
/** This filter is documented in wp-includes/ms-functions.php */
$subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) ); $subdirectory_reserved_names = apply_filters( 'subdirectory_reserved_names', array( 'page', 'comments', 'blog', 'files', 'feed' ) );
if ( in_array( $domain, $subdirectory_reserved_names ) ) if ( in_array( $domain, $subdirectory_reserved_names ) )
wp_die( sprintf( __('The following words are reserved for use by WordPress functions and cannot be used as blog names: <code>%s</code>' ), implode( '</code>, <code>', $subdirectory_reserved_names ) ) ); wp_die( sprintf( __('The following words are reserved for use by WordPress functions and cannot be used as blog names: <code>%s</code>' ), implode( '</code>, <code>', $subdirectory_reserved_names ) ) );

View File

@ -59,7 +59,7 @@ if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] && is_ar
} }
/** /**
* Fires after network options are updated. * Fires after the site options are updated.
* *
* @since 3.0.0 * @since 3.0.0
*/ */

View File

@ -9,6 +9,7 @@
get_header(); ?> get_header(); ?>
<div id="main-content" class="main-content">
<div id="primary" class="content-area"> <div id="primary" class="content-area">
<div id="content" class="site-content" role="main"> <div id="content" class="site-content" role="main">
@ -24,8 +25,9 @@ get_header(); ?>
</div><!-- #content --> </div><!-- #content -->
</div><!-- #primary --> </div><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php <?php
get_sidebar( 'content' );
get_sidebar(); get_sidebar();
get_footer(); get_footer();

View File

@ -19,6 +19,7 @@
get_header(); ?> get_header(); ?>
<div id="main-content" class="main-content">
<section id="primary" class="content-area"> <section id="primary" class="content-area">
<div id="content" class="site-content" role="main"> <div id="content" class="site-content" role="main">
@ -59,8 +60,9 @@ get_header(); ?>
?> ?>
</div><!-- #content --> </div><!-- #content -->
</section><!-- #primary --> </section><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php <?php
get_sidebar( 'content' );
get_sidebar(); get_sidebar();
get_footer(); get_footer();

View File

@ -11,6 +11,7 @@
get_header(); ?> get_header(); ?>
<div id="main-content" class="main-content">
<section id="primary" class="content-area"> <section id="primary" class="content-area">
<div id="content" class="site-content" role="main"> <div id="content" class="site-content" role="main">
@ -43,8 +44,9 @@ get_header(); ?>
?> ?>
</div><!-- #content --> </div><!-- #content -->
</section><!-- #primary --> </section><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php <?php
get_sidebar( 'content' );
get_sidebar(); get_sidebar();
get_footer(); get_footer();

View File

@ -18,6 +18,14 @@
</div><!-- .entry-meta --> </div><!-- .entry-meta -->
<?php endif; ?> <?php endif; ?>
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;
?>
<div class="entry-meta"> <div class="entry-meta">
<span class="post-format"> <span class="post-format">
<a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'aside' ) ); ?>"><?php echo get_post_format_string( 'aside' ); ?></a> <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'aside' ) ); ?>"><?php echo get_post_format_string( 'aside' ); ?></a>
@ -46,16 +54,6 @@
</div><!-- .entry-content --> </div><!-- .entry-content -->
<footer class="entry-meta"> <footer class="entry-meta">
<div class="entry-meta">
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;
?>
</div>
<?php if ( has_tag() ) : ?> <?php if ( has_tag() ) : ?>
<span class="tag-links"><?php echo get_the_tag_list(); ?></span> <span class="tag-links"><?php echo get_the_tag_list(); ?></span>
<?php endif; ?> <?php endif; ?>

View File

@ -9,38 +9,24 @@
?> ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a class="attachment-featured-featured" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>"> <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
<?php <?php
if ( has_post_thumbnail() ) : if ( has_post_thumbnail() ) :
the_post_thumbnail( 'featured-thumbnail-featured' ); if ( 'grid' == get_theme_mod( 'featured_content_layout' ) )
the_post_thumbnail( 'post-thumbnail-grid' );
else : else
$images = get_children( array( the_post_thumbnail( 'post-thumbnail-slider' );
'post_parent' => get_the_ID(), endif;
'post_type' => 'attachment', ?>
'post_mime_type' => 'image',
'orderby' => 'menu_order',
'order' => 'ASC',
'numberposts' => 1,
) );
if ( $images ) :
$image = array_shift( $images );
echo wp_get_attachment_image( $image->ID, 'featured-thumbnail-featured' );
endif;
endif;
?>
</a> </a>
<div class="entry-wrap"> <header class="entry-header">
<header class="entry-header"> <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) &&twentyfourteen_categorized_blog() ) : ?>
<?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> <div class="entry-meta">
<div class="entry-meta"> <span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
<span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span> </div><!-- .entry-meta -->
</div><!-- .entry-meta --> <?php endif; ?>
<?php endif; ?>
<?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> <?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">','</a></h1>' ); ?>
</header><!-- .entry-header --> </header><!-- .entry-header -->
</div>
</article><!-- #post-## --> </article><!-- #post-## -->

View File

@ -6,34 +6,10 @@
* @subpackage Twenty_Fourteen * @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0 * @since Twenty Fourteen 1.0
*/ */
if ( has_post_thumbnail() ) :
$image = get_post_thumbnail_id();
else :
$images = get_posts( array(
'post_parent' => get_the_ID(),
'fields' => 'ids',
'numberposts' => 1,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order ID',
) );
$image = array_shift( $images );
endif;
?> ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_single() && $image ) : ?> <?php twentyfourteen_post_thumbnail(); ?>
<div class="featured-thumbnail">
<?php echo wp_get_attachment_image( $image, 'featured-thumbnail-large' ); ?>
</div>
<?php elseif ( $image ) : ?>
<a class="featured-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
<?php echo wp_get_attachment_image( $image, 'featured-thumbnail-large' ); ?>
</a>
<?php endif; ?>
<header class="entry-header"> <header class="entry-header">
<?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?> <?php if ( in_array( 'category', get_object_taxonomies( get_post_type() ) ) && twentyfourteen_categorized_blog() ) : ?>

View File

@ -18,6 +18,14 @@
</div><!-- .entry-meta --> </div><!-- .entry-meta -->
<?php endif; ?> <?php endif; ?>
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;
?>
<div class="entry-meta"> <div class="entry-meta">
<span class="post-format"> <span class="post-format">
<a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'link' ) ); ?>"><?php echo get_post_format_string( 'link' ); ?></a> <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'link' ) ); ?>"><?php echo get_post_format_string( 'link' ); ?></a>

View File

@ -18,6 +18,14 @@
</div><!-- .entry-meta --> </div><!-- .entry-meta -->
<?php endif; ?> <?php endif; ?>
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;
?>
<div class="entry-meta"> <div class="entry-meta">
<span class="post-format"> <span class="post-format">
<a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'quote' ) ); ?>"><?php echo get_post_format_string( 'quote' ); ?></a> <a class="entry-format" href="<?php echo esc_url( get_post_format_link( 'quote' ) ); ?>"><?php echo get_post_format_string( 'quote' ); ?></a>
@ -46,16 +54,6 @@
</div><!-- .entry-content --> </div><!-- .entry-content -->
<footer class="entry-meta"> <footer class="entry-meta">
<div class="entry-meta">
<?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;
?>
</div>
<?php if ( has_tag() ) : ?> <?php if ( has_tag() ) : ?>
<span class="tag-links"><?php echo get_the_tag_list(); ?></span> <span class="tag-links"><?php echo get_the_tag_list(); ?></span>
<?php endif; ?> <?php endif; ?>

View File

@ -20,7 +20,13 @@
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' ); ?> <?php
if ( is_single() ) :
the_title( '<h1 class="entry-title">', '</h1>' );
else :
the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
endif;
?>
<div class="entry-meta"> <div class="entry-meta">
<?php <?php

View File

@ -9,6 +9,13 @@
get_header(); ?> get_header(); ?>
<div id="main-content" class="main-content">
<?php
if ( is_front_page() && twentyfourteen_has_featured_posts() )
get_template_part( 'featured-content' );
?>
<div id="primary" class="content-area"> <div id="primary" class="content-area">
<div id="content" class="site-content" role="main"> <div id="content" class="site-content" role="main">
<?php <?php
@ -34,6 +41,7 @@ get_header(); ?>
?> ?>
</div><!-- #content --> </div><!-- #content -->
</div><!-- #primary --> </div><!-- #primary -->
</div><!-- #main-content -->
<?php <?php
get_sidebar(); get_sidebar();

View File

@ -11,7 +11,7 @@
?> ?>
<div id="featured-content" class="featured-content"> <div id="featured-content" class="featured-content">
<div class="featured-content-inner">
<?php <?php
do_action( 'twentyfourteen_featured_posts_before' ); do_action( 'twentyfourteen_featured_posts_before' );
@ -26,5 +26,5 @@
wp_reset_postdata(); wp_reset_postdata();
?> ?>
</div><!-- .featured-content-inner -->
</div><!-- #featured-content .featured-content --> </div><!-- #featured-content .featured-content -->

View File

@ -1,46 +0,0 @@
<?php
/**
* The template for displaying the home page
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/
get_header(); ?>
<div class="front-page-content-wrapper">
<?php
if ( twentyfourteen_has_featured_posts() )
get_template_part( 'featured-content' );
?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
get_template_part( 'content', get_post_format() );
comments_template();
endwhile;
twentyfourteen_paging_nav();
else :
get_template_part( 'content', 'none' );
endif;
?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
<?php get_sidebar( 'content' ); ?>
</div><!-- .front-page-content-wrapper -->
<?php
get_sidebar();
get_footer();

View File

@ -9,6 +9,13 @@
get_header(); ?> get_header(); ?>
<div id="main-content" class="main-content">
<?php
if ( is_front_page() && twentyfourteen_has_featured_posts() )
get_template_part( 'featured-content' );
?>
<div id="primary" class="content-area"> <div id="primary" class="content-area">
<div id="content" class="site-content" role="main"> <div id="content" class="site-content" role="main">
<?php <?php
@ -24,6 +31,7 @@ get_header(); ?>
?> ?>
</div><!-- #content --> </div><!-- #content -->
</div><!-- #primary --> </div><!-- #primary -->
</div><!-- #main-content -->
<?php <?php
get_sidebar(); get_sidebar();

View File

@ -68,9 +68,9 @@ function twentyfourteen_setup() {
add_theme_support( 'post-thumbnails' ); add_theme_support( 'post-thumbnails' );
// Add several sizes for Post Thumbnails. // Add several sizes for Post Thumbnails.
add_image_size( 'featured-thumbnail-large', 672, 0 ); add_image_size( 'post-thumbnail-slider', 1038, 576, true );
add_image_size( 'featured-thumbnail-featured', 672, 372, true ); add_image_size( 'post-thumbnail-grid', 672, 372, true );
add_image_size( 'featured-thumbnail-formatted', 306, 0 ); add_image_size( 'post-thumbnail', 672, 0 );
// This theme uses wp_nav_menu() in two locations. // This theme uses wp_nav_menu() in two locations.
register_nav_menus( array( register_nav_menus( array(
@ -220,9 +220,8 @@ function twentyfourteen_font_url() {
* @return void * @return void
*/ */
function twentyfourteen_scripts() { function twentyfourteen_scripts() {
// Add Lato font, used in the main stylesheet. // Add Lato font, used in the main stylesheet.
wp_enqueue_style( 'twentyfourteen-lato' ); wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null );
// Add Genericons font, used in the main stylesheet. // Add Genericons font, used in the main stylesheet.
wp_enqueue_style( 'genericons', get_template_directory_uri() . '/fonts/genericons.css', array(), '3.0' ); wp_enqueue_style( 'genericons', get_template_directory_uri() . '/fonts/genericons.css', array(), '3.0' );
@ -239,10 +238,10 @@ function twentyfourteen_scripts() {
if ( is_active_sidebar( 'sidebar-3' ) ) if ( is_active_sidebar( 'sidebar-3' ) )
wp_enqueue_script( 'jquery-masonry' ); wp_enqueue_script( 'jquery-masonry' );
wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131011', true ); if ( 'slider' == get_theme_mod( 'featured_content_layout' ) )
wp_enqueue_script( 'twentyfourteen-slider', get_template_directory_uri() . '/js/slider.js', array( 'jquery' ), '20131028', true );
// Add Lato font used in the main stylesheet. wp_enqueue_script( 'twentyfourteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20131011', true );
wp_enqueue_style( 'twentyfourteen-lato', twentyfourteen_font_url(), array(), null );
} }
add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' ); add_action( 'wp_enqueue_scripts', 'twentyfourteen_scripts' );
@ -337,7 +336,7 @@ function twentyfourteen_list_authors() {
?> ?>
<div class="contributor"> <div class="contributor">
<div class="contributor-info clear"> <div class="contributor-info">
<div class="contributor-avatar"><?php echo get_avatar( $contributor_id, 132 ); ?></div> <div class="contributor-avatar"><?php echo get_avatar( $contributor_id, 132 ); ?></div>
<div class="contributor-summary"> <div class="contributor-summary">
<h2 class="contributor-name"><?php echo get_the_author_meta( 'display_name', $contributor_id ); ?></h2> <h2 class="contributor-name"><?php echo get_the_author_meta( 'display_name', $contributor_id ); ?></h2>
@ -361,9 +360,12 @@ endif;
* *
* Adds body classes to denote: * Adds body classes to denote:
* 1. Single or multiple authors. * 1. Single or multiple authors.
* 2. Index views. * 2. Presense of header image.
* 3. Full-width content layout. * 3. Index views.
* 4. Presence of footer widgets. * 4. Full-width content layout.
* 5. Presence of footer widgets.
* 6. Single views.
* 7. Featured content layout.
* *
* @since Twenty Fourteen 1.0 * @since Twenty Fourteen 1.0
* *
@ -391,6 +393,14 @@ function twentyfourteen_body_classes( $classes ) {
if ( is_active_sidebar( 'sidebar-3' ) ) if ( is_active_sidebar( 'sidebar-3' ) )
$classes[] = 'footer-widgets'; $classes[] = 'footer-widgets';
if ( is_singular() )
$classes[] = 'singular';
if ( is_front_page() && 'slider' == get_theme_mod( 'featured_content_layout' ) )
$classes[] = 'slider';
elseif ( is_front_page() )
$classes[] = 'grid';
return $classes; return $classes;
} }
add_filter( 'body_class', 'twentyfourteen_body_classes' ); add_filter( 'body_class', 'twentyfourteen_body_classes' );
@ -399,7 +409,7 @@ add_filter( 'body_class', 'twentyfourteen_body_classes' );
* Extend the default WordPress post classes. * Extend the default WordPress post classes.
* *
* Adds a post class to denote: * Adds a post class to denote:
* Non-password protected page with a featured image. * Non-password protected page with a post thumbnail.
* *
* @since Twenty Fourteen 1.0 * @since Twenty Fourteen 1.0
* *
@ -408,7 +418,9 @@ add_filter( 'body_class', 'twentyfourteen_body_classes' );
*/ */
function twentyfourteen_post_classes( $classes ) { function twentyfourteen_post_classes( $classes ) {
if ( ! post_password_required() && has_post_thumbnail() ) if ( ! post_password_required() && has_post_thumbnail() )
$classes[] = 'has-featured-image'; $classes[] = 'has-post-thumbnail';
else
$classes[] = 'no-post-thumbnail';
return $classes; return $classes;
} }

View File

@ -51,7 +51,7 @@
</div> </div>
<div id="search-container" class="search-box-wrapper hide"> <div id="search-container" class="search-box-wrapper hide">
<div class="search-box clear"> <div class="search-box">
<?php get_search_form(); ?> <?php get_search_form(); ?>
</div> </div>
</div> </div>

View File

@ -12,78 +12,80 @@ $metadata = wp_get_attachment_metadata();
get_header(); get_header();
?> ?>
<section id="primary" class="content-area image-attachment"> <div id="main-content" class="main-content">
<div id="content" class="site-content" role="main"> <section id="primary" class="content-area image-attachment">
<div id="content" class="site-content" role="main">
<?php while ( have_posts() ) : the_post(); ?> <?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header"> <header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
<div class="entry-meta"> <div class="entry-meta">
<span class="entry-date"><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time></span> <span class="entry-date"><time class="entry-date" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php echo esc_html( get_the_date() ); ?></time></span>
<span class="full-size-link"><a href="<?php echo wp_get_attachment_url(); ?>"><?php echo $metadata['width']; ?> &times; <?php echo $metadata['height']; ?></a></span> <span class="full-size-link"><a href="<?php echo wp_get_attachment_url(); ?>"><?php echo $metadata['width']; ?> &times; <?php echo $metadata['height']; ?></a></span>
<span class="parent-post-link"><a href="<?php echo get_permalink( $post->post_parent ); ?>" rel="gallery"><?php echo get_the_title( $post->post_parent ); ?></a></span> <span class="parent-post-link"><a href="<?php echo get_permalink( $post->post_parent ); ?>" rel="gallery"><?php echo get_the_title( $post->post_parent ); ?></a></span>
<?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?> <?php edit_post_link( __( 'Edit', 'twentyfourteen' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-meta --> </div><!-- .entry-meta -->
</header><!-- .entry-header --> </header><!-- .entry-header -->
<div class="entry-content"> <div class="entry-content">
<div class="entry-attachment"> <div class="entry-attachment">
<div class="attachment"> <div class="attachment">
<?php twentyfourteen_the_attached_image(); ?> <?php twentyfourteen_the_attached_image(); ?>
</div><!-- .attachment --> </div><!-- .attachment -->
<?php if ( has_excerpt() ) : ?> <?php if ( has_excerpt() ) : ?>
<div class="entry-caption"> <div class="entry-caption">
<?php the_excerpt(); ?> <?php the_excerpt(); ?>
</div><!-- .entry-caption --> </div><!-- .entry-caption -->
<?php endif; ?> <?php endif; ?>
</div><!-- .entry-attachment --> </div><!-- .entry-attachment -->
<?php <?php
the_content(); the_content();
wp_link_pages( array( wp_link_pages( array(
'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>', 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentyfourteen' ) . '</span>',
'after' => '</div>', 'after' => '</div>',
'link_before' => '<span>', 'link_before' => '<span>',
'link_after' => '</span>', 'link_after' => '</span>',
) ); ) );
?> ?>
</div><!-- .entry-content --> </div><!-- .entry-content -->
<footer class="entry-meta"> <footer class="entry-meta">
<?php <?php
if ( comments_open() && pings_open() ) : // Comments and trackbacks open if ( comments_open() && pings_open() ) : // Comments and trackbacks open
printf( __( '<a class="comment-link" href="#respond">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() ); printf( __( '<a class="comment-link" href="#respond">Post a comment</a> or leave a trackback: <a class="trackback-link" href="%s" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() );
elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open elseif ( ! comments_open() && pings_open() ) : // Only trackbacks open
printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() ); printf( __( 'Comments are closed, but you can leave a trackback: <a class="trackback-link" href="%s" rel="trackback">Trackback URL</a>.', 'twentyfourteen' ), get_trackback_url() );
elseif ( comments_open() && ! pings_open() ) : // Only comments open elseif ( comments_open() && ! pings_open() ) : // Only comments open
_e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond">post a comment</a>.', 'twentyfourteen' ); _e( 'Trackbacks are closed, but you can <a class="comment-link" href="#respond">post a comment</a>.', 'twentyfourteen' );
elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed elseif ( ! comments_open() && ! pings_open() ) : // Comments and trackbacks closed
_e( 'Both comments and trackbacks are currently closed.', 'twentyfourteen' ); _e( 'Both comments and trackbacks are currently closed.', 'twentyfourteen' );
endif; endif;
?> ?>
</footer><!-- .entry-meta --> </footer><!-- .entry-meta -->
</article><!-- #post-## --> </article><!-- #post-## -->
<nav id="image-navigation" class="navigation image-navigation"> <nav id="image-navigation" class="navigation image-navigation">
<div class="nav-links"> <div class="nav-links">
<?php previous_image_link( false, __( '<div class="previous-image">Previous Image</div>', 'twentyfourteen' ) ); ?> <?php previous_image_link( false, __( '<div class="previous-image">Previous Image</div>', 'twentyfourteen' ) ); ?>
<?php next_image_link( false, __( '<div class="next-image">Next Image</div>', 'twentyfourteen' ) ); ?> <?php next_image_link( false, __( '<div class="next-image">Next Image</div>', 'twentyfourteen' ) ); ?>
</div><!-- .nav-links --> </div><!-- .nav-links -->
</nav><!-- #image-navigation --> </nav><!-- #image-navigation -->
<?php comments_template(); ?> <?php comments_template(); ?>
<?php endwhile; // end of the loop. ?> <?php endwhile; // end of the loop. ?>
</div><!-- #content --> </div><!-- #content -->
</section><!-- #primary --> </section><!-- #primary -->
</div><!-- #main-content -->
<?php <?php
get_sidebar(); get_sidebar();

View File

@ -30,6 +30,29 @@ function twentyfourteen_customize_register( $wp_customize ) {
'section' => 'colors', 'section' => 'colors',
'settings' => 'accent_color', 'settings' => 'accent_color',
) ) ); ) ) );
// Add the featured content section.
$wp_customize->add_section( 'featured_content', array(
'title' => __( 'Featured Content', 'twentyfourteen' ),
'priority' => 120,
) );
// Add the featured content layout setting and control.
$wp_customize->add_setting( 'featured_content_layout', array(
'default' => 'grid',
'type' => 'theme_mod',
'capability' => 'edit_theme_options',
) );
$wp_customize->add_control( 'featured_content_layout', array(
'label' => __( 'Layout', 'twentyfourteen' ),
'section' => 'featured_content',
'type' => 'select',
'choices' => array(
'grid' => __( 'Grid', 'twentyfourteen' ),
'slider' => __( 'Slider', 'twentyfourteen' ),
),
) );
} }
add_action( 'customize_register', 'twentyfourteen_customize_register' ); add_action( 'customize_register', 'twentyfourteen_customize_register' );

View File

@ -159,7 +159,7 @@ add_action( 'edit_category', 'twentyfourteen_category_transient_flusher' );
add_action( 'save_post', 'twentyfourteen_category_transient_flusher' ); add_action( 'save_post', 'twentyfourteen_category_transient_flusher' );
/** /**
* Displays an optional featured image, with an anchor element * Displays an optional post thumbnail, with an anchor element
* when on index views, and a div element when on a single view. * when on index views, and a div element when on a single view.
* *
* @return void * @return void
@ -171,15 +171,15 @@ function twentyfourteen_post_thumbnail() {
if ( is_singular() ) : if ( is_singular() ) :
?> ?>
<div class="featured-thumbnail"> <div class="post-thumbnail">
<?php the_post_thumbnail( 'featured-thumbnail-large' ); ?> <?php the_post_thumbnail( 'post-thumbnail' ); ?>
</div> </div>
<?php else : ?> <?php else : ?>
<a class="featured-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>"> <a class="post-thumbnail" href="<?php the_permalink(); ?>" rel="<?php the_ID(); ?>">
<?php if ( has_post_thumbnail() ) : <?php if ( has_post_thumbnail() ) :
the_post_thumbnail( 'featured-thumbnail-large' ); the_post_thumbnail( 'post-thumbnail' );
else : ?> else : ?>
<p class="screen-reader-text"><?php _e( 'No featured image.', 'twentyfourteen' ); ?></p> <p class="screen-reader-text"><?php _e( 'No featured image.', 'twentyfourteen' ); ?></p>
<?php endif; ?> <?php endif; ?>

View File

@ -120,39 +120,66 @@ class Twenty_Fourteen_Ephemera_Widget extends WP_Widget {
<?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?> <?php while ( $ephemera->have_posts() ) : $ephemera->the_post(); ?>
<li> <li>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <article <?php post_class(); ?>>
<div class="entry-content"> <div class="entry-content">
<?php <?php
if ( has_post_format( 'gallery' ) ) : if ( has_post_format( 'gallery' ) ) :
$images = get_posts( array(
'post_parent' => get_post()->post_parent,
'fields' => 'ids',
'numberposts' => -1,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order ID'
) );
$total_images = count( $images );
if ( has_post_thumbnail() ) : if ( post_password_required() ) :
$featured_image = get_the_post_thumbnail( get_the_ID(), 'featured-thumbnail-formatted' ); the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
elseif ( $total_images > 0 ) : else :
$image = array_shift( $images ); $images = array();
$featured_image = wp_get_attachment_image( $image, 'featured-thumbnail-formatted' );
endif; if ( function_exists( 'get_post_galleries' ) ) {
$galleries = get_post_galleries( get_the_ID(), false );
if ( isset( $galleries[0]['ids'] ) )
$images = explode( ',', $galleries[0]['ids'] );
} else {
$pattern = get_shortcode_regex();
preg_match( "/$pattern/s", get_the_content(), $match );
$atts = shortcode_parse_atts( $match[3] );
if ( isset( $atts['ids'] ) )
$images = explode( ',', $atts['ids'] );
}
if ( ! $images ) :
$images = get_posts( array(
'fields' => 'ids',
'numberposts' => 999,
'order' => 'ASC',
'orderby' => 'menu_order',
'post_mime_type' => 'image',
'post_parent' => get_the_ID(),
'post_type' => 'attachment',
) );
endif;
$total_images = count( $images );
if ( has_post_thumbnail() ) :
$post_thumbnail = get_the_post_thumbnail( get_the_ID(), 'post-thumbnail' );
elseif ( $total_images > 0 ) :
$image = array_shift( $images );
$post_thumbnail = wp_get_attachment_image( $image, 'post-thumbnail' );
endif;
if ( ! empty ( $post_thumbnail ) ) :
?> ?>
<a href="<?php the_permalink(); ?>"><?php echo $featured_image; ?></a> <a href="<?php the_permalink(); ?>"><?php echo $post_thumbnail; ?></a>
<p class="wp-caption-text"> <?php
endif;
?>
<p class="wp-caption-text">
<?php
printf( _n( 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photo</a>.', 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photos</a>.', $total_images, 'twentyfourteen' ),
esc_url( get_permalink() ),
number_format_i18n( $total_images )
);
?>
</p>
<?php <?php
printf( _n( 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photo</a>.', 'This gallery contains <a href="%1$s" rel="bookmark">%2$s photos</a>.', $total_images, 'twentyfourteen' ), endif;
esc_url( get_permalink() ),
number_format_i18n( $total_images )
);
?>
</p>
<?php
else : else :
the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) ); the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyfourteen' ) );
endif; endif;

View File

@ -15,6 +15,13 @@
get_header(); ?> get_header(); ?>
<div id="main-content" class="main-content">
<?php
if ( is_front_page() && twentyfourteen_has_featured_posts() )
get_template_part( 'featured-content' );
?>
<div id="primary" class="content-area"> <div id="primary" class="content-area">
<div id="content" class="site-content" role="main"> <div id="content" class="site-content" role="main">
@ -35,8 +42,9 @@ get_header(); ?>
</div><!-- #content --> </div><!-- #content -->
</div><!-- #primary --> </div><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php <?php
get_sidebar( 'content' );
get_sidebar(); get_sidebar();
get_footer(); get_footer();

View File

@ -2,9 +2,7 @@
var body = $( 'body' ), var body = $( 'body' ),
_window = $( window ); _window = $( window );
/** // Enable menu toggle for small screens.
* Enables menu toggle for small screens.
*/
( function() { ( function() {
var nav = $( '#primary-navigation' ), button, menu; var nav = $( '#primary-navigation' ), button, menu;
if ( ! nav ) if ( ! nav )
@ -26,7 +24,7 @@
} ); } );
} )(); } )();
/** /*
* Makes "skip to content" link work correctly in IE9 and Chrome for better * Makes "skip to content" link work correctly in IE9 and Chrome for better
* accessibility. * accessibility.
* *
@ -44,9 +42,7 @@
} ); } );
$( function() { $( function() {
/** // Search toggle.
* Search toggle.
*/
$( '.search-toggle' ).on( 'click.twentyfourteen', function() { $( '.search-toggle' ).on( 'click.twentyfourteen', function() {
var that = $( this ), var that = $( this ),
wrapper = $( '.search-box-wrapper' ); wrapper = $( '.search-box-wrapper' );
@ -58,7 +54,7 @@
wrapper.find( '.search-field' ).focus(); wrapper.find( '.search-field' ).focus();
} ); } );
/** /*
* Fixed navbar. * Fixed navbar.
* *
* The callback on the scroll event is only added if there is a header * The callback on the scroll event is only added if there is a header
@ -76,17 +72,13 @@
} ); } );
} }
/** // Focus styles for primary menu.
* Focus styles for primary menu.
*/
$( '.primary-navigation' ).find( 'a' ).on( 'focus.twentyfourteen blur.twentyfourteen', function() { $( '.primary-navigation' ).find( 'a' ).on( 'focus.twentyfourteen blur.twentyfourteen', function() {
$( this ).parents().toggleClass( 'focus' ); $( this ).parents().toggleClass( 'focus' );
} ); } );
} ); } );
/** // Arrange footer widgets vertically.
* Arranges footer widgets vertically.
*/
if ( $.isFunction( $.fn.masonry ) ) { if ( $.isFunction( $.fn.masonry ) ) {
$( '#footer-sidebar' ).masonry( { $( '#footer-sidebar' ).masonry( {
itemSelector: '.widget', itemSelector: '.widget',
@ -97,5 +89,15 @@
isResizable: true, isResizable: true,
isRTL: $( 'body' ).is( '.rtl' ) isRTL: $( 'body' ).is( '.rtl' )
} ); } );
} };
} )( jQuery );
// Initialize Featured Content slider.
_window.load( function() {
if ( body.is( '.slider' ) ) {
$( '.featured-content' ).featuredslider( {
selector: '.featured-content-inner > article',
controlsContainer: '.featured-content'
} );
}
} );
} )( jQuery );

View File

@ -0,0 +1,572 @@
/*
* Twenty Fourteen Featured Content Slider
*
* Adapted from FlexSlider v2.2.0, copyright 2012 WooThemes
* @link http://www.woothemes.com/flexslider/
*/
( function( $ ) {
// FeaturedSlider: object instance.
$.featuredslider = function( el, options ) {
var slider = $( el );
// Make variables public.
slider.vars = $.extend( {}, $.featuredslider.defaults, options );
var namespace = slider.vars.namespace,
msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
touch = ( ( 'ontouchstart' in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch ),
eventType = 'click touchend MSPointerUp',
watchedEvent = '',
watchedEventClearTimer,
methods = {},
focused = true;
// Store a reference to the slider object.
$.data( el, 'featuredslider', slider );
// Private slider methods.
methods = {
init: function() {
slider.animating = false;
slider.currentSlide = 0;
slider.animatingTo = slider.currentSlide;
slider.atEnd = ( slider.currentSlide === 0 || slider.currentSlide === slider.last );
slider.containerSelector = slider.vars.selector.substr( 0, slider.vars.selector.search( ' ' ) );
slider.slides = $( slider.vars.selector, slider );
slider.container = $( slider.containerSelector, slider );
slider.count = slider.slides.length;
slider.prop = 'marginLeft';
slider.args = {};
// TOUCH
slider.transitions = ( function() {
var obj = document.createElement( 'div' ),
props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
for ( var i in props ) {
if ( obj.style[ props[i] ] !== undefined ) {
slider.pfx = props[i].replace( 'Perspective', '' ).toLowerCase();
slider.prop = '-' + slider.pfx + '-transform';
return true;
}
}
return false;
}() );
// CONTROLSCONTAINER
if ( slider.vars.controlsContainer !== '' )
slider.controlsContainer = $( slider.vars.controlsContainer ).length > 0 && $( slider.vars.controlsContainer );
slider.doMath();
// INIT
slider.setup( 'init' );
// CONTROLNAV
methods.controlNav.setup();
// DIRECTIONNAV
methods.directionNav.setup();
// KEYBOARD
if ( $( slider.containerSelector ).length === 1 ) {
$( document ).bind( 'keyup', function( event ) {
var keycode = event.keyCode;
if ( ! slider.animating && ( keycode === 39 || keycode === 37 ) ) {
var target = ( keycode === 39 ) ? slider.getTarget( 'next' ) : ( keycode === 37 ) ? slider.getTarget( 'prev' ) : false;
slider.featureAnimate( target );
}
} );
}
// TOUCH
if ( touch )
methods.touch();
$( window ).bind( 'resize orientationchange focus', methods.resize );
slider.find( 'img' ).attr( 'draggable', 'false' );
},
controlNav: {
setup: function() {
methods.controlNav.setupPaging();
},
setupPaging: function() {
var type = 'control-paging',
j = 1,
item,
slide;
slider.controlNavScaffold = $( '<ol class="' + namespace + 'control-nav ' + namespace + type + '"></ol>' );
if ( slider.pagingCount > 1 ) {
for ( var i = 0; i < slider.pagingCount; i++ ) {
slide = slider.slides.eq( i );
item = '<a>' + j + '</a>';
slider.controlNavScaffold.append( '<li>' + item + '</li>' );
j++;
}
}
// CONTROLSCONTAINER
( slider.controlsContainer ) ? $( slider.controlsContainer ).append( slider.controlNavScaffold ) : slider.append( slider.controlNavScaffold );
methods.controlNav.set();
methods.controlNav.active();
slider.controlNavScaffold.delegate( 'a, img', eventType, function( event ) {
event.preventDefault();
if ( watchedEvent === '' || watchedEvent === event.type ) {
var $this = $( this ),
target = slider.controlNav.index( $this );
if ( ! $this.hasClass( namespace + 'active' ) ) {
slider.direction = ( target > slider.currentSlide ) ? 'next' : 'prev';
slider.featureAnimate( target );
}
}
// Set up flags to prevent event duplication.
if ( watchedEvent === '' )
watchedEvent = event.type;
methods.setToClearWatchedEvent();
} );
},
set: function() {
var selector = 'a';
slider.controlNav = $( '.' + namespace + 'control-nav li ' + selector, ( slider.controlsContainer ) ? slider.controlsContainer : slider );
},
active: function() {
slider.controlNav.removeClass( namespace + 'active' ).eq( slider.animatingTo ).addClass( namespace + 'active' );
},
update: function( action, pos ) {
if ( slider.pagingCount > 1 && action === 'add' ) {
slider.controlNavScaffold.append( $( '<li><a>' + slider.count + '</a></li>' ) );
} else if ( slider.pagingCount === 1 ) {
slider.controlNavScaffold.find( 'li' ).remove();
} else {
slider.controlNav.eq( pos ).closest( 'li' ).remove();
}
methods.controlNav.set();
( slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length ) ? slider.update( pos, action ) : methods.controlNav.active();
}
},
directionNav: {
setup: function() {
var directionNavScaffold = $( '<ul class="' + namespace + 'direction-nav"><li><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>' );
// CONTROLSCONTAINER
if ( slider.controlsContainer ) {
$( slider.controlsContainer ).append( directionNavScaffold );
slider.directionNav = $( '.' + namespace + 'direction-nav li a', slider.controlsContainer );
} else {
slider.append( directionNavScaffold );
slider.directionNav = $( '.' + namespace + 'direction-nav li a', slider );
}
methods.directionNav.update();
slider.directionNav.bind( eventType, function( event ) {
event.preventDefault();
var target;
if ( watchedEvent === '' || watchedEvent === event.type ) {
target = ( $( this ).hasClass( namespace + 'next' ) ) ? slider.getTarget( 'next' ) : slider.getTarget( 'prev' );
slider.featureAnimate( target );
}
// Set up flags to prevent event duplication.
if ( watchedEvent === '' )
watchedEvent = event.type;
methods.setToClearWatchedEvent();
} );
},
update: function() {
var disabledClass = namespace + 'disabled';
if ( slider.pagingCount === 1 ) {
slider.directionNav.addClass( disabledClass ).attr( 'tabindex', '-1' );
} else {
slider.directionNav.removeClass( disabledClass ).removeAttr( 'tabindex' );
}
}
},
touch: function() {
var startX,
startY,
offset,
cwidth,
dx,
startT,
scrolling = false,
localX = 0,
localY = 0,
accDx = 0;
if ( ! msGesture ) {
el.addEventListener( 'touchstart', onTouchStart, false );
function onTouchStart( e ) {
if ( slider.animating ) {
e.preventDefault();
} else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
cwidth = slider.w;
startT = Number( new Date() );
// Local vars for X and Y points.
localX = e.touches[0].pageX;
localY = e.touches[0].pageY;
offset = ( slider.animatingTo === slider.last ) ? 0 :
( slider.currentSlide === slider.last ) ? slider.limit : ( slider.currentSlide + slider.cloneOffset ) * cwidth;
startX = localX;
startY = localY;
el.addEventListener( 'touchmove', onTouchMove, false );
el.addEventListener( 'touchend', onTouchEnd, false );
}
}
function onTouchMove( e ) {
// Local vars for X and Y points.
localX = e.touches[0].pageX;
localY = e.touches[0].pageY;
dx = startX - localX;
scrolling = Math.abs( dx ) < Math.abs( localY - startY );
var fxms = 500;
if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
e.preventDefault();
if ( slider.transitions ) {
slider.setProps( offset + dx, 'setTouch' );
}
}
}
function onTouchEnd( e ) {
// Finish the touch by undoing the touch session.
el.removeEventListener( 'touchmove', onTouchMove, false );
if ( slider.animatingTo === slider.currentSlide && ! scrolling && ! ( dx === null ) ) {
var updateDx = dx,
target = ( updateDx > 0 ) ? slider.getTarget( 'next' ) : slider.getTarget( 'prev' );
slider.featureAnimate( target );
}
el.removeEventListener( 'touchend', onTouchEnd, false );
startX = null;
startY = null;
dx = null;
offset = null;
}
} else {
el.style.msTouchAction = 'none';
el._gesture = new MSGesture();
el._gesture.target = el;
el.addEventListener( 'MSPointerDown', onMSPointerDown, false );
el._slider = slider;
el.addEventListener( 'MSGestureChange', onMSGestureChange, false );
el.addEventListener( 'MSGestureEnd', onMSGestureEnd, false );
function onMSPointerDown( e ) {
e.stopPropagation();
if ( slider.animating ) {
e.preventDefault();
} else {
el._gesture.addPointer( e.pointerId );
accDx = 0;
cwidth = slider.w;
startT = Number( new Date() );
offset = ( slider.animatingTo === slider.last ) ? 0 : ( slider.currentSlide === slider.last ) ? slider.limit : ( slider.currentSlide + slider.cloneOffset ) * cwidth;
}
}
function onMSGestureChange( e ) {
e.stopPropagation();
var slider = e.target._slider;
if ( ! slider )
return;
var transX = -e.translationX,
transY = -e.translationY;
// Accumulate translations.
accDx = accDx + transX;
dx = accDx;
scrolling = Math.abs( accDx ) < Math.abs( -transY );
if ( e.detail === e.MSGESTURE_FLAG_INERTIA ) {
setImmediate( function () {
el._gesture.stop();
} );
return;
}
if ( ! scrolling || Number( new Date() ) - startT > 500 ) {
e.preventDefault();
if ( slider.transitions ) {
slider.setProps( offset + dx, 'setTouch' );
}
}
}
function onMSGestureEnd( e ) {
e.stopPropagation();
var slider = e.target._slider;
if ( ! slider )
return;
if ( slider.animatingTo === slider.currentSlide && ! scrolling && ! ( dx === null ) ) {
var updateDx = dx,
target = ( updateDx > 0 ) ? slider.getTarget( 'next' ) : slider.getTarget( 'prev' );
slider.featureAnimate( target );
}
startX = null;
startY = null;
dx = null;
offset = null;
accDx = 0;
}
}
},
resize: function() {
if ( ! slider.animating && slider.is( ':visible' ) ) {
slider.doMath();
// SMOOTH HEIGHT
methods.smoothHeight();
slider.newSlides.width( slider.computedW );
slider.setProps( slider.computedW, 'setTotal' );
}
},
smoothHeight: function( dur ) {
var $obj = slider.viewport;
( dur ) ? $obj.animate( { 'height': slider.slides.eq( slider.animatingTo ).height() }, dur ) : $obj.height( slider.slides.eq( slider.animatingTo ).height() );
},
setToClearWatchedEvent: function() {
clearTimeout( watchedEventClearTimer );
watchedEventClearTimer = setTimeout( function() {
watchedEvent = '';
}, 3000 );
}
};
// Public methods.
slider.featureAnimate = function( target ) {
if ( target !== slider.currentSlide )
slider.direction = ( target > slider.currentSlide ) ? 'next' : 'prev';
if ( ! slider.animating && slider.is( ':visible' ) ) {
slider.animating = true;
slider.animatingTo = target;
// CONTROLNAV
methods.controlNav.active();
slider.slides.removeClass( namespace + 'active-slide' ).eq( target ).addClass( namespace + 'active-slide' );
slider.atEnd = target === 0 || target === slider.last;
// DIRECTIONNAV
methods.directionNav.update();
var dimension = slider.computedW,
margin, slideString, calcNext;
if ( slider.currentSlide === 0 && target === slider.count - 1 && slider.direction !== 'next' ) {
slideString = 0;
} else if ( slider.currentSlide === slider.last && target === 0 && slider.direction !== 'prev' ) {
slideString = ( slider.count + 1 ) * dimension;
} else {
slideString = ( target + slider.cloneOffset ) * dimension;
}
slider.setProps( slideString, '', slider.vars.animationSpeed );
if ( slider.transitions ) {
if ( ! slider.atEnd ) {
slider.animating = false;
slider.currentSlide = slider.animatingTo;
}
slider.container.unbind( 'webkitTransitionEnd transitionend' );
slider.container.bind( 'webkitTransitionEnd transitionend', function() {
slider.wrapup( dimension );
} );
} else {
slider.container.animate( slider.args, slider.vars.animationSpeed, 'swing', function() {
slider.wrapup( dimension );
} );
}
// SMOOTH HEIGHT
methods.smoothHeight( slider.vars.animationSpeed );
}
};
slider.wrapup = function( dimension ) {
if ( slider.currentSlide === 0 && slider.animatingTo === slider.last ) {
slider.setProps( dimension, 'jumpEnd' );
} else if ( slider.currentSlide === slider.last && slider.animatingTo === 0 ) {
slider.setProps( dimension, 'jumpStart' );
}
slider.animating = false;
slider.currentSlide = slider.animatingTo;
};
slider.getTarget = function( dir ) {
slider.direction = dir;
if ( dir === 'next' ) {
return ( slider.currentSlide === slider.last ) ? 0 : slider.currentSlide + 1;
} else {
return ( slider.currentSlide === 0 ) ? slider.last : slider.currentSlide - 1;
}
};
slider.setProps = function( pos, special, dur ) {
var target = ( function() {
var posCheck = ( pos ) ? pos : slider.itemW * slider.animatingTo,
posCalc = ( function() {
switch ( special ) {
case 'setTotal': return ( slider.currentSlide + slider.cloneOffset ) * pos;
case 'setTouch': return pos;
case 'jumpEnd': return slider.count * pos;
case 'jumpStart': return pos;
default: return pos;
}
}() );
return ( posCalc * -1 ) + 'px';
}() );
if ( slider.transitions ) {
target = 'translate3d(' + target + ',0,0 )';
dur = ( dur !== undefined ) ? ( dur / 1000 ) + 's' : '0s';
slider.container.css( '-' + slider.pfx + '-transition-duration', dur );
}
slider.args[slider.prop] = target;
if ( slider.transitions || dur === undefined )
slider.container.css( slider.args );
};
slider.setup = function( type ) {
var sliderOffset, arr;
if ( type === 'init' ) {
slider.viewport = $( '<div class="' + namespace + 'viewport"></div>' ).css( { 'overflow': 'hidden', 'position': 'relative' } ).appendTo( slider ).append( slider.container );
slider.cloneCount = 0;
slider.cloneOffset = 0;
}
slider.cloneCount = 2;
slider.cloneOffset = 1;
// Clear out old clones.
if ( type !== 'init' )
slider.container.find( '.clone' ).remove();
slider.container.append( slider.slides.first().clone().addClass( 'clone' ).attr( 'aria-hidden', 'true' ) ).prepend( slider.slides.last().clone().addClass( 'clone' ).attr( 'aria-hidden', 'true' ) );
slider.newSlides = $( slider.vars.selector, slider );
sliderOffset = slider.currentSlide + slider.cloneOffset;
slider.container.width( ( slider.count + slider.cloneCount ) * 200 + '%' );
slider.setProps( sliderOffset * slider.computedW, 'init' );
setTimeout( function() {
slider.doMath();
slider.newSlides.css( { 'width': slider.computedW, 'float': 'left', 'display': 'block' } );
// SMOOTH HEIGHT
methods.smoothHeight();
}, ( type === 'init' ) ? 100 : 0 );
slider.slides.removeClass( namespace + 'active-slide' ).eq( slider.currentSlide ).addClass( namespace + 'active-slide' );
};
slider.doMath = function() {
var slide = slider.slides.first();
slider.w = ( slider.viewport===undefined ) ? slider.width() : slider.viewport.width();
slider.h = slide.height();
slider.boxPadding = slide.outerWidth() - slide.width();
slider.itemW = slider.w;
slider.pagingCount = slider.count;
slider.last = slider.count - 1;
slider.computedW = slider.itemW - slider.boxPadding;
};
slider.update = function( pos, action ) {
slider.doMath();
// Update currentSlide and slider.animatingTo if necessary.
if ( pos < slider.currentSlide ) {
slider.currentSlide += 1;
} else if ( pos <= slider.currentSlide && pos !== 0 ) {
slider.currentSlide -= 1;
}
slider.animatingTo = slider.currentSlide;
// Update controlNav.
if ( action === 'add' || slider.pagingCount > slider.controlNav.length ) {
methods.controlNav.update( 'add' );
} else if ( action === 'remove' || slider.pagingCount < slider.controlNav.length ) {
if ( slider.currentSlide > slider.last ) {
slider.currentSlide -= 1;
slider.animatingTo -= 1;
}
methods.controlNav.update( 'remove', slider.last );
}
// Update directionNav.
methods.directionNav.update();
};
// FeaturedSlider: initialize.
methods.init();
};
// Ensure the slider isn't focused if the window loses focus.
$( window ).blur( function ( e ) {
focused = false;
} ).focus( function ( e ) {
focused = true;
} );
// Default settings.
$.featuredslider.defaults = {
namespace: 'slider-', // String: prefix string attached to the class of every element generated by the plugin.
selector: '.slides > li', // String: selector, must match a simple pattern.
animationSpeed: 600, // Integer: Set the speed of animations, in milliseconds.
controlsContainer: '', // jQuery Object/Selector: container navigation to append elements.
// Text labels: @todo allow translation
prevText: 'Previous', // String: Set the text for the "previous" directionNav item.
nextText: 'Next' // String: Set the text for the "next" directionNav item.
};
// FeaturedSlider: plugin function.
$.fn.featuredslider = function( options ) {
if ( options === undefined )
options = {};
if ( typeof options === 'object' ) {
return this.each( function() {
var $this = $( this ),
selector = ( options.selector ) ? options.selector : '.slides > li',
$slides = $this.find( selector );
if ( $slides.length === 1 || $slides.length === 0 ) {
$slides.fadeIn( 400 );
} else if ( $this.data( 'featuredslider' ) === undefined ) {
new $.featuredslider( this, options );
}
} );
}
};
} )( jQuery );

View File

@ -13,6 +13,12 @@
get_header(); ?> get_header(); ?>
<div id="main-content" class="main-content">
<?php
if ( is_front_page() && twentyfourteen_has_featured_posts() )
get_template_part( 'featured-content' );
?>
<div id="primary" class="content-area"> <div id="primary" class="content-area">
<div id="content" class="site-content" role="main"> <div id="content" class="site-content" role="main">
@ -30,8 +36,9 @@ get_header(); ?>
</div><!-- #content --> </div><!-- #content -->
</div><!-- #primary --> </div><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php <?php
get_sidebar( 'content' );
get_sidebar(); get_sidebar();
get_footer(); get_footer();

View File

@ -361,7 +361,7 @@ blockquote.alignleft {
/* Mobile list style */ /* Mobile list style */
@media screen and (max-width: 400px) { @media screen and (max-width: 400px) {
.list-view .featured-thumbnail img { .list-view .post-thumbnail img {
float: right; float: right;
margin: 0 0 3px 10px; margin: 0 0 3px 10px;
} }

View File

@ -9,6 +9,7 @@
get_header(); ?> get_header(); ?>
<div id="main-content" class="main-content">
<section id="primary" class="content-area"> <section id="primary" class="content-area">
<div id="content" class="site-content" role="main"> <div id="content" class="site-content" role="main">
@ -34,8 +35,10 @@ get_header(); ?>
</div><!-- #content --> </div><!-- #content -->
</section><!-- #primary --> </section><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php <?php
get_sidebar( 'content' );
get_sidebar(); get_sidebar();
get_footer(); get_footer();

View File

@ -8,20 +8,18 @@
*/ */
?> ?>
<div id="secondary"> <div id="secondary">
<div id="secondary-top"> <?php
<?php $description = get_bloginfo( 'description' );
$description = get_bloginfo( 'description' ); if ( ! empty ( $description ) ) :
if ( ! empty ( $description ) ) : ?>
?> <h2 class="site-description"><?php echo esc_html( $description ); ?></h2>
<h2 class="site-description"><?php echo esc_html( $description ); ?></h2> <?php endif; ?>
<?php endif; ?>
<?php if ( has_nav_menu( 'secondary' ) ) : ?> <?php if ( has_nav_menu( 'secondary' ) ) : ?>
<nav role="navigation" class="navigation site-navigation secondary-navigation"> <nav role="navigation" class="navigation site-navigation secondary-navigation">
<?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?> <?php wp_nav_menu( array( 'theme_location' => 'secondary' ) ); ?>
</nav> </nav>
<?php endif; ?> <?php endif; ?>
</div><!-- #secondary-top -->
<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?> <?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
<div id="primary-sidebar" class="primary-sidebar widget-area" role="complementary"> <div id="primary-sidebar" class="primary-sidebar widget-area" role="complementary">
@ -29,6 +27,6 @@
do_action( 'before_sidebar' ); do_action( 'before_sidebar' );
dynamic_sidebar( 'sidebar-1' ); dynamic_sidebar( 'sidebar-1' );
?> ?>
</div><!-- #secondary-bottom --> </div><!-- #primary-sidebar .primary-sidebar -->
<?php endif; ?> <?php endif; ?>
</div><!-- #secondary --> </div><!-- #secondary -->

View File

@ -9,25 +9,27 @@
get_header(); ?> get_header(); ?>
<div id="primary" class="content-area"> <div id="main-content" class="main-content">
<div id="content" class="site-content" role="main"> <div id="primary" class="content-area">
<?php <div id="content" class="site-content" role="main">
while ( have_posts() ) : <?php
the_post(); while ( have_posts() ) :
the_post();
get_template_part( 'content', get_post_format() ); get_template_part( 'content', get_post_format() );
twentyfourteen_post_nav(); twentyfourteen_post_nav();
// If comments are open or we have at least one comment, load up the comment template. // If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) if ( comments_open() || get_comments_number() )
comments_template(); comments_template();
endwhile; endwhile;
?> ?>
</div><!-- #content --> </div><!-- #content -->
</div><!-- #primary --> </div><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php <?php
get_sidebar( 'content' );
get_sidebar(); get_sidebar();
get_footer(); get_footer();

View File

@ -13,7 +13,6 @@ This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others. Use it to make something cool, have fun, and share what you've learned with others.
*/ */
/** /**
* Table of Contents: * Table of Contents:
* *
@ -34,7 +33,7 @@ Use it to make something cool, have fun, and share what you've learned with othe
* 6.8 - Archives * 6.8 - Archives
* 6.9 - Contributor Page * 6.9 - Contributor Page
* 6.10 - 404 Page * 6.10 - 404 Page
* 6.11 - Front Page * 6.11 - Full-width
* 6.12 - Comments * 6.12 - Comments
* 7.0 - Sidebar * 7.0 - Sidebar
* 7.1 - Widgets * 7.1 - Widgets
@ -555,13 +554,8 @@ img[class*="attachment-"],
img.size-full, img.size-full,
img.size-large, img.size-large,
img.wp-post-image { img.wp-post-image,
height: auto; .post-thumbnail img {
max-width: 100%;
}
.attachment-featured-featured img,
.featured-thumbnail img {
height: auto; height: auto;
max-width: 100%; max-width: 100%;
} }
@ -701,12 +695,16 @@ img.wp-smiley {
/* Clearing floats */ /* Clearing floats */
.clear:before,
.clear:after,
.footer-sidebar:before, .footer-sidebar:before,
.footer-sidebar:after, .footer-sidebar:after,
.hentry:before, .hentry:before,
.hentry:after, .hentry:after,
.slider-direction-nav:before,
.slider-direction-nav:after,
.contributor-info:before,
.contributor-info:after,
.search-box:before,
.search-box:after,
[class*="content"]:before, [class*="content"]:before,
[class*="content"]:after, [class*="content"]:after,
[class*="site"]:before, [class*="site"]:before,
@ -715,9 +713,11 @@ img.wp-smiley {
display: table; display: table;
} }
.clear:after,
.footer-sidebar:after, .footer-sidebar:after,
.hentry:after, .hentry:after,
.slider-direction-nav:after,
.contributor-info:after,
.search-box:after,
[class*="content"]:after, [class*="content"]:after,
[class*="site"]:after { [class*="site"]:after {
clear: both; clear: both;
@ -731,6 +731,7 @@ img.wp-smiley {
.contributor-posts-link:before, .contributor-posts-link:before,
.menu-toggle:before, .menu-toggle:before,
.search-toggle:before, .search-toggle:before,
.slider-direction-nav a:before,
.widget_twentyfourteen_ephemera .widget-title:before { .widget_twentyfourteen_ephemera .widget-title:before {
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
display: inline-block; display: inline-block;
@ -767,6 +768,10 @@ span + .edit-link:before,
position: relative; position: relative;
} }
.main-content {
width: 100%;
}
/** /**
* 4.0 Header * 4.0 Header
@ -779,14 +784,14 @@ span + .edit-link:before,
} }
.site-header { .site-header {
background-color: #000;
max-width: 1260px; max-width: 1260px;
position: relative; position: relative;
width: 100%; width: 100%;
z-index: 3; z-index: 4;
} }
.header-main { .header-main {
background-color: #000;
min-height: 48px; min-height: 48px;
padding: 0 10px; padding: 0 10px;
} }
@ -811,7 +816,7 @@ span + .edit-link:before,
cursor: pointer; cursor: pointer;
float: right; float: right;
height: 48px; height: 48px;
margin-right: 38px; margin-right: 48px;
text-align: center; text-align: center;
width: 48px; width: 48px;
} }
@ -844,10 +849,10 @@ span + .edit-link:before,
.search-box .search-field { .search-box .search-field {
background-color: #fff; background-color: #fff;
float: right; float: right;
font-size: 13px; font-size: 16px;
margin: 12px 10px; margin: 12px 10px;
padding: 3px 2px 3px 6px; padding: 1px 2px 2px 6px;
width: 240px; width: 300px;
} }
@ -928,7 +933,7 @@ span + .edit-link:before,
.secondary-navigation { .secondary-navigation {
border-bottom: 1px solid rgba(255, 255, 255, 0.2); border-bottom: 1px solid rgba(255, 255, 255, 0.2);
font-size: 14px; font-size: 14px;
margin: 48px 0 0; margin: 48px 0;
} }
.secondary-navigation a { .secondary-navigation a {
@ -984,10 +989,6 @@ span + .edit-link:before,
max-width: 672px; max-width: 672px;
} }
.full-width .hentry {
max-width: 100%;
}
.site-content .entry-header, .site-content .entry-header,
.site-content .entry-content, .site-content .entry-content,
.site-content .entry-summary, .site-content .entry-summary,
@ -1003,29 +1004,29 @@ span + .edit-link:before,
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
*/ */
.featured-thumbnail { .post-thumbnail {
background: url(images/pattern-light.svg) #767676 repeat fixed; background: url(images/pattern-light.svg) #767676 repeat fixed;
display: none; display: none;
float: none; float: none;
height: auto; height: auto;
margin: 0; margin: 0;
min-height: 180px; min-height: 192px;
position: relative; position: relative;
width: 100%; width: 100%;
z-index: 0; z-index: 0;
} }
a.featured-thumbnail:hover { a.post-thumbnail:hover {
background: url(images/pattern-light.svg) #919191 repeat fixed; background: url(images/pattern-light.svg) #919191 repeat fixed;
} }
.featured-thumbnail img { .post-thumbnail img {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
.has-featured-image .featured-thumbnail, .has-post-thumbnail .post-thumbnail,
.format-standard .featured-thumbnail { .format-standard .post-thumbnail {
display: block; display: block;
} }
@ -1045,7 +1046,7 @@ a.featured-thumbnail:hover {
padding: 0 10px 12px; padding: 0 10px 12px;
} }
.site-content .has-featured-image .entry-header, .site-content .has-post-thumbnail .entry-header,
.site-content .format-standard .entry-header { .site-content .format-standard .entry-header {
padding-top: 24px; padding-top: 24px;
} }
@ -1058,7 +1059,7 @@ a.featured-thumbnail:hover {
clear: none; clear: none;
font-size: 15px; font-size: 15px;
font-weight: 900; font-weight: 900;
line-height: 18px; line-height: 1.2;
margin: 0 0 6px 0; margin: 0 0 6px 0;
} }
@ -1079,7 +1080,6 @@ a.featured-thumbnail:hover {
} }
/** /**
* 6.3 Entry Meta * 6.3 Entry Meta
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
@ -1506,20 +1506,10 @@ a.featured-thumbnail:hover {
padding-top: 0; padding-top: 0;
} }
.site-content .entry-meta .entry-title { .site-content .format-link .entry-title,
font-size: 12px; .site-content .format-aside .entry-title,
font-weight: 400; .site-content .format-quote .entry-title {
line-height: 1.3333333333; display: none;
margin-bottom: 8px;
text-transform: none;
}
.entry-meta .entry-title a {
color: #767676;
}
.entry-meta .entry-title a:hover {
color: #2b2b2b;
} }
@ -1733,17 +1723,30 @@ a.featured-thumbnail:hover {
/** /**
* 6.11 Front Page * 6.11 Full-width
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
*/ */
.front-page-content-wrapper { .full-width.singular .content-area {
width: 100%; padding-top: 0;
}
.full-width .hentry {
max-width: 100%;
}
.full-width.singular .hentry.no-post-thumbnail,
.full-width.singular .hentry.no-post-thumbnail.format-standard.post-password-required {
padding-top: 24px;
}
.full-width.singular .hentry.no-post-thumbnail.format-standard {
padding-top: 0;
} }
/** /**
* 6.11 Comments * 6.12 Comments
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
*/ */
@ -1969,6 +1972,7 @@ a.featured-thumbnail:hover {
#secondary { #secondary {
background-color: #000; background-color: #000;
border-top: 1px solid #000; border-top: 1px solid #000;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
clear: both; clear: both;
color: rgba(255, 255, 255, 0.55); color: rgba(255, 255, 255, 0.55);
font-size: 14px; font-size: 14px;
@ -1989,6 +1993,9 @@ a.featured-thumbnail:hover {
.primary-sidebar { .primary-sidebar {
padding-top: 48px; padding-top: 48px;
} }
.secondary-navigation + .primary-sidebar {
padding-top: 0;
}
.footer-sidebar a, .footer-sidebar a,
.primary-sidebar a { .primary-sidebar a {
@ -2070,7 +2077,7 @@ a.featured-thumbnail:hover {
.widget-area input[type="reset"], .widget-area input[type="reset"],
.widget-area input[type="submit"] { .widget-area input[type="submit"] {
font-size: 11px; font-size: 11px;
padding: 6px 24px; padding: 6px 15px;
} }
.widget-area input[type="email"], .widget-area input[type="email"],
@ -2437,7 +2444,6 @@ a.featured-thumbnail:hover {
} }
.footer-sidebar { .footer-sidebar {
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
padding-top: 48px; padding-top: 48px;
} }
@ -2446,6 +2452,10 @@ a.featured-thumbnail:hover {
padding: 15px 10px; padding: 15px 10px;
} }
#supplementary + .site-info {
border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.site-info a { .site-info a {
color: rgba(255, 255, 255, 0.75); color: rgba(255, 255, 255, 0.75);
} }
@ -2465,35 +2475,47 @@ a.featured-thumbnail:hover {
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
position: relative;
width: 100%; width: 100%;
} }
.featured-content-inner {
overflow: hidden;
}
.featured-content .hentry { .featured-content .hentry {
color: #fff; color: #fff;
margin: 0; margin: 0;
max-width: 100%;
width: 100%; width: 100%;
} }
.attachment-featured-featured { .featured-content .post-thumbnail,
background-color: #000; .featured-content .post-thumbnail:hover {
background: transparent;
}
.featured-content .post-thumbnail {
display: block; display: block;
overflow: hidden; min-height: 0;
position: relative;
padding-top: 55.357142857%;
} }
.attachment-featured-featured:hover img { .featured-content .post-thumbnail img {
opacity: 0.85; left: 0;
position: absolute;
top: 0;
} }
.featured-content .entry-wrap { .featured-content .entry-header {
background-color: #000; background-color: #000;
border-color: #000;
border-style: solid;
border-width: 12px 10px;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;
-moz-box-sizing: border-box; -moz-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
min-height: 96px; min-height: 96px;
overflow: hidden; overflow: hidden;
padding: 24px 10px;
} }
.featured-content a { .featured-content a {
@ -2524,20 +2546,132 @@ a.featured-thumbnail:hover {
} }
/* Slider */
.slider .featured-content .hentry {
display: none;
-webkit-backface-visibility: hidden;
position: relative;
}
.slider .featured-content .post-thumbnail {
padding-top: 55.49132947%;
}
.slider-control-paging {
background-color: #000;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
float: left;
list-style: none;
margin: -24px 0 0 0;
position: relative;
width: 100%;
z-index: 3;
}
.slider-control-paging li {
float: left;
margin: 2px 4px 2px 0;
}
.slider-control-paging li:last-child {
margin-right: 0;
}
.slider-control-paging a {
cursor: pointer;
display: block;
height: 44px;
position: relative;
text-indent: -999em;
width: 44px;
}
.slider-control-paging a:before {
background-color: #4d4d4d;
content: "";
height: 12px;
left: 10px;
position: absolute;
top: 16px;
width: 12px;
}
.slider-control-paging a:hover:before {
background-color: #24890d;
}
.slider-control-paging a.slider-active:before {
background-color: #41a62a;
}
.slider-direction-nav {
clear: both;
list-style: none;
margin: 0;
position: relative;
width: 100%;
z-index: 3;
}
.slider-direction-nav li {
border-color: #fff;
border-style: solid;
border-width: 2px 1px 0 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
float: left;
text-align: center;
width: 50%;
}
.slider-direction-nav li:last-child {
border-width: 2px 0 0 1px;
}
.slider-direction-nav a {
background-color: #000;
display: block;
font-size: 0;
height: 46px;
}
.slider-direction-nav a:hover {
background-color: #24890d;
}
.slider-direction-nav a:before {
content: "\f430";
color: #fff;
font-size: 32px;
line-height: 46px;
}
.slider-direction-nav a.slider-next:before {
content: "\f429";
}
.slider-direction-nav .slider-disabled {
display: none;
}
/** /**
* 10.0 Media Queries * 10.0 Media Queries
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
*/ */
@media screen and (max-width: 400px) { @media screen and (max-width: 400px) {
.list-view .featured-thumbnail { .list-view .site-content .post-thumbnail {
background: none; background: none;
min-height: 0; min-height: 0;
width: auto; width: auto;
z-index: 2; z-index: 2;
} }
.list-view .featured-thumbnail img { .list-view .site-content .post-thumbnail img {
float: left; float: left;
margin: 0 10px 3px 0; margin: 0 10px 3px 0;
width: 84px; width: 84px;
@ -2600,7 +2734,7 @@ a.featured-thumbnail:hover {
} }
@media screen and (min-width: 401px) { @media screen and (min-width: 401px) {
a.featured-thumbnail:hover img { a.post-thumbnail:hover img {
opacity: 0.85; opacity: 0.85;
} }
@ -2702,8 +2836,8 @@ a.featured-thumbnail:hover {
margin: -3px 2px 0 0; margin: -3px 2px 0 0;
} }
.list-view .site-content .has-featured-image .featured-thumbnail, .list-view .site-content .has-post-thumbnail .post-thumbnail,
.list-view .site-content .format-standard .featured-thumbnail { .list-view .site-content .format-standard .post-thumbnail {
margin-top: -49px; margin-top: -49px;
} }
@ -2725,7 +2859,7 @@ a.featured-thumbnail:hover {
padding-left: 30px; padding-left: 30px;
} }
.site-content .has-featured-image .entry-header, .site-content .has-post-thumbnail .entry-header,
.site-content .format-standard .entry-header { .site-content .format-standard .entry-header {
margin-top: -48px; margin-top: -48px;
} }
@ -2736,12 +2870,20 @@ a.featured-thumbnail:hover {
} }
@media screen and (min-width: 673px) { @media screen and (min-width: 673px) {
.header-main {
padding: 0 0 0 30px;
}
.content-area { .content-area {
float: left; float: left;
padding-top: 36px; padding-top: 36px;
width: 100%; width: 100%;
} }
.full-width.singular .content-area {
padding-top: 0;
}
.site-content { .site-content {
margin-right: 33.33333333%; margin-right: 33.33333333%;
} }
@ -2750,16 +2892,25 @@ a.featured-thumbnail:hover {
margin-right: 0; margin-right: 0;
} }
.site-content .has-featured-image .entry-header, .site-content .has-post-thumbnail .entry-header,
.site-content .format-standard .entry-header { .site-content .format-standard .entry-header {
margin-top: 0; margin-top: 0;
} }
.full-width .site-content .has-featured-image .entry-header, .full-width .site-content .has-post-thumbnail .entry-header,
.full-width .site-content .format-standard .entry-header { .full-width .site-content .format-standard .entry-header {
margin-top: -48px; margin-top: -48px;
} }
.full-width.singular .hentry.no-post-thumbnail,
.full-width.singular .hentry.no-post-thumbnail.format-standard.post-password-required {
padding-top: 36px;
}
.full-width.singular .hentry.no-post-thumbnail.format-standard {
padding-top: 0;
}
.archive-header, .archive-header,
.comments-area, .comments-area,
.image-navigation, .image-navigation,
@ -2773,6 +2924,11 @@ a.featured-thumbnail:hover {
padding-left: 30px; padding-left: 30px;
} }
#secondary,
#supplementary {
padding: 0 30px;
}
.content-sidebar { .content-sidebar {
border: 0; border: 0;
float: right; float: right;
@ -2781,29 +2937,74 @@ a.featured-thumbnail:hover {
width: 33.33333333%; width: 33.33333333%;
} }
.featured-content .hentry { .grid .featured-content .hentry {
float: left; float: left;
width: 50%; width: 50%;
} }
.featured-content .hentry:nth-child( 2n+1 ) { .grid .featured-content .hentry:nth-child( 2n+1 ) {
clear: both; clear: both;
} }
.featured-content .entry-wrap { .grid .featured-content .entry-header {
border-color: #000;
border-style: solid;
border-width: 12px 10px;
height: 96px; height: 96px;
padding: 0;
} }
.attachment-featured-featured { .slider .featured-content .entry-title {
height: 186px; font-size: 22px;
line-height: 1.0909090909;
}
.slider .featured-content .entry-header {
bottom: 0;
min-height: inherit;
padding: 24px 30px 48px;
position: absolute;
width: 50%;
z-index: 3;
}
.slider-control-paging {
background: transparent;
margin-top: -48px;
padding-left: 20px;
width: 50%;
}
.slider-direction-nav {
clear: none;
float: right;
margin-top: -48px;
width: 98px;
}
.slider-direction-nav li {
border: none;
padding: 0 1px; 0 0;
}
.slider-direction-nav li:last-child {
padding: 0 0 0 1px;
}
.slider-direction-nav a {
height: 48px;
}
.slider-direction-nav a:before {
line-height: 48px;
}
.site-info {
padding: 15px 30px;
} }
} }
@media screen and (min-width: 782px) { @media screen and (min-width: 782px) {
.header-main {
padding: 0 0 0 30px;
}
.search-toggle { .search-toggle {
margin-right: 0; margin-right: 0;
} }
@ -2923,10 +3124,6 @@ a.featured-thumbnail:hover {
.primary-navigation li .current-menu-ancestor > a { .primary-navigation li .current-menu-ancestor > a {
background-color: #000; background-color: #000;
} }
.attachment-featured-featured {
height: 213px;
}
} }
@media screen and (min-width: 810px) { @media screen and (min-width: 810px) {
@ -2970,10 +3167,6 @@ a.featured-thumbnail:hover {
.contributor-summary { .contributor-summary {
float: left; float: left;
} }
.attachment-featured-featured {
height: 224px;
}
} }
@media screen and (min-width: 870px) { @media screen and (min-width: 870px) {
@ -2982,7 +3175,20 @@ a.featured-thumbnail:hover {
padding-top: 72px; padding-top: 72px;
} }
.site-content .has-featured-image .entry-header, .full-width.singular .content-area {
padding-top: 0;
}
.full-width.singular .hentry.no-post-thumbnail,
.full-width.singular .hentry.no-post-thumbnail.format-standard.post-password-required {
padding-top: 72px;
}
.full-width.singular .hentry.no-post-thumbnail.format-standard {
padding-top: 0;
}
.site-content .has-post-thumbnail .entry-header,
.site-content .format-standard .entry-header { .site-content .format-standard .entry-header {
margin-top: -48px; margin-top: -48px;
} }
@ -3022,10 +3228,6 @@ a.featured-thumbnail:hover {
.featured-content { .featured-content {
margin-bottom: -24px; margin-bottom: -24px;
} }
.attachment-featured-featured {
height: 241px;
}
} }
@media screen and (min-width: 1008px) { @media screen and (min-width: 1008px) {
@ -3033,6 +3235,10 @@ a.featured-thumbnail:hover {
padding-left: 182px; padding-left: 182px;
} }
.main-content {
float: left;
}
.site-content { .site-content {
margin: 0 29.04761904% 0 182px; margin: 0 29.04761904% 0 182px;
} }
@ -3041,7 +3247,7 @@ a.featured-thumbnail:hover {
margin-top: 0; margin-top: 0;
} }
.site-content .has-featured-image .entry-header, .site-content .has-post-thumbnail .entry-header,
.site-content .format-standard .entry-header { .site-content .format-standard .entry-header {
margin-top: 0; margin-top: 0;
} }
@ -3066,14 +3272,13 @@ a.featured-thumbnail:hover {
#secondary { #secondary {
background-color: transparent; background-color: transparent;
border-top: 0; border: 0;
clear: none; clear: none;
float: left; float: left;
font-size: 11px; font-size: 11px;
line-height: 1.6363636363; line-height: 1.6363636363;
margin: 0 0 0 -100%; margin: 0 0 0 -100%;
min-height: 100vh; min-height: 100vh;
padding: 0 30px;
width: 122px; width: 122px;
} }
@ -3110,7 +3315,7 @@ a.featured-thumbnail:hover {
.secondary-navigation { .secondary-navigation {
border-bottom: 1px solid rgba(255, 255, 255, 0.2); border-bottom: 1px solid rgba(255, 255, 255, 0.2);
font-size: 11px; font-size: 11px;
margin: 0 0 48px; margin-top: 0;
} }
.secondary-navigation ul, .secondary-navigation ul,
@ -3168,41 +3373,29 @@ a.featured-thumbnail:hover {
width: 25%; width: 25%;
} }
.site-info {
padding: 15px 30px;
}
.front-page-content-wrapper {
float: left;
}
.featured-content { .featured-content {
padding-left: 182px; padding-left: 182px;
} }
.featured-content .hentry { .grid .featured-content .hentry {
width: 33.3333333%; width: 33.3333333%;
} }
.featured-content .hentry:nth-child( 2n+1 ) { .grid .featured-content .hentry:nth-child( 2n+1 ) {
clear: none; clear: none;
} }
.featured-content .hentry:nth-child( 3n+1 ) { .grid .featured-content .hentry:nth-child( 3n+1 ) {
clear: both; clear: both;
} }
.featured-content .entry-wrap { .grid .featured-content .entry-header {
height: 120px; height: 120px;
} }
.attachment-featured-featured {
height: 152px;
}
} }
@media screen and (min-width: 1040px) { @media screen and (min-width: 1040px) {
.site-content .has-featured-image .entry-header, .site-content .has-post-thumbnail .entry-header,
.site-content .format-standard .entry-header { .site-content .format-standard .entry-header {
margin-top: -48px; margin-top: -48px;
} }
@ -3238,10 +3431,6 @@ a.featured-thumbnail:hover {
padding-right: 30px; padding-right: 30px;
padding-left: 30px; padding-left: 30px;
} }
.attachment-featured-featured {
height: 158px;
}
} }
@media screen and (min-width: 1080px) { @media screen and (min-width: 1080px) {
@ -3266,6 +3455,33 @@ a.featured-thumbnail:hover {
.secondary-navigation ul ul { .secondary-navigation ul ul {
left: 162px; left: 162px;
} }
.slider .featured-content .entry-title {
font-size: 33px;
}
.slider .featured-content .entry-header,
.slider-control-paging {
width: 534px;
}
.slider-control-paging {
padding-left: 24px;
}
.slider-control-paging li {
margin: 12px 12px 12px 0
}
.slider-control-paging a {
height: 24px;
width: 24px;
}
.slider-control-paging a:before {
left: 6px;
top: 6px;
}
} }
@media screen and (min-width: 1110px) { @media screen and (min-width: 1110px) {
@ -3282,10 +3498,6 @@ a.featured-thumbnail:hover {
padding-right: 30px; padding-right: 30px;
padding-left: 30px; padding-left: 30px;
} }
.attachment-featured-featured {
height: 164px;
}
} }
@media screen and (min-width: 1218px) { @media screen and (min-width: 1218px) {
@ -3314,10 +3526,6 @@ a.featured-thumbnail:hover {
.full-width .site-content footer.entry-meta { .full-width .site-content footer.entry-meta {
margin-right: auto; margin-right: auto;
} }
.attachment-featured-featured {
height: 184px;
}
} }
@media screen and (min-width: 1260px) { @media screen and (min-width: 1260px) {
@ -3334,8 +3542,4 @@ a.featured-thumbnail:hover {
.site-content blockquote.alignright { .site-content blockquote.alignright {
margin-right: -18%; margin-right: -18%;
} }
.attachment-featured-featured {
height: 192px;
}
} }

View File

@ -13,6 +13,7 @@
get_header(); ?> get_header(); ?>
<div id="main-content" class="main-content">
<section id="primary" class="content-area"> <section id="primary" class="content-area">
<div id="content" class="site-content" role="main"> <div id="content" class="site-content" role="main">
@ -45,8 +46,9 @@ get_header(); ?>
?> ?>
</div><!-- #content --> </div><!-- #content -->
</section><!-- #primary --> </section><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->
<?php <?php
get_sidebar( 'content' );
get_sidebar(); get_sidebar();
get_footer(); get_footer();

View File

@ -15,6 +15,7 @@
get_header(); ?> get_header(); ?>
<div id="main-content" class="main-content">
<section id="primary" class="content-area"> <section id="primary" class="content-area">
<div id="content" class="site-content" role="main"> <div id="content" class="site-content" role="main">
@ -64,8 +65,8 @@ get_header(); ?>
?> ?>
</div><!-- #content --> </div><!-- #content -->
</section><!-- #primary --> </section><!-- #primary -->
</div><!-- #main-content -->
<?php <?php
get_sidebar( 'content' );
get_sidebar(); get_sidebar();
get_footer(); get_footer();

View File

@ -786,8 +786,6 @@ final class _WP_Editors {
'update_post_term_cache' => false, 'update_post_term_cache' => false,
'update_post_meta_cache' => false, 'update_post_meta_cache' => false,
'post_status' => 'publish', 'post_status' => 'publish',
'order' => 'DESC',
'orderby' => 'post_date',
'posts_per_page' => 20, 'posts_per_page' => 20,
); );

View File

@ -252,7 +252,7 @@ class WP {
* to executing the query. Needed to allow custom rewrite rules using your own arguments * to executing the query. Needed to allow custom rewrite rules using your own arguments
* to work, or any other custom query variables you want to be publicly available. * to work, or any other custom query variables you want to be publicly available.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param array $public_query_vars The array of whitelisted query variables. * @param array $public_query_vars The array of whitelisted query variables.
*/ */
@ -471,7 +471,7 @@ class WP {
/** /**
* Filter the query string before parsing. * Filter the query string before parsing.
* *
* @since 1.5.2 * @since 1.5.0
* @deprecated 2.1.0 Use 'query_vars' or 'request' filters instead. * @deprecated 2.1.0 Use 'query_vars' or 'request' filters instead.
* *
* @param string $query_string The query string to modify. * @param string $query_string The query string to modify.

View File

@ -34,7 +34,7 @@ function get_comment_author( $comment_ID = 0 ) {
/** /**
* Filter the returned comment author name. * Filter the returned comment author name.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string $author The comment author's username. * @param string $author The comment author's username.
*/ */
@ -53,7 +53,7 @@ function comment_author( $comment_ID = 0 ) {
/** /**
* Filter the comment author's name for display. * Filter the comment author's name for display.
* *
* @since 1.2.1 * @since 1.2.0
* *
* @param string $author The comment author's username. * @param string $author The comment author's username.
*/ */
@ -74,7 +74,7 @@ function get_comment_author_email( $comment_ID = 0 ) {
/** /**
* Filter the comment author's returned email address. * Filter the comment author's returned email address.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string $comment->comment_author_email The comment author's email address. * @param string $comment->comment_author_email The comment author's email address.
*/ */
@ -99,7 +99,7 @@ function comment_author_email( $comment_ID = 0 ) {
/** /**
* Filter the comment author's email for display. * Filter the comment author's email for display.
* *
* @since 1.2.1 * @since 1.2.0
* *
* @param string $author_email The comment author's email address. * @param string $author_email The comment author's email address.
*/ */
@ -153,7 +153,7 @@ function get_comment_author_email_link( $linktext = '', $before = '', $after = '
* Care should be taken to protect the email address and assure that email * Care should be taken to protect the email address and assure that email
* harvesters do not capture your commentors' email address. * harvesters do not capture your commentors' email address.
* *
* @since 1.2.1 * @since 1.2.0
* *
* @param string $comment->comment_author_email The comment author's email address. * @param string $comment->comment_author_email The comment author's email address.
*/ */
@ -192,7 +192,7 @@ function get_comment_author_link( $comment_ID = 0 ) {
/** /**
* Filter the comment author's link for display. * Filter the comment author's link for display.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string $return The HTML-formatted comment author link. Empty for an invalid URL. * @param string $return The HTML-formatted comment author link. Empty for an invalid URL.
*/ */
@ -225,7 +225,7 @@ function get_comment_author_IP( $comment_ID = 0 ) {
/** /**
* Filter the comment author's returned IP address. * Filter the comment author's returned IP address.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string $comment->comment_author_IP The comment author's IP address. * @param string $comment->comment_author_IP The comment author's IP address.
*/ */
@ -255,7 +255,14 @@ function get_comment_author_url( $comment_ID = 0 ) {
$comment = get_comment( $comment_ID ); $comment = get_comment( $comment_ID );
$url = ('http://' == $comment->comment_author_url) ? '' : $comment->comment_author_url; $url = ('http://' == $comment->comment_author_url) ? '' : $comment->comment_author_url;
$url = esc_url( $url, array('http', 'https') ); $url = esc_url( $url, array('http', 'https') );
return apply_filters('get_comment_author_url', $url); /**
* Filter the comment author's URL.
*
* @since 1.5.0
*
* @param string $url The comment author's URL.
*/
return apply_filters( 'get_comment_author_url', $url );
} }
/** /**
@ -270,7 +277,7 @@ function comment_author_url( $comment_ID = 0 ) {
/** /**
* Filter the comment author's URL for display. * Filter the comment author's URL for display.
* *
* @since 1.2.1 * @since 1.2.0
* *
* @param string $author_url The comment author's URL. * @param string $author_url The comment author's URL.
*/ */
@ -306,7 +313,7 @@ function get_comment_author_url_link( $linktext = '', $before = '', $after = ''
/** /**
* Filter the comment author's returned URL link. * Filter the comment author's returned URL link.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string $return The HTML-formatted comment author URL link. * @param string $return The HTML-formatted comment author URL link.
*/ */
@ -445,7 +452,7 @@ function get_comment_date( $d = '', $comment_ID = 0 ) {
/** /**
* Filter the returned comment date. * Filter the returned comment date.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string|int $date Formatted date string or Unix timestamp. * @param string|int $date Formatted date string or Unix timestamp.
* @param string $d The format of the date. * @param string $d The format of the date.
@ -508,7 +515,7 @@ function comment_excerpt( $comment_ID = 0 ) {
/** /**
* Filter the comment excerpt for display. * Filter the comment excerpt for display.
* *
* @since 1.2.1 * @since 1.2.0
* *
* @param string $comment_excerpt The comment excerpt text. * @param string $comment_excerpt The comment excerpt text.
*/ */
@ -527,7 +534,7 @@ function get_comment_ID() {
/** /**
* Filter the returned comment ID. * Filter the returned comment ID.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param int $comment->comment_ID The current comment ID. * @param int $comment->comment_ID The current comment ID.
*/ */
@ -660,7 +667,7 @@ function get_comments_number( $post_id = 0 ) {
/** /**
* Filter the returned comment count for a post. * Filter the returned comment count for a post.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param int $count The number of comments a post has. * @param int $count The number of comments a post has.
* @param int|WP_Post $post_id The post ID or WP_Post object. * @param int|WP_Post $post_id The post ID or WP_Post object.
@ -694,7 +701,7 @@ function comments_number( $zero = false, $one = false, $more = false, $deprecate
/** /**
* Filter the comments count for display. * Filter the comments count for display.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string $output A translatable string formatted based on whether the count is equal to 0, 1, or 1+. @see _n() * @param string $output A translatable string formatted based on whether the count is equal to 0, 1, or 1+. @see _n()
* @param int $number The number of post comments. * @param int $number The number of post comments.
@ -717,7 +724,7 @@ function get_comment_text( $comment_ID = 0, $args = array() ) {
/** /**
* Filter the text of a comment. * Filter the text of a comment.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string $comment->comment_content The text of the comment. * @param string $comment->comment_content The text of the comment.
* @param object $comment The comment object. * @param object $comment The comment object.
@ -743,7 +750,7 @@ function comment_text( $comment_ID = 0, $args = array() ) {
/** /**
* Filter the text of a comment to be displayed. * Filter the text of a comment to be displayed.
* *
* @since 1.2.1 * @since 1.2.0
* *
* @param string $comment_text The text of the current comment. * @param string $comment_text The text of the current comment.
* @param object $comment The comment object. * @param object $comment The comment object.
@ -773,7 +780,7 @@ function get_comment_time( $d = '', $gmt = false, $translate = true ) {
/** /**
* Filter the returned comment time. * Filter the returned comment time.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string|int $date The comment time, formatted as a date string or Unix timestamp. * @param string|int $date The comment time, formatted as a date string or Unix timestamp.
* @param string $d The date format. * @param string $d The date format.
@ -810,7 +817,7 @@ function get_comment_type( $comment_ID = 0 ) {
/** /**
* Filter the returned comment type. * Filter the returned comment type.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string $comment->comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'. * @param string $comment->comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'.
*/ */
@ -1081,7 +1088,7 @@ function comments_template( $file = '/comments.php', $separate_comments = false
/** /**
* Filter the path to the theme template file used for the comments template. * Filter the path to the theme template file used for the comments template.
* *
* @since 1.5.2 * @since 1.5.1
* *
* @param string $theme_template The path to the theme template file. * @param string $theme_template The path to the theme template file.
*/ */
@ -2101,7 +2108,7 @@ function comment_form( $args = array(), $post_id = null ) {
/** /**
* Fires at the bottom of the comment form, inside the closing </form> tag. * Fires at the bottom of the comment form, inside the closing </form> tag.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param int $post_id The post ID. * @param int $post_id The post ID.
*/ */

View File

@ -42,10 +42,10 @@ function wp_initial_constants() {
if ( function_exists( 'memory_get_usage' ) ) { if ( function_exists( 'memory_get_usage' ) ) {
$current_limit = @ini_get( 'memory_limit' ); $current_limit = @ini_get( 'memory_limit' );
$current_limit_int = intval( $current_limit ); $current_limit_int = intval( $current_limit );
if ( false !== stripos( $current_limit, 'G' ) ) if ( false !== strpos( $current_limit, 'G' ) )
$current_limit_int *= 1024; $current_limit_int *= 1024;
$wp_limit_int = intval( WP_MEMORY_LIMIT ); $wp_limit_int = intval( WP_MEMORY_LIMIT );
if ( false !== stripos( WP_MEMORY_LIMIT, 'G' ) ) if ( false !== strpos( WP_MEMORY_LIMIT, 'G' ) )
$wp_limit_int *= 1024; $wp_limit_int *= 1024;
if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || $current_limit_int < $wp_limit_int ) ) if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || $current_limit_int < $wp_limit_int ) )

View File

@ -894,27 +894,24 @@ function get_status_header_desc( $code ) {
* Set HTTP status header. * Set HTTP status header.
* *
* @since 2.0.0 * @since 2.0.0
* @uses apply_filters() Calls 'status_header' on status header string, HTTP * @see get_status_header_desc()
* HTTP code, HTTP code description, and protocol string as separate
* parameters.
* *
* @param int $header HTTP status code * @param int $code HTTP status code.
* @return unknown
*/ */
function status_header( $header ) { function status_header( $code ) {
$text = get_status_header_desc( $header ); $description = get_status_header_desc( $code );
if ( empty( $text ) ) if ( empty( $description ) )
return false; return;
$protocol = $_SERVER["SERVER_PROTOCOL"]; $protocol = $_SERVER['SERVER_PROTOCOL'];
if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol ) if ( 'HTTP/1.1' != $protocol && 'HTTP/1.0' != $protocol )
$protocol = 'HTTP/1.0'; $protocol = 'HTTP/1.0';
$status_header = "$protocol $header $text"; $status_header = "$protocol $code $description";
if ( function_exists( 'apply_filters' ) ) if ( function_exists( 'apply_filters' ) )
$status_header = apply_filters( 'status_header', $status_header, $header, $text, $protocol ); $status_header = apply_filters( 'status_header', $status_header, $code, $description, $protocol );
return @header( $status_header, true, $header ); @header( $status_header, true, $code );
} }
/** /**
@ -925,7 +922,6 @@ function status_header( $header ) {
* *
* @since 2.8.0 * @since 2.8.0
* *
* @uses apply_filters()
* @return array The associative array of header names and field values. * @return array The associative array of header names and field values.
*/ */
function wp_get_nocache_headers() { function wp_get_nocache_headers() {
@ -949,7 +945,7 @@ function wp_get_nocache_headers() {
* be sent so that all of them get the point that no caching should occur. * be sent so that all of them get the point that no caching should occur.
* *
* @since 2.0.0 * @since 2.0.0
* @uses wp_get_nocache_headers() * @see wp_get_nocache_headers()
*/ */
function nocache_headers() { function nocache_headers() {
$headers = wp_get_nocache_headers(); $headers = wp_get_nocache_headers();

View File

@ -30,7 +30,7 @@ function get_locale() {
/** /**
* Filter WordPress install's locale ID. * Filter WordPress install's locale ID.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string $locale The locale ID. * @param string $locale The locale ID.
*/ */
@ -797,9 +797,9 @@ function wp_get_pomo_file_data( $po_file ) {
'Project-Id-Version' => '"Project-Id-Version', 'Project-Id-Version' => '"Project-Id-Version',
'X-Generator' => '"X-Generator', 'X-Generator' => '"X-Generator',
) ); ) );
foreach ( $headers as &$header ) { foreach ( $headers as $header => $value ) {
// Remove possible contextual '\n' and closing double quote. // Remove possible contextual '\n' and closing double quote.
$header = preg_replace( '~(\\\n)?"$~', '', $header ); $headers[ $header ] = preg_replace( '~(\\\n)?"$~', '', $value );
} }
return $headers; return $headers;
} }

View File

@ -1378,7 +1378,7 @@ function get_previous_post_link( $format = '&laquo; %link', $link = '%title', $i
* Display previous post link that is adjacent to the current post. * Display previous post link that is adjacent to the current post.
* *
* @since 1.5.0 * @since 1.5.0
* @uses get_previous_post_link() * @see get_previous_post_link()
* *
* @param string $format Optional. Link anchor format. * @param string $format Optional. Link anchor format.
* @param string $link Optional. Link permalink format. * @param string $link Optional. Link permalink format.
@ -1391,10 +1391,9 @@ function previous_post_link( $format = '&laquo; %link', $link = '%title', $in_sa
} }
/** /**
* Get previous post link that is adjacent to the current post. * Get next post link that is adjacent to the current post.
* *
* @since 3.7.0 * @since 3.7.0
* @uses get_next_post_link()
* *
* @param string $format Optional. Link anchor format. * @param string $format Optional. Link anchor format.
* @param string $link Optional. Link permalink format. * @param string $link Optional. Link permalink format.
@ -1403,7 +1402,7 @@ function previous_post_link( $format = '&laquo; %link', $link = '%title', $in_sa
* @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'.
* @return string * @return string
*/ */
function get_next_post_link( $format = '&laquo; %link', $link = '%title', $in_same_cat = false, $excluded_terms = '', $taxonomy = 'category' ) { function get_next_post_link( $format = '%link &raquo;', $link = '%title', $in_same_cat = false, $excluded_terms = '', $taxonomy = 'category' ) {
return get_adjacent_post_link( $format, $link, $in_same_cat, $excluded_terms, false, $taxonomy ); return get_adjacent_post_link( $format, $link, $in_same_cat, $excluded_terms, false, $taxonomy );
} }
@ -1411,6 +1410,7 @@ function get_next_post_link( $format = '&laquo; %link', $link = '%title', $in_sa
* Display next post link that is adjacent to the current post. * Display next post link that is adjacent to the current post.
* *
* @since 1.5.0 * @since 1.5.0
* @see get_next_post_link()
* *
* @param string $format Optional. Link anchor format. * @param string $format Optional. Link anchor format.
* @param string $link Optional. Link permalink format. * @param string $link Optional. Link permalink format.

View File

@ -66,6 +66,8 @@ function wp_get_active_network_plugins() {
* use the wp-content/blog-deleted.php, blog-inactive.php and * use the wp-content/blog-deleted.php, blog-inactive.php and
* blog-suspended.php drop-ins. * blog-suspended.php drop-ins.
* *
* @since 3.0.0
*
* @return bool|string Returns true on success, or drop-in file to include. * @return bool|string Returns true on success, or drop-in file to include.
*/ */
function ms_site_check() { function ms_site_check() {
@ -76,7 +78,7 @@ function ms_site_check() {
/** /**
* Filter checking the status of the current blog. * Filter checking the status of the current blog.
* *
* @since 1.2.1 * @since 3.0.0
* *
* @param bool null Whether to skip the blog status check. Default null. * @param bool null Whether to skip the blog status check. Default null.
*/ */

View File

@ -3706,7 +3706,7 @@ function get_pages( $args = array() ) {
if ( !in_array( $post_type, $hierarchical_post_types ) ) if ( !in_array( $post_type, $hierarchical_post_types ) )
return $pages; return $pages;
if ( $parent && ! $child_of ) if ( $parent > 0 && ! $child_of )
$hierarchical = false; $hierarchical = false;
// Make sure we have a valid post status // Make sure we have a valid post status

View File

@ -7,7 +7,7 @@ if ( defined('WP_USE_THEMES') && WP_USE_THEMES )
/** /**
* Fires before determining which template to load. * Fires before determining which template to load.
* *
* @since 1.5.2 * @since 1.5.0
*/ */
do_action( 'template_redirect' ); do_action( 'template_redirect' );

View File

@ -34,7 +34,7 @@ function get_query_template( $type, $templates = array() ) {
* -- minus the extension -- of the file to load. This hook also applies * -- minus the extension -- of the file to load. This hook also applies
* to various types of files loaded as part of the Template Hierarchy. * to various types of files loaded as part of the Template Hierarchy.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string $template Path to the template. @see locate_template() * @param string $template Path to the template. @see locate_template()
*/ */

View File

@ -1258,12 +1258,6 @@ function validate_username( $username ) {
/** /**
* Insert an user into the database. * Insert an user into the database.
* *
* Can update a current user or insert a new user based on whether the user's ID
* is present.
*
* Can be used to update the user's info (see below), set the user's role, and
* set the user's preference on whether they want the rich editor on.
*
* Most of the $userdata array fields have filters associated with the values. * Most of the $userdata array fields have filters associated with the values.
* The exceptions are 'rich_editing', 'role', 'jabber', 'aim', 'yim', * The exceptions are 'rich_editing', 'role', 'jabber', 'aim', 'yim',
* 'user_registered', and 'ID'. The filters have the prefix 'pre_user_' followed * 'user_registered', and 'ID'. The filters have the prefix 'pre_user_' followed
@ -1456,7 +1450,6 @@ function wp_insert_user( $userdata ) {
* *
* @since 2.0.0 * @since 2.0.0
* @see wp_insert_user() For what fields can be set in $userdata * @see wp_insert_user() For what fields can be set in $userdata
* @uses wp_insert_user() Used to update existing user or add new one if user doesn't exist already
* *
* @param mixed $userdata An array of user data or a user object of type stdClass or WP_User. * @param mixed $userdata An array of user data or a user object of type stdClass or WP_User.
* @return int|WP_Error The updated user's ID or a WP_Error object if the user could not be updated. * @return int|WP_Error The updated user's ID or a WP_Error object if the user could not be updated.

View File

@ -299,8 +299,8 @@ function retrieve_password() {
/** /**
* Fires before a new password is retrieved. * Fires before a new password is retrieved.
* *
* @since 1.5.2 * @since 1.5.0
* @deprecated 1.5.2 Misspelled. Use 'retrieve_password' hook instead. * @deprecated 1.5.1 Misspelled. Use 'retrieve_password' hook instead.
* *
* @param string $user_login The user login name. * @param string $user_login The user login name.
*/ */
@ -308,7 +308,7 @@ function retrieve_password() {
/** /**
* Fires before a new password is retrieved. * Fires before a new password is retrieved.
* *
* @since 1.5.2 * @since 1.5.1
* *
* @param string $user_login The user login name. * @param string $user_login The user login name.
*/ */
@ -508,7 +508,7 @@ case 'retrievepassword' :
/** /**
* Fires before the lost password form. * Fires before the lost password form.
* *
* @since 1.5.2 * @since 1.5.1
*/ */
do_action( 'lost_password' ); do_action( 'lost_password' );
@ -542,7 +542,7 @@ if ( get_option( 'users_can_register' ) ) :
/** /**
* Filter the registration URL below the login form. * Filter the registration URL below the login form.
* *
* @since 1.5.2 * @since 1.5.0
* *
* @param string $registration_url Registration URL. * @param string $registration_url Registration URL.
*/ */

View File

@ -219,7 +219,7 @@ if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )
* *
* Pluggable functions are also available at this point in the loading order. * Pluggable functions are also available at this point in the loading order.
* *
* @since 1.5.2 * @since 1.5.0
*/ */
do_action( 'plugins_loaded' ); do_action( 'plugins_loaded' );
@ -335,7 +335,7 @@ $wp->init();
* *
* If you wish to plug an action once WP is loaded, use the wp_loaded hook below. * If you wish to plug an action once WP is loaded, use the wp_loaded hook below.
* *
* @since 1.5.2 * @since 1.5.0
*/ */
do_action( 'init' ); do_action( 'init' );