Completed
Push — master ( d488ab...6453e7 )
by Stephen
53:31
created
src/wp-content/themes/twentythirteen/sidebar.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The sidebar containing the secondary widget area
4
- *
5
- * Displays on posts and pages.
6
- *
7
- * If no active widgets are in this sidebar, hide it completely.
8
- *
9
- * @package WordPress
10
- * @subpackage Twenty_Thirteen
11
- * @since Twenty Thirteen 1.0
12
- */
3
+		 * The sidebar containing the secondary widget area
4
+		 *
5
+		 * Displays on posts and pages.
6
+		 *
7
+		 * If no active widgets are in this sidebar, hide it completely.
8
+		 *
9
+		 * @package WordPress
10
+		 * @subpackage Twenty_Thirteen
11
+		 * @since Twenty Thirteen 1.0
12
+		 */
13 13
 
14 14
 if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
15 15
 	<div id="tertiary" class="sidebar-container" role="complementary">
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
  * @since Twenty Thirteen 1.0
12 12
  */
13 13
 
14
-if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
14
+if (is_active_sidebar('sidebar-2')) : ?>
15 15
 	<div id="tertiary" class="sidebar-container" role="complementary">
16 16
 		<div class="sidebar-inner">
17 17
 			<div class="widget-area">
18
-				<?php dynamic_sidebar( 'sidebar-2' ); ?>
18
+				<?php dynamic_sidebar('sidebar-2'); ?>
19 19
 			</div><!-- .widget-area -->
20 20
 		</div><!-- .sidebar-inner -->
21 21
 	</div><!-- #tertiary -->
Please login to merge, or discard this patch.
src/wp-content/themes/twentythirteen/index.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,17 +18,17 @@
 block discarded – undo
18 18
 
19 19
 	<div id="primary" class="content-area">
20 20
 		<div id="content" class="site-content" role="main">
21
-		<?php if ( have_posts() ) : ?>
21
+		<?php if (have_posts()) : ?>
22 22
 
23 23
 			<?php /* The loop */ ?>
24
-			<?php while ( have_posts() ) : the_post(); ?>
25
-				<?php get_template_part( 'content', get_post_format() ); ?>
24
+			<?php while (have_posts()) : the_post(); ?>
25
+				<?php get_template_part('content', get_post_format()); ?>
26 26
 			<?php endwhile; ?>
27 27
 
28 28
 			<?php twentythirteen_paging_nav(); ?>
29 29
 
30 30
 		<?php else : ?>
31
-			<?php get_template_part( 'content', 'none' ); ?>
31
+			<?php get_template_part('content', 'none'); ?>
32 32
 		<?php endif; ?>
33 33
 
34 34
 		</div><!-- #content -->
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,11 @@
 block discarded – undo
27 27
 
28 28
 			<?php twentythirteen_paging_nav(); ?>
29 29
 
30
-		<?php else : ?>
31
-			<?php get_template_part( 'content', 'none' ); ?>
30
+		<?php else {
31
+	: ?>
32
+			<?php get_template_part( 'content', 'none' );
33
+}
34
+?>
32 35
 		<?php endif; ?>
33 36
 
34 37
 		</div><!-- #content -->
Please login to merge, or discard this patch.
src/wp-content/themes/twentythirteen/content-video.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12 12
 	<header class="entry-header">
13
-		<?php if ( is_single() ) : ?>
13
+		<?php if (is_single()) : ?>
14 14
 		<h1 class="entry-title"><?php the_title(); ?></h1>
15 15
 		<?php else : ?>
16 16
 		<h1 class="entry-title">
@@ -22,27 +22,27 @@  discard block
 block discarded – undo
22 22
 	<div class="entry-content">
23 23
 		<?php
24 24
 			/* translators: %s: Name of current post */
25
-			the_content( sprintf(
26
-				__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
27
-				the_title( '<span class="screen-reader-text">', '</span>', false )
28
-			) );
25
+			the_content(sprintf(
26
+				__('Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen'),
27
+				the_title('<span class="screen-reader-text">', '</span>', false)
28
+			));
29 29
 
30
-			wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
30
+			wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>'));
31 31
 		?>
32 32
 	</div><!-- .entry-content -->
33 33
 
34 34
 	<footer class="entry-meta">
35 35
 		<?php twentythirteen_entry_meta(); ?>
36 36
 
37
-		<?php if ( comments_open() && ! is_single() ) : ?>
37
+		<?php if (comments_open() && ! is_single()) : ?>
38 38
 		<span class="comments-link">
39
-			<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a comment', 'twentythirteen' ) . '</span>', __( 'One comment so far', 'twentythirteen' ), __( 'View all % comments', 'twentythirteen' ) ); ?>
39
+			<?php comments_popup_link('<span class="leave-reply">'.__('Leave a comment', 'twentythirteen').'</span>', __('One comment so far', 'twentythirteen'), __('View all % comments', 'twentythirteen')); ?>
40 40
 		</span><!-- .comments-link -->
41 41
 		<?php endif; // comments_open() ?>
42
-		<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
42
+		<?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?>
43 43
 
44
-		<?php if ( is_single() && get_the_author_meta( 'description' ) && is_multi_author() ) : ?>
45
-			<?php get_template_part( 'author-bio' ); ?>
44
+		<?php if (is_single() && get_the_author_meta('description') && is_multi_author()) : ?>
45
+			<?php get_template_part('author-bio'); ?>
46 46
 		<?php endif; ?>
47 47
 	</footer><!-- .entry-meta -->
48 48
 </article><!-- #post -->
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,9 +12,12 @@
 block discarded – undo
12 12
 	<header class="entry-header">
13 13
 		<?php if ( is_single() ) : ?>
14 14
 		<h1 class="entry-title"><?php the_title(); ?></h1>
15
-		<?php else : ?>
15
+		<?php else {
16
+	: ?>
16 17
 		<h1 class="entry-title">
17
-			<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
18
+			<a href="<?php the_permalink();
19
+}
20
+?>" rel="bookmark"><?php the_title(); ?></a>
18 21
 		</h1>
19 22
 		<?php endif; // is_single() ?>
20 23
 	</header><!-- .entry-header -->
Please login to merge, or discard this patch.
src/wp-content/themes/twentythirteen/functions.php 3 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1,27 +1,27 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Twenty Thirteen functions and definitions
4
- *
5
- * Sets up the theme and provides some helper functions, which are used in the
6
- * theme as custom template tags. Others are attached to action and filter
7
- * hooks in WordPress to change core functionality.
8
- *
9
- * When using a child theme (see https://codex.wordpress.org/Theme_Development
10
- * and https://codex.wordpress.org/Child_Themes), you can override certain
11
- * functions (those wrapped in a function_exists() call) by defining them first
12
- * in your child theme's functions.php file. The child theme's functions.php
13
- * file is included before the parent theme's file, so the child theme
14
- * functions would be used.
15
- *
16
- * Functions that are not pluggable (not wrapped in function_exists()) are
17
- * instead attached to a filter or action hook.
18
- *
19
- * For more information on hooks, actions, and filters, @link https://codex.wordpress.org/Plugin_API
20
- *
21
- * @package WordPress
22
- * @subpackage Twenty_Thirteen
23
- * @since Twenty Thirteen 1.0
24
- */
3
+		 * Twenty Thirteen functions and definitions
4
+		 *
5
+		 * Sets up the theme and provides some helper functions, which are used in the
6
+		 * theme as custom template tags. Others are attached to action and filter
7
+		 * hooks in WordPress to change core functionality.
8
+		 *
9
+		 * When using a child theme (see https://codex.wordpress.org/Theme_Development
10
+		 * and https://codex.wordpress.org/Child_Themes), you can override certain
11
+		 * functions (those wrapped in a function_exists() call) by defining them first
12
+		 * in your child theme's functions.php file. The child theme's functions.php
13
+		 * file is included before the parent theme's file, so the child theme
14
+		 * functions would be used.
15
+		 *
16
+		 * Functions that are not pluggable (not wrapped in function_exists()) are
17
+		 * instead attached to a filter or action hook.
18
+		 *
19
+		 * For more information on hooks, actions, and filters, @link https://codex.wordpress.org/Plugin_API
20
+		 *
21
+		 * @package WordPress
22
+		 * @subpackage Twenty_Thirteen
23
+		 * @since Twenty Thirteen 1.0
24
+		 */
25 25
 
26 26
 /*
27 27
  * Set up the content width value based on the theme's design.
Please login to merge, or discard this patch.
Spacing   +129 added lines, -129 removed lines patch added patch discarded remove patch
@@ -28,19 +28,19 @@  discard block
 block discarded – undo
28 28
  *
29 29
  * @see twentythirteen_content_width() for template-specific adjustments.
30 30
  */
31
-if ( ! isset( $content_width ) )
31
+if ( ! isset($content_width))
32 32
 	$content_width = 604;
33 33
 
34 34
 /**
35 35
  * Add support for a custom header image.
36 36
  */
37
-require get_template_directory() . '/inc/custom-header.php';
37
+require get_template_directory().'/inc/custom-header.php';
38 38
 
39 39
 /**
40 40
  * Twenty Thirteen only works in WordPress 3.6 or later.
41 41
  */
42
-if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) )
43
-	require get_template_directory() . '/inc/back-compat.php';
42
+if (version_compare($GLOBALS['wp_version'], '3.6-alpha', '<'))
43
+	require get_template_directory().'/inc/back-compat.php';
44 44
 
45 45
 /**
46 46
  * Twenty Thirteen setup.
@@ -66,47 +66,47 @@  discard block
 block discarded – undo
66 66
 	 * replace to change 'twentythirteen' to the name of your theme in all
67 67
 	 * template files.
68 68
 	 */
69
-	load_theme_textdomain( 'twentythirteen', get_template_directory() . '/languages' );
69
+	load_theme_textdomain('twentythirteen', get_template_directory().'/languages');
70 70
 
71 71
 	/*
72 72
 	 * This theme styles the visual editor to resemble the theme style,
73 73
 	 * specifically font, colors, icons, and column width.
74 74
 	 */
75
-	add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentythirteen_fonts_url() ) );
75
+	add_editor_style(array('css/editor-style.css', 'genericons/genericons.css', twentythirteen_fonts_url()));
76 76
 
77 77
 	// Adds RSS feed links to <head> for posts and comments.
78
-	add_theme_support( 'automatic-feed-links' );
78
+	add_theme_support('automatic-feed-links');
79 79
 
80 80
 	/*
81 81
 	 * Switches default core markup for search form, comment form,
82 82
 	 * and comments to output valid HTML5.
83 83
 	 */
84
-	add_theme_support( 'html5', array(
84
+	add_theme_support('html5', array(
85 85
 		'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
86
-	) );
86
+	));
87 87
 
88 88
 	/*
89 89
 	 * This theme supports all available post formats by default.
90 90
 	 * See https://codex.wordpress.org/Post_Formats
91 91
 	 */
92
-	add_theme_support( 'post-formats', array(
92
+	add_theme_support('post-formats', array(
93 93
 		'aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video'
94
-	) );
94
+	));
95 95
 
96 96
 	// This theme uses wp_nav_menu() in one location.
97
-	register_nav_menu( 'primary', __( 'Navigation Menu', 'twentythirteen' ) );
97
+	register_nav_menu('primary', __('Navigation Menu', 'twentythirteen'));
98 98
 
99 99
 	/*
100 100
 	 * This theme uses a custom image size for featured images, displayed on
101 101
 	 * "standard" posts and pages.
102 102
 	 */
103
-	add_theme_support( 'post-thumbnails' );
104
-	set_post_thumbnail_size( 604, 270, true );
103
+	add_theme_support('post-thumbnails');
104
+	set_post_thumbnail_size(604, 270, true);
105 105
 
106 106
 	// This theme uses its own gallery styles.
107
-	add_filter( 'use_default_gallery_style', '__return_false' );
107
+	add_filter('use_default_gallery_style', '__return_false');
108 108
 }
109
-add_action( 'after_setup_theme', 'twentythirteen_setup' );
109
+add_action('after_setup_theme', 'twentythirteen_setup');
110 110
 
111 111
 /**
112 112
  * Return the Google font stylesheet URL, if available.
@@ -125,28 +125,28 @@  discard block
 block discarded – undo
125 125
 	 * supported by Source Sans Pro, translate this to 'off'. Do not translate
126 126
 	 * into your own language.
127 127
 	 */
128
-	$source_sans_pro = _x( 'on', 'Source Sans Pro font: on or off', 'twentythirteen' );
128
+	$source_sans_pro = _x('on', 'Source Sans Pro font: on or off', 'twentythirteen');
129 129
 
130 130
 	/* Translators: If there are characters in your language that are not
131 131
 	 * supported by Bitter, translate this to 'off'. Do not translate into your
132 132
 	 * own language.
133 133
 	 */
134
-	$bitter = _x( 'on', 'Bitter font: on or off', 'twentythirteen' );
134
+	$bitter = _x('on', 'Bitter font: on or off', 'twentythirteen');
135 135
 
136
-	if ( 'off' !== $source_sans_pro || 'off' !== $bitter ) {
136
+	if ('off' !== $source_sans_pro || 'off' !== $bitter) {
137 137
 		$font_families = array();
138 138
 
139
-		if ( 'off' !== $source_sans_pro )
139
+		if ('off' !== $source_sans_pro)
140 140
 			$font_families[] = 'Source Sans Pro:300,400,700,300italic,400italic,700italic';
141 141
 
142
-		if ( 'off' !== $bitter )
142
+		if ('off' !== $bitter)
143 143
 			$font_families[] = 'Bitter:400,700';
144 144
 
145 145
 		$query_args = array(
146
-			'family' => urlencode( implode( '|', $font_families ) ),
147
-			'subset' => urlencode( 'latin,latin-ext' ),
146
+			'family' => urlencode(implode('|', $font_families)),
147
+			'subset' => urlencode('latin,latin-ext'),
148 148
 		);
149
-		$fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' );
149
+		$fonts_url = add_query_arg($query_args, 'https://fonts.googleapis.com/css');
150 150
 	}
151 151
 
152 152
 	return $fonts_url;
@@ -162,30 +162,30 @@  discard block
 block discarded – undo
162 162
 	 * Adds JavaScript to pages with the comment form to support
163 163
 	 * sites with threaded comments (when in use).
164 164
 	 */
165
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
166
-		wp_enqueue_script( 'comment-reply' );
165
+	if (is_singular() && comments_open() && get_option('thread_comments'))
166
+		wp_enqueue_script('comment-reply');
167 167
 
168 168
 	// Adds Masonry to handle vertical alignment of footer widgets.
169
-	if ( is_active_sidebar( 'sidebar-1' ) )
170
-		wp_enqueue_script( 'jquery-masonry' );
169
+	if (is_active_sidebar('sidebar-1'))
170
+		wp_enqueue_script('jquery-masonry');
171 171
 
172 172
 	// Loads JavaScript file with functionality specific to Twenty Thirteen.
173
-	wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
173
+	wp_enqueue_script('twentythirteen-script', get_template_directory_uri().'/js/functions.js', array('jquery'), '20150330', true);
174 174
 
175 175
 	// Add Source Sans Pro and Bitter fonts, used in the main stylesheet.
176
-	wp_enqueue_style( 'twentythirteen-fonts', twentythirteen_fonts_url(), array(), null );
176
+	wp_enqueue_style('twentythirteen-fonts', twentythirteen_fonts_url(), array(), null);
177 177
 
178 178
 	// Add Genericons font, used in the main stylesheet.
179
-	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.03' );
179
+	wp_enqueue_style('genericons', get_template_directory_uri().'/genericons/genericons.css', array(), '3.03');
180 180
 
181 181
 	// Loads our main stylesheet.
182
-	wp_enqueue_style( 'twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18' );
182
+	wp_enqueue_style('twentythirteen-style', get_stylesheet_uri(), array(), '2013-07-18');
183 183
 
184 184
 	// Loads the Internet Explorer specific stylesheet.
185
-	wp_enqueue_style( 'twentythirteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentythirteen-style' ), '2013-07-18' );
186
-	wp_style_add_data( 'twentythirteen-ie', 'conditional', 'lt IE 9' );
185
+	wp_enqueue_style('twentythirteen-ie', get_template_directory_uri().'/css/ie.css', array('twentythirteen-style'), '2013-07-18');
186
+	wp_style_add_data('twentythirteen-ie', 'conditional', 'lt IE 9');
187 187
 }
188
-add_action( 'wp_enqueue_scripts', 'twentythirteen_scripts_styles' );
188
+add_action('wp_enqueue_scripts', 'twentythirteen_scripts_styles');
189 189
 
190 190
 /**
191 191
  * Filter the page title.
@@ -199,27 +199,27 @@  discard block
 block discarded – undo
199 199
  * @param string $sep   Optional separator.
200 200
  * @return string The filtered title.
201 201
  */
202
-function twentythirteen_wp_title( $title, $sep ) {
202
+function twentythirteen_wp_title($title, $sep) {
203 203
 	global $paged, $page;
204 204
 
205
-	if ( is_feed() )
205
+	if (is_feed())
206 206
 		return $title;
207 207
 
208 208
 	// Add the site name.
209
-	$title .= get_bloginfo( 'name', 'display' );
209
+	$title .= get_bloginfo('name', 'display');
210 210
 
211 211
 	// Add the site description for the home/front page.
212
-	$site_description = get_bloginfo( 'description', 'display' );
213
-	if ( $site_description && ( is_home() || is_front_page() ) )
212
+	$site_description = get_bloginfo('description', 'display');
213
+	if ($site_description && (is_home() || is_front_page()))
214 214
 		$title = "$title $sep $site_description";
215 215
 
216 216
 	// Add a page number if necessary.
217
-	if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
218
-		$title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) );
217
+	if (($paged >= 2 || $page >= 2) && ! is_404())
218
+		$title = "$title $sep ".sprintf(__('Page %s', 'twentythirteen'), max($paged, $page));
219 219
 
220 220
 	return $title;
221 221
 }
222
-add_filter( 'wp_title', 'twentythirteen_wp_title', 10, 2 );
222
+add_filter('wp_title', 'twentythirteen_wp_title', 10, 2);
223 223
 
224 224
 /**
225 225
  * Register two widget areas.
@@ -227,29 +227,29 @@  discard block
 block discarded – undo
227 227
  * @since Twenty Thirteen 1.0
228 228
  */
229 229
 function twentythirteen_widgets_init() {
230
-	register_sidebar( array(
231
-		'name'          => __( 'Main Widget Area', 'twentythirteen' ),
230
+	register_sidebar(array(
231
+		'name'          => __('Main Widget Area', 'twentythirteen'),
232 232
 		'id'            => 'sidebar-1',
233
-		'description'   => __( 'Appears in the footer section of the site.', 'twentythirteen' ),
233
+		'description'   => __('Appears in the footer section of the site.', 'twentythirteen'),
234 234
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
235 235
 		'after_widget'  => '</aside>',
236 236
 		'before_title'  => '<h3 class="widget-title">',
237 237
 		'after_title'   => '</h3>',
238
-	) );
238
+	));
239 239
 
240
-	register_sidebar( array(
241
-		'name'          => __( 'Secondary Widget Area', 'twentythirteen' ),
240
+	register_sidebar(array(
241
+		'name'          => __('Secondary Widget Area', 'twentythirteen'),
242 242
 		'id'            => 'sidebar-2',
243
-		'description'   => __( 'Appears on posts and pages in the sidebar.', 'twentythirteen' ),
243
+		'description'   => __('Appears on posts and pages in the sidebar.', 'twentythirteen'),
244 244
 		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
245 245
 		'after_widget'  => '</aside>',
246 246
 		'before_title'  => '<h3 class="widget-title">',
247 247
 		'after_title'   => '</h3>',
248
-	) );
248
+	));
249 249
 }
250
-add_action( 'widgets_init', 'twentythirteen_widgets_init' );
250
+add_action('widgets_init', 'twentythirteen_widgets_init');
251 251
 
252
-if ( ! function_exists( 'twentythirteen_paging_nav' ) ) :
252
+if ( ! function_exists('twentythirteen_paging_nav')) :
253 253
 /**
254 254
  * Display navigation to next/previous set of posts when applicable.
255 255
  *
@@ -259,19 +259,19 @@  discard block
 block discarded – undo
259 259
 	global $wp_query;
260 260
 
261 261
 	// Don't print empty markup if there's only one page.
262
-	if ( $wp_query->max_num_pages < 2 )
262
+	if ($wp_query->max_num_pages < 2)
263 263
 		return;
264 264
 	?>
265 265
 	<nav class="navigation paging-navigation" role="navigation">
266
-		<h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1>
266
+		<h1 class="screen-reader-text"><?php _e('Posts navigation', 'twentythirteen'); ?></h1>
267 267
 		<div class="nav-links">
268 268
 
269
-			<?php if ( get_next_posts_link() ) : ?>
270
-			<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentythirteen' ) ); ?></div>
269
+			<?php if (get_next_posts_link()) : ?>
270
+			<div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">&larr;</span> Older posts', 'twentythirteen')); ?></div>
271 271
 			<?php endif; ?>
272 272
 
273
-			<?php if ( get_previous_posts_link() ) : ?>
274
-			<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?></div>
273
+			<?php if (get_previous_posts_link()) : ?>
274
+			<div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">&rarr;</span>', 'twentythirteen')); ?></div>
275 275
 			<?php endif; ?>
276 276
 
277 277
 		</div><!-- .nav-links -->
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 }
281 281
 endif;
282 282
 
283
-if ( ! function_exists( 'twentythirteen_post_nav' ) ) :
283
+if ( ! function_exists('twentythirteen_post_nav')) :
284 284
 /**
285 285
  * Display navigation to next/previous post when applicable.
286 286
 *
@@ -290,18 +290,18 @@  discard block
 block discarded – undo
290 290
 	global $post;
291 291
 
292 292
 	// Don't print empty markup if there's nowhere to navigate.
293
-	$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );
294
-	$next     = get_adjacent_post( false, '', false );
293
+	$previous = (is_attachment()) ? get_post($post->post_parent) : get_adjacent_post(false, '', true);
294
+	$next     = get_adjacent_post(false, '', false);
295 295
 
296
-	if ( ! $next && ! $previous )
296
+	if ( ! $next && ! $previous)
297 297
 		return;
298 298
 	?>
299 299
 	<nav class="navigation post-navigation" role="navigation">
300
-		<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1>
300
+		<h1 class="screen-reader-text"><?php _e('Post navigation', 'twentythirteen'); ?></h1>
301 301
 		<div class="nav-links">
302 302
 
303
-			<?php previous_post_link( '%link', _x( '<span class="meta-nav">&larr;</span> %title', 'Previous post link', 'twentythirteen' ) ); ?>
304
-			<?php next_post_link( '%link', _x( '%title <span class="meta-nav">&rarr;</span>', 'Next post link', 'twentythirteen' ) ); ?>
303
+			<?php previous_post_link('%link', _x('<span class="meta-nav">&larr;</span> %title', 'Previous post link', 'twentythirteen')); ?>
304
+			<?php next_post_link('%link', _x('%title <span class="meta-nav">&rarr;</span>', 'Next post link', 'twentythirteen')); ?>
305 305
 
306 306
 		</div><!-- .nav-links -->
307 307
 	</nav><!-- .navigation -->
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 }
310 310
 endif;
311 311
 
312
-if ( ! function_exists( 'twentythirteen_entry_meta' ) ) :
312
+if ( ! function_exists('twentythirteen_entry_meta')) :
313 313
 /**
314 314
  * Print HTML with meta information for current post: categories, tags, permalink, author, and date.
315 315
  *
@@ -318,36 +318,36 @@  discard block
 block discarded – undo
318 318
  * @since Twenty Thirteen 1.0
319 319
  */
320 320
 function twentythirteen_entry_meta() {
321
-	if ( is_sticky() && is_home() && ! is_paged() )
322
-		echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>';
321
+	if (is_sticky() && is_home() && ! is_paged())
322
+		echo '<span class="featured-post">'.esc_html__('Sticky', 'twentythirteen').'</span>';
323 323
 
324
-	if ( ! has_post_format( 'link' ) && 'post' == get_post_type() )
324
+	if ( ! has_post_format('link') && 'post' == get_post_type())
325 325
 		twentythirteen_entry_date();
326 326
 
327 327
 	// Translators: used between list items, there is a space after the comma.
328
-	$categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) );
329
-	if ( $categories_list ) {
330
-		echo '<span class="categories-links">' . $categories_list . '</span>';
328
+	$categories_list = get_the_category_list(__(', ', 'twentythirteen'));
329
+	if ($categories_list) {
330
+		echo '<span class="categories-links">'.$categories_list.'</span>';
331 331
 	}
332 332
 
333 333
 	// Translators: used between list items, there is a space after the comma.
334
-	$tag_list = get_the_tag_list( '', __( ', ', 'twentythirteen' ) );
335
-	if ( $tag_list ) {
336
-		echo '<span class="tags-links">' . $tag_list . '</span>';
334
+	$tag_list = get_the_tag_list('', __(', ', 'twentythirteen'));
335
+	if ($tag_list) {
336
+		echo '<span class="tags-links">'.$tag_list.'</span>';
337 337
 	}
338 338
 
339 339
 	// Post author
340
-	if ( 'post' == get_post_type() ) {
341
-		printf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
342
-			esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
343
-			esc_attr( sprintf( __( 'View all posts by %s', 'twentythirteen' ), get_the_author() ) ),
340
+	if ('post' == get_post_type()) {
341
+		printf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
342
+			esc_url(get_author_posts_url(get_the_author_meta('ID'))),
343
+			esc_attr(sprintf(__('View all posts by %s', 'twentythirteen'), get_the_author())),
344 344
 			get_the_author()
345 345
 		);
346 346
 	}
347 347
 }
348 348
 endif;
349 349
 
350
-if ( ! function_exists( 'twentythirteen_entry_date' ) ) :
350
+if ( ! function_exists('twentythirteen_entry_date')) :
351 351
 /**
352 352
  * Print HTML with date information for current post.
353 353
  *
@@ -358,27 +358,27 @@  discard block
 block discarded – undo
358 358
  * @param boolean $echo (optional) Whether to echo the date. Default true.
359 359
  * @return string The HTML-formatted post date.
360 360
  */
361
-function twentythirteen_entry_date( $echo = true ) {
362
-	if ( has_post_format( array( 'chat', 'status' ) ) )
363
-		$format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' );
361
+function twentythirteen_entry_date($echo = true) {
362
+	if (has_post_format(array('chat', 'status')))
363
+		$format_prefix = _x('%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen');
364 364
 	else
365 365
 		$format_prefix = '%2$s';
366 366
 
367
-	$date = sprintf( '<span class="date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span>',
368
-		esc_url( get_permalink() ),
369
-		esc_attr( sprintf( __( 'Permalink to %s', 'twentythirteen' ), the_title_attribute( 'echo=0' ) ) ),
370
-		esc_attr( get_the_date( 'c' ) ),
371
-		esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) )
367
+	$date = sprintf('<span class="date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span>',
368
+		esc_url(get_permalink()),
369
+		esc_attr(sprintf(__('Permalink to %s', 'twentythirteen'), the_title_attribute('echo=0'))),
370
+		esc_attr(get_the_date('c')),
371
+		esc_html(sprintf($format_prefix, get_post_format_string(get_post_format()), get_the_date()))
372 372
 	);
373 373
 
374
-	if ( $echo )
374
+	if ($echo)
375 375
 		echo $date;
376 376
 
377 377
 	return $date;
378 378
 }
379 379
 endif;
380 380
 
381
-if ( ! function_exists( 'twentythirteen_the_attached_image' ) ) :
381
+if ( ! function_exists('twentythirteen_the_attached_image')) :
382 382
 /**
383 383
  * Print the attached image with a link to the next attached image.
384 384
  *
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 	 *     @type int The attachment width in pixels.
396 396
 	 * }
397 397
 	 */
398
-	$attachment_size     = apply_filters( 'twentythirteen_attachment_size', array( 724, 724 ) );
398
+	$attachment_size     = apply_filters('twentythirteen_attachment_size', array(724, 724));
399 399
 	$next_attachment_url = wp_get_attachment_url();
400 400
 	$post                = get_post();
401 401
 
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 	 * looking at the last image in a gallery), or, in a gallery of one, just the
406 406
 	 * link to that image file.
407 407
 	 */
408
-	$attachment_ids = get_posts( array(
408
+	$attachment_ids = get_posts(array(
409 409
 		'post_parent'    => $post->post_parent,
410 410
 		'fields'         => 'ids',
411 411
 		'numberposts'    => -1,
@@ -414,30 +414,30 @@  discard block
 block discarded – undo
414 414
 		'post_mime_type' => 'image',
415 415
 		'order'          => 'ASC',
416 416
 		'orderby'        => 'menu_order ID',
417
-	) );
417
+	));
418 418
 
419 419
 	// If there is more than 1 attachment in a gallery...
420
-	if ( count( $attachment_ids ) > 1 ) {
421
-		foreach ( $attachment_ids as $attachment_id ) {
422
-			if ( $attachment_id == $post->ID ) {
423
-				$next_id = current( $attachment_ids );
420
+	if (count($attachment_ids) > 1) {
421
+		foreach ($attachment_ids as $attachment_id) {
422
+			if ($attachment_id == $post->ID) {
423
+				$next_id = current($attachment_ids);
424 424
 				break;
425 425
 			}
426 426
 		}
427 427
 
428 428
 		// get the URL of the next image attachment...
429
-		if ( $next_id )
430
-			$next_attachment_url = get_attachment_link( $next_id );
429
+		if ($next_id)
430
+			$next_attachment_url = get_attachment_link($next_id);
431 431
 
432 432
 		// or get the URL of the first image attachment.
433 433
 		else
434
-			$next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
434
+			$next_attachment_url = get_attachment_link(reset($attachment_ids));
435 435
 	}
436 436
 
437
-	printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>',
438
-		esc_url( $next_attachment_url ),
439
-		the_title_attribute( array( 'echo' => false ) ),
440
-		wp_get_attachment_image( $post->ID, $attachment_size )
437
+	printf('<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>',
438
+		esc_url($next_attachment_url),
439
+		the_title_attribute(array('echo' => false)),
440
+		wp_get_attachment_image($post->ID, $attachment_size)
441 441
 	);
442 442
 }
443 443
 endif;
@@ -456,12 +456,12 @@  discard block
 block discarded – undo
456 456
  */
457 457
 function twentythirteen_get_link_url() {
458 458
 	$content = get_the_content();
459
-	$has_url = get_url_in_content( $content );
459
+	$has_url = get_url_in_content($content);
460 460
 
461
-	return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() );
461
+	return ($has_url) ? $has_url : apply_filters('the_permalink', get_permalink());
462 462
 }
463 463
 
464
-if ( ! function_exists( 'twentythirteen_excerpt_more' ) && ! is_admin() ) :
464
+if ( ! function_exists('twentythirteen_excerpt_more') && ! is_admin()) :
465 465
 /**
466 466
  * Replaces "[...]" (appended to automatically generated excerpts) with ...
467 467
  * and a Continue reading link.
@@ -471,15 +471,15 @@  discard block
 block discarded – undo
471 471
  * @param string $more Default Read More excerpt link.
472 472
  * @return string Filtered Read More excerpt link.
473 473
  */
474
-function twentythirteen_excerpt_more( $more ) {
475
-	$link = sprintf( '<a href="%1$s" class="more-link">%2$s</a>',
476
-		esc_url( get_permalink( get_the_ID() ) ),
474
+function twentythirteen_excerpt_more($more) {
475
+	$link = sprintf('<a href="%1$s" class="more-link">%2$s</a>',
476
+		esc_url(get_permalink(get_the_ID())),
477 477
 			/* translators: %s: Name of current post */
478
-			sprintf( __( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ), '<span class="screen-reader-text">' . get_the_title( get_the_ID() ) . '</span>' )
478
+			sprintf(__('Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen'), '<span class="screen-reader-text">'.get_the_title(get_the_ID()).'</span>')
479 479
 		);
480
-	return ' &hellip; ' . $link;
480
+	return ' &hellip; '.$link;
481 481
 }
482
-add_filter( 'excerpt_more', 'twentythirteen_excerpt_more' );
482
+add_filter('excerpt_more', 'twentythirteen_excerpt_more');
483 483
 endif;
484 484
 
485 485
 /**
@@ -495,19 +495,19 @@  discard block
 block discarded – undo
495 495
  * @param array $classes A list of existing body class values.
496 496
  * @return array The filtered body class list.
497 497
  */
498
-function twentythirteen_body_class( $classes ) {
499
-	if ( ! is_multi_author() )
498
+function twentythirteen_body_class($classes) {
499
+	if ( ! is_multi_author())
500 500
 		$classes[] = 'single-author';
501 501
 
502
-	if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() )
502
+	if (is_active_sidebar('sidebar-2') && ! is_attachment() && ! is_404())
503 503
 		$classes[] = 'sidebar';
504 504
 
505
-	if ( ! get_option( 'show_avatars' ) )
505
+	if ( ! get_option('show_avatars'))
506 506
 		$classes[] = 'no-avatars';
507 507
 
508 508
 	return $classes;
509 509
 }
510
-add_filter( 'body_class', 'twentythirteen_body_class' );
510
+add_filter('body_class', 'twentythirteen_body_class');
511 511
 
512 512
 /**
513 513
  * Adjust content_width value for video post formats and attachment templates.
@@ -517,12 +517,12 @@  discard block
 block discarded – undo
517 517
 function twentythirteen_content_width() {
518 518
 	global $content_width;
519 519
 
520
-	if ( is_attachment() )
520
+	if (is_attachment())
521 521
 		$content_width = 724;
522
-	elseif ( has_post_format( 'audio' ) )
522
+	elseif (has_post_format('audio'))
523 523
 		$content_width = 484;
524 524
 }
525
-add_action( 'template_redirect', 'twentythirteen_content_width' );
525
+add_action('template_redirect', 'twentythirteen_content_width');
526 526
 
527 527
 /**
528 528
  * Add postMessage support for site title and description for the Customizer.
@@ -531,12 +531,12 @@  discard block
 block discarded – undo
531 531
  *
532 532
  * @param WP_Customize_Manager $wp_customize Customizer object.
533 533
  */
534
-function twentythirteen_customize_register( $wp_customize ) {
535
-	$wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
536
-	$wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
537
-	$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
534
+function twentythirteen_customize_register($wp_customize) {
535
+	$wp_customize->get_setting('blogname')->transport         = 'postMessage';
536
+	$wp_customize->get_setting('blogdescription')->transport  = 'postMessage';
537
+	$wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
538 538
 }
539
-add_action( 'customize_register', 'twentythirteen_customize_register' );
539
+add_action('customize_register', 'twentythirteen_customize_register');
540 540
 
541 541
 /**
542 542
  * Enqueue Javascript postMessage handlers for the Customizer.
@@ -547,6 +547,6 @@  discard block
 block discarded – undo
547 547
  * @since Twenty Thirteen 1.0
548 548
  */
549 549
 function twentythirteen_customize_preview_js() {
550
-	wp_enqueue_script( 'twentythirteen-customizer', get_template_directory_uri() . '/js/theme-customizer.js', array( 'customize-preview' ), '20141120', true );
550
+	wp_enqueue_script('twentythirteen-customizer', get_template_directory_uri().'/js/theme-customizer.js', array('customize-preview'), '20141120', true);
551 551
 }
552
-add_action( 'customize_preview_init', 'twentythirteen_customize_preview_js' );
552
+add_action('customize_preview_init', 'twentythirteen_customize_preview_js');
Please login to merge, or discard this patch.
Braces   +66 added lines, -45 removed lines patch added patch discarded remove patch
@@ -28,8 +28,9 @@  discard block
 block discarded – undo
28 28
  *
29 29
  * @see twentythirteen_content_width() for template-specific adjustments.
30 30
  */
31
-if ( ! isset( $content_width ) )
31
+if ( ! isset( $content_width ) ) {
32 32
 	$content_width = 604;
33
+}
33 34
 
34 35
 /**
35 36
  * Add support for a custom header image.
@@ -39,8 +40,9 @@  discard block
 block discarded – undo
39 40
 /**
40 41
  * Twenty Thirteen only works in WordPress 3.6 or later.
41 42
  */
42
-if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) )
43
+if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) ) {
43 44
 	require get_template_directory() . '/inc/back-compat.php';
45
+}
44 46
 
45 47
 /**
46 48
  * Twenty Thirteen setup.
@@ -136,11 +138,13 @@  discard block
 block discarded – undo
136 138
 	if ( 'off' !== $source_sans_pro || 'off' !== $bitter ) {
137 139
 		$font_families = array();
138 140
 
139
-		if ( 'off' !== $source_sans_pro )
140
-			$font_families[] = 'Source Sans Pro:300,400,700,300italic,400italic,700italic';
141
+		if ( 'off' !== $source_sans_pro ) {
142
+					$font_families[] = 'Source Sans Pro:300,400,700,300italic,400italic,700italic';
143
+		}
141 144
 
142
-		if ( 'off' !== $bitter )
143
-			$font_families[] = 'Bitter:400,700';
145
+		if ( 'off' !== $bitter ) {
146
+					$font_families[] = 'Bitter:400,700';
147
+		}
144 148
 
145 149
 		$query_args = array(
146 150
 			'family' => urlencode( implode( '|', $font_families ) ),
@@ -162,12 +166,14 @@  discard block
 block discarded – undo
162 166
 	 * Adds JavaScript to pages with the comment form to support
163 167
 	 * sites with threaded comments (when in use).
164 168
 	 */
165
-	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) )
166
-		wp_enqueue_script( 'comment-reply' );
169
+	if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
170
+			wp_enqueue_script( 'comment-reply' );
171
+	}
167 172
 
168 173
 	// Adds Masonry to handle vertical alignment of footer widgets.
169
-	if ( is_active_sidebar( 'sidebar-1' ) )
170
-		wp_enqueue_script( 'jquery-masonry' );
174
+	if ( is_active_sidebar( 'sidebar-1' ) ) {
175
+			wp_enqueue_script( 'jquery-masonry' );
176
+	}
171 177
 
172 178
 	// Loads JavaScript file with functionality specific to Twenty Thirteen.
173 179
 	wp_enqueue_script( 'twentythirteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20150330', true );
@@ -202,20 +208,23 @@  discard block
 block discarded – undo
202 208
 function twentythirteen_wp_title( $title, $sep ) {
203 209
 	global $paged, $page;
204 210
 
205
-	if ( is_feed() )
206
-		return $title;
211
+	if ( is_feed() ) {
212
+			return $title;
213
+	}
207 214
 
208 215
 	// Add the site name.
209 216
 	$title .= get_bloginfo( 'name', 'display' );
210 217
 
211 218
 	// Add the site description for the home/front page.
212 219
 	$site_description = get_bloginfo( 'description', 'display' );
213
-	if ( $site_description && ( is_home() || is_front_page() ) )
214
-		$title = "$title $sep $site_description";
220
+	if ( $site_description && ( is_home() || is_front_page() ) ) {
221
+			$title = "$title $sep $site_description";
222
+	}
215 223
 
216 224
 	// Add a page number if necessary.
217
-	if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() )
218
-		$title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) );
225
+	if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
226
+			$title = "$title $sep " . sprintf( __( 'Page %s', 'twentythirteen' ), max( $paged, $page ) );
227
+	}
219 228
 
220 229
 	return $title;
221 230
 }
@@ -259,8 +268,9 @@  discard block
 block discarded – undo
259 268
 	global $wp_query;
260 269
 
261 270
 	// Don't print empty markup if there's only one page.
262
-	if ( $wp_query->max_num_pages < 2 )
263
-		return;
271
+	if ( $wp_query->max_num_pages < 2 ) {
272
+			return;
273
+	}
264 274
 	?>
265 275
 	<nav class="navigation paging-navigation" role="navigation">
266 276
 		<h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'twentythirteen' ); ?></h1>
@@ -293,8 +303,9 @@  discard block
 block discarded – undo
293 303
 	$previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true );
294 304
 	$next     = get_adjacent_post( false, '', false );
295 305
 
296
-	if ( ! $next && ! $previous )
297
-		return;
306
+	if ( ! $next && ! $previous ) {
307
+			return;
308
+	}
298 309
 	?>
299 310
 	<nav class="navigation post-navigation" role="navigation">
300 311
 		<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'twentythirteen' ); ?></h1>
@@ -318,11 +329,13 @@  discard block
 block discarded – undo
318 329
  * @since Twenty Thirteen 1.0
319 330
  */
320 331
 function twentythirteen_entry_meta() {
321
-	if ( is_sticky() && is_home() && ! is_paged() )
322
-		echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>';
332
+	if ( is_sticky() && is_home() && ! is_paged() ) {
333
+			echo '<span class="featured-post">' . esc_html__( 'Sticky', 'twentythirteen' ) . '</span>';
334
+	}
323 335
 
324
-	if ( ! has_post_format( 'link' ) && 'post' == get_post_type() )
325
-		twentythirteen_entry_date();
336
+	if ( ! has_post_format( 'link' ) && 'post' == get_post_type() ) {
337
+			twentythirteen_entry_date();
338
+	}
326 339
 
327 340
 	// Translators: used between list items, there is a space after the comma.
328 341
 	$categories_list = get_the_category_list( __( ', ', 'twentythirteen' ) );
@@ -359,10 +372,11 @@  discard block
 block discarded – undo
359 372
  * @return string The HTML-formatted post date.
360 373
  */
361 374
 function twentythirteen_entry_date( $echo = true ) {
362
-	if ( has_post_format( array( 'chat', 'status' ) ) )
363
-		$format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' );
364
-	else
365
-		$format_prefix = '%2$s';
375
+	if ( has_post_format( array( 'chat', 'status' ) ) ) {
376
+			$format_prefix = _x( '%1$s on %2$s', '1: post format name. 2: date', 'twentythirteen' );
377
+	} else {
378
+			$format_prefix = '%2$s';
379
+	}
366 380
 
367 381
 	$date = sprintf( '<span class="date"><a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a></span>',
368 382
 		esc_url( get_permalink() ),
@@ -371,8 +385,9 @@  discard block
 block discarded – undo
371 385
 		esc_html( sprintf( $format_prefix, get_post_format_string( get_post_format() ), get_the_date() ) )
372 386
 	);
373 387
 
374
-	if ( $echo )
375
-		echo $date;
388
+	if ( $echo ) {
389
+			echo $date;
390
+	}
376 391
 
377 392
 	return $date;
378 393
 }
@@ -426,12 +441,14 @@  discard block
 block discarded – undo
426 441
 		}
427 442
 
428 443
 		// get the URL of the next image attachment...
429
-		if ( $next_id )
430
-			$next_attachment_url = get_attachment_link( $next_id );
444
+		if ( $next_id ) {
445
+					$next_attachment_url = get_attachment_link( $next_id );
446
+		}
431 447
 
432 448
 		// or get the URL of the first image attachment.
433
-		else
434
-			$next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
449
+		else {
450
+					$next_attachment_url = get_attachment_link( reset( $attachment_ids ) );
451
+		}
435 452
 	}
436 453
 
437 454
 	printf( '<a href="%1$s" title="%2$s" rel="attachment">%3$s</a>',
@@ -496,14 +513,17 @@  discard block
 block discarded – undo
496 513
  * @return array The filtered body class list.
497 514
  */
498 515
 function twentythirteen_body_class( $classes ) {
499
-	if ( ! is_multi_author() )
500
-		$classes[] = 'single-author';
516
+	if ( ! is_multi_author() ) {
517
+			$classes[] = 'single-author';
518
+	}
501 519
 
502
-	if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() )
503
-		$classes[] = 'sidebar';
520
+	if ( is_active_sidebar( 'sidebar-2' ) && ! is_attachment() && ! is_404() ) {
521
+			$classes[] = 'sidebar';
522
+	}
504 523
 
505
-	if ( ! get_option( 'show_avatars' ) )
506
-		$classes[] = 'no-avatars';
524
+	if ( ! get_option( 'show_avatars' ) ) {
525
+			$classes[] = 'no-avatars';
526
+	}
507 527
 
508 528
 	return $classes;
509 529
 }
@@ -517,11 +537,12 @@  discard block
 block discarded – undo
517 537
 function twentythirteen_content_width() {
518 538
 	global $content_width;
519 539
 
520
-	if ( is_attachment() )
521
-		$content_width = 724;
522
-	elseif ( has_post_format( 'audio' ) )
523
-		$content_width = 484;
524
-}
540
+	if ( is_attachment() ) {
541
+			$content_width = 724;
542
+	} elseif ( has_post_format( 'audio' ) ) {
543
+			$content_width = 484;
544
+	}
545
+	}
525 546
 add_action( 'template_redirect', 'twentythirteen_content_width' );
526 547
 
527 548
 /**
Please login to merge, or discard this patch.
src/wp-content/themes/twentythirteen/content-aside.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The template for displaying posts in the Aside post format
4
- *
5
- * @package WordPress
6
- * @subpackage Twenty_Thirteen
7
- * @since Twenty Thirteen 1.0
8
- */
3
+	 * The template for displaying posts in the Aside post format
4
+	 *
5
+	 * @package WordPress
6
+	 * @subpackage Twenty_Thirteen
7
+	 * @since Twenty Thirteen 1.0
8
+	 */
9 9
 ?>
10 10
 
11 11
 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,27 +12,27 @@
 block discarded – undo
12 12
 	<div class="entry-content">
13 13
 		<?php
14 14
 			/* translators: %s: Name of current post */
15
-			the_content( sprintf(
16
-				__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
17
-				the_title( '<span class="screen-reader-text">', '</span>', false )
18
-			) );
15
+			the_content(sprintf(
16
+				__('Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen'),
17
+				the_title('<span class="screen-reader-text">', '</span>', false)
18
+			));
19 19
 
20
-			wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
20
+			wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>'));
21 21
 		?>
22 22
 	</div><!-- .entry-content -->
23 23
 
24 24
 	<footer class="entry-meta">
25
-		<?php if ( is_single() ) : ?>
25
+		<?php if (is_single()) : ?>
26 26
 			<?php twentythirteen_entry_meta(); ?>
27
-			<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
27
+			<?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?>
28 28
 
29
-			<?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?>
30
-				<?php get_template_part( 'author-bio' ); ?>
29
+			<?php if (get_the_author_meta('description') && is_multi_author()) : ?>
30
+				<?php get_template_part('author-bio'); ?>
31 31
 			<?php endif; ?>
32 32
 
33 33
 		<?php else : ?>
34 34
 			<?php twentythirteen_entry_date(); ?>
35
-			<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
35
+			<?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?>
36 36
 		<?php endif; // is_single() ?>
37 37
 	</footer><!-- .entry-meta -->
38 38
 </article><!-- #post -->
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,11 @@
 block discarded – undo
30 30
 				<?php get_template_part( 'author-bio' ); ?>
31 31
 			<?php endif; ?>
32 32
 
33
-		<?php else : ?>
34
-			<?php twentythirteen_entry_date(); ?>
33
+		<?php else {
34
+	: ?>
35
+			<?php twentythirteen_entry_date();
36
+}
37
+?>
35 38
 			<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
36 39
 		<?php endif; // is_single() ?>
37 40
 	</footer><!-- .entry-meta -->
Please login to merge, or discard this patch.
src/wp-content/themes/twentythirteen/category.php 3 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The template for displaying Category pages
4
- *
5
- * @link https://codex.wordpress.org/Template_Hierarchy
6
- *
7
- * @package WordPress
8
- * @subpackage Twenty_Thirteen
9
- * @since Twenty Thirteen 1.0
10
- */
3
+		 * The template for displaying Category pages
4
+		 *
5
+		 * @link https://codex.wordpress.org/Template_Hierarchy
6
+		 *
7
+		 * @package WordPress
8
+		 * @subpackage Twenty_Thirteen
9
+		 * @since Twenty Thirteen 1.0
10
+		 */
11 11
 
12 12
 get_header(); ?>
13 13
 
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,24 +14,24 @@
 block discarded – undo
14 14
 	<div id="primary" class="content-area">
15 15
 		<div id="content" class="site-content" role="main">
16 16
 
17
-		<?php if ( have_posts() ) : ?>
17
+		<?php if (have_posts()) : ?>
18 18
 			<header class="archive-header">
19
-				<h1 class="archive-title"><?php printf( __( 'Category Archives: %s', 'twentythirteen' ), single_cat_title( '', false ) ); ?></h1>
19
+				<h1 class="archive-title"><?php printf(__('Category Archives: %s', 'twentythirteen'), single_cat_title('', false)); ?></h1>
20 20
 
21
-				<?php if ( category_description() ) : // Show an optional category description ?>
21
+				<?php if (category_description()) : // Show an optional category description ?>
22 22
 				<div class="archive-meta"><?php echo category_description(); ?></div>
23 23
 				<?php endif; ?>
24 24
 			</header><!-- .archive-header -->
25 25
 
26 26
 			<?php /* The loop */ ?>
27
-			<?php while ( have_posts() ) : the_post(); ?>
28
-				<?php get_template_part( 'content', get_post_format() ); ?>
27
+			<?php while (have_posts()) : the_post(); ?>
28
+				<?php get_template_part('content', get_post_format()); ?>
29 29
 			<?php endwhile; ?>
30 30
 
31 31
 			<?php twentythirteen_paging_nav(); ?>
32 32
 
33 33
 		<?php else : ?>
34
-			<?php get_template_part( 'content', 'none' ); ?>
34
+			<?php get_template_part('content', 'none'); ?>
35 35
 		<?php endif; ?>
36 36
 
37 37
 		</div><!-- #content -->
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,11 @@
 block discarded – undo
30 30
 
31 31
 			<?php twentythirteen_paging_nav(); ?>
32 32
 
33
-		<?php else : ?>
34
-			<?php get_template_part( 'content', 'none' ); ?>
33
+		<?php else {
34
+	: ?>
35
+			<?php get_template_part( 'content', 'none' );
36
+}
37
+?>
35 38
 		<?php endif; ?>
36 39
 
37 40
 		</div><!-- #content -->
Please login to merge, or discard this patch.
src/wp-content/themes/twentythirteen/content-link.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,32 +11,32 @@
 block discarded – undo
11 11
 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12 12
 	<header class="entry-header">
13 13
 		<h1 class="entry-title">
14
-			<a href="<?php echo esc_url( twentythirteen_get_link_url() ); ?>"><?php the_title(); ?></a>
14
+			<a href="<?php echo esc_url(twentythirteen_get_link_url()); ?>"><?php the_title(); ?></a>
15 15
 		</h1>
16 16
 
17 17
 		<div class="entry-meta">
18 18
 			<?php twentythirteen_entry_date(); ?>
19
-			<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
19
+			<?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?>
20 20
 		</div><!-- .entry-meta -->
21 21
 	</header><!-- .entry-header -->
22 22
 
23 23
 	<div class="entry-content">
24 24
 		<?php
25 25
 			/* translators: %s: Name of current post */
26
-			the_content( sprintf(
27
-				__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
28
-				the_title( '<span class="screen-reader-text">', '</span>', false )
29
-			) );
26
+			the_content(sprintf(
27
+				__('Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen'),
28
+				the_title('<span class="screen-reader-text">', '</span>', false)
29
+			));
30 30
 
31
-			wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
31
+			wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>'));
32 32
 		?>
33 33
 	</div><!-- .entry-content -->
34 34
 
35
-	<?php if ( is_single() ) : ?>
35
+	<?php if (is_single()) : ?>
36 36
 	<footer class="entry-meta">
37 37
 		<?php twentythirteen_entry_meta(); ?>
38
-		<?php if ( get_the_author_meta( 'description' ) && is_multi_author() ) : ?>
39
-			<?php get_template_part( 'author-bio' ); ?>
38
+		<?php if (get_the_author_meta('description') && is_multi_author()) : ?>
39
+			<?php get_template_part('author-bio'); ?>
40 40
 		<?php endif; ?>
41 41
 	</footer><!-- .entry-meta -->
42 42
 	<?php endif; // is_single() ?>
Please login to merge, or discard this patch.
src/wp-content/themes/twentythirteen/page.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The template for displaying all pages
4
- *
5
- * This is the template that displays all pages by default.
6
- * Please note that this is the WordPress construct of pages and that other
7
- * 'pages' on your WordPress site will use a different template.
8
- *
9
- * @package WordPress
10
- * @subpackage Twenty_Thirteen
11
- * @since Twenty Thirteen 1.0
12
- */
3
+		 * The template for displaying all pages
4
+		 *
5
+		 * This is the template that displays all pages by default.
6
+		 * Please note that this is the WordPress construct of pages and that other
7
+		 * 'pages' on your WordPress site will use a different template.
8
+		 *
9
+		 * @package WordPress
10
+		 * @subpackage Twenty_Thirteen
11
+		 * @since Twenty Thirteen 1.0
12
+		 */
13 13
 
14 14
 get_header(); ?>
15 15
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
 		<div id="content" class="site-content" role="main">
18 18
 
19 19
 			<?php /* The loop */ ?>
20
-			<?php while ( have_posts() ) : the_post(); ?>
20
+			<?php while (have_posts()) : the_post(); ?>
21 21
 
22 22
 				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
23 23
 					<header class="entry-header">
24
-						<?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>
24
+						<?php if (has_post_thumbnail() && ! post_password_required()) : ?>
25 25
 						<div class="entry-thumbnail">
26 26
 							<?php the_post_thumbnail(); ?>
27 27
 						</div>
@@ -32,11 +32,11 @@  discard block
 block discarded – undo
32 32
 
33 33
 					<div class="entry-content">
34 34
 						<?php the_content(); ?>
35
-						<?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
35
+						<?php wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>')); ?>
36 36
 					</div><!-- .entry-content -->
37 37
 
38 38
 					<footer class="entry-meta">
39
-						<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
39
+						<?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?>
40 40
 					</footer><!-- .entry-meta -->
41 41
 				</article><!-- #post -->
42 42
 
Please login to merge, or discard this patch.
src/wp-content/themes/twentythirteen/content-image.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12 12
 	<header class="entry-header">
13
-		<?php if ( is_single() ) : ?>
13
+		<?php if (is_single()) : ?>
14 14
 		<h1 class="entry-title"><?php the_title(); ?></h1>
15 15
 		<?php else : ?>
16 16
 		<h1 class="entry-title">
@@ -22,27 +22,27 @@  discard block
 block discarded – undo
22 22
 	<div class="entry-content">
23 23
 		<?php
24 24
 			/* translators: %s: Name of current post */
25
-			the_content( sprintf(
26
-				__( 'Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen' ),
27
-				the_title( '<span class="screen-reader-text">', '</span>', false )
28
-			) );
25
+			the_content(sprintf(
26
+				__('Continue reading %s <span class="meta-nav">&rarr;</span>', 'twentythirteen'),
27
+				the_title('<span class="screen-reader-text">', '</span>', false)
28
+			));
29 29
 
30
-			wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) );
30
+			wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">'.__('Pages:', 'twentythirteen').'</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>'));
31 31
 		?>
32 32
 	</div><!-- .entry-content -->
33 33
 
34 34
 	<footer class="entry-meta">
35 35
 		<?php twentythirteen_entry_meta(); ?>
36 36
 
37
-		<?php if ( comments_open() && ! is_single() ) : ?>
37
+		<?php if (comments_open() && ! is_single()) : ?>
38 38
 		<span class="comments-link">
39
-			<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a comment', 'twentythirteen' ) . '</span>', __( 'One comment so far', 'twentythirteen' ), __( 'View all % comments', 'twentythirteen' ) ); ?>
39
+			<?php comments_popup_link('<span class="leave-reply">'.__('Leave a comment', 'twentythirteen').'</span>', __('One comment so far', 'twentythirteen'), __('View all % comments', 'twentythirteen')); ?>
40 40
 		</span><!-- .comments-link -->
41 41
 		<?php endif; // comments_open() ?>
42
-		<?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>
42
+		<?php edit_post_link(__('Edit', 'twentythirteen'), '<span class="edit-link">', '</span>'); ?>
43 43
 
44
-		<?php if ( is_single() && get_the_author_meta( 'description' ) && is_multi_author() ) : ?>
45
-			<?php get_template_part( 'author-bio' ); ?>
44
+		<?php if (is_single() && get_the_author_meta('description') && is_multi_author()) : ?>
45
+			<?php get_template_part('author-bio'); ?>
46 46
 		<?php endif; ?>
47 47
 	</footer><!-- .entry-meta -->
48 48
 </article><!-- #post -->
Please login to merge, or discard this patch.
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,9 +12,12 @@
 block discarded – undo
12 12
 	<header class="entry-header">
13 13
 		<?php if ( is_single() ) : ?>
14 14
 		<h1 class="entry-title"><?php the_title(); ?></h1>
15
-		<?php else : ?>
15
+		<?php else {
16
+	: ?>
16 17
 		<h1 class="entry-title">
17
-			<a href="<?php the_permalink(); ?>" rel="bookmark"><?php the_title(); ?></a>
18
+			<a href="<?php the_permalink();
19
+}
20
+?>" rel="bookmark"><?php the_title(); ?></a>
18 21
 		</h1>
19 22
 		<?php endif; // is_single() ?>
20 23
 	</header><!-- .entry-header -->
Please login to merge, or discard this patch.