Completed
Push — master ( a7cd2a...eabd6c )
by Stephen
38:42
created
src/wp-activate.php 3 patches
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,8 +18,9 @@  discard block
 block discarded – undo
18 18
 	die();
19 19
 }
20 20
 
21
-if ( is_object( $wp_object_cache ) )
21
+if ( is_object( $wp_object_cache ) ) {
22 22
 	$wp_object_cache->cache_enabled = false;
23
+}
23 24
 
24 25
 // Fix for page title
25 26
 $wp_query->is_404 = false;
@@ -117,8 +118,11 @@  discard block
 block discarded – undo
117 118
 
118 119
 			<?php if ( $url && $url != network_home_url( '', 'http' ) ) : ?>
119 120
 				<p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>'), $url, $url . 'wp-login.php' ); ?></p>
120
-			<?php else: ?>
121
-				<p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?></p>
121
+			<?php else {
122
+	: ?>
123
+				<p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url('wp-login.php', 'login'), network_home_url() );
124
+}
125
+?></p>
122 126
 			<?php endif;
123 127
 		}
124 128
 	}
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
  * @since MU
38 38
  */
39 39
 function do_activate_header() {
40
-    /**
41
-     * Fires before the Site Activation page is loaded, but on the wp_head action.
42
-     *
43
-     * @since 3.0.0
44
-     */
45
-    do_action( 'activate_wp_head' );
40
+	/**
41
+	 * Fires before the Site Activation page is loaded, but on the wp_head action.
42
+	 *
43
+	 * @since 3.0.0
44
+	 */
45
+	do_action( 'activate_wp_head' );
46 46
 }
47 47
 add_action( 'wp_head', 'do_activate_header' );
48 48
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		$result = wpmu_activate_signup( $key );
89 89
 		if ( is_wp_error($result) ) {
90 90
 			if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
91
-			    $signup = $result->get_error_data();
91
+				$signup = $result->get_error_data();
92 92
 				?>
93 93
 				<h2><?php _e('Your account is now active!'); ?></h2>
94 94
 				<?php
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 				?>
104 104
 				<h2><?php _e('An error occurred during the activation'); ?></h2>
105 105
 				<?php
106
-			    echo '<p>'.$result->get_error_message().'</p>';
106
+				echo '<p>'.$result->get_error_message().'</p>';
107 107
 			}
108 108
 		} else {
109 109
 			$url = isset( $result['blog_id'] ) ? get_blogaddress_by_id( (int) $result['blog_id'] ) : '';
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -6,19 +6,19 @@  discard block
 block discarded – undo
6 6
  * @package WordPress
7 7
  */
8 8
 
9
-define( 'WP_INSTALLING', true );
9
+define('WP_INSTALLING', true);
10 10
 
11 11
 /** Sets up the WordPress Environment. */
12
-require( dirname(__FILE__) . '/wp-load.php' );
12
+require(dirname(__FILE__).'/wp-load.php');
13 13
 
14
-require( dirname( __FILE__ ) . '/wp-blog-header.php' );
14
+require(dirname(__FILE__).'/wp-blog-header.php');
15 15
 
16
-if ( !is_multisite() ) {
17
-	wp_redirect( wp_registration_url() );
16
+if ( ! is_multisite()) {
17
+	wp_redirect(wp_registration_url());
18 18
 	die();
19 19
 }
20 20
 
21
-if ( is_object( $wp_object_cache ) )
21
+if (is_object($wp_object_cache))
22 22
 	$wp_object_cache->cache_enabled = false;
23 23
 
24 24
 // Fix for page title
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
  *
30 30
  * @since 3.0.0
31 31
  */
32
-do_action( 'activate_header' );
32
+do_action('activate_header');
33 33
 
34 34
 /**
35 35
  * Adds an action hook specific to this page that fires on wp_head
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
      *
43 43
      * @since 3.0.0
44 44
      */
45
-    do_action( 'activate_wp_head' );
45
+    do_action('activate_wp_head');
46 46
 }
47
-add_action( 'wp_head', 'do_activate_header' );
47
+add_action('wp_head', 'do_activate_header');
48 48
 
49 49
 /**
50 50
  * Loads styles specific to this page.
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
 	</style>
63 63
 	<?php
64 64
 }
65
-add_action( 'wp_head', 'wpmu_activate_stylesheet' );
65
+add_action('wp_head', 'wpmu_activate_stylesheet');
66 66
 
67
-get_header( 'wp-activate' );
67
+get_header('wp-activate');
68 68
 ?>
69 69
 
70 70
 <div id="signup-content" class="widecolumn">
71 71
 	<div class="wp-activate-container">
72
-	<?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
72
+	<?php if (empty($_GET['key']) && empty($_POST['key'])) { ?>
73 73
 
74 74
 		<h2><?php _e('Activation Key Required') ?></h2>
75 75
 		<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">
@@ -84,19 +84,19 @@  discard block
 block discarded – undo
84 84
 
85 85
 	<?php } else {
86 86
 
87
-		$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
88
-		$result = wpmu_activate_signup( $key );
89
-		if ( is_wp_error($result) ) {
90
-			if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
87
+		$key = ! empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
88
+		$result = wpmu_activate_signup($key);
89
+		if (is_wp_error($result)) {
90
+			if ('already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code()) {
91 91
 			    $signup = $result->get_error_data();
92 92
 				?>
93 93
 				<h2><?php _e('Your account is now active!'); ?></h2>
94 94
 				<?php
95 95
 				echo '<p class="lead-in">';
96
-				if ( $signup->domain . $signup->path == '' ) {
97
-					printf( __('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.'), network_site_url( 'wp-login.php', 'login' ), $signup->user_login, $signup->user_email, wp_lostpassword_url() );
96
+				if ($signup->domain.$signup->path == '') {
97
+					printf(__('Your account has been activated. You may now <a href="%1$s">log in</a> to the site using your chosen username of &#8220;%2$s&#8221;. Please check your email inbox at %3$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%4$s">reset your password</a>.'), network_site_url('wp-login.php', 'login'), $signup->user_login, $signup->user_email, wp_lostpassword_url());
98 98
 				} else {
99
-					printf( __('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.'), 'http://' . $signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url() );
99
+					printf(__('Your site at <a href="%1$s">%2$s</a> is active. You may now log in to your site using your chosen username of &#8220;%3$s&#8221;. Please check your email inbox at %4$s for your password and login instructions. If you do not receive an email, please check your junk or spam folder. If you still do not receive an email within an hour, you can <a href="%5$s">reset your password</a>.'), 'http://'.$signup->domain, $signup->domain, $signup->user_login, $signup->user_email, wp_lostpassword_url());
100 100
 				}
101 101
 				echo '</p>';
102 102
 			} else {
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 			    echo '<p>'.$result->get_error_message().'</p>';
107 107
 			}
108 108
 		} else {
109
-			$url = isset( $result['blog_id'] ) ? get_blogaddress_by_id( (int) $result['blog_id'] ) : '';
110
-			$user = get_userdata( (int) $result['user_id'] );
109
+			$url = isset($result['blog_id']) ? get_blogaddress_by_id((int) $result['blog_id']) : '';
110
+			$user = get_userdata((int) $result['user_id']);
111 111
 			?>
112 112
 			<h2><?php _e('Your account is now active!'); ?></h2>
113 113
 
@@ -116,14 +116,14 @@  discard block
 block discarded – undo
116 116
 				<p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $result['password']; ?></p>
117 117
 			</div>
118 118
 
119
-			<?php if ( $url && $url != network_home_url( '', 'http' ) ) :
120
-				switch_to_blog( (int) $result['blog_id'] );
119
+			<?php if ($url && $url != network_home_url('', 'http')) :
120
+				switch_to_blog((int) $result['blog_id']);
121 121
 				$login_url = wp_login_url();
122 122
 				restore_current_blog();
123 123
 				?>
124
-				<p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>' ), $url, esc_url( $login_url ) ); ?></p>
124
+				<p class="view"><?php printf(__('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Log in</a>'), $url, esc_url($login_url)); ?></p>
125 125
 			<?php else: ?>
126
-				<p class="view"><?php printf( __('Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.' ), network_site_url('wp-login.php', 'login'), network_home_url() ); ?></p>
126
+				<p class="view"><?php printf(__('Your account is now activated. <a href="%1$s">Log in</a> or go back to the <a href="%2$s">homepage</a>.'), network_site_url('wp-login.php', 'login'), network_home_url()); ?></p>
127 127
 			<?php endif;
128 128
 		}
129 129
 	}
@@ -134,4 +134,4 @@  discard block
 block discarded – undo
134 134
 	var key_input = document.getElementById('key');
135 135
 	key_input && key_input.focus();
136 136
 </script>
137
-<?php get_footer( 'wp-activate' );
137
+<?php get_footer('wp-activate');
Please login to merge, or discard this patch.
src/wp-settings.php 3 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Used to set up and fix common variables and include
4
- * the WordPress procedural and class library.
5
- *
6
- * Allows for some configuration in wp-config.php (see default-constants.php)
7
- *
8
- * @internal This file must be parsable by PHP4.
9
- *
10
- * @package WordPress
11
- */
3
+	 * Used to set up and fix common variables and include
4
+	 * the WordPress procedural and class library.
5
+	 *
6
+	 * Allows for some configuration in wp-config.php (see default-constants.php)
7
+	 *
8
+	 * @internal This file must be parsable by PHP4.
9
+	 *
10
+	 * @package WordPress
11
+	 */
12 12
 
13 13
 /**
14 14
  * Stores the location of the WordPress directory of functions, classes, and core content.
Please login to merge, or discard this patch.
Braces   +17 added lines, -10 removed lines patch added patch discarded remove patch
@@ -61,8 +61,9 @@  discard block
 block discarded – undo
61 61
 wp_debug_mode();
62 62
 
63 63
 // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
64
-if ( WP_CACHE )
64
+if ( WP_CACHE ) {
65 65
 	WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
66
+}
66 67
 
67 68
 // Define WP_LANG_DIR if not set.
68 69
 wp_set_lang_dir();
@@ -99,8 +100,9 @@  discard block
 block discarded – undo
99 100
 register_shutdown_function( 'shutdown_action_hook' );
100 101
 
101 102
 // Stop most of WordPress from being loaded if we just want the basics.
102
-if ( SHORTINIT )
103
+if ( SHORTINIT ) {
103 104
 	return false;
105
+}
104 106
 
105 107
 // Load the L10n library.
106 108
 require_once( ABSPATH . WPINC . '/l10n.php' );
@@ -189,8 +191,9 @@  discard block
 block discarded – undo
189 191
  */
190 192
 do_action( 'muplugins_loaded' );
191 193
 
192
-if ( is_multisite() )
194
+if ( is_multisite() ) {
193 195
 	ms_cookie_constants(  );
196
+}
194 197
 
195 198
 // Define constants after multisite is loaded.
196 199
 wp_cookie_constants();
@@ -224,8 +227,9 @@  discard block
 block discarded – undo
224 227
 wp_set_internal_encoding();
225 228
 
226 229
 // Run wp_cache_postload() if object cache is enabled and the function exists.
227
-if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )
230
+if ( WP_CACHE && function_exists( 'wp_cache_postload' ) ) {
228 231
 	wp_cache_postload();
232
+}
229 233
 
230 234
 /**
231 235
  * Fires once activated plugins have loaded.
@@ -307,8 +311,9 @@  discard block
 block discarded – undo
307 311
 
308 312
 $locale = get_locale();
309 313
 $locale_file = WP_LANG_DIR . "/$locale.php";
310
-if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
314
+if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) ) {
311 315
 	require( $locale_file );
316
+}
312 317
 unset( $locale_file );
313 318
 
314 319
 // Pull in locale data after loading text domain.
@@ -323,11 +328,13 @@  discard block
 block discarded – undo
323 328
 
324 329
 // Load the functions for the active theme, for both parent and child theme if applicable.
325 330
 if ( ! defined( 'WP_INSTALLING' ) || 'wp-activate.php' === $pagenow ) {
326
-	if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
327
-		include( STYLESHEETPATH . '/functions.php' );
328
-	if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
329
-		include( TEMPLATEPATH . '/functions.php' );
330
-}
331
+	if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) ) {
332
+			include( STYLESHEETPATH . '/functions.php' );
333
+	}
334
+	if ( file_exists( TEMPLATEPATH . '/functions.php' ) ) {
335
+			include( TEMPLATEPATH . '/functions.php' );
336
+	}
337
+	}
331 338
 
332 339
 /**
333 340
  * Fires after the theme is loaded.
Please login to merge, or discard this patch.
Spacing   +141 added lines, -141 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
  *
16 16
  * @since 1.0.0
17 17
  */
18
-define( 'WPINC', 'wp-includes' );
18
+define('WPINC', 'wp-includes');
19 19
 
20 20
 // Include files required for initialization.
21
-require( ABSPATH . WPINC . '/load.php' );
22
-require( ABSPATH . WPINC . '/default-constants.php' );
21
+require(ABSPATH.WPINC.'/load.php');
22
+require(ABSPATH.WPINC.'/default-constants.php');
23 23
 
24 24
 /*
25 25
  * These can't be directly globalized in version.php. When updating,
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
  * these values to be overridden if already set.
28 28
  */
29 29
 global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version, $wp_local_package;
30
-require( ABSPATH . WPINC . '/version.php' );
30
+require(ABSPATH.WPINC.'/version.php');
31 31
 
32 32
 /**
33 33
  * If not already configured, `$blog_id` will default to 1 in a single site
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 wp_check_php_mysql_versions();
46 46
 
47 47
 // Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php.
48
-@ini_set( 'magic_quotes_runtime', 0 );
49
-@ini_set( 'magic_quotes_sybase',  0 );
48
+@ini_set('magic_quotes_runtime', 0);
49
+@ini_set('magic_quotes_sybase', 0);
50 50
 
51 51
 // WordPress calculates offsets from UTC.
52
-date_default_timezone_set( 'UTC' );
52
+date_default_timezone_set('UTC');
53 53
 
54 54
 // Turn register_globals off.
55 55
 wp_unregister_GLOBALS();
@@ -70,19 +70,19 @@  discard block
 block discarded – undo
70 70
 wp_debug_mode();
71 71
 
72 72
 // For an advanced caching plugin to use. Uses a static drop-in because you would only want one.
73
-if ( WP_CACHE )
74
-	WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
73
+if (WP_CACHE)
74
+	WP_DEBUG ? include(WP_CONTENT_DIR.'/advanced-cache.php') : @include(WP_CONTENT_DIR.'/advanced-cache.php');
75 75
 
76 76
 // Define WP_LANG_DIR if not set.
77 77
 wp_set_lang_dir();
78 78
 
79 79
 // Load early WordPress files.
80
-require( ABSPATH . WPINC . '/compat.php' );
81
-require( ABSPATH . WPINC . '/functions.php' );
82
-require( ABSPATH . WPINC . '/class-wp.php' );
83
-require( ABSPATH . WPINC . '/class-wp-error.php' );
84
-require( ABSPATH . WPINC . '/plugin.php' );
85
-require( ABSPATH . WPINC . '/pomo/mo.php' );
80
+require(ABSPATH.WPINC.'/compat.php');
81
+require(ABSPATH.WPINC.'/functions.php');
82
+require(ABSPATH.WPINC.'/class-wp.php');
83
+require(ABSPATH.WPINC.'/class-wp-error.php');
84
+require(ABSPATH.WPINC.'/plugin.php');
85
+require(ABSPATH.WPINC.'/pomo/mo.php');
86 86
 
87 87
 // Include the wpdb class and, if present, a db.php database drop-in.
88 88
 require_wp_db();
@@ -95,110 +95,110 @@  discard block
 block discarded – undo
95 95
 wp_start_object_cache();
96 96
 
97 97
 // Attach the default filters.
98
-require( ABSPATH . WPINC . '/default-filters.php' );
98
+require(ABSPATH.WPINC.'/default-filters.php');
99 99
 
100 100
 // Initialize multisite if enabled.
101
-if ( is_multisite() ) {
102
-	require( ABSPATH . WPINC . '/ms-blogs.php' );
103
-	require( ABSPATH . WPINC . '/ms-settings.php' );
104
-} elseif ( ! defined( 'MULTISITE' ) ) {
105
-	define( 'MULTISITE', false );
101
+if (is_multisite()) {
102
+	require(ABSPATH.WPINC.'/ms-blogs.php');
103
+	require(ABSPATH.WPINC.'/ms-settings.php');
104
+} elseif ( ! defined('MULTISITE')) {
105
+	define('MULTISITE', false);
106 106
 }
107 107
 
108
-register_shutdown_function( 'shutdown_action_hook' );
108
+register_shutdown_function('shutdown_action_hook');
109 109
 
110 110
 // Stop most of WordPress from being loaded if we just want the basics.
111
-if ( SHORTINIT )
111
+if (SHORTINIT)
112 112
 	return false;
113 113
 
114 114
 // Load the L10n library.
115
-require_once( ABSPATH . WPINC . '/l10n.php' );
115
+require_once(ABSPATH.WPINC.'/l10n.php');
116 116
 
117 117
 // Run the installer if WordPress is not installed.
118 118
 wp_not_installed();
119 119
 
120 120
 // Load most of WordPress.
121
-require( ABSPATH . WPINC . '/class-wp-walker.php' );
122
-require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
123
-require( ABSPATH . WPINC . '/formatting.php' );
124
-require( ABSPATH . WPINC . '/capabilities.php' );
125
-require( ABSPATH . WPINC . '/class-wp-roles.php' );
126
-require( ABSPATH . WPINC . '/class-wp-role.php' );
127
-require( ABSPATH . WPINC . '/class-wp-user.php' );
128
-require( ABSPATH . WPINC . '/query.php' );
129
-require( ABSPATH . WPINC . '/date.php' );
130
-require( ABSPATH . WPINC . '/theme.php' );
131
-require( ABSPATH . WPINC . '/class-wp-theme.php' );
132
-require( ABSPATH . WPINC . '/template.php' );
133
-require( ABSPATH . WPINC . '/user.php' );
134
-require( ABSPATH . WPINC . '/class-wp-user-query.php' );
135
-require( ABSPATH . WPINC . '/session.php' );
136
-require( ABSPATH . WPINC . '/meta.php' );
137
-require( ABSPATH . WPINC . '/class-wp-meta-query.php' );
138
-require( ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php' );
139
-require( ABSPATH . WPINC . '/general-template.php' );
140
-require( ABSPATH . WPINC . '/link-template.php' );
141
-require( ABSPATH . WPINC . '/author-template.php' );
142
-require( ABSPATH . WPINC . '/post.php' );
143
-require( ABSPATH . WPINC . '/class-walker-page.php' );
144
-require( ABSPATH . WPINC . '/class-walker-page-dropdown.php' );
145
-require( ABSPATH . WPINC . '/class-wp-post.php' );
146
-require( ABSPATH . WPINC . '/post-template.php' );
147
-require( ABSPATH . WPINC . '/revision.php' );
148
-require( ABSPATH . WPINC . '/post-formats.php' );
149
-require( ABSPATH . WPINC . '/post-thumbnail-template.php' );
150
-require( ABSPATH . WPINC . '/category.php' );
151
-require( ABSPATH . WPINC . '/class-walker-category.php' );
152
-require( ABSPATH . WPINC . '/class-walker-category-dropdown.php' );
153
-require( ABSPATH . WPINC . '/category-template.php' );
154
-require( ABSPATH . WPINC . '/comment.php' );
155
-require( ABSPATH . WPINC . '/class-wp-comment.php' );
156
-require( ABSPATH . WPINC . '/class-wp-comment-query.php' );
157
-require( ABSPATH . WPINC . '/class-walker-comment.php' );
158
-require( ABSPATH . WPINC . '/comment-template.php' );
159
-require( ABSPATH . WPINC . '/rewrite.php' );
160
-require( ABSPATH . WPINC . '/class-wp-rewrite.php' );
161
-require( ABSPATH . WPINC . '/feed.php' );
162
-require( ABSPATH . WPINC . '/bookmark.php' );
163
-require( ABSPATH . WPINC . '/bookmark-template.php' );
164
-require( ABSPATH . WPINC . '/kses.php' );
165
-require( ABSPATH . WPINC . '/cron.php' );
166
-require( ABSPATH . WPINC . '/deprecated.php' );
167
-require( ABSPATH . WPINC . '/script-loader.php' );
168
-require( ABSPATH . WPINC . '/taxonomy.php' );
169
-require( ABSPATH . WPINC . '/class-wp-term.php' );
170
-require( ABSPATH . WPINC . '/class-wp-tax-query.php' );
171
-require( ABSPATH . WPINC . '/update.php' );
172
-require( ABSPATH . WPINC . '/canonical.php' );
173
-require( ABSPATH . WPINC . '/shortcodes.php' );
174
-require( ABSPATH . WPINC . '/embed.php' );
175
-require( ABSPATH . WPINC . '/class-wp-embed.php' );
176
-require( ABSPATH . WPINC . '/class-wp-oembed-controller.php' );
177
-require( ABSPATH . WPINC . '/media.php' );
178
-require( ABSPATH . WPINC . '/http.php' );
179
-require( ABSPATH . WPINC . '/class-http.php' );
180
-require( ABSPATH . WPINC . '/class-wp-http-streams.php' );
181
-require( ABSPATH . WPINC . '/class-wp-http-curl.php' );
182
-require( ABSPATH . WPINC . '/class-wp-http-proxy.php' );
183
-require( ABSPATH . WPINC . '/class-wp-http-cookie.php' );
184
-require( ABSPATH . WPINC . '/class-wp-http-encoding.php' );
185
-require( ABSPATH . WPINC . '/class-wp-http-response.php' );
186
-require( ABSPATH . WPINC . '/widgets.php' );
187
-require( ABSPATH . WPINC . '/class-wp-widget.php' );
188
-require( ABSPATH . WPINC . '/class-wp-widget-factory.php' );
189
-require( ABSPATH . WPINC . '/nav-menu.php' );
190
-require( ABSPATH . WPINC . '/nav-menu-template.php' );
191
-require( ABSPATH . WPINC . '/admin-bar.php' );
192
-require( ABSPATH . WPINC . '/rest-api.php' );
193
-require( ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php' );
194
-require( ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php' );
195
-require( ABSPATH . WPINC . '/rest-api/class-wp-rest-request.php' );
121
+require(ABSPATH.WPINC.'/class-wp-walker.php');
122
+require(ABSPATH.WPINC.'/class-wp-ajax-response.php');
123
+require(ABSPATH.WPINC.'/formatting.php');
124
+require(ABSPATH.WPINC.'/capabilities.php');
125
+require(ABSPATH.WPINC.'/class-wp-roles.php');
126
+require(ABSPATH.WPINC.'/class-wp-role.php');
127
+require(ABSPATH.WPINC.'/class-wp-user.php');
128
+require(ABSPATH.WPINC.'/query.php');
129
+require(ABSPATH.WPINC.'/date.php');
130
+require(ABSPATH.WPINC.'/theme.php');
131
+require(ABSPATH.WPINC.'/class-wp-theme.php');
132
+require(ABSPATH.WPINC.'/template.php');
133
+require(ABSPATH.WPINC.'/user.php');
134
+require(ABSPATH.WPINC.'/class-wp-user-query.php');
135
+require(ABSPATH.WPINC.'/session.php');
136
+require(ABSPATH.WPINC.'/meta.php');
137
+require(ABSPATH.WPINC.'/class-wp-meta-query.php');
138
+require(ABSPATH.WPINC.'/class-wp-metadata-lazyloader.php');
139
+require(ABSPATH.WPINC.'/general-template.php');
140
+require(ABSPATH.WPINC.'/link-template.php');
141
+require(ABSPATH.WPINC.'/author-template.php');
142
+require(ABSPATH.WPINC.'/post.php');
143
+require(ABSPATH.WPINC.'/class-walker-page.php');
144
+require(ABSPATH.WPINC.'/class-walker-page-dropdown.php');
145
+require(ABSPATH.WPINC.'/class-wp-post.php');
146
+require(ABSPATH.WPINC.'/post-template.php');
147
+require(ABSPATH.WPINC.'/revision.php');
148
+require(ABSPATH.WPINC.'/post-formats.php');
149
+require(ABSPATH.WPINC.'/post-thumbnail-template.php');
150
+require(ABSPATH.WPINC.'/category.php');
151
+require(ABSPATH.WPINC.'/class-walker-category.php');
152
+require(ABSPATH.WPINC.'/class-walker-category-dropdown.php');
153
+require(ABSPATH.WPINC.'/category-template.php');
154
+require(ABSPATH.WPINC.'/comment.php');
155
+require(ABSPATH.WPINC.'/class-wp-comment.php');
156
+require(ABSPATH.WPINC.'/class-wp-comment-query.php');
157
+require(ABSPATH.WPINC.'/class-walker-comment.php');
158
+require(ABSPATH.WPINC.'/comment-template.php');
159
+require(ABSPATH.WPINC.'/rewrite.php');
160
+require(ABSPATH.WPINC.'/class-wp-rewrite.php');
161
+require(ABSPATH.WPINC.'/feed.php');
162
+require(ABSPATH.WPINC.'/bookmark.php');
163
+require(ABSPATH.WPINC.'/bookmark-template.php');
164
+require(ABSPATH.WPINC.'/kses.php');
165
+require(ABSPATH.WPINC.'/cron.php');
166
+require(ABSPATH.WPINC.'/deprecated.php');
167
+require(ABSPATH.WPINC.'/script-loader.php');
168
+require(ABSPATH.WPINC.'/taxonomy.php');
169
+require(ABSPATH.WPINC.'/class-wp-term.php');
170
+require(ABSPATH.WPINC.'/class-wp-tax-query.php');
171
+require(ABSPATH.WPINC.'/update.php');
172
+require(ABSPATH.WPINC.'/canonical.php');
173
+require(ABSPATH.WPINC.'/shortcodes.php');
174
+require(ABSPATH.WPINC.'/embed.php');
175
+require(ABSPATH.WPINC.'/class-wp-embed.php');
176
+require(ABSPATH.WPINC.'/class-wp-oembed-controller.php');
177
+require(ABSPATH.WPINC.'/media.php');
178
+require(ABSPATH.WPINC.'/http.php');
179
+require(ABSPATH.WPINC.'/class-http.php');
180
+require(ABSPATH.WPINC.'/class-wp-http-streams.php');
181
+require(ABSPATH.WPINC.'/class-wp-http-curl.php');
182
+require(ABSPATH.WPINC.'/class-wp-http-proxy.php');
183
+require(ABSPATH.WPINC.'/class-wp-http-cookie.php');
184
+require(ABSPATH.WPINC.'/class-wp-http-encoding.php');
185
+require(ABSPATH.WPINC.'/class-wp-http-response.php');
186
+require(ABSPATH.WPINC.'/widgets.php');
187
+require(ABSPATH.WPINC.'/class-wp-widget.php');
188
+require(ABSPATH.WPINC.'/class-wp-widget-factory.php');
189
+require(ABSPATH.WPINC.'/nav-menu.php');
190
+require(ABSPATH.WPINC.'/nav-menu-template.php');
191
+require(ABSPATH.WPINC.'/admin-bar.php');
192
+require(ABSPATH.WPINC.'/rest-api.php');
193
+require(ABSPATH.WPINC.'/rest-api/class-wp-rest-server.php');
194
+require(ABSPATH.WPINC.'/rest-api/class-wp-rest-response.php');
195
+require(ABSPATH.WPINC.'/rest-api/class-wp-rest-request.php');
196 196
 
197 197
 // Load multisite-specific files.
198
-if ( is_multisite() ) {
199
-	require( ABSPATH . WPINC . '/ms-functions.php' );
200
-	require( ABSPATH . WPINC . '/ms-default-filters.php' );
201
-	require( ABSPATH . WPINC . '/ms-deprecated.php' );
198
+if (is_multisite()) {
199
+	require(ABSPATH.WPINC.'/ms-functions.php');
200
+	require(ABSPATH.WPINC.'/ms-default-filters.php');
201
+	require(ABSPATH.WPINC.'/ms-deprecated.php');
202 202
 }
203 203
 
204 204
 // Define constants that rely on the API to obtain the default value.
@@ -208,18 +208,18 @@  discard block
 block discarded – undo
208 208
 $GLOBALS['wp_plugin_paths'] = array();
209 209
 
210 210
 // Load must-use plugins.
211
-foreach ( wp_get_mu_plugins() as $mu_plugin ) {
212
-	include_once( $mu_plugin );
211
+foreach (wp_get_mu_plugins() as $mu_plugin) {
212
+	include_once($mu_plugin);
213 213
 }
214
-unset( $mu_plugin );
214
+unset($mu_plugin);
215 215
 
216 216
 // Load network activated plugins.
217
-if ( is_multisite() ) {
218
-	foreach ( wp_get_active_network_plugins() as $network_plugin ) {
219
-		wp_register_plugin_realpath( $network_plugin );
220
-		include_once( $network_plugin );
217
+if (is_multisite()) {
218
+	foreach (wp_get_active_network_plugins() as $network_plugin) {
219
+		wp_register_plugin_realpath($network_plugin);
220
+		include_once($network_plugin);
221 221
 	}
222
-	unset( $network_plugin );
222
+	unset($network_plugin);
223 223
 }
224 224
 
225 225
 /**
@@ -227,9 +227,9 @@  discard block
 block discarded – undo
227 227
  *
228 228
  * @since 2.8.0
229 229
  */
230
-do_action( 'muplugins_loaded' );
230
+do_action('muplugins_loaded');
231 231
 
232
-if ( is_multisite() )
232
+if (is_multisite())
233 233
 	ms_cookie_constants(  );
234 234
 
235 235
 // Define constants after multisite is loaded.
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 wp_ssl_constants();
240 240
 
241 241
 // Create common globals.
242
-require( ABSPATH . WPINC . '/vars.php' );
242
+require(ABSPATH.WPINC.'/vars.php');
243 243
 
244 244
 // Make taxonomies and posts available to plugins and themes.
245 245
 // @plugin authors: warning: these get registered again on the init hook.
@@ -247,24 +247,24 @@  discard block
 block discarded – undo
247 247
 create_initial_post_types();
248 248
 
249 249
 // Register the default theme directory root
250
-register_theme_directory( get_theme_root() );
250
+register_theme_directory(get_theme_root());
251 251
 
252 252
 // Load active plugins.
253
-foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
254
-	wp_register_plugin_realpath( $plugin );
255
-	include_once( $plugin );
253
+foreach (wp_get_active_and_valid_plugins() as $plugin) {
254
+	wp_register_plugin_realpath($plugin);
255
+	include_once($plugin);
256 256
 }
257
-unset( $plugin );
257
+unset($plugin);
258 258
 
259 259
 // Load pluggable functions.
260
-require( ABSPATH . WPINC . '/pluggable.php' );
261
-require( ABSPATH . WPINC . '/pluggable-deprecated.php' );
260
+require(ABSPATH.WPINC.'/pluggable.php');
261
+require(ABSPATH.WPINC.'/pluggable-deprecated.php');
262 262
 
263 263
 // Set internal encoding.
264 264
 wp_set_internal_encoding();
265 265
 
266 266
 // Run wp_cache_postload() if object cache is enabled and the function exists.
267
-if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )
267
+if (WP_CACHE && function_exists('wp_cache_postload'))
268 268
 	wp_cache_postload();
269 269
 
270 270
 /**
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
  *
275 275
  * @since 1.5.0
276 276
  */
277
-do_action( 'plugins_loaded' );
277
+do_action('plugins_loaded');
278 278
 
279 279
 // Define constants which affect functionality if not already defined.
280 280
 wp_functionality_constants();
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
  *
288 288
  * @since 2.0.11
289 289
  */
290
-do_action( 'sanitize_comment_cookies' );
290
+do_action('sanitize_comment_cookies');
291 291
 
292 292
 /**
293 293
  * WordPress Query object
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
  *
338 338
  * @since 2.6.0
339 339
  */
340
-do_action( 'setup_theme' );
340
+do_action('setup_theme');
341 341
 
342 342
 // Define the template related constants.
343 343
 wp_templating_constants(  );
@@ -346,13 +346,13 @@  discard block
 block discarded – undo
346 346
 load_default_textdomain();
347 347
 
348 348
 $locale = get_locale();
349
-$locale_file = WP_LANG_DIR . "/$locale.php";
350
-if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
351
-	require( $locale_file );
352
-unset( $locale_file );
349
+$locale_file = WP_LANG_DIR."/$locale.php";
350
+if ((0 === validate_file($locale)) && is_readable($locale_file))
351
+	require($locale_file);
352
+unset($locale_file);
353 353
 
354 354
 // Pull in locale data after loading text domain.
355
-require_once( ABSPATH . WPINC . '/locale.php' );
355
+require_once(ABSPATH.WPINC.'/locale.php');
356 356
 
357 357
 /**
358 358
  * WordPress Locale object for loading locale domain date and various strings.
@@ -362,11 +362,11 @@  discard block
 block discarded – undo
362 362
 $GLOBALS['wp_locale'] = new WP_Locale();
363 363
 
364 364
 // Load the functions for the active theme, for both parent and child theme if applicable.
365
-if ( ! wp_installing() || 'wp-activate.php' === $pagenow ) {
366
-	if ( TEMPLATEPATH !== STYLESHEETPATH && file_exists( STYLESHEETPATH . '/functions.php' ) )
367
-		include( STYLESHEETPATH . '/functions.php' );
368
-	if ( file_exists( TEMPLATEPATH . '/functions.php' ) )
369
-		include( TEMPLATEPATH . '/functions.php' );
365
+if ( ! wp_installing() || 'wp-activate.php' === $pagenow) {
366
+	if (TEMPLATEPATH !== STYLESHEETPATH && file_exists(STYLESHEETPATH.'/functions.php'))
367
+		include(STYLESHEETPATH.'/functions.php');
368
+	if (file_exists(TEMPLATEPATH.'/functions.php'))
369
+		include(TEMPLATEPATH.'/functions.php');
370 370
 }
371 371
 
372 372
 /**
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
  *
375 375
  * @since 3.0.0
376 376
  */
377
-do_action( 'after_setup_theme' );
377
+do_action('after_setup_theme');
378 378
 
379 379
 // Set up current user.
380 380
 $GLOBALS['wp']->init();
@@ -390,12 +390,12 @@  discard block
 block discarded – undo
390 390
  *
391 391
  * @since 1.5.0
392 392
  */
393
-do_action( 'init' );
393
+do_action('init');
394 394
 
395 395
 // Check site status
396
-if ( is_multisite() ) {
397
-	if ( true !== ( $file = ms_site_check() ) ) {
398
-		require( $file );
396
+if (is_multisite()) {
397
+	if (true !== ($file = ms_site_check())) {
398
+		require($file);
399 399
 		die();
400 400
 	}
401 401
 	unset($file);
@@ -411,4 +411,4 @@  discard block
 block discarded – undo
411 411
  *
412 412
  * @since 3.0.0
413 413
  */
414
-do_action( 'wp_loaded' );
414
+do_action('wp_loaded');
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/footer.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
 	</div><!-- #main .wrapper -->
13 13
 	<footer id="colophon" role="contentinfo">
14 14
 		<div class="site-info">
15
-			<?php do_action( 'twentytwelve_credits' ); ?>
16
-			<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'twentytwelve' ) ); ?>" title="<?php esc_attr_e( 'Semantic Personal Publishing Platform', 'twentytwelve' ); ?>"><?php printf( __( 'Proudly powered by %s', 'twentytwelve' ), 'WordPress' ); ?></a>
15
+			<?php do_action('twentytwelve_credits'); ?>
16
+			<a href="<?php echo esc_url(__('https://wordpress.org/', 'twentytwelve')); ?>" title="<?php esc_attr_e('Semantic Personal Publishing Platform', 'twentytwelve'); ?>"><?php printf(__('Proudly powered by %s', 'twentytwelve'), 'WordPress'); ?></a>
17 17
 		</div><!-- .site-info -->
18 18
 	</footer><!-- #colophon -->
19 19
 </div><!-- #page -->
Please login to merge, or discard this patch.
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 the footer
4
- *
5
- * Contains footer content and the closing of the #main and #page div elements.
6
- *
7
- * @package WordPress
8
- * @subpackage Twenty_Twelve
9
- * @since Twenty Twelve 1.0
10
- */
3
+		 * The template for displaying the footer
4
+		 *
5
+		 * Contains footer content and the closing of the #main and #page div elements.
6
+		 *
7
+		 * @package WordPress
8
+		 * @subpackage Twenty_Twelve
9
+		 * @since Twenty Twelve 1.0
10
+		 */
11 11
 ?>
12 12
 	</div><!-- #main .wrapper -->
13 13
 	<footer id="colophon" role="contentinfo">
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/content-quote.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,16 +10,16 @@
 block discarded – undo
10 10
 
11 11
 	<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
12 12
 		<div class="entry-content">
13
-			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?>
13
+			<?php the_content(__('Continue reading <span class="meta-nav">&rarr;</span>', 'twentytwelve')); ?>
14 14
 		</div><!-- .entry-content -->
15 15
 
16 16
 		<footer class="entry-meta">
17
-			<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'twentytwelve' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
18
-			<?php if ( comments_open() ) : ?>
17
+			<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr(sprintf(__('Permalink to %s', 'twentytwelve'), the_title_attribute('echo=0'))); ?>" rel="bookmark"><?php echo get_the_date(); ?></a>
18
+			<?php if (comments_open()) : ?>
19 19
 			<div class="comments-link">
20
-				<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
20
+				<?php comments_popup_link('<span class="leave-reply">'.__('Leave a reply', 'twentytwelve').'</span>', __('1 Reply', 'twentytwelve'), __('% Replies', 'twentytwelve')); ?>
21 21
 			</div><!-- .comments-link -->
22 22
 			<?php endif; // comments_open() ?>
23
-			<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
23
+			<?php edit_post_link(__('Edit', 'twentytwelve'), '<span class="edit-link">', '</span>'); ?>
24 24
 		</footer><!-- .entry-meta -->
25 25
 	</article><!-- #post -->
Please login to merge, or discard this patch.
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 Quote post format
4
- *
5
- * @package WordPress
6
- * @subpackage Twenty_Twelve
7
- * @since Twenty Twelve 1.0
8
- */
3
+		 * The template for displaying posts in the Quote post format
4
+		 *
5
+		 * @package WordPress
6
+		 * @subpackage Twenty_Twelve
7
+		 * @since Twenty Twelve 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.
src/wp-content/themes/twentytwelve/image.php 3 patches
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -14,32 +14,32 @@  discard block
 block discarded – undo
14 14
 	<div id="primary" class="site-content">
15 15
 		<div id="content" role="main">
16 16
 
17
-		<?php while ( have_posts() ) : the_post(); ?>
17
+		<?php while (have_posts()) : the_post(); ?>
18 18
 
19
-				<article id="post-<?php the_ID(); ?>" <?php post_class( 'image-attachment' ); ?>>
19
+				<article id="post-<?php the_ID(); ?>" <?php post_class('image-attachment'); ?>>
20 20
 					<header class="entry-header">
21 21
 						<h1 class="entry-title"><?php the_title(); ?></h1>
22 22
 
23 23
 						<footer class="entry-meta">
24 24
 							<?php
25 25
 								$metadata = wp_get_attachment_metadata();
26
-								printf( __( '<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>.', 'twentytwelve' ),
27
-									esc_attr( get_the_date( 'c' ) ),
28
-									esc_html( get_the_date() ),
29
-									esc_url( wp_get_attachment_url() ),
26
+								printf(__('<span class="meta-prep meta-prep-entry-date">Published </span> <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s &times; %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>.', 'twentytwelve'),
27
+									esc_attr(get_the_date('c')),
28
+									esc_html(get_the_date()),
29
+									esc_url(wp_get_attachment_url()),
30 30
 									$metadata['width'],
31 31
 									$metadata['height'],
32
-									esc_url( get_permalink( $post->post_parent ) ),
33
-									esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ),
34
-									get_the_title( $post->post_parent )
32
+									esc_url(get_permalink($post->post_parent)),
33
+									esc_attr(strip_tags(get_the_title($post->post_parent))),
34
+									get_the_title($post->post_parent)
35 35
 								);
36 36
 							?>
37
-							<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
37
+							<?php edit_post_link(__('Edit', 'twentytwelve'), '<span class="edit-link">', '</span>'); ?>
38 38
 						</footer><!-- .entry-meta -->
39 39
 
40 40
 						<nav id="image-navigation" class="navigation" role="navigation">
41
-							<span class="previous-image"><?php previous_image_link( false, __( '&larr; Previous', 'twentytwelve' ) ); ?></span>
42
-							<span class="next-image"><?php next_image_link( false, __( 'Next &rarr;', 'twentytwelve' ) ); ?></span>
41
+							<span class="previous-image"><?php previous_image_link(false, __('&larr; Previous', 'twentytwelve')); ?></span>
42
+							<span class="next-image"><?php next_image_link(false, __('Next &rarr;', 'twentytwelve')); ?></span>
43 43
 						</nav><!-- #image-navigation -->
44 44
 					</header><!-- .entry-header -->
45 45
 
@@ -52,28 +52,28 @@  discard block
 block discarded – undo
52 52
  * Grab the IDs of all the image attachments in a gallery so we can get the URL of the next adjacent image in a gallery,
53 53
  * or the first image (if we're looking at the last image in a gallery), or, in a gallery of one, just the link to that image file
54 54
  */
55
-$attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
56
-foreach ( $attachments as $k => $attachment ) :
57
-	if ( $attachment->ID == $post->ID )
55
+$attachments = array_values(get_children(array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID')));
56
+foreach ($attachments as $k => $attachment) :
57
+	if ($attachment->ID == $post->ID)
58 58
 		break;
59 59
 endforeach;
60 60
 
61 61
 // If there is more than 1 attachment in a gallery
62
-if ( count( $attachments ) > 1 ) :
62
+if (count($attachments) > 1) :
63 63
 	$k++;
64
-	if ( isset( $attachments[ $k ] ) ) :
64
+	if (isset($attachments[$k])) :
65 65
 		// get the URL of the next image attachment
66
-		$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
66
+		$next_attachment_url = get_attachment_link($attachments[$k]->ID);
67 67
 	else :
68 68
 		// or get the URL of the first image attachment
69
-		$next_attachment_url = get_attachment_link( $attachments[0]->ID );
69
+		$next_attachment_url = get_attachment_link($attachments[0]->ID);
70 70
 	endif;
71 71
 else :
72 72
 	// or, if there's only 1 image, get the URL of the image
73 73
 	$next_attachment_url = wp_get_attachment_url();
74 74
 endif;
75 75
 ?>
76
-								<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
76
+								<a href="<?php echo esc_url($next_attachment_url); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
77 77
 								/**
78 78
  								 * Filter the image attachment size to use.
79 79
 								 *
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 								 *     @type int The attachment width in pixels.
85 85
 								 * }
86 86
 								 */
87
-								$attachment_size = apply_filters( 'twentytwelve_attachment_size', array( 960, 960 ) );
88
-								echo wp_get_attachment_image( $post->ID, $attachment_size );
87
+								$attachment_size = apply_filters('twentytwelve_attachment_size', array(960, 960));
88
+								echo wp_get_attachment_image($post->ID, $attachment_size);
89 89
 								?></a>
90 90
 
91
-								<?php if ( ! empty( $post->post_excerpt ) ) : ?>
91
+								<?php if ( ! empty($post->post_excerpt)) : ?>
92 92
 								<div class="entry-caption">
93 93
 									<?php the_excerpt(); ?>
94 94
 								</div>
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 						<div class="entry-description">
101 101
 							<?php the_content(); ?>
102
-							<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
102
+							<?php wp_link_pages(array('before' => '<div class="page-links">'.__('Pages:', 'twentytwelve'), 'after' => '</div>')); ?>
103 103
 						</div><!-- .entry-description -->
104 104
 
105 105
 					</div><!-- .entry-content -->
Please login to merge, or discard this patch.
Braces   +10 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,9 +54,10 @@  discard block
 block discarded – undo
54 54
  */
55 55
 $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) );
56 56
 foreach ( $attachments as $k => $attachment ) :
57
-	if ( $attachment->ID == $post->ID )
58
-		break;
59
-endforeach;
57
+	if ( $attachment->ID == $post->ID ) {
58
+			break;
59
+	}
60
+	endforeach;
60 61
 
61 62
 // If there is more than 1 attachment in a gallery
62 63
 if ( count( $attachments ) > 1 ) :
@@ -64,13 +65,17 @@  discard block
 block discarded – undo
64 65
 	if ( isset( $attachments[ $k ] ) ) :
65 66
 		// get the URL of the next image attachment
66 67
 		$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
67
-	else :
68
+	else {
69
+		:
68 70
 		// or get the URL of the first image attachment
69 71
 		$next_attachment_url = get_attachment_link( $attachments[0]->ID );
72
+	}
70 73
 	endif;
71
-else :
74
+else {
75
+	:
72 76
 	// or, if there's only 1 image, get the URL of the image
73 77
 	$next_attachment_url = wp_get_attachment_url();
78
+}
74 79
 endif;
75 80
 ?>
76 81
 								<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * The template for displaying image attachments
4
- *
5
- * @link https://codex.wordpress.org/Template_Hierarchy
6
- *
7
- * @package WordPress
8
- * @subpackage Twenty_Twelve
9
- * @since Twenty Twelve 1.0
10
- */
3
+			 * The template for displaying image attachments
4
+			 *
5
+			 * @link https://codex.wordpress.org/Template_Hierarchy
6
+			 *
7
+			 * @package WordPress
8
+			 * @subpackage Twenty_Twelve
9
+			 * @since Twenty Twelve 1.0
10
+			 */
11 11
 
12 12
 get_header(); ?>
13 13
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 ?>
76 76
 								<a href="<?php echo esc_url( $next_attachment_url ); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
77 77
 								/**
78
- 								 * Filter the image attachment size to use.
78
+								 * Filter the image attachment size to use.
79 79
 								 *
80 80
 								 * @since Twenty Twelve 1.0
81 81
 								 *
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/sidebar-front.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,21 +15,21 @@
 block discarded – undo
15 15
  *
16 16
  * If none of the sidebars have widgets, then let's bail early.
17 17
  */
18
-if ( ! is_active_sidebar( 'sidebar-2' ) && ! is_active_sidebar( 'sidebar-3' ) )
18
+if ( ! is_active_sidebar('sidebar-2') && ! is_active_sidebar('sidebar-3'))
19 19
 	return;
20 20
 
21 21
 // If we get this far, we have widgets. Let do this.
22 22
 ?>
23 23
 <div id="secondary" class="widget-area" role="complementary">
24
-	<?php if ( is_active_sidebar( 'sidebar-2' ) ) : ?>
24
+	<?php if (is_active_sidebar('sidebar-2')) : ?>
25 25
 	<div class="first front-widgets">
26
-		<?php dynamic_sidebar( 'sidebar-2' ); ?>
26
+		<?php dynamic_sidebar('sidebar-2'); ?>
27 27
 	</div><!-- .first -->
28 28
 	<?php endif; ?>
29 29
 
30
-	<?php if ( is_active_sidebar( 'sidebar-3' ) ) : ?>
30
+	<?php if (is_active_sidebar('sidebar-3')) : ?>
31 31
 	<div class="second front-widgets">
32
-		<?php dynamic_sidebar( 'sidebar-3' ); ?>
32
+		<?php dynamic_sidebar('sidebar-3'); ?>
33 33
 	</div><!-- .second -->
34 34
 	<?php endif; ?>
35 35
 </div><!-- #secondary -->
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@
 block discarded – undo
15 15
  *
16 16
  * If none of the sidebars have widgets, then let's bail early.
17 17
  */
18
-if ( ! is_active_sidebar( 'sidebar-2' ) && ! is_active_sidebar( 'sidebar-3' ) )
18
+if ( ! is_active_sidebar( 'sidebar-2' ) && ! is_active_sidebar( 'sidebar-3' ) ) {
19 19
 	return;
20
+}
20 21
 
21 22
 // If we get this far, we have widgets. Let do this.
22 23
 ?>
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/header.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 <html <?php language_attributes(); ?>>
20 20
 <!--<![endif]-->
21 21
 <head>
22
-<meta charset="<?php bloginfo( 'charset' ); ?>" />
22
+<meta charset="<?php bloginfo('charset'); ?>" />
23 23
 <meta name="viewport" content="width=device-width" />
24
-<title><?php wp_title( '|', true, 'right' ); ?></title>
24
+<title><?php wp_title('|', true, 'right'); ?></title>
25 25
 <link rel="profile" href="http://gmpg.org/xfn/11" />
26
-<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
26
+<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
27 27
 <?php // Loads HTML5 JavaScript file to add support for HTML5 elements in older IE versions. ?>
28 28
 <!--[if lt IE 9]>
29 29
 <script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>
@@ -35,18 +35,18 @@  discard block
 block discarded – undo
35 35
 <div id="page" class="hfeed site">
36 36
 	<header id="masthead" class="site-header" role="banner">
37 37
 		<hgroup>
38
-			<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
39
-			<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
38
+			<h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>" title="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
39
+			<h2 class="site-description"><?php bloginfo('description'); ?></h2>
40 40
 		</hgroup>
41 41
 
42 42
 		<nav id="site-navigation" class="main-navigation" role="navigation">
43
-			<button class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></button>
44
-			<a class="assistive-text" href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentytwelve' ); ?>"><?php _e( 'Skip to content', 'twentytwelve' ); ?></a>
45
-			<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_class' => 'nav-menu' ) ); ?>
43
+			<button class="menu-toggle"><?php _e('Menu', 'twentytwelve'); ?></button>
44
+			<a class="assistive-text" href="#content" title="<?php esc_attr_e('Skip to content', 'twentytwelve'); ?>"><?php _e('Skip to content', 'twentytwelve'); ?></a>
45
+			<?php wp_nav_menu(array('theme_location' => 'primary', 'menu_class' => 'nav-menu')); ?>
46 46
 		</nav><!-- #site-navigation -->
47 47
 
48
-		<?php if ( get_header_image() ) : ?>
49
-		<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a>
48
+		<?php if (get_header_image()) : ?>
49
+		<a href="<?php echo esc_url(home_url('/')); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo esc_attr(get_custom_header()->width); ?>" height="<?php echo esc_attr(get_custom_header()->height); ?>" alt="<?php echo esc_attr(get_bloginfo('name', 'display')); ?>" /></a>
50 50
 		<?php endif; ?>
51 51
 	</header><!-- #masthead -->
52 52
 
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/page-templates/front-page.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,19 +17,19 @@
 block discarded – undo
17 17
 	<div id="primary" class="site-content">
18 18
 		<div id="content" role="main">
19 19
 
20
-			<?php while ( have_posts() ) : the_post(); ?>
21
-				<?php if ( has_post_thumbnail() ) : ?>
20
+			<?php while (have_posts()) : the_post(); ?>
21
+				<?php if (has_post_thumbnail()) : ?>
22 22
 					<div class="entry-page-image">
23 23
 						<?php the_post_thumbnail(); ?>
24 24
 					</div><!-- .entry-page-image -->
25 25
 				<?php endif; ?>
26 26
 
27
-				<?php get_template_part( 'content', 'page' ); ?>
27
+				<?php get_template_part('content', 'page'); ?>
28 28
 
29 29
 			<?php endwhile; // end of the loop. ?>
30 30
 
31 31
 		</div><!-- #content -->
32 32
 	</div><!-- #primary -->
33 33
 
34
-<?php get_sidebar( 'front' ); ?>
34
+<?php get_sidebar('front'); ?>
35 35
 <?php get_footer(); ?>
36 36
\ No newline at end of file
Please login to merge, or discard this patch.
src/wp-content/themes/twentytwelve/sidebar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,8 @@
 block discarded – undo
10 10
  */
11 11
 ?>
12 12
 
13
-	<?php if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
13
+	<?php if (is_active_sidebar('sidebar-1')) : ?>
14 14
 		<div id="secondary" class="widget-area" role="complementary">
15
-			<?php dynamic_sidebar( 'sidebar-1' ); ?>
15
+			<?php dynamic_sidebar('sidebar-1'); ?>
16 16
 		</div><!-- #secondary -->
17 17
 	<?php endif; ?>
18 18
\ No newline at end of file
Please login to merge, or discard this patch.