Completed
Push — master ( d488ab...6453e7 )
by Stephen
53:31
created
src/wp-cron.php 2 patches
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 
12 12
 ignore_user_abort(true);
13 13
 
14
-if ( !empty($_POST) || defined('DOING_AJAX') || defined('DOING_CRON') )
14
+if ( ! empty($_POST) || defined('DOING_AJAX') || defined('DOING_CRON'))
15 15
 	die();
16 16
 
17 17
 /**
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
  */
22 22
 define('DOING_CRON', true);
23 23
 
24
-if ( !defined('ABSPATH') ) {
24
+if ( ! defined('ABSPATH')) {
25 25
 	/** Set up WordPress environment */
26
-	require_once( dirname( __FILE__ ) . '/wp-load.php' );
26
+	require_once(dirname(__FILE__).'/wp-load.php');
27 27
 }
28 28
 
29 29
 /**
@@ -40,44 +40,44 @@  discard block
 block discarded – undo
40 40
 	global $wpdb;
41 41
 
42 42
 	$value = 0;
43
-	if ( wp_using_ext_object_cache() ) {
43
+	if (wp_using_ext_object_cache()) {
44 44
 		/*
45 45
 		 * Skip local cache and force re-fetch of doing_cron transient
46 46
 		 * in case another process updated the cache.
47 47
 		 */
48
-		$value = wp_cache_get( 'doing_cron', 'transient', true );
48
+		$value = wp_cache_get('doing_cron', 'transient', true);
49 49
 	} else {
50
-		$row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", '_transient_doing_cron' ) );
51
-		if ( is_object( $row ) )
50
+		$row = $wpdb->get_row($wpdb->prepare("SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", '_transient_doing_cron'));
51
+		if (is_object($row))
52 52
 			$value = $row->option_value;
53 53
 	}
54 54
 
55 55
 	return $value;
56 56
 }
57 57
 
58
-if ( false === $crons = _get_cron_array() )
58
+if (false === $crons = _get_cron_array())
59 59
 	die();
60 60
 
61
-$keys = array_keys( $crons );
62
-$gmt_time = microtime( true );
61
+$keys = array_keys($crons);
62
+$gmt_time = microtime(true);
63 63
 
64
-if ( isset($keys[0]) && $keys[0] > $gmt_time )
64
+if (isset($keys[0]) && $keys[0] > $gmt_time)
65 65
 	die();
66 66
 
67 67
 
68 68
 // The cron lock: a unix timestamp from when the cron was spawned.
69
-$doing_cron_transient = get_transient( 'doing_cron' );
69
+$doing_cron_transient = get_transient('doing_cron');
70 70
 
71 71
 // Use global $doing_wp_cron lock otherwise use the GET lock. If no lock, trying grabbing a new lock.
72
-if ( empty( $doing_wp_cron ) ) {
73
-	if ( empty( $_GET[ 'doing_wp_cron' ] ) ) {
72
+if (empty($doing_wp_cron)) {
73
+	if (empty($_GET['doing_wp_cron'])) {
74 74
 		// Called from external script/job. Try setting a lock.
75
-		if ( $doing_cron_transient && ( $doing_cron_transient + WP_CRON_LOCK_TIMEOUT > $gmt_time ) )
75
+		if ($doing_cron_transient && ($doing_cron_transient + WP_CRON_LOCK_TIMEOUT > $gmt_time))
76 76
 			return;
77
-		$doing_cron_transient = $doing_wp_cron = sprintf( '%.22F', microtime( true ) );
78
-		set_transient( 'doing_cron', $doing_wp_cron );
77
+		$doing_cron_transient = $doing_wp_cron = sprintf('%.22F', microtime(true));
78
+		set_transient('doing_cron', $doing_wp_cron);
79 79
 	} else {
80
-		$doing_wp_cron = $_GET[ 'doing_wp_cron' ];
80
+		$doing_wp_cron = $_GET['doing_wp_cron'];
81 81
 	}
82 82
 }
83 83
 
@@ -85,25 +85,25 @@  discard block
 block discarded – undo
85 85
  * The cron lock (a unix timestamp set when the cron was spawned),
86 86
  * must match $doing_wp_cron (the "key").
87 87
  */
88
-if ( $doing_cron_transient != $doing_wp_cron )
88
+if ($doing_cron_transient != $doing_wp_cron)
89 89
 	return;
90 90
 
91
-foreach ( $crons as $timestamp => $cronhooks ) {
92
-	if ( $timestamp > $gmt_time )
91
+foreach ($crons as $timestamp => $cronhooks) {
92
+	if ($timestamp > $gmt_time)
93 93
 		break;
94 94
 
95
-	foreach ( $cronhooks as $hook => $keys ) {
95
+	foreach ($cronhooks as $hook => $keys) {
96 96
 
97
-		foreach ( $keys as $k => $v ) {
97
+		foreach ($keys as $k => $v) {
98 98
 
99 99
 			$schedule = $v['schedule'];
100 100
 
101
-			if ( $schedule != false ) {
101
+			if ($schedule != false) {
102 102
 				$new_args = array($timestamp, $schedule, $hook, $v['args']);
103 103
 				call_user_func_array('wp_reschedule_event', $new_args);
104 104
 			}
105 105
 
106
-			wp_unschedule_event( $timestamp, $hook, $v['args'] );
106
+			wp_unschedule_event($timestamp, $hook, $v['args']);
107 107
 
108 108
 			/**
109 109
 			 * Fires scheduled events.
@@ -114,16 +114,16 @@  discard block
 block discarded – undo
114 114
 			 * @param string $hook Name of the hook that was scheduled to be fired.
115 115
 			 * @param array  $args The arguments to be passed to the hook.
116 116
 			 */
117
- 			do_action_ref_array( $hook, $v['args'] );
117
+ 			do_action_ref_array($hook, $v['args']);
118 118
 
119 119
 			// If the hook ran too long and another cron process stole the lock, quit.
120
-			if ( _get_cron_lock() != $doing_wp_cron )
120
+			if (_get_cron_lock() != $doing_wp_cron)
121 121
 				return;
122 122
 		}
123 123
 	}
124 124
 }
125 125
 
126
-if ( _get_cron_lock() == $doing_wp_cron )
127
-	delete_transient( 'doing_cron' );
126
+if (_get_cron_lock() == $doing_wp_cron)
127
+	delete_transient('doing_cron');
128 128
 
129 129
 die();
Please login to merge, or discard this patch.
Braces   +22 added lines, -13 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@  discard block
 block discarded – undo
11 11
 
12 12
 ignore_user_abort(true);
13 13
 
14
-if ( !empty($_POST) || defined('DOING_AJAX') || defined('DOING_CRON') )
14
+if ( !empty($_POST) || defined('DOING_AJAX') || defined('DOING_CRON') ) {
15 15
 	die();
16
+}
16 17
 
17 18
 /**
18 19
  * Tell WordPress we are doing the CRON task.
@@ -48,21 +49,24 @@  discard block
 block discarded – undo
48 49
 		$value = wp_cache_get( 'doing_cron', 'transient', true );
49 50
 	} else {
50 51
 		$row = $wpdb->get_row( $wpdb->prepare( "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1", '_transient_doing_cron' ) );
51
-		if ( is_object( $row ) )
52
-			$value = $row->option_value;
52
+		if ( is_object( $row ) ) {
53
+					$value = $row->option_value;
54
+		}
53 55
 	}
54 56
 
55 57
 	return $value;
56 58
 }
57 59
 
58
-if ( false === $crons = _get_cron_array() )
60
+if ( false === $crons = _get_cron_array() ) {
59 61
 	die();
62
+}
60 63
 
61 64
 $keys = array_keys( $crons );
62 65
 $gmt_time = microtime( true );
63 66
 
64
-if ( isset($keys[0]) && $keys[0] > $gmt_time )
67
+if ( isset($keys[0]) && $keys[0] > $gmt_time ) {
65 68
 	die();
69
+}
66 70
 
67 71
 
68 72
 // The cron lock: a unix timestamp from when the cron was spawned.
@@ -72,8 +76,9 @@  discard block
 block discarded – undo
72 76
 if ( empty( $doing_wp_cron ) ) {
73 77
 	if ( empty( $_GET[ 'doing_wp_cron' ] ) ) {
74 78
 		// Called from external script/job. Try setting a lock.
75
-		if ( $doing_cron_transient && ( $doing_cron_transient + WP_CRON_LOCK_TIMEOUT > $gmt_time ) )
76
-			return;
79
+		if ( $doing_cron_transient && ( $doing_cron_transient + WP_CRON_LOCK_TIMEOUT > $gmt_time ) ) {
80
+					return;
81
+		}
77 82
 		$doing_cron_transient = $doing_wp_cron = sprintf( '%.22F', microtime( true ) );
78 83
 		set_transient( 'doing_cron', $doing_wp_cron );
79 84
 	} else {
@@ -85,12 +90,14 @@  discard block
 block discarded – undo
85 90
  * The cron lock (a unix timestamp set when the cron was spawned),
86 91
  * must match $doing_wp_cron (the "key").
87 92
  */
88
-if ( $doing_cron_transient != $doing_wp_cron )
93
+if ( $doing_cron_transient != $doing_wp_cron ) {
89 94
 	return;
95
+}
90 96
 
91 97
 foreach ( $crons as $timestamp => $cronhooks ) {
92
-	if ( $timestamp > $gmt_time )
93
-		break;
98
+	if ( $timestamp > $gmt_time ) {
99
+			break;
100
+	}
94 101
 
95 102
 	foreach ( $cronhooks as $hook => $keys ) {
96 103
 
@@ -117,13 +124,15 @@  discard block
 block discarded – undo
117 124
  			do_action_ref_array( $hook, $v['args'] );
118 125
 
119 126
 			// If the hook ran too long and another cron process stole the lock, quit.
120
-			if ( _get_cron_lock() != $doing_wp_cron )
121
-				return;
127
+			if ( _get_cron_lock() != $doing_wp_cron ) {
128
+							return;
129
+			}
122 130
 		}
123 131
 	}
124 132
 }
125 133
 
126
-if ( _get_cron_lock() == $doing_wp_cron )
134
+if ( _get_cron_lock() == $doing_wp_cron ) {
127 135
 	delete_transient( 'doing_cron' );
136
+}
128 137
 
129 138
 die();
Please login to merge, or discard this patch.
src/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,4 +14,4 @@
 block discarded – undo
14 14
 define('WP_USE_THEMES', true);
15 15
 
16 16
 /** Loads the WordPress Environment and Template */
17
-require( dirname( __FILE__ ) . '/wp-blog-header.php' );
17
+require(dirname(__FILE__).'/wp-blog-header.php');
Please login to merge, or discard this patch.
src/wp-load.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
  */
20 20
 
21 21
 /** Define ABSPATH as this file's directory */
22
-define( 'ABSPATH', dirname(__FILE__) . '/' );
22
+define('ABSPATH', dirname(__FILE__).'/');
23 23
 
24
-error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );
24
+error_reporting(E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR);
25 25
 
26 26
 /*
27 27
  * If wp-config.php exists in the WordPress root, or if it exists in the root and wp-settings.php
@@ -31,51 +31,51 @@  discard block
 block discarded – undo
31 31
  *
32 32
  * If neither set of conditions is true, initiate loading the setup process.
33 33
  */
34
-if ( file_exists( ABSPATH . 'wp-config.php') ) {
34
+if (file_exists(ABSPATH.'wp-config.php')) {
35 35
 
36 36
 	/** The config file resides in ABSPATH */
37
-	require_once( ABSPATH . 'wp-config.php' );
37
+	require_once(ABSPATH.'wp-config.php');
38 38
 
39
-} elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) {
39
+} elseif (file_exists(dirname(ABSPATH).'/wp-config.php') && ! file_exists(dirname(ABSPATH).'/wp-settings.php')) {
40 40
 
41 41
 	/** The config file resides one level above ABSPATH but is not part of another install */
42
-	require_once( dirname(ABSPATH) . '/wp-config.php' );
42
+	require_once(dirname(ABSPATH).'/wp-config.php');
43 43
 
44 44
 } else {
45 45
 
46 46
 	// A config file doesn't exist
47 47
 
48
-	define( 'WPINC', 'wp-includes' );
49
-	require_once( ABSPATH . WPINC . '/load.php' );
48
+	define('WPINC', 'wp-includes');
49
+	require_once(ABSPATH.WPINC.'/load.php');
50 50
 
51 51
 	// Standardize $_SERVER variables across setups.
52 52
 	wp_fix_server_vars();
53 53
 
54
-	require_once( ABSPATH . WPINC . '/functions.php' );
54
+	require_once(ABSPATH.WPINC.'/functions.php');
55 55
 
56
-	$path = wp_guess_url() . '/wp-admin/setup-config.php';
56
+	$path = wp_guess_url().'/wp-admin/setup-config.php';
57 57
 
58 58
 	/*
59 59
 	 * We're going to redirect to setup-config.php. While this shouldn't result
60 60
 	 * in an infinite loop, that's a silly thing to assume, don't you think? If
61 61
 	 * we're traveling in circles, our last-ditch effort is "Need more help?"
62 62
 	 */
63
-	if ( false === strpos( $_SERVER['REQUEST_URI'], 'setup-config' ) ) {
64
-		header( 'Location: ' . $path );
63
+	if (false === strpos($_SERVER['REQUEST_URI'], 'setup-config')) {
64
+		header('Location: '.$path);
65 65
 		exit;
66 66
 	}
67 67
 
68
-	define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
69
-	require_once( ABSPATH . WPINC . '/version.php' );
68
+	define('WP_CONTENT_DIR', ABSPATH.'wp-content');
69
+	require_once(ABSPATH.WPINC.'/version.php');
70 70
 
71 71
 	wp_check_php_mysql_versions();
72 72
 	wp_load_translations_early();
73 73
 
74 74
 	// Die with an error message
75
-	$die  = __( "There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started." ) . '</p>';
76
-	$die .= '<p>' . __( "Need more help? <a href='https://codex.wordpress.org/Editing_wp-config.php'>We got it</a>." ) . '</p>';
77
-	$die .= '<p>' . __( "You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file." ) . '</p>';
78
-	$die .= '<p><a href="' . $path . '" class="button button-large">' . __( "Create a Configuration File" ) . '</a>';
75
+	$die  = __("There doesn't seem to be a <code>wp-config.php</code> file. I need this before we can get started.").'</p>';
76
+	$die .= '<p>'.__("Need more help? <a href='https://codex.wordpress.org/Editing_wp-config.php'>We got it</a>.").'</p>';
77
+	$die .= '<p>'.__("You can create a <code>wp-config.php</code> file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.").'</p>';
78
+	$die .= '<p><a href="'.$path.'" class="button button-large">'.__("Create a Configuration File").'</a>';
79 79
 
80
-	wp_die( $die, __( 'WordPress &rsaquo; Error' ) );
80
+	wp_die($die, __('WordPress &rsaquo; Error'));
81 81
 }
Please login to merge, or discard this patch.
src/wp-activate.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Confirms that the activation key that is sent in an email after a user signs
4
- * up for a new blog matches the key for that user and then displays confirmation.
5
- *
6
- * @package WordPress
7
- */
3
+	 * Confirms that the activation key that is sent in an email after a user signs
4
+	 * up for a new blog matches the key for that user and then displays confirmation.
5
+	 *
6
+	 * @package WordPress
7
+	 */
8 8
 
9 9
 define( 'WP_INSTALLING', true );
10 10
 
@@ -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
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 		$result = wpmu_activate_signup( $key );
88 88
 		if ( is_wp_error($result) ) {
89 89
 			if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
90
-			    $signup = $result->get_error_data();
90
+				$signup = $result->get_error_data();
91 91
 				?>
92 92
 				<h2><?php _e('Your account is now active!'); ?></h2>
93 93
 				<?php
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 				?>
103 103
 				<h2><?php _e('An error occurred during the activation'); ?></h2>
104 104
 				<?php
105
-			    echo '<p>'.$result->get_error_message().'</p>';
105
+				echo '<p>'.$result->get_error_message().'</p>';
106 106
 			}
107 107
 		} else {
108 108
 			$url = isset( $result['blog_id'] ) ? get_blogaddress_by_id( (int) $result['blog_id'] ) : '';
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 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( site_url( '/wp-login.php?action=register' ) );
16
+if ( ! is_multisite()) {
17
+	wp_redirect(site_url('/wp-login.php?action=register'));
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,13 +62,13 @@  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 67
 get_header();
68 68
 ?>
69 69
 
70 70
 <div id="content" class="widecolumn">
71
-	<?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
71
+	<?php if (empty($_GET['key']) && empty($_POST['key'])) { ?>
72 72
 
73 73
 		<h2><?php _e('Activation Key Required') ?></h2>
74 74
 		<form name="activateform" id="activateform" method="post" action="<?php echo network_site_url('wp-activate.php'); ?>">
@@ -83,19 +83,19 @@  discard block
 block discarded – undo
83 83
 
84 84
 	<?php } else {
85 85
 
86
-		$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
87
-		$result = wpmu_activate_signup( $key );
88
-		if ( is_wp_error($result) ) {
89
-			if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
86
+		$key = ! empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
87
+		$result = wpmu_activate_signup($key);
88
+		if (is_wp_error($result)) {
89
+			if ('already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code()) {
90 90
 			    $signup = $result->get_error_data();
91 91
 				?>
92 92
 				<h2><?php _e('Your account is now active!'); ?></h2>
93 93
 				<?php
94 94
 				echo '<p class="lead-in">';
95
-				if ( $signup->domain . $signup->path == '' ) {
96
-					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() );
95
+				if ($signup->domain.$signup->path == '') {
96
+					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());
97 97
 				} else {
98
-					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() );
98
+					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 99
 				}
100 100
 				echo '</p>';
101 101
 			} else {
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 			    echo '<p>'.$result->get_error_message().'</p>';
106 106
 			}
107 107
 		} else {
108
-			$url = isset( $result['blog_id'] ) ? get_blogaddress_by_id( (int) $result['blog_id'] ) : '';
109
-			$user = get_userdata( (int) $result['user_id'] );
108
+			$url = isset($result['blog_id']) ? get_blogaddress_by_id((int) $result['blog_id']) : '';
109
+			$user = get_userdata((int) $result['user_id']);
110 110
 			?>
111 111
 			<h2><?php _e('Your account is now active!'); ?></h2>
112 112
 
@@ -115,10 +115,10 @@  discard block
 block discarded – undo
115 115
 				<p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $result['password']; ?></p>
116 116
 			</div>
117 117
 
118
-			<?php if ( $url && $url != network_home_url( '', 'http' ) ) : ?>
119
-				<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>
118
+			<?php if ($url && $url != network_home_url('', 'http')) : ?>
119
+				<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 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
+				<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>
122 122
 			<?php endif;
123 123
 		}
124 124
 	}
Please login to merge, or discard this patch.
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.
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.
Spacing   +110 added lines, -110 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;
30
-require( ABSPATH . WPINC . '/version.php' );
30
+require(ABSPATH.WPINC.'/version.php');
31 31
 
32 32
 // Set initial default constants including WP_MEMORY_LIMIT, WP_MAX_MEMORY_LIMIT, WP_DEBUG, SCRIPT_DEBUG, WP_CONTENT_DIR and WP_CACHE.
33 33
 wp_initial_constants();
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
 wp_check_php_mysql_versions();
37 37
 
38 38
 // Disable magic quotes at runtime. Magic quotes are added using wpdb later in wp-settings.php.
39
-@ini_set( 'magic_quotes_runtime', 0 );
40
-@ini_set( 'magic_quotes_sybase',  0 );
39
+@ini_set('magic_quotes_runtime', 0);
40
+@ini_set('magic_quotes_sybase', 0);
41 41
 
42 42
 // WordPress calculates offsets from UTC.
43
-date_default_timezone_set( 'UTC' );
43
+date_default_timezone_set('UTC');
44 44
 
45 45
 // Turn register_globals off.
46 46
 wp_unregister_GLOBALS();
@@ -61,19 +61,19 @@  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 )
65
-	WP_DEBUG ? include( WP_CONTENT_DIR . '/advanced-cache.php' ) : @include( WP_CONTENT_DIR . '/advanced-cache.php' );
64
+if (WP_CACHE)
65
+	WP_DEBUG ? include(WP_CONTENT_DIR.'/advanced-cache.php') : @include(WP_CONTENT_DIR.'/advanced-cache.php');
66 66
 
67 67
 // Define WP_LANG_DIR if not set.
68 68
 wp_set_lang_dir();
69 69
 
70 70
 // Load early WordPress files.
71
-require( ABSPATH . WPINC . '/compat.php' );
72
-require( ABSPATH . WPINC . '/functions.php' );
73
-require( ABSPATH . WPINC . '/class-wp.php' );
74
-require( ABSPATH . WPINC . '/class-wp-error.php' );
75
-require( ABSPATH . WPINC . '/plugin.php' );
76
-require( ABSPATH . WPINC . '/pomo/mo.php' );
71
+require(ABSPATH.WPINC.'/compat.php');
72
+require(ABSPATH.WPINC.'/functions.php');
73
+require(ABSPATH.WPINC.'/class-wp.php');
74
+require(ABSPATH.WPINC.'/class-wp-error.php');
75
+require(ABSPATH.WPINC.'/plugin.php');
76
+require(ABSPATH.WPINC.'/pomo/mo.php');
77 77
 
78 78
 // Include the wpdb class and, if present, a db.php database drop-in.
79 79
 require_wp_db();
@@ -86,79 +86,79 @@  discard block
 block discarded – undo
86 86
 wp_start_object_cache();
87 87
 
88 88
 // Attach the default filters.
89
-require( ABSPATH . WPINC . '/default-filters.php' );
89
+require(ABSPATH.WPINC.'/default-filters.php');
90 90
 
91 91
 // Initialize multisite if enabled.
92
-if ( is_multisite() ) {
93
-	require( ABSPATH . WPINC . '/ms-blogs.php' );
94
-	require( ABSPATH . WPINC . '/ms-settings.php' );
95
-} elseif ( ! defined( 'MULTISITE' ) ) {
96
-	define( 'MULTISITE', false );
92
+if (is_multisite()) {
93
+	require(ABSPATH.WPINC.'/ms-blogs.php');
94
+	require(ABSPATH.WPINC.'/ms-settings.php');
95
+} elseif ( ! defined('MULTISITE')) {
96
+	define('MULTISITE', false);
97 97
 }
98 98
 
99
-register_shutdown_function( 'shutdown_action_hook' );
99
+register_shutdown_function('shutdown_action_hook');
100 100
 
101 101
 // Stop most of WordPress from being loaded if we just want the basics.
102
-if ( SHORTINIT )
102
+if (SHORTINIT)
103 103
 	return false;
104 104
 
105 105
 // Load the L10n library.
106
-require_once( ABSPATH . WPINC . '/l10n.php' );
106
+require_once(ABSPATH.WPINC.'/l10n.php');
107 107
 
108 108
 // Run the installer if WordPress is not installed.
109 109
 wp_not_installed();
110 110
 
111 111
 // Load most of WordPress.
112
-require( ABSPATH . WPINC . '/class-wp-walker.php' );
113
-require( ABSPATH . WPINC . '/class-wp-ajax-response.php' );
114
-require( ABSPATH . WPINC . '/formatting.php' );
115
-require( ABSPATH . WPINC . '/capabilities.php' );
116
-require( ABSPATH . WPINC . '/query.php' );
117
-require( ABSPATH . WPINC . '/date.php' );
118
-require( ABSPATH . WPINC . '/theme.php' );
119
-require( ABSPATH . WPINC . '/class-wp-theme.php' );
120
-require( ABSPATH . WPINC . '/template.php' );
121
-require( ABSPATH . WPINC . '/user.php' );
122
-require( ABSPATH . WPINC . '/session.php' );
123
-require( ABSPATH . WPINC . '/meta.php' );
124
-require( ABSPATH . WPINC . '/general-template.php' );
125
-require( ABSPATH . WPINC . '/link-template.php' );
126
-require( ABSPATH . WPINC . '/author-template.php' );
127
-require( ABSPATH . WPINC . '/post.php' );
128
-require( ABSPATH . WPINC . '/post-template.php' );
129
-require( ABSPATH . WPINC . '/revision.php' );
130
-require( ABSPATH . WPINC . '/post-formats.php' );
131
-require( ABSPATH . WPINC . '/post-thumbnail-template.php' );
132
-require( ABSPATH . WPINC . '/category.php' );
133
-require( ABSPATH . WPINC . '/category-template.php' );
134
-require( ABSPATH . WPINC . '/comment.php' );
135
-require( ABSPATH . WPINC . '/comment-template.php' );
136
-require( ABSPATH . WPINC . '/rewrite.php' );
137
-require( ABSPATH . WPINC . '/feed.php' );
138
-require( ABSPATH . WPINC . '/bookmark.php' );
139
-require( ABSPATH . WPINC . '/bookmark-template.php' );
140
-require( ABSPATH . WPINC . '/kses.php' );
141
-require( ABSPATH . WPINC . '/cron.php' );
142
-require( ABSPATH . WPINC . '/deprecated.php' );
143
-require( ABSPATH . WPINC . '/script-loader.php' );
144
-require( ABSPATH . WPINC . '/taxonomy.php' );
145
-require( ABSPATH . WPINC . '/update.php' );
146
-require( ABSPATH . WPINC . '/canonical.php' );
147
-require( ABSPATH . WPINC . '/shortcodes.php' );
148
-require( ABSPATH . WPINC . '/class-wp-embed.php' );
149
-require( ABSPATH . WPINC . '/media.php' );
150
-require( ABSPATH . WPINC . '/http.php' );
151
-require( ABSPATH . WPINC . '/class-http.php' );
152
-require( ABSPATH . WPINC . '/widgets.php' );
153
-require( ABSPATH . WPINC . '/nav-menu.php' );
154
-require( ABSPATH . WPINC . '/nav-menu-template.php' );
155
-require( ABSPATH . WPINC . '/admin-bar.php' );
112
+require(ABSPATH.WPINC.'/class-wp-walker.php');
113
+require(ABSPATH.WPINC.'/class-wp-ajax-response.php');
114
+require(ABSPATH.WPINC.'/formatting.php');
115
+require(ABSPATH.WPINC.'/capabilities.php');
116
+require(ABSPATH.WPINC.'/query.php');
117
+require(ABSPATH.WPINC.'/date.php');
118
+require(ABSPATH.WPINC.'/theme.php');
119
+require(ABSPATH.WPINC.'/class-wp-theme.php');
120
+require(ABSPATH.WPINC.'/template.php');
121
+require(ABSPATH.WPINC.'/user.php');
122
+require(ABSPATH.WPINC.'/session.php');
123
+require(ABSPATH.WPINC.'/meta.php');
124
+require(ABSPATH.WPINC.'/general-template.php');
125
+require(ABSPATH.WPINC.'/link-template.php');
126
+require(ABSPATH.WPINC.'/author-template.php');
127
+require(ABSPATH.WPINC.'/post.php');
128
+require(ABSPATH.WPINC.'/post-template.php');
129
+require(ABSPATH.WPINC.'/revision.php');
130
+require(ABSPATH.WPINC.'/post-formats.php');
131
+require(ABSPATH.WPINC.'/post-thumbnail-template.php');
132
+require(ABSPATH.WPINC.'/category.php');
133
+require(ABSPATH.WPINC.'/category-template.php');
134
+require(ABSPATH.WPINC.'/comment.php');
135
+require(ABSPATH.WPINC.'/comment-template.php');
136
+require(ABSPATH.WPINC.'/rewrite.php');
137
+require(ABSPATH.WPINC.'/feed.php');
138
+require(ABSPATH.WPINC.'/bookmark.php');
139
+require(ABSPATH.WPINC.'/bookmark-template.php');
140
+require(ABSPATH.WPINC.'/kses.php');
141
+require(ABSPATH.WPINC.'/cron.php');
142
+require(ABSPATH.WPINC.'/deprecated.php');
143
+require(ABSPATH.WPINC.'/script-loader.php');
144
+require(ABSPATH.WPINC.'/taxonomy.php');
145
+require(ABSPATH.WPINC.'/update.php');
146
+require(ABSPATH.WPINC.'/canonical.php');
147
+require(ABSPATH.WPINC.'/shortcodes.php');
148
+require(ABSPATH.WPINC.'/class-wp-embed.php');
149
+require(ABSPATH.WPINC.'/media.php');
150
+require(ABSPATH.WPINC.'/http.php');
151
+require(ABSPATH.WPINC.'/class-http.php');
152
+require(ABSPATH.WPINC.'/widgets.php');
153
+require(ABSPATH.WPINC.'/nav-menu.php');
154
+require(ABSPATH.WPINC.'/nav-menu-template.php');
155
+require(ABSPATH.WPINC.'/admin-bar.php');
156 156
 
157 157
 // Load multisite-specific files.
158
-if ( is_multisite() ) {
159
-	require( ABSPATH . WPINC . '/ms-functions.php' );
160
-	require( ABSPATH . WPINC . '/ms-default-filters.php' );
161
-	require( ABSPATH . WPINC . '/ms-deprecated.php' );
158
+if (is_multisite()) {
159
+	require(ABSPATH.WPINC.'/ms-functions.php');
160
+	require(ABSPATH.WPINC.'/ms-default-filters.php');
161
+	require(ABSPATH.WPINC.'/ms-deprecated.php');
162 162
 }
163 163
 
164 164
 // Define constants that rely on the API to obtain the default value.
@@ -168,18 +168,18 @@  discard block
 block discarded – undo
168 168
 $GLOBALS['wp_plugin_paths'] = array();
169 169
 
170 170
 // Load must-use plugins.
171
-foreach ( wp_get_mu_plugins() as $mu_plugin ) {
172
-	include_once( $mu_plugin );
171
+foreach (wp_get_mu_plugins() as $mu_plugin) {
172
+	include_once($mu_plugin);
173 173
 }
174
-unset( $mu_plugin );
174
+unset($mu_plugin);
175 175
 
176 176
 // Load network activated plugins.
177
-if ( is_multisite() ) {
178
-	foreach( wp_get_active_network_plugins() as $network_plugin ) {
179
-		wp_register_plugin_realpath( $network_plugin );
180
-		include_once( $network_plugin );
177
+if (is_multisite()) {
178
+	foreach (wp_get_active_network_plugins() as $network_plugin) {
179
+		wp_register_plugin_realpath($network_plugin);
180
+		include_once($network_plugin);
181 181
 	}
182
-	unset( $network_plugin );
182
+	unset($network_plugin);
183 183
 }
184 184
 
185 185
 /**
@@ -187,9 +187,9 @@  discard block
 block discarded – undo
187 187
  *
188 188
  * @since 2.8.0
189 189
  */
190
-do_action( 'muplugins_loaded' );
190
+do_action('muplugins_loaded');
191 191
 
192
-if ( is_multisite() )
192
+if (is_multisite())
193 193
 	ms_cookie_constants(  );
194 194
 
195 195
 // Define constants after multisite is loaded.
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 wp_ssl_constants();
200 200
 
201 201
 // Create common globals.
202
-require( ABSPATH . WPINC . '/vars.php' );
202
+require(ABSPATH.WPINC.'/vars.php');
203 203
 
204 204
 // Make taxonomies and posts available to plugins and themes.
205 205
 // @plugin authors: warning: these get registered again on the init hook.
@@ -207,24 +207,24 @@  discard block
 block discarded – undo
207 207
 create_initial_post_types();
208 208
 
209 209
 // Register the default theme directory root
210
-register_theme_directory( get_theme_root() );
210
+register_theme_directory(get_theme_root());
211 211
 
212 212
 // Load active plugins.
213
-foreach ( wp_get_active_and_valid_plugins() as $plugin ) {
214
-	wp_register_plugin_realpath( $plugin );
215
-	include_once( $plugin );
213
+foreach (wp_get_active_and_valid_plugins() as $plugin) {
214
+	wp_register_plugin_realpath($plugin);
215
+	include_once($plugin);
216 216
 }
217
-unset( $plugin );
217
+unset($plugin);
218 218
 
219 219
 // Load pluggable functions.
220
-require( ABSPATH . WPINC . '/pluggable.php' );
221
-require( ABSPATH . WPINC . '/pluggable-deprecated.php' );
220
+require(ABSPATH.WPINC.'/pluggable.php');
221
+require(ABSPATH.WPINC.'/pluggable-deprecated.php');
222 222
 
223 223
 // Set internal encoding.
224 224
 wp_set_internal_encoding();
225 225
 
226 226
 // Run wp_cache_postload() if object cache is enabled and the function exists.
227
-if ( WP_CACHE && function_exists( 'wp_cache_postload' ) )
227
+if (WP_CACHE && function_exists('wp_cache_postload'))
228 228
 	wp_cache_postload();
229 229
 
230 230
 /**
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
  *
235 235
  * @since 1.5.0
236 236
  */
237
-do_action( 'plugins_loaded' );
237
+do_action('plugins_loaded');
238 238
 
239 239
 // Define constants which affect functionality if not already defined.
240 240
 wp_functionality_constants();
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
  *
248 248
  * @since 2.0.11
249 249
  */
250
-do_action( 'sanitize_comment_cookies' );
250
+do_action('sanitize_comment_cookies');
251 251
 
252 252
 /**
253 253
  * WordPress Query object
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
  *
298 298
  * @since 2.6.0
299 299
  */
300
-do_action( 'setup_theme' );
300
+do_action('setup_theme');
301 301
 
302 302
 // Define the template related constants.
303 303
 wp_templating_constants(  );
@@ -306,13 +306,13 @@  discard block
 block discarded – undo
306 306
 load_default_textdomain();
307 307
 
308 308
 $locale = get_locale();
309
-$locale_file = WP_LANG_DIR . "/$locale.php";
310
-if ( ( 0 === validate_file( $locale ) ) && is_readable( $locale_file ) )
311
-	require( $locale_file );
312
-unset( $locale_file );
309
+$locale_file = WP_LANG_DIR."/$locale.php";
310
+if ((0 === validate_file($locale)) && is_readable($locale_file))
311
+	require($locale_file);
312
+unset($locale_file);
313 313
 
314 314
 // Pull in locale data after loading text domain.
315
-require_once( ABSPATH . WPINC . '/locale.php' );
315
+require_once(ABSPATH.WPINC.'/locale.php');
316 316
 
317 317
 /**
318 318
  * WordPress Locale object for loading locale domain date and various strings.
@@ -322,11 +322,11 @@  discard block
 block discarded – undo
322 322
 $GLOBALS['wp_locale'] = new WP_Locale();
323 323
 
324 324
 // Load the functions for the active theme, for both parent and child theme if applicable.
325
-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' );
325
+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 330
 }
331 331
 
332 332
 /**
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
  *
335 335
  * @since 3.0.0
336 336
  */
337
-do_action( 'after_setup_theme' );
337
+do_action('after_setup_theme');
338 338
 
339 339
 // Set up current user.
340 340
 $GLOBALS['wp']->init();
@@ -350,12 +350,12 @@  discard block
 block discarded – undo
350 350
  *
351 351
  * @since 1.5.0
352 352
  */
353
-do_action( 'init' );
353
+do_action('init');
354 354
 
355 355
 // Check site status
356
-if ( is_multisite() ) {
357
-	if ( true !== ( $file = ms_site_check() ) ) {
358
-		require( $file );
356
+if (is_multisite()) {
357
+	if (true !== ($file = ms_site_check())) {
358
+		require($file);
359 359
 		die();
360 360
 	}
361 361
 	unset($file);
@@ -371,4 +371,4 @@  discard block
 block discarded – undo
371 371
  *
372 372
  * @since 3.0.0
373 373
  */
374
-do_action( 'wp_loaded' );
374
+do_action('wp_loaded');
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.
src/wp-content/themes/twentytwelve/footer.php 1 patch
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.
src/wp-content/themes/twentytwelve/content-quote.php 1 patch
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.
src/wp-content/themes/twentytwelve/image.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 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.
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.
src/wp-content/themes/twentytwelve/sidebar-front.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 sidebar containing the front page widget areas
4
- *
5
- * If no active widgets are in either sidebar, hide them completely.
6
- *
7
- * @package WordPress
8
- * @subpackage Twenty_Twelve
9
- * @since Twenty Twelve 1.0
10
- */
3
+								 * The sidebar containing the front page widget areas
4
+								 *
5
+								 * If no active widgets are in either sidebar, hide them completely.
6
+								 *
7
+								 * @package WordPress
8
+								 * @subpackage Twenty_Twelve
9
+								 * @since Twenty Twelve 1.0
10
+								 */
11 11
 
12 12
 /*
13 13
  * The front page widget area is triggered if any of the areas
Please login to merge, or discard this patch.
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.