Completed
Push — master ( cde0c6...d99bf9 )
by Stephen
15:46
created
src/wp-includes/class-walker-category.php 2 patches
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 * @todo Decouple this
33 33
 	 * @var array
34 34
 	 */
35
-	public $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
35
+	public $db_fields = array('parent' => 'parent', 'id' => 'term_id');
36 36
 
37 37
 	/**
38 38
 	 * Starts the list before the elements are added.
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 	 * @param array  $args   An array of arguments. Will only append content if style argument value is 'list'.
47 47
 	 *                       @see wp_list_categories()
48 48
 	 */
49
-	public function start_lvl( &$output, $depth = 0, $args = array() ) {
50
-		if ( 'list' != $args['style'] )
49
+	public function start_lvl(&$output, $depth = 0, $args = array()) {
50
+		if ('list' != $args['style'])
51 51
 			return;
52 52
 
53 53
 		$indent = str_repeat("\t", $depth);
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 	 * @param array  $args   An array of arguments. Will only append content if style argument value is 'list'.
67 67
 	 *                       @wsee wp_list_categories()
68 68
 	 */
69
-	public function end_lvl( &$output, $depth = 0, $args = array() ) {
70
-		if ( 'list' != $args['style'] )
69
+	public function end_lvl(&$output, $depth = 0, $args = array()) {
70
+		if ('list' != $args['style'])
71 71
 			return;
72 72
 
73 73
 		$indent = str_repeat("\t", $depth);
@@ -87,21 +87,21 @@  discard block
 block discarded – undo
87 87
 	 * @param array  $args     An array of arguments. @see wp_list_categories()
88 88
 	 * @param int    $id       ID of the current category.
89 89
 	 */
90
-	public function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
90
+	public function start_el(&$output, $category, $depth = 0, $args = array(), $id = 0) {
91 91
 		/** This filter is documented in wp-includes/category-template.php */
92 92
 		$cat_name = apply_filters(
93 93
 			'list_cats',
94
-			esc_attr( $category->name ),
94
+			esc_attr($category->name),
95 95
 			$category
96 96
 		);
97 97
 
98 98
 		// Don't generate an element if the category name is empty.
99
-		if ( ! $cat_name ) {
99
+		if ( ! $cat_name) {
100 100
 			return;
101 101
 		}
102 102
 
103
-		$link = '<a href="' . esc_url( get_term_link( $category ) ) . '" ';
104
-		if ( $args['use_desc_for_title'] && ! empty( $category->description ) ) {
103
+		$link = '<a href="'.esc_url(get_term_link($category)).'" ';
104
+		if ($args['use_desc_for_title'] && ! empty($category->description)) {
105 105
 			/**
106 106
 			 * Filter the category description for display.
107 107
 			 *
@@ -110,72 +110,72 @@  discard block
 block discarded – undo
110 110
 			 * @param string $description Category description.
111 111
 			 * @param object $category    Category object.
112 112
 			 */
113
-			$link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"';
113
+			$link .= 'title="'.esc_attr(strip_tags(apply_filters('category_description', $category->description, $category))).'"';
114 114
 		}
115 115
 
116 116
 		$link .= '>';
117
-		$link .= $cat_name . '</a>';
117
+		$link .= $cat_name.'</a>';
118 118
 
119
-		if ( ! empty( $args['feed_image'] ) || ! empty( $args['feed'] ) ) {
119
+		if ( ! empty($args['feed_image']) || ! empty($args['feed'])) {
120 120
 			$link .= ' ';
121 121
 
122
-			if ( empty( $args['feed_image'] ) ) {
122
+			if (empty($args['feed_image'])) {
123 123
 				$link .= '(';
124 124
 			}
125 125
 
126
-			$link .= '<a href="' . esc_url( get_term_feed_link( $category->term_id, $category->taxonomy, $args['feed_type'] ) ) . '"';
126
+			$link .= '<a href="'.esc_url(get_term_feed_link($category->term_id, $category->taxonomy, $args['feed_type'])).'"';
127 127
 
128
-			if ( empty( $args['feed'] ) ) {
129
-				$alt = ' alt="' . sprintf(__( 'Feed for all posts filed under %s' ), $cat_name ) . '"';
128
+			if (empty($args['feed'])) {
129
+				$alt = ' alt="'.sprintf(__('Feed for all posts filed under %s'), $cat_name).'"';
130 130
 			} else {
131
-				$alt = ' alt="' . $args['feed'] . '"';
131
+				$alt = ' alt="'.$args['feed'].'"';
132 132
 				$name = $args['feed'];
133
-				$link .= empty( $args['title'] ) ? '' : $args['title'];
133
+				$link .= empty($args['title']) ? '' : $args['title'];
134 134
 			}
135 135
 
136 136
 			$link .= '>';
137 137
 
138
-			if ( empty( $args['feed_image'] ) ) {
138
+			if (empty($args['feed_image'])) {
139 139
 				$link .= $name;
140 140
 			} else {
141
-				$link .= "<img src='" . $args['feed_image'] . "'$alt" . ' />';
141
+				$link .= "<img src='".$args['feed_image']."'$alt".' />';
142 142
 			}
143 143
 			$link .= '</a>';
144 144
 
145
-			if ( empty( $args['feed_image'] ) ) {
145
+			if (empty($args['feed_image'])) {
146 146
 				$link .= ')';
147 147
 			}
148 148
 		}
149 149
 
150
-		if ( ! empty( $args['show_count'] ) ) {
151
-			$link .= ' (' . number_format_i18n( $category->count ) . ')';
150
+		if ( ! empty($args['show_count'])) {
151
+			$link .= ' ('.number_format_i18n($category->count).')';
152 152
 		}
153
-		if ( 'list' == $args['style'] ) {
153
+		if ('list' == $args['style']) {
154 154
 			$output .= "\t<li";
155 155
 			$css_classes = array(
156 156
 				'cat-item',
157
-				'cat-item-' . $category->term_id,
157
+				'cat-item-'.$category->term_id,
158 158
 			);
159 159
 
160
-			if ( ! empty( $args['current_category'] ) ) {
160
+			if ( ! empty($args['current_category'])) {
161 161
 				// 'current_category' can be an array, so we use `get_terms()`.
162
-				$_current_terms = get_terms( $category->taxonomy, array(
162
+				$_current_terms = get_terms($category->taxonomy, array(
163 163
 					'include' => $args['current_category'],
164 164
 					'hide_empty' => false,
165
-				) );
165
+				));
166 166
 
167
-				foreach ( $_current_terms as $_current_term ) {
168
-					if ( $category->term_id == $_current_term->term_id ) {
167
+				foreach ($_current_terms as $_current_term) {
168
+					if ($category->term_id == $_current_term->term_id) {
169 169
 						$css_classes[] = 'current-cat';
170
-					} elseif ( $category->term_id == $_current_term->parent ) {
170
+					} elseif ($category->term_id == $_current_term->parent) {
171 171
 						$css_classes[] = 'current-cat-parent';
172 172
 					}
173
-					while ( $_current_term->parent ) {
174
-						if ( $category->term_id == $_current_term->parent ) {
175
-							$css_classes[] =  'current-cat-ancestor';
173
+					while ($_current_term->parent) {
174
+						if ($category->term_id == $_current_term->parent) {
175
+							$css_classes[] = 'current-cat-ancestor';
176 176
 							break;
177 177
 						}
178
-						$_current_term = get_term( $_current_term->parent, $category->taxonomy );
178
+						$_current_term = get_term($_current_term->parent, $category->taxonomy);
179 179
 					}
180 180
 				}
181 181
 			}
@@ -192,12 +192,12 @@  discard block
 block discarded – undo
192 192
 			 * @param int    $depth       Depth of page, used for padding.
193 193
 			 * @param array  $args        An array of wp_list_categories() arguments.
194 194
 			 */
195
-			$css_classes = implode( ' ', apply_filters( 'category_css_class', $css_classes, $category, $depth, $args ) );
195
+			$css_classes = implode(' ', apply_filters('category_css_class', $css_classes, $category, $depth, $args));
196 196
 
197
-			$output .=  ' class="' . $css_classes . '"';
197
+			$output .= ' class="'.$css_classes.'"';
198 198
 			$output .= ">$link\n";
199
-		} elseif ( isset( $args['separator'] ) ) {
200
-			$output .= "\t$link" . $args['separator'] . "\n";
199
+		} elseif (isset($args['separator'])) {
200
+			$output .= "\t$link".$args['separator']."\n";
201 201
 		} else {
202 202
 			$output .= "\t$link<br />\n";
203 203
 		}
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
 	 * @param int    $depth  Depth of category. Not used.
216 216
 	 * @param array  $args   An array of arguments. Only uses 'list' for whether should append to output. @see wp_list_categories()
217 217
 	 */
218
-	public function end_el( &$output, $page, $depth = 0, $args = array() ) {
219
-		if ( 'list' != $args['style'] )
218
+	public function end_el(&$output, $page, $depth = 0, $args = array()) {
219
+		if ('list' != $args['style'])
220 220
 			return;
221 221
 
222 222
 		$output .= "</li>\n";
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@  discard block
 block discarded – undo
47 47
 	 *                       @see wp_list_categories()
48 48
 	 */
49 49
 	public function start_lvl( &$output, $depth = 0, $args = array() ) {
50
-		if ( 'list' != $args['style'] )
51
-			return;
50
+		if ( 'list' != $args['style'] ) {
51
+					return;
52
+		}
52 53
 
53 54
 		$indent = str_repeat("\t", $depth);
54 55
 		$output .= "$indent<ul class='children'>\n";
@@ -67,8 +68,9 @@  discard block
 block discarded – undo
67 68
 	 *                       @wsee wp_list_categories()
68 69
 	 */
69 70
 	public function end_lvl( &$output, $depth = 0, $args = array() ) {
70
-		if ( 'list' != $args['style'] )
71
-			return;
71
+		if ( 'list' != $args['style'] ) {
72
+					return;
73
+		}
72 74
 
73 75
 		$indent = str_repeat("\t", $depth);
74 76
 		$output .= "$indent</ul>\n";
@@ -216,8 +218,9 @@  discard block
 block discarded – undo
216 218
 	 * @param array  $args   An array of arguments. Only uses 'list' for whether should append to output. @see wp_list_categories()
217 219
 	 */
218 220
 	public function end_el( &$output, $page, $depth = 0, $args = array() ) {
219
-		if ( 'list' != $args['style'] )
220
-			return;
221
+		if ( 'list' != $args['style'] ) {
222
+					return;
223
+		}
221 224
 
222 225
 		$output .= "</li>\n";
223 226
 	}
Please login to merge, or discard this patch.
src/wp-includes/shortcodes.php 3 patches
Braces   +25 added lines, -20 removed lines patch added patch discarded remove patch
@@ -170,8 +170,9 @@  discard block
 block discarded – undo
170 170
 
171 171
 	if ( shortcode_exists( $tag ) ) {
172 172
 		preg_match_all( '/' . get_shortcode_regex() . '/', $content, $matches, PREG_SET_ORDER );
173
-		if ( empty( $matches ) )
174
-			return false;
173
+		if ( empty( $matches ) ) {
174
+					return false;
175
+		}
175 176
 
176 177
 		foreach ( $matches as $shortcode ) {
177 178
 			if ( $tag === $shortcode[2] ) {
@@ -206,8 +207,9 @@  discard block
 block discarded – undo
206 207
 		return $content;
207 208
 	}
208 209
 
209
-	if (empty($shortcode_tags) || !is_array($shortcode_tags))
210
-		return $content;
210
+	if (empty($shortcode_tags) || !is_array($shortcode_tags)) {
211
+			return $content;
212
+	}
211 213
 
212 214
 	// Find all registered tag names in $content.
213 215
 	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
@@ -484,16 +486,17 @@  discard block
 block discarded – undo
484 486
 	$text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);
485 487
 	if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) {
486 488
 		foreach ($match as $m) {
487
-			if (!empty($m[1]))
488
-				$atts[strtolower($m[1])] = stripcslashes($m[2]);
489
-			elseif (!empty($m[3]))
490
-				$atts[strtolower($m[3])] = stripcslashes($m[4]);
491
-			elseif (!empty($m[5]))
492
-				$atts[strtolower($m[5])] = stripcslashes($m[6]);
493
-			elseif (isset($m[7]) && strlen($m[7]))
494
-				$atts[] = stripcslashes($m[7]);
495
-			elseif (isset($m[8]))
496
-				$atts[] = stripcslashes($m[8]);
489
+			if (!empty($m[1])) {
490
+							$atts[strtolower($m[1])] = stripcslashes($m[2]);
491
+			} elseif (!empty($m[3])) {
492
+							$atts[strtolower($m[3])] = stripcslashes($m[4]);
493
+			} elseif (!empty($m[5])) {
494
+							$atts[strtolower($m[5])] = stripcslashes($m[6]);
495
+			} elseif (isset($m[7]) && strlen($m[7])) {
496
+							$atts[] = stripcslashes($m[7]);
497
+			} elseif (isset($m[8])) {
498
+							$atts[] = stripcslashes($m[8]);
499
+			}
497 500
 		}
498 501
 
499 502
 		// Reject any unclosed HTML elements
@@ -531,10 +534,11 @@  discard block
 block discarded – undo
531 534
 	$atts = (array)$atts;
532 535
 	$out = array();
533 536
 	foreach ($pairs as $name => $default) {
534
-		if ( array_key_exists($name, $atts) )
535
-			$out[$name] = $atts[$name];
536
-		else
537
-			$out[$name] = $default;
537
+		if ( array_key_exists($name, $atts) ) {
538
+					$out[$name] = $atts[$name];
539
+		} else {
540
+					$out[$name] = $default;
541
+		}
538 542
 	}
539 543
 	/**
540 544
 	 * Filter a shortcode's default attributes.
@@ -574,8 +578,9 @@  discard block
 block discarded – undo
574 578
 		return $content;
575 579
 	}
576 580
 
577
-	if (empty($shortcode_tags) || !is_array($shortcode_tags))
578
-		return $content;
581
+	if (empty($shortcode_tags) || !is_array($shortcode_tags)) {
582
+			return $content;
583
+	}
579 584
 
580 585
 	// Find all registered tag names in $content.
581 586
 	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -445,11 +445,11 @@
 block discarded – undo
445 445
  * @return string Content with placeholders removed.
446 446
  */
447 447
 function unescape_invalid_shortcodes( $content ) {
448
-        // Clean up entire string, avoids re-parsing HTML.
449
-        $trans = array( '&#91;' => '[', '&#93;' => ']' );
450
-        $content = strtr( $content, $trans );
448
+		// Clean up entire string, avoids re-parsing HTML.
449
+		$trans = array( '&#91;' => '[', '&#93;' => ']' );
450
+		$content = strtr( $content, $trans );
451 451
 
452
-        return $content;
452
+		return $content;
453 453
 }
454 454
 
455 455
 /**
Please login to merge, or discard this patch.
Spacing   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -89,20 +89,20 @@  discard block
 block discarded – undo
89 89
 function add_shortcode($tag, $func) {
90 90
 	global $shortcode_tags;
91 91
 
92
-	if ( '' == trim( $tag ) ) {
93
-		$message = __( 'Invalid shortcode name: Empty name given.' );
94
-		_doing_it_wrong( __FUNCTION__, $message, '4.4.0' );
92
+	if ('' == trim($tag)) {
93
+		$message = __('Invalid shortcode name: Empty name given.');
94
+		_doing_it_wrong(__FUNCTION__, $message, '4.4.0');
95 95
 		return;
96 96
 	}
97 97
 
98
-	if ( 0 !== preg_match( '@[<>&/\[\]\x00-\x20=]@', $tag ) ) {
98
+	if (0 !== preg_match('@[<>&/\[\]\x00-\x20=]@', $tag)) {
99 99
 		/* translators: 1: shortcode name, 2: space separated list of reserved characters */
100
-		$message = sprintf( __( 'Invalid shortcode name: %1$s. Do not use spaces or reserved characters: %2$s' ), $tag, '& / < > [ ] =' );
101
-		_doing_it_wrong( __FUNCTION__, $message, '4.4.0' );
100
+		$message = sprintf(__('Invalid shortcode name: %1$s. Do not use spaces or reserved characters: %2$s'), $tag, '& / < > [ ] =');
101
+		_doing_it_wrong(__FUNCTION__, $message, '4.4.0');
102 102
 		return;
103 103
 	}
104 104
 
105
-	$shortcode_tags[ $tag ] = $func;
105
+	$shortcode_tags[$tag] = $func;
106 106
 }
107 107
 
108 108
 /**
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
  * @param string $tag Shortcode tag to check.
148 148
  * @return bool Whether the given shortcode exists.
149 149
  */
150
-function shortcode_exists( $tag ) {
150
+function shortcode_exists($tag) {
151 151
 	global $shortcode_tags;
152
-	return array_key_exists( $tag, $shortcode_tags );
152
+	return array_key_exists($tag, $shortcode_tags);
153 153
 }
154 154
 
155 155
 /**
@@ -163,20 +163,20 @@  discard block
 block discarded – undo
163 163
  * @param string $tag     Shortcode tag to check.
164 164
  * @return bool Whether the passed content contains the given shortcode.
165 165
  */
166
-function has_shortcode( $content, $tag ) {
167
-	if ( false === strpos( $content, '[' ) ) {
166
+function has_shortcode($content, $tag) {
167
+	if (false === strpos($content, '[')) {
168 168
 		return false;
169 169
 	}
170 170
 
171
-	if ( shortcode_exists( $tag ) ) {
172
-		preg_match_all( '/' . get_shortcode_regex() . '/', $content, $matches, PREG_SET_ORDER );
173
-		if ( empty( $matches ) )
171
+	if (shortcode_exists($tag)) {
172
+		preg_match_all('/'.get_shortcode_regex().'/', $content, $matches, PREG_SET_ORDER);
173
+		if (empty($matches))
174 174
 			return false;
175 175
 
176
-		foreach ( $matches as $shortcode ) {
177
-			if ( $tag === $shortcode[2] ) {
176
+		foreach ($matches as $shortcode) {
177
+			if ($tag === $shortcode[2]) {
178 178
 				return true;
179
-			} elseif ( ! empty( $shortcode[5] ) && has_shortcode( $shortcode[5], $tag ) ) {
179
+			} elseif ( ! empty($shortcode[5]) && has_shortcode($shortcode[5], $tag)) {
180 180
 				return true;
181 181
 			}
182 182
 		}
@@ -199,31 +199,31 @@  discard block
 block discarded – undo
199 199
  * @param bool $ignore_html When true, shortcodes inside HTML elements will be skipped.
200 200
  * @return string Content with shortcodes filtered out.
201 201
  */
202
-function do_shortcode( $content, $ignore_html = false ) {
202
+function do_shortcode($content, $ignore_html = false) {
203 203
 	global $shortcode_tags;
204 204
 
205
-	if ( false === strpos( $content, '[' ) ) {
205
+	if (false === strpos($content, '[')) {
206 206
 		return $content;
207 207
 	}
208 208
 
209
-	if (empty($shortcode_tags) || !is_array($shortcode_tags))
209
+	if (empty($shortcode_tags) || ! is_array($shortcode_tags))
210 210
 		return $content;
211 211
 
212 212
 	// Find all registered tag names in $content.
213
-	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
214
-	$tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] );
213
+	preg_match_all('@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches);
214
+	$tagnames = array_intersect(array_keys($shortcode_tags), $matches[1]);
215 215
 
216
-	if ( empty( $tagnames ) ) {
216
+	if (empty($tagnames)) {
217 217
 		return $content;
218 218
 	}
219 219
 
220
-	$content = do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames );
220
+	$content = do_shortcodes_in_html_tags($content, $ignore_html, $tagnames);
221 221
 
222
-	$pattern = get_shortcode_regex( $tagnames );
223
-	$content = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $content );
222
+	$pattern = get_shortcode_regex($tagnames);
223
+	$content = preg_replace_callback("/$pattern/", 'do_shortcode_tag', $content);
224 224
 
225 225
 	// Always restore square braces so we don't break things like <!--[if IE ]>
226
-	$content = unescape_invalid_shortcodes( $content );
226
+	$content = unescape_invalid_shortcodes($content);
227 227
 
228 228
 	return $content;
229 229
 }
@@ -251,13 +251,13 @@  discard block
 block discarded – undo
251 251
  * @param array $tagnames Optional. List of shortcodes to find. Defaults to all registered shortcodes.
252 252
  * @return string The shortcode search regular expression
253 253
  */
254
-function get_shortcode_regex( $tagnames = null ) {
254
+function get_shortcode_regex($tagnames = null) {
255 255
 	global $shortcode_tags;
256 256
 
257
-	if ( empty( $tagnames ) ) {
258
-		$tagnames = array_keys( $shortcode_tags );
257
+	if (empty($tagnames)) {
258
+		$tagnames = array_keys($shortcode_tags);
259 259
 	}
260
-	$tagregexp = join( '|', array_map('preg_quote', $tagnames) );
260
+	$tagregexp = join('|', array_map('preg_quote', $tagnames));
261 261
 
262 262
 	// WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcode_tag()
263 263
 	// Also, see shortcode_unautop() and shortcode.js.
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 		.         '\\[\\/\\2\\]'             // Closing shortcode tag
290 290
 		.     ')?'
291 291
 		. ')'
292
-		. '(\\]?)';                          // 6: Optional second closing brocket for escaping shortcodes: [[tag]]
292
+		. '(\\]?)'; // 6: Optional second closing brocket for escaping shortcodes: [[tag]]
293 293
 }
294 294
 
295 295
 /**
@@ -304,21 +304,21 @@  discard block
 block discarded – undo
304 304
  * @param array $m Regular expression match array
305 305
  * @return string|false False on failure.
306 306
  */
307
-function do_shortcode_tag( $m ) {
307
+function do_shortcode_tag($m) {
308 308
 	global $shortcode_tags;
309 309
 
310 310
 	// allow [[foo]] syntax for escaping a tag
311
-	if ( $m[1] == '[' && $m[6] == ']' ) {
311
+	if ($m[1] == '[' && $m[6] == ']') {
312 312
 		return substr($m[0], 1, -1);
313 313
 	}
314 314
 
315 315
 	$tag = $m[2];
316
-	$attr = shortcode_parse_atts( $m[3] );
316
+	$attr = shortcode_parse_atts($m[3]);
317 317
 
318
-	if ( ! is_callable( $shortcode_tags[ $tag ] ) ) {
318
+	if ( ! is_callable($shortcode_tags[$tag])) {
319 319
 		/* translators: %s: shortcode tag */
320
-		$message = sprintf( __( 'Attempting to parse a shortcode without a valid callback: %s' ), $tag );
321
-		_doing_it_wrong( __FUNCTION__, $message, '4.3.0' );
320
+		$message = sprintf(__('Attempting to parse a shortcode without a valid callback: %s'), $tag);
321
+		_doing_it_wrong(__FUNCTION__, $message, '4.3.0');
322 322
 		return $m[0];
323 323
 	}
324 324
 
@@ -335,14 +335,14 @@  discard block
 block discarded – undo
335 335
 	 * @param array|string $attr        Shortcode attributes array or empty string.
336 336
 	 * @param array        $m           Regular expression match array.
337 337
 	 */
338
-	$return = apply_filters( 'pre_do_shortcode_tag', false, $tag, $attr, $m );
339
-	if ( false !== $return ) {
338
+	$return = apply_filters('pre_do_shortcode_tag', false, $tag, $attr, $m);
339
+	if (false !== $return) {
340 340
 		return $return;
341 341
 	}
342 342
 
343
-	$content = isset( $m[5] ) ? $m[5] : null;
343
+	$content = isset($m[5]) ? $m[5] : null;
344 344
 
345
-	$output = $m[1] . call_user_func( $shortcode_tags[ $tag ], $attr, $content, $tag ) . $m[6];
345
+	$output = $m[1].call_user_func($shortcode_tags[$tag], $attr, $content, $tag).$m[6];
346 346
 
347 347
 	/**
348 348
 	 * Filters the output created by a shortcode callback.
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
 	 * @param array|string $attr   Shortcode attributes array or empty string.
355 355
 	 * @param array        $m      Regular expression match array.
356 356
 	 */
357
-	return apply_filters( 'do_shortcode_tag', $output, $tag, $attr, $m );
357
+	return apply_filters('do_shortcode_tag', $output, $tag, $attr, $m);
358 358
 }
359 359
 
360 360
 /**
@@ -372,93 +372,93 @@  discard block
 block discarded – undo
372 372
  * @param array $tagnames List of shortcodes to find.
373 373
  * @return string Content with shortcodes filtered out.
374 374
  */
375
-function do_shortcodes_in_html_tags( $content, $ignore_html, $tagnames ) {
375
+function do_shortcodes_in_html_tags($content, $ignore_html, $tagnames) {
376 376
 	// Normalize entities in unfiltered HTML before adding placeholders.
377
-	$trans = array( '&#91;' => '&#091;', '&#93;' => '&#093;' );
378
-	$content = strtr( $content, $trans );
379
-	$trans = array( '[' => '&#91;', ']' => '&#93;' );
377
+	$trans = array('&#91;' => '&#091;', '&#93;' => '&#093;');
378
+	$content = strtr($content, $trans);
379
+	$trans = array('[' => '&#91;', ']' => '&#93;');
380 380
 
381
-	$pattern = get_shortcode_regex( $tagnames );
382
-	$textarr = wp_html_split( $content );
381
+	$pattern = get_shortcode_regex($tagnames);
382
+	$textarr = wp_html_split($content);
383 383
 
384
-	foreach ( $textarr as &$element ) {
385
-		if ( '' == $element || '<' !== $element[0] ) {
384
+	foreach ($textarr as &$element) {
385
+		if ('' == $element || '<' !== $element[0]) {
386 386
 			continue;
387 387
 		}
388 388
 
389
-		$noopen = false === strpos( $element, '[' );
390
-		$noclose = false === strpos( $element, ']' );
391
-		if ( $noopen || $noclose ) {
389
+		$noopen = false === strpos($element, '[');
390
+		$noclose = false === strpos($element, ']');
391
+		if ($noopen || $noclose) {
392 392
 			// This element does not contain shortcodes.
393
-			if ( $noopen xor $noclose ) {
393
+			if ($noopen xor $noclose) {
394 394
 				// Need to encode stray [ or ] chars.
395
-				$element = strtr( $element, $trans );
395
+				$element = strtr($element, $trans);
396 396
 			}
397 397
 			continue;
398 398
 		}
399 399
 
400
-		if ( $ignore_html || '<!--' === substr( $element, 0, 4 ) || '<![CDATA[' === substr( $element, 0, 9 ) ) {
400
+		if ($ignore_html || '<!--' === substr($element, 0, 4) || '<![CDATA[' === substr($element, 0, 9)) {
401 401
 			// Encode all [ and ] chars.
402
-			$element = strtr( $element, $trans );
402
+			$element = strtr($element, $trans);
403 403
 			continue;
404 404
 		}
405 405
 
406
-		$attributes = wp_kses_attr_parse( $element );
407
-		if ( false === $attributes ) {
406
+		$attributes = wp_kses_attr_parse($element);
407
+		if (false === $attributes) {
408 408
 			// Some plugins are doing things like [name] <[email]>.
409
-			if ( 1 === preg_match( '%^<\s*\[\[?[^\[\]]+\]%', $element ) ) {
410
-				$element = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $element );
409
+			if (1 === preg_match('%^<\s*\[\[?[^\[\]]+\]%', $element)) {
410
+				$element = preg_replace_callback("/$pattern/", 'do_shortcode_tag', $element);
411 411
 			}
412 412
 
413 413
 			// Looks like we found some crazy unfiltered HTML.  Skipping it for sanity.
414
-			$element = strtr( $element, $trans );
414
+			$element = strtr($element, $trans);
415 415
 			continue;
416 416
 		}
417 417
 
418 418
 		// Get element name
419
-		$front = array_shift( $attributes );
420
-		$back = array_pop( $attributes );
419
+		$front = array_shift($attributes);
420
+		$back = array_pop($attributes);
421 421
 		$matches = array();
422 422
 		preg_match('%[a-zA-Z0-9]+%', $front, $matches);
423 423
 		$elname = $matches[0];
424 424
 
425 425
 		// Look for shortcodes in each attribute separately.
426
-		foreach ( $attributes as &$attr ) {
427
-			$open = strpos( $attr, '[' );
428
-			$close = strpos( $attr, ']' );
429
-			if ( false === $open || false === $close ) {
426
+		foreach ($attributes as &$attr) {
427
+			$open = strpos($attr, '[');
428
+			$close = strpos($attr, ']');
429
+			if (false === $open || false === $close) {
430 430
 				continue; // Go to next attribute.  Square braces will be escaped at end of loop.
431 431
 			}
432
-			$double = strpos( $attr, '"' );
433
-			$single = strpos( $attr, "'" );
434
-			if ( ( false === $single || $open < $single ) && ( false === $double || $open < $double ) ) {
432
+			$double = strpos($attr, '"');
433
+			$single = strpos($attr, "'");
434
+			if ((false === $single || $open < $single) && (false === $double || $open < $double)) {
435 435
 				// $attr like '[shortcode]' or 'name = [shortcode]' implies unfiltered_html.
436 436
 				// In this specific situation we assume KSES did not run because the input
437 437
 				// was written by an administrator, so we should avoid changing the output
438 438
 				// and we do not need to run KSES here.
439
-				$attr = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $attr );
439
+				$attr = preg_replace_callback("/$pattern/", 'do_shortcode_tag', $attr);
440 440
 			} else {
441 441
 				// $attr like 'name = "[shortcode]"' or "name = '[shortcode]'"
442 442
 				// We do not know if $content was unfiltered. Assume KSES ran before shortcodes.
443 443
 				$count = 0;
444
-				$new_attr = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $attr, -1, $count );
445
-				if ( $count > 0 ) {
444
+				$new_attr = preg_replace_callback("/$pattern/", 'do_shortcode_tag', $attr, -1, $count);
445
+				if ($count > 0) {
446 446
 					// Sanitize the shortcode output using KSES.
447
-					$new_attr = wp_kses_one_attr( $new_attr, $elname );
448
-					if ( '' !== trim( $new_attr ) ) {
447
+					$new_attr = wp_kses_one_attr($new_attr, $elname);
448
+					if ('' !== trim($new_attr)) {
449 449
 						// The shortcode is safe to use now.
450 450
 						$attr = $new_attr;
451 451
 					}
452 452
 				}
453 453
 			}
454 454
 		}
455
-		$element = $front . implode( '', $attributes ) . $back;
455
+		$element = $front.implode('', $attributes).$back;
456 456
 
457 457
 		// Now encode any remaining [ or ] chars.
458
-		$element = strtr( $element, $trans );
458
+		$element = strtr($element, $trans);
459 459
 	}
460 460
 
461
-	$content = implode( '', $textarr );
461
+	$content = implode('', $textarr);
462 462
 
463 463
 	return $content;
464 464
 }
@@ -471,10 +471,10 @@  discard block
 block discarded – undo
471 471
  * @param string $content Content to search for placeholders.
472 472
  * @return string Content with placeholders removed.
473 473
  */
474
-function unescape_invalid_shortcodes( $content ) {
474
+function unescape_invalid_shortcodes($content) {
475 475
         // Clean up entire string, avoids re-parsing HTML.
476
-        $trans = array( '&#91;' => '[', '&#93;' => ']' );
477
-        $content = strtr( $content, $trans );
476
+        $trans = array('&#91;' => '[', '&#93;' => ']');
477
+        $content = strtr($content, $trans);
478 478
 
479 479
         return $content;
480 480
 }
@@ -509,13 +509,13 @@  discard block
 block discarded – undo
509 509
 	$atts = array();
510 510
 	$pattern = get_shortcode_atts_regex();
511 511
 	$text = preg_replace("/[\x{00a0}\x{200b}]+/u", " ", $text);
512
-	if ( preg_match_all($pattern, $text, $match, PREG_SET_ORDER) ) {
512
+	if (preg_match_all($pattern, $text, $match, PREG_SET_ORDER)) {
513 513
 		foreach ($match as $m) {
514
-			if (!empty($m[1]))
514
+			if ( ! empty($m[1]))
515 515
 				$atts[strtolower($m[1])] = stripcslashes($m[2]);
516
-			elseif (!empty($m[3]))
516
+			elseif ( ! empty($m[3]))
517 517
 				$atts[strtolower($m[3])] = stripcslashes($m[4]);
518
-			elseif (!empty($m[5]))
518
+			elseif ( ! empty($m[5]))
519 519
 				$atts[strtolower($m[5])] = stripcslashes($m[6]);
520 520
 			elseif (isset($m[7]) && strlen($m[7]))
521 521
 				$atts[] = stripcslashes($m[7]);
@@ -524,9 +524,9 @@  discard block
 block discarded – undo
524 524
 		}
525 525
 
526 526
 		// Reject any unclosed HTML elements
527
-		foreach( $atts as &$value ) {
528
-			if ( false !== strpos( $value, '<' ) ) {
529
-				if ( 1 !== preg_match( '/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', $value ) ) {
527
+		foreach ($atts as &$value) {
528
+			if (false !== strpos($value, '<')) {
529
+				if (1 !== preg_match('/^[^<]*+(?:<[^>]*+>[^<]*+)*+$/', $value)) {
530 530
 					$value = '';
531 531
 				}
532 532
 			}
@@ -554,11 +554,11 @@  discard block
 block discarded – undo
554 554
  * @param string $shortcode Optional. The name of the shortcode, provided for context to enable filtering
555 555
  * @return array Combined and filtered attribute list.
556 556
  */
557
-function shortcode_atts( $pairs, $atts, $shortcode = '' ) {
558
-	$atts = (array)$atts;
557
+function shortcode_atts($pairs, $atts, $shortcode = '') {
558
+	$atts = (array) $atts;
559 559
 	$out = array();
560 560
 	foreach ($pairs as $name => $default) {
561
-		if ( array_key_exists($name, $atts) )
561
+		if (array_key_exists($name, $atts))
562 562
 			$out[$name] = $atts[$name];
563 563
 		else
564 564
 			$out[$name] = $default;
@@ -577,8 +577,8 @@  discard block
 block discarded – undo
577 577
 	 * @param array  $atts      The user defined shortcode attributes.
578 578
 	 * @param string $shortcode The shortcode name.
579 579
 	 */
580
-	if ( $shortcode ) {
581
-		$out = apply_filters( "shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode );
580
+	if ($shortcode) {
581
+		$out = apply_filters("shortcode_atts_{$shortcode}", $out, $pairs, $atts, $shortcode);
582 582
 	}
583 583
 
584 584
 	return $out;
@@ -594,20 +594,20 @@  discard block
 block discarded – undo
594 594
  * @param string $content Content to remove shortcode tags.
595 595
  * @return string Content without shortcode tags.
596 596
  */
597
-function strip_shortcodes( $content ) {
597
+function strip_shortcodes($content) {
598 598
 	global $shortcode_tags;
599 599
 
600
-	if ( false === strpos( $content, '[' ) ) {
600
+	if (false === strpos($content, '[')) {
601 601
 		return $content;
602 602
 	}
603 603
 
604
-	if (empty($shortcode_tags) || !is_array($shortcode_tags))
604
+	if (empty($shortcode_tags) || ! is_array($shortcode_tags))
605 605
 		return $content;
606 606
 
607 607
 	// Find all registered tag names in $content.
608
-	preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );
608
+	preg_match_all('@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches);
609 609
 
610
-	$tags_to_remove = array_keys( $shortcode_tags );
610
+	$tags_to_remove = array_keys($shortcode_tags);
611 611
 
612 612
 	/**
613 613
 	 * Filters the list of shortcode tags to remove from the content.
@@ -617,21 +617,21 @@  discard block
 block discarded – undo
617 617
 	 * @param array  $tag_array Array of shortcode tags to remove.
618 618
 	 * @param string $content   Content shortcodes are being removed from.
619 619
 	 */
620
-	$tags_to_remove = apply_filters( 'strip_shortcodes_tagnames', $tags_to_remove, $content );
620
+	$tags_to_remove = apply_filters('strip_shortcodes_tagnames', $tags_to_remove, $content);
621 621
 
622
-	$tagnames = array_intersect( $tags_to_remove, $matches[1] );
622
+	$tagnames = array_intersect($tags_to_remove, $matches[1]);
623 623
 
624
-	if ( empty( $tagnames ) ) {
624
+	if (empty($tagnames)) {
625 625
 		return $content;
626 626
 	}
627 627
 
628
-	$content = do_shortcodes_in_html_tags( $content, true, $tagnames );
628
+	$content = do_shortcodes_in_html_tags($content, true, $tagnames);
629 629
 
630
-	$pattern = get_shortcode_regex( $tagnames );
631
-	$content = preg_replace_callback( "/$pattern/", 'strip_shortcode_tag', $content );
630
+	$pattern = get_shortcode_regex($tagnames);
631
+	$content = preg_replace_callback("/$pattern/", 'strip_shortcode_tag', $content);
632 632
 
633 633
 	// Always restore square braces so we don't break things like <!--[if IE ]>
634
-	$content = unescape_invalid_shortcodes( $content );
634
+	$content = unescape_invalid_shortcodes($content);
635 635
 
636 636
 	return $content;
637 637
 }
@@ -644,11 +644,11 @@  discard block
 block discarded – undo
644 644
  * @param array $m RegEx matches against post content.
645 645
  * @return string|false The content stripped of the tag, otherwise false.
646 646
  */
647
-function strip_shortcode_tag( $m ) {
647
+function strip_shortcode_tag($m) {
648 648
 	// allow [[foo]] syntax for escaping a tag
649
-	if ( $m[1] == '[' && $m[6] == ']' ) {
649
+	if ($m[1] == '[' && $m[6] == ']') {
650 650
 		return substr($m[0], 1, -1);
651 651
 	}
652 652
 
653
-	return $m[1] . $m[6];
653
+	return $m[1].$m[6];
654 654
 }
Please login to merge, or discard this patch.
src/wp-includes/script-loader.php 2 patches
Braces   +44 added lines, -30 removed lines patch added patch discarded remove patch
@@ -683,11 +683,13 @@  discard block
 block discarded – undo
683 683
 function wp_default_styles( &$styles ) {
684 684
 	include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version
685 685
 
686
-	if ( ! defined( 'SCRIPT_DEBUG' ) )
687
-		define( 'SCRIPT_DEBUG', false !== strpos( $wp_version, '-src' ) );
686
+	if ( ! defined( 'SCRIPT_DEBUG' ) ) {
687
+			define( 'SCRIPT_DEBUG', false !== strpos( $wp_version, '-src' ) );
688
+	}
688 689
 
689
-	if ( ! $guessurl = site_url() )
690
-		$guessurl = wp_guess_url();
690
+	if ( ! $guessurl = site_url() ) {
691
+			$guessurl = wp_guess_url();
692
+	}
691 693
 
692 694
 	$styles->base_url = $guessurl;
693 695
 	$styles->content_url = defined('WP_CONTENT_URL')? WP_CONTENT_URL : '';
@@ -812,14 +814,17 @@  discard block
 block discarded – undo
812 814
  * @return array Reordered array, if needed.
813 815
  */
814 816
 function wp_prototype_before_jquery( $js_array ) {
815
-	if ( false === $prototype = array_search( 'prototype', $js_array, true ) )
816
-		return $js_array;
817
+	if ( false === $prototype = array_search( 'prototype', $js_array, true ) ) {
818
+			return $js_array;
819
+	}
817 820
 
818
-	if ( false === $jquery = array_search( 'jquery', $js_array, true ) )
819
-		return $js_array;
821
+	if ( false === $jquery = array_search( 'jquery', $js_array, true ) ) {
822
+			return $js_array;
823
+	}
820 824
 
821
-	if ( $prototype < $jquery )
822
-		return $js_array;
825
+	if ( $prototype < $jquery ) {
826
+			return $js_array;
827
+	}
823 828
 
824 829
 	unset($js_array[$prototype]);
825 830
 
@@ -867,14 +872,16 @@  discard block
 block discarded – undo
867 872
 function wp_style_loader_src( $src, $handle ) {
868 873
 	global $_wp_admin_css_colors;
869 874
 
870
-	if ( wp_installing() )
871
-		return preg_replace( '#^wp-admin/#', './', $src );
875
+	if ( wp_installing() ) {
876
+			return preg_replace( '#^wp-admin/#', './', $src );
877
+	}
872 878
 
873 879
 	if ( 'colors' == $handle ) {
874 880
 		$color = get_user_option('admin_color');
875 881
 
876
-		if ( empty($color) || !isset($_wp_admin_css_colors[$color]) )
877
-			$color = 'fresh';
882
+		if ( empty($color) || !isset($_wp_admin_css_colors[$color]) ) {
883
+					$color = 'fresh';
884
+		}
878 885
 
879 886
 		$color = $_wp_admin_css_colors[$color];
880 887
 		$url = $color->url;
@@ -985,8 +992,9 @@  discard block
 block discarded – undo
985 992
 	global $wp_scripts, $compress_scripts;
986 993
 
987 994
 	$zip = $compress_scripts ? 1 : 0;
988
-	if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP )
989
-		$zip = 'gzip';
995
+	if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP ) {
996
+			$zip = 'gzip';
997
+	}
990 998
 
991 999
 	if ( $concat = trim( $wp_scripts->concat, ', ' ) ) {
992 1000
 
@@ -1009,9 +1017,10 @@  discard block
 block discarded – undo
1009 1017
 		echo "<script type='text/javascript' src='" . esc_attr($src) . "'></script>\n";
1010 1018
 	}
1011 1019
 
1012
-	if ( !empty($wp_scripts->print_html) )
1013
-		echo $wp_scripts->print_html;
1014
-}
1020
+	if ( !empty($wp_scripts->print_html) ) {
1021
+			echo $wp_scripts->print_html;
1022
+	}
1023
+	}
1015 1024
 
1016 1025
 /**
1017 1026
  * Prints the script queue in the HTML head on the front end.
@@ -1163,8 +1172,9 @@  discard block
 block discarded – undo
1163 1172
 	$wp_styles = wp_styles();
1164 1173
 
1165 1174
 	$zip = $compress_css ? 1 : 0;
1166
-	if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP )
1167
-		$zip = 'gzip';
1175
+	if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP ) {
1176
+			$zip = 'gzip';
1177
+	}
1168 1178
 
1169 1179
 	if ( $concat = trim( $wp_styles->concat, ', ' ) ) {
1170 1180
 		$dir = $wp_styles->text_direction;
@@ -1183,9 +1193,10 @@  discard block
 block discarded – undo
1183 1193
 		}
1184 1194
 	}
1185 1195
 
1186
-	if ( !empty($wp_styles->print_html) )
1187
-		echo $wp_styles->print_html;
1188
-}
1196
+	if ( !empty($wp_styles->print_html) ) {
1197
+			echo $wp_styles->print_html;
1198
+	}
1199
+	}
1189 1200
 
1190 1201
 /**
1191 1202
  * Determine the concatenation and compression settings for scripts and styles.
@@ -1203,19 +1214,22 @@  discard block
 block discarded – undo
1203 1214
 
1204 1215
 	if ( ! isset($concatenate_scripts) ) {
1205 1216
 		$concatenate_scripts = defined('CONCATENATE_SCRIPTS') ? CONCATENATE_SCRIPTS : true;
1206
-		if ( ( ! is_admin() && ! did_action( 'login_init' ) ) || ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) )
1207
-			$concatenate_scripts = false;
1217
+		if ( ( ! is_admin() && ! did_action( 'login_init' ) ) || ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) ) {
1218
+					$concatenate_scripts = false;
1219
+		}
1208 1220
 	}
1209 1221
 
1210 1222
 	if ( ! isset($compress_scripts) ) {
1211 1223
 		$compress_scripts = defined('COMPRESS_SCRIPTS') ? COMPRESS_SCRIPTS : true;
1212
-		if ( $compress_scripts && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
1213
-			$compress_scripts = false;
1224
+		if ( $compress_scripts && ( ! get_site_option('can_compress_scripts') || $compressed_output ) ) {
1225
+					$compress_scripts = false;
1226
+		}
1214 1227
 	}
1215 1228
 
1216 1229
 	if ( ! isset($compress_css) ) {
1217 1230
 		$compress_css = defined('COMPRESS_CSS') ? COMPRESS_CSS : true;
1218
-		if ( $compress_css && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
1219
-			$compress_css = false;
1231
+		if ( $compress_css && ( ! get_site_option('can_compress_scripts') || $compressed_output ) ) {
1232
+					$compress_css = false;
1233
+		}
1220 1234
 	}
1221 1235
 }
Please login to merge, or discard this patch.
Spacing   +610 added lines, -610 removed lines patch added patch discarded remove patch
@@ -17,22 +17,22 @@  discard block
 block discarded – undo
17 17
  */
18 18
 
19 19
 /** WordPress Dependency Class */
20
-require( ABSPATH . WPINC . '/class-wp-dependency.php' );
20
+require(ABSPATH.WPINC.'/class-wp-dependency.php');
21 21
 
22 22
 /** WordPress Dependencies Class */
23
-require( ABSPATH . WPINC . '/class.wp-dependencies.php' );
23
+require(ABSPATH.WPINC.'/class.wp-dependencies.php');
24 24
 
25 25
 /** WordPress Scripts Class */
26
-require( ABSPATH . WPINC . '/class.wp-scripts.php' );
26
+require(ABSPATH.WPINC.'/class.wp-scripts.php');
27 27
 
28 28
 /** WordPress Scripts Functions */
29
-require( ABSPATH . WPINC . '/functions.wp-scripts.php' );
29
+require(ABSPATH.WPINC.'/functions.wp-scripts.php');
30 30
 
31 31
 /** WordPress Styles Class */
32
-require( ABSPATH . WPINC . '/class.wp-styles.php' );
32
+require(ABSPATH.WPINC.'/class.wp-styles.php');
33 33
 
34 34
 /** WordPress Styles Functions */
35
-require( ABSPATH . WPINC . '/functions.wp-styles.php' );
35
+require(ABSPATH.WPINC.'/functions.wp-styles.php');
36 36
 
37 37
 /**
38 38
  * Register all WordPress scripts.
@@ -45,103 +45,103 @@  discard block
 block discarded – undo
45 45
  *
46 46
  * @param WP_Scripts $scripts WP_Scripts object.
47 47
  */
48
-function wp_default_scripts( &$scripts ) {
49
-	include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version
48
+function wp_default_scripts(&$scripts) {
49
+	include(ABSPATH.WPINC.'/version.php'); // include an unmodified $wp_version
50 50
 
51
-	$develop_src = false !== strpos( $wp_version, '-src' );
51
+	$develop_src = false !== strpos($wp_version, '-src');
52 52
 
53
-	if ( ! defined( 'SCRIPT_DEBUG' ) ) {
54
-		define( 'SCRIPT_DEBUG', $develop_src );
53
+	if ( ! defined('SCRIPT_DEBUG')) {
54
+		define('SCRIPT_DEBUG', $develop_src);
55 55
 	}
56 56
 
57
-	if ( ! $guessurl = site_url() ) {
57
+	if ( ! $guessurl = site_url()) {
58 58
 		$guessed_url = true;
59 59
 		$guessurl = wp_guess_url();
60 60
 	}
61 61
 
62 62
 	$scripts->base_url = $guessurl;
63
-	$scripts->content_url = defined('WP_CONTENT_URL')? WP_CONTENT_URL : '';
64
-	$scripts->default_version = get_bloginfo( 'version' );
63
+	$scripts->content_url = defined('WP_CONTENT_URL') ? WP_CONTENT_URL : '';
64
+	$scripts->default_version = get_bloginfo('version');
65 65
 	$scripts->default_dirs = array('/wp-admin/js/', '/wp-includes/js/');
66 66
 
67 67
 	$suffix = SCRIPT_DEBUG ? '' : '.min';
68 68
 	$dev_suffix = $develop_src ? '' : '.min';
69 69
 
70
-	$scripts->add( 'utils', "/wp-includes/js/utils$suffix.js" );
71
-	did_action( 'init' ) && $scripts->localize( 'utils', 'userSettings', array(
70
+	$scripts->add('utils', "/wp-includes/js/utils$suffix.js");
71
+	did_action('init') && $scripts->localize('utils', 'userSettings', array(
72 72
 		'url' => (string) SITECOOKIEPATH,
73 73
 		'uid' => (string) get_current_user_id(),
74 74
 		'time' => (string) time(),
75
-		'secure' => (string) ( 'https' === parse_url( site_url(), PHP_URL_SCHEME ) ),
76
-	) );
77
-
78
-	$scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 );
79
-	did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array(
80
-		'warnDelete'   => __( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." ),
81
-		'dismiss'      => __( 'Dismiss this notice.' ),
82
-		'collapseMenu' => __( 'Collapse Main menu' ),
83
-		'expandMenu'   => __( 'Expand Main menu' ),
84
-	) );
85
-
86
-	$scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 );
87
-
88
-	$scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", array(), '1.6.1', 1 );
89
-
90
-	$scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", array(), false, 1 );
91
-	did_action( 'init' ) && $scripts->localize( 'quicktags', 'quicktagsL10n', array(
92
-		'closeAllOpenTags'      => __( 'Close all open tags' ),
93
-		'closeTags'             => __( 'close tags' ),
94
-		'enterURL'              => __( 'Enter the URL' ),
95
-		'enterImageURL'         => __( 'Enter the URL of the image' ),
96
-		'enterImageDescription' => __( 'Enter a description of the image' ),
97
-		'textdirection'         => __( 'text direction' ),
98
-		'toggleTextdirection'   => __( 'Toggle Editor Text Direction' ),
99
-		'dfw'                   => __( 'Distraction-free writing mode' ),
100
-		'strong'          => __( 'Bold' ),
101
-		'strongClose'     => __( 'Close bold tag' ),
102
-		'em'              => __( 'Italic' ),
103
-		'emClose'         => __( 'Close italic tag' ),
104
-		'link'            => __( 'Insert link' ),
105
-		'blockquote'      => __( 'Blockquote' ),
106
-		'blockquoteClose' => __( 'Close blockquote tag' ),
107
-		'del'             => __( 'Deleted text (strikethrough)' ),
108
-		'delClose'        => __( 'Close deleted text tag' ),
109
-		'ins'             => __( 'Inserted text' ),
110
-		'insClose'        => __( 'Close inserted text tag' ),
111
-		'image'           => __( 'Insert image' ),
112
-		'ul'              => __( 'Bulleted list' ),
113
-		'ulClose'         => __( 'Close bulleted list tag' ),
114
-		'ol'              => __( 'Numbered list' ),
115
-		'olClose'         => __( 'Close numbered list tag' ),
116
-		'li'              => __( 'List item' ),
117
-		'liClose'         => __( 'Close list item tag' ),
118
-		'code'            => __( 'Code' ),
119
-		'codeClose'       => __( 'Close code tag' ),
120
-		'more'            => __( 'Insert Read More tag' ),
121
-	) );
122
-
123
-	$scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' );
124
-
125
-	$scripts->add( 'editor', "/wp-admin/js/editor$suffix.js", array('utils','jquery'), false, 1 );
75
+		'secure' => (string) ('https' === parse_url(site_url(), PHP_URL_SCHEME)),
76
+	));
77
+
78
+	$scripts->add('common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1);
79
+	did_action('init') && $scripts->localize('common', 'commonL10n', array(
80
+		'warnDelete'   => __("You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete."),
81
+		'dismiss'      => __('Dismiss this notice.'),
82
+		'collapseMenu' => __('Collapse Main menu'),
83
+		'expandMenu'   => __('Expand Main menu'),
84
+	));
85
+
86
+	$scripts->add('wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array('jquery'), false, 1);
87
+
88
+	$scripts->add('sack', "/wp-includes/js/tw-sack$suffix.js", array(), '1.6.1', 1);
89
+
90
+	$scripts->add('quicktags', "/wp-includes/js/quicktags$suffix.js", array(), false, 1);
91
+	did_action('init') && $scripts->localize('quicktags', 'quicktagsL10n', array(
92
+		'closeAllOpenTags'      => __('Close all open tags'),
93
+		'closeTags'             => __('close tags'),
94
+		'enterURL'              => __('Enter the URL'),
95
+		'enterImageURL'         => __('Enter the URL of the image'),
96
+		'enterImageDescription' => __('Enter a description of the image'),
97
+		'textdirection'         => __('text direction'),
98
+		'toggleTextdirection'   => __('Toggle Editor Text Direction'),
99
+		'dfw'                   => __('Distraction-free writing mode'),
100
+		'strong'          => __('Bold'),
101
+		'strongClose'     => __('Close bold tag'),
102
+		'em'              => __('Italic'),
103
+		'emClose'         => __('Close italic tag'),
104
+		'link'            => __('Insert link'),
105
+		'blockquote'      => __('Blockquote'),
106
+		'blockquoteClose' => __('Close blockquote tag'),
107
+		'del'             => __('Deleted text (strikethrough)'),
108
+		'delClose'        => __('Close deleted text tag'),
109
+		'ins'             => __('Inserted text'),
110
+		'insClose'        => __('Close inserted text tag'),
111
+		'image'           => __('Insert image'),
112
+		'ul'              => __('Bulleted list'),
113
+		'ulClose'         => __('Close bulleted list tag'),
114
+		'ol'              => __('Numbered list'),
115
+		'olClose'         => __('Close numbered list tag'),
116
+		'li'              => __('List item'),
117
+		'liClose'         => __('Close list item tag'),
118
+		'code'            => __('Code'),
119
+		'codeClose'       => __('Close code tag'),
120
+		'more'            => __('Insert Read More tag'),
121
+	));
122
+
123
+	$scripts->add('colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m');
124
+
125
+	$scripts->add('editor', "/wp-admin/js/editor$suffix.js", array('utils', 'jquery'), false, 1);
126 126
 
127 127
 	// Back-compat for old DFW. To-do: remove at the end of 2016.
128
-	$scripts->add( 'wp-fullscreen-stub', "/wp-admin/js/wp-fullscreen-stub$suffix.js", array(), false, 1 );
128
+	$scripts->add('wp-fullscreen-stub', "/wp-admin/js/wp-fullscreen-stub$suffix.js", array(), false, 1);
129 129
 
130
-	$scripts->add( 'wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1 );
131
-	did_action( 'init' ) && $scripts->localize( 'wp-ajax-response', 'wpAjax', array(
130
+	$scripts->add('wp-ajax-response', "/wp-includes/js/wp-ajax-response$suffix.js", array('jquery'), false, 1);
131
+	did_action('init') && $scripts->localize('wp-ajax-response', 'wpAjax', array(
132 132
 		'noPerm' => __('Sorry, you are not allowed to do that.'),
133 133
 		'broken' => __('An unidentified error has occurred.')
134
-	) );
134
+	));
135 135
 
136
-	$scripts->add( 'wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111129a', 1 );
137
-	did_action( 'init' ) && $scripts->localize( 'wp-pointer', 'wpPointerL10n', array(
136
+	$scripts->add('wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array('jquery-ui-widget', 'jquery-ui-position'), '20111129a', 1);
137
+	did_action('init') && $scripts->localize('wp-pointer', 'wpPointerL10n', array(
138 138
 		'dismiss' => __('Dismiss'),
139
-	) );
139
+	));
140 140
 
141
-	$scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('heartbeat'), false, 1 );
141
+	$scripts->add('autosave', "/wp-includes/js/autosave$suffix.js", array('heartbeat'), false, 1);
142 142
 
143
-	$scripts->add( 'heartbeat', "/wp-includes/js/heartbeat$suffix.js", array('jquery'), false, 1 );
144
-	did_action( 'init' ) && $scripts->localize( 'heartbeat', 'heartbeatSettings',
143
+	$scripts->add('heartbeat', "/wp-includes/js/heartbeat$suffix.js", array('jquery'), false, 1);
144
+	did_action('init') && $scripts->localize('heartbeat', 'heartbeatSettings',
145 145
 		/**
146 146
 		 * Filters the Heartbeat settings.
147 147
 		 *
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
 		 *
150 150
 		 * @param array $settings Heartbeat settings array.
151 151
 		 */
152
-		apply_filters( 'heartbeat_settings', array() )
152
+		apply_filters('heartbeat_settings', array())
153 153
 	);
154 154
 
155
-	$scripts->add( 'wp-auth-check', "/wp-includes/js/wp-auth-check$suffix.js", array('heartbeat'), false, 1 );
156
-	did_action( 'init' ) && $scripts->localize( 'wp-auth-check', 'authcheckL10n', array(
155
+	$scripts->add('wp-auth-check', "/wp-includes/js/wp-auth-check$suffix.js", array('heartbeat'), false, 1);
156
+	did_action('init') && $scripts->localize('wp-auth-check', 'authcheckL10n', array(
157 157
 		'beforeunload' => __('Your session has expired. You can log in again from this page or go to the login page.'),
158 158
 
159 159
 		/**
@@ -164,104 +164,104 @@  discard block
 block discarded – undo
164 164
 		 * @param int $interval The interval in which to check a user's authentication.
165 165
 		 *                      Default 3 minutes in seconds, or 180.
166 166
 		 */
167
-		'interval' => apply_filters( 'wp_auth_check_interval', 3 * MINUTE_IN_SECONDS ),
168
-	) );
167
+		'interval' => apply_filters('wp_auth_check_interval', 3 * MINUTE_IN_SECONDS),
168
+	));
169 169
 
170
-	$scripts->add( 'wp-lists', "/wp-includes/js/wp-lists$suffix.js", array( 'wp-ajax-response', 'jquery-color' ), false, 1 );
170
+	$scripts->add('wp-lists', "/wp-includes/js/wp-lists$suffix.js", array('wp-ajax-response', 'jquery-color'), false, 1);
171 171
 
172 172
 	// WordPress no longer uses or bundles Prototype or script.aculo.us. These are now pulled from an external source.
173
-	$scripts->add( 'prototype', 'https://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js', array(), '1.7.1');
174
-	$scripts->add( 'scriptaculous-root', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js', array('prototype'), '1.9.0');
175
-	$scripts->add( 'scriptaculous-builder', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/builder.js', array('scriptaculous-root'), '1.9.0');
176
-	$scripts->add( 'scriptaculous-dragdrop', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), '1.9.0');
177
-	$scripts->add( 'scriptaculous-effects', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/effects.js', array('scriptaculous-root'), '1.9.0');
178
-	$scripts->add( 'scriptaculous-slider', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/slider.js', array('scriptaculous-effects'), '1.9.0');
179
-	$scripts->add( 'scriptaculous-sound', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/sound.js', array( 'scriptaculous-root' ), '1.9.0' );
180
-	$scripts->add( 'scriptaculous-controls', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/controls.js', array('scriptaculous-root'), '1.9.0');
181
-	$scripts->add( 'scriptaculous', false, array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls') );
173
+	$scripts->add('prototype', 'https://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js', array(), '1.7.1');
174
+	$scripts->add('scriptaculous-root', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js', array('prototype'), '1.9.0');
175
+	$scripts->add('scriptaculous-builder', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/builder.js', array('scriptaculous-root'), '1.9.0');
176
+	$scripts->add('scriptaculous-dragdrop', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/dragdrop.js', array('scriptaculous-builder', 'scriptaculous-effects'), '1.9.0');
177
+	$scripts->add('scriptaculous-effects', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/effects.js', array('scriptaculous-root'), '1.9.0');
178
+	$scripts->add('scriptaculous-slider', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/slider.js', array('scriptaculous-effects'), '1.9.0');
179
+	$scripts->add('scriptaculous-sound', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/sound.js', array('scriptaculous-root'), '1.9.0');
180
+	$scripts->add('scriptaculous-controls', 'https://ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/controls.js', array('scriptaculous-root'), '1.9.0');
181
+	$scripts->add('scriptaculous', false, array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls'));
182 182
 
183 183
 	// not used in core, replaced by Jcrop.js
184
-	$scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop') );
184
+	$scripts->add('cropper', '/wp-includes/js/crop/cropper.js', array('scriptaculous-dragdrop'));
185 185
 
186 186
 	// jQuery
187
-	$scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4' );
188
-	$scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4' );
189
-	$scripts->add( 'jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1' );
187
+	$scripts->add('jquery', false, array('jquery-core', 'jquery-migrate'), '1.12.4');
188
+	$scripts->add('jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.12.4');
189
+	$scripts->add('jquery-migrate', "/wp-includes/js/jquery/jquery-migrate$suffix.js", array(), '1.4.1');
190 190
 
191 191
 	// full jQuery UI
192
-	$scripts->add( 'jquery-ui-core', "/wp-includes/js/jquery/ui/core$dev_suffix.js", array('jquery'), '1.11.4', 1 );
193
-	$scripts->add( 'jquery-effects-core', "/wp-includes/js/jquery/ui/effect$dev_suffix.js", array('jquery'), '1.11.4', 1 );
194
-
195
-	$scripts->add( 'jquery-effects-blind', "/wp-includes/js/jquery/ui/effect-blind$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
196
-	$scripts->add( 'jquery-effects-bounce', "/wp-includes/js/jquery/ui/effect-bounce$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
197
-	$scripts->add( 'jquery-effects-clip', "/wp-includes/js/jquery/ui/effect-clip$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
198
-	$scripts->add( 'jquery-effects-drop', "/wp-includes/js/jquery/ui/effect-drop$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
199
-	$scripts->add( 'jquery-effects-explode', "/wp-includes/js/jquery/ui/effect-explode$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
200
-	$scripts->add( 'jquery-effects-fade', "/wp-includes/js/jquery/ui/effect-fade$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
201
-	$scripts->add( 'jquery-effects-fold', "/wp-includes/js/jquery/ui/effect-fold$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
202
-	$scripts->add( 'jquery-effects-highlight', "/wp-includes/js/jquery/ui/effect-highlight$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
203
-	$scripts->add( 'jquery-effects-puff', "/wp-includes/js/jquery/ui/effect-puff$dev_suffix.js", array('jquery-effects-core', 'jquery-effects-scale'), '1.11.4', 1 );
204
-	$scripts->add( 'jquery-effects-pulsate', "/wp-includes/js/jquery/ui/effect-pulsate$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
205
-	$scripts->add( 'jquery-effects-scale', "/wp-includes/js/jquery/ui/effect-scale$dev_suffix.js", array('jquery-effects-core', 'jquery-effects-size'), '1.11.4', 1 );
206
-	$scripts->add( 'jquery-effects-shake', "/wp-includes/js/jquery/ui/effect-shake$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
207
-	$scripts->add( 'jquery-effects-size', "/wp-includes/js/jquery/ui/effect-size$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
208
-	$scripts->add( 'jquery-effects-slide', "/wp-includes/js/jquery/ui/effect-slide$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
209
-	$scripts->add( 'jquery-effects-transfer', "/wp-includes/js/jquery/ui/effect-transfer$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 );
210
-
211
-	$scripts->add( 'jquery-ui-accordion', "/wp-includes/js/jquery/ui/accordion$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 );
212
-	$scripts->add( 'jquery-ui-autocomplete', "/wp-includes/js/jquery/ui/autocomplete$dev_suffix.js", array( 'jquery-ui-menu', 'wp-a11y' ), '1.11.4', 1 );
213
-	$scripts->add( 'jquery-ui-button', "/wp-includes/js/jquery/ui/button$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 );
214
-	$scripts->add( 'jquery-ui-datepicker', "/wp-includes/js/jquery/ui/datepicker$dev_suffix.js", array('jquery-ui-core'), '1.11.4', 1 );
215
-	$scripts->add( 'jquery-ui-dialog', "/wp-includes/js/jquery/ui/dialog$dev_suffix.js", array('jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-button', 'jquery-ui-position'), '1.11.4', 1 );
216
-	$scripts->add( 'jquery-ui-draggable', "/wp-includes/js/jquery/ui/draggable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1 );
217
-	$scripts->add( 'jquery-ui-droppable', "/wp-includes/js/jquery/ui/droppable$dev_suffix.js", array('jquery-ui-draggable'), '1.11.4', 1 );
218
-	$scripts->add( 'jquery-ui-menu', "/wp-includes/js/jquery/ui/menu$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.4', 1 );
219
-	$scripts->add( 'jquery-ui-mouse', "/wp-includes/js/jquery/ui/mouse$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget' ), '1.11.4', 1 );
220
-	$scripts->add( 'jquery-ui-position', "/wp-includes/js/jquery/ui/position$dev_suffix.js", array('jquery'), '1.11.4', 1 );
221
-	$scripts->add( 'jquery-ui-progressbar', "/wp-includes/js/jquery/ui/progressbar$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 );
222
-	$scripts->add( 'jquery-ui-resizable', "/wp-includes/js/jquery/ui/resizable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1 );
223
-	$scripts->add( 'jquery-ui-selectable', "/wp-includes/js/jquery/ui/selectable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1 );
224
-	$scripts->add( 'jquery-ui-selectmenu', "/wp-includes/js/jquery/ui/selectmenu$dev_suffix.js", array('jquery-ui-menu'), '1.11.4', 1 );
225
-	$scripts->add( 'jquery-ui-slider', "/wp-includes/js/jquery/ui/slider$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1 );
226
-	$scripts->add( 'jquery-ui-sortable', "/wp-includes/js/jquery/ui/sortable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1 );
227
-	$scripts->add( 'jquery-ui-spinner', "/wp-includes/js/jquery/ui/spinner$dev_suffix.js", array( 'jquery-ui-button' ), '1.11.4', 1 );
228
-	$scripts->add( 'jquery-ui-tabs', "/wp-includes/js/jquery/ui/tabs$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 );
229
-	$scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.4', 1 );
230
-	$scripts->add( 'jquery-ui-widget', "/wp-includes/js/jquery/ui/widget$dev_suffix.js", array('jquery'), '1.11.4', 1 );
192
+	$scripts->add('jquery-ui-core', "/wp-includes/js/jquery/ui/core$dev_suffix.js", array('jquery'), '1.11.4', 1);
193
+	$scripts->add('jquery-effects-core', "/wp-includes/js/jquery/ui/effect$dev_suffix.js", array('jquery'), '1.11.4', 1);
194
+
195
+	$scripts->add('jquery-effects-blind', "/wp-includes/js/jquery/ui/effect-blind$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
196
+	$scripts->add('jquery-effects-bounce', "/wp-includes/js/jquery/ui/effect-bounce$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
197
+	$scripts->add('jquery-effects-clip', "/wp-includes/js/jquery/ui/effect-clip$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
198
+	$scripts->add('jquery-effects-drop', "/wp-includes/js/jquery/ui/effect-drop$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
199
+	$scripts->add('jquery-effects-explode', "/wp-includes/js/jquery/ui/effect-explode$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
200
+	$scripts->add('jquery-effects-fade', "/wp-includes/js/jquery/ui/effect-fade$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
201
+	$scripts->add('jquery-effects-fold', "/wp-includes/js/jquery/ui/effect-fold$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
202
+	$scripts->add('jquery-effects-highlight', "/wp-includes/js/jquery/ui/effect-highlight$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
203
+	$scripts->add('jquery-effects-puff', "/wp-includes/js/jquery/ui/effect-puff$dev_suffix.js", array('jquery-effects-core', 'jquery-effects-scale'), '1.11.4', 1);
204
+	$scripts->add('jquery-effects-pulsate', "/wp-includes/js/jquery/ui/effect-pulsate$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
205
+	$scripts->add('jquery-effects-scale', "/wp-includes/js/jquery/ui/effect-scale$dev_suffix.js", array('jquery-effects-core', 'jquery-effects-size'), '1.11.4', 1);
206
+	$scripts->add('jquery-effects-shake', "/wp-includes/js/jquery/ui/effect-shake$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
207
+	$scripts->add('jquery-effects-size', "/wp-includes/js/jquery/ui/effect-size$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
208
+	$scripts->add('jquery-effects-slide', "/wp-includes/js/jquery/ui/effect-slide$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
209
+	$scripts->add('jquery-effects-transfer', "/wp-includes/js/jquery/ui/effect-transfer$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1);
210
+
211
+	$scripts->add('jquery-ui-accordion', "/wp-includes/js/jquery/ui/accordion$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1);
212
+	$scripts->add('jquery-ui-autocomplete', "/wp-includes/js/jquery/ui/autocomplete$dev_suffix.js", array('jquery-ui-menu', 'wp-a11y'), '1.11.4', 1);
213
+	$scripts->add('jquery-ui-button', "/wp-includes/js/jquery/ui/button$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1);
214
+	$scripts->add('jquery-ui-datepicker', "/wp-includes/js/jquery/ui/datepicker$dev_suffix.js", array('jquery-ui-core'), '1.11.4', 1);
215
+	$scripts->add('jquery-ui-dialog', "/wp-includes/js/jquery/ui/dialog$dev_suffix.js", array('jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-button', 'jquery-ui-position'), '1.11.4', 1);
216
+	$scripts->add('jquery-ui-draggable', "/wp-includes/js/jquery/ui/draggable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1);
217
+	$scripts->add('jquery-ui-droppable', "/wp-includes/js/jquery/ui/droppable$dev_suffix.js", array('jquery-ui-draggable'), '1.11.4', 1);
218
+	$scripts->add('jquery-ui-menu', "/wp-includes/js/jquery/ui/menu$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position'), '1.11.4', 1);
219
+	$scripts->add('jquery-ui-mouse', "/wp-includes/js/jquery/ui/mouse$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1);
220
+	$scripts->add('jquery-ui-position', "/wp-includes/js/jquery/ui/position$dev_suffix.js", array('jquery'), '1.11.4', 1);
221
+	$scripts->add('jquery-ui-progressbar', "/wp-includes/js/jquery/ui/progressbar$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1);
222
+	$scripts->add('jquery-ui-resizable', "/wp-includes/js/jquery/ui/resizable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1);
223
+	$scripts->add('jquery-ui-selectable', "/wp-includes/js/jquery/ui/selectable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1);
224
+	$scripts->add('jquery-ui-selectmenu', "/wp-includes/js/jquery/ui/selectmenu$dev_suffix.js", array('jquery-ui-menu'), '1.11.4', 1);
225
+	$scripts->add('jquery-ui-slider', "/wp-includes/js/jquery/ui/slider$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1);
226
+	$scripts->add('jquery-ui-sortable', "/wp-includes/js/jquery/ui/sortable$dev_suffix.js", array('jquery-ui-mouse'), '1.11.4', 1);
227
+	$scripts->add('jquery-ui-spinner', "/wp-includes/js/jquery/ui/spinner$dev_suffix.js", array('jquery-ui-button'), '1.11.4', 1);
228
+	$scripts->add('jquery-ui-tabs', "/wp-includes/js/jquery/ui/tabs$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1);
229
+	$scripts->add('jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position'), '1.11.4', 1);
230
+	$scripts->add('jquery-ui-widget', "/wp-includes/js/jquery/ui/widget$dev_suffix.js", array('jquery'), '1.11.4', 1);
231 231
 
232 232
 	// Strings for 'jquery-ui-autocomplete' live region messages
233
-	did_action( 'init' ) && $scripts->localize( 'jquery-ui-autocomplete', 'uiAutocompleteL10n', array(
234
-		'noResults' => __( 'No results found.' ),
233
+	did_action('init') && $scripts->localize('jquery-ui-autocomplete', 'uiAutocompleteL10n', array(
234
+		'noResults' => __('No results found.'),
235 235
 		/* translators: Number of results found when using jQuery UI Autocomplete */
236
-		'oneResult' => __( '1 result found. Use up and down arrow keys to navigate.' ),
236
+		'oneResult' => __('1 result found. Use up and down arrow keys to navigate.'),
237 237
 		/* translators: %d: Number of results found when using jQuery UI Autocomplete */
238
-		'manyResults' => __( '%d results found. Use up and down arrow keys to navigate.' ),
239
-		'itemSelected' => __( 'Item selected.' ),
240
-	) );
238
+		'manyResults' => __('%d results found. Use up and down arrow keys to navigate.'),
239
+		'itemSelected' => __('Item selected.'),
240
+	));
241 241
 
242 242
 	// deprecated, not used in core, most functionality is included in jQuery 1.3
243
-	$scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '3.37.0', 1 );
243
+	$scripts->add('jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '3.37.0', 1);
244 244
 
245 245
 	// jQuery plugins
246
-	$scripts->add( 'jquery-color', "/wp-includes/js/jquery/jquery.color.min.js", array('jquery'), '2.1.1', 1 );
247
-	$scripts->add( 'schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20m', 1 );
248
-	$scripts->add( 'jquery-query', "/wp-includes/js/jquery/jquery.query.js", array('jquery'), '2.1.7', 1 );
249
-	$scripts->add( 'jquery-serialize-object', "/wp-includes/js/jquery/jquery.serialize-object.js", array('jquery'), '0.2', 1 );
250
-	$scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array('jquery'), '0.0.2m', 1 );
251
-	$scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), false, 1 );
252
-	$scripts->add( 'jquery-touch-punch', "/wp-includes/js/jquery/jquery.ui.touch-punch.js", array('jquery-ui-widget', 'jquery-ui-mouse'), '0.2.2', 1 );
246
+	$scripts->add('jquery-color', "/wp-includes/js/jquery/jquery.color.min.js", array('jquery'), '2.1.1', 1);
247
+	$scripts->add('schedule', '/wp-includes/js/jquery/jquery.schedule.js', array('jquery'), '20m', 1);
248
+	$scripts->add('jquery-query', "/wp-includes/js/jquery/jquery.query.js", array('jquery'), '2.1.7', 1);
249
+	$scripts->add('jquery-serialize-object', "/wp-includes/js/jquery/jquery.serialize-object.js", array('jquery'), '0.2', 1);
250
+	$scripts->add('jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array('jquery'), '0.0.2m', 1);
251
+	$scripts->add('jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), false, 1);
252
+	$scripts->add('jquery-touch-punch', "/wp-includes/js/jquery/jquery.ui.touch-punch.js", array('jquery-ui-widget', 'jquery-ui-mouse'), '0.2.2', 1);
253 253
 
254 254
 	// Not used any more, registered for backwards compatibility.
255
-	$scripts->add( 'suggest', "/wp-includes/js/jquery/suggest$suffix.js", array('jquery'), '1.1-20110113', 1 );
255
+	$scripts->add('suggest', "/wp-includes/js/jquery/suggest$suffix.js", array('jquery'), '1.1-20110113', 1);
256 256
 
257 257
 	// Masonry v2 depended on jQuery. v3 does not. The older jquery-masonry handle is a shiv.
258 258
 	// It sets jQuery as a dependency, as the theme may have been implicitly loading it this way.
259
-	$scripts->add( 'imagesloaded', "/wp-includes/js/imagesloaded.min.js", array(), '3.2.0', 1 );
260
-	$scripts->add( 'masonry', "/wp-includes/js/masonry.min.js", array( 'imagesloaded' ), '3.3.2', 1 );
261
-	$scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2b', 1 );
259
+	$scripts->add('imagesloaded', "/wp-includes/js/imagesloaded.min.js", array(), '3.2.0', 1);
260
+	$scripts->add('masonry', "/wp-includes/js/masonry.min.js", array('imagesloaded'), '3.3.2', 1);
261
+	$scripts->add('jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array('jquery', 'masonry'), '3.1.2b', 1);
262 262
 
263
-	$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20121105', 1 );
264
-	did_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array(
263
+	$scripts->add('thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20121105', 1);
264
+	did_action('init') && $scripts->localize('thickbox', 'thickboxL10n', array(
265 265
 		'next' => __('Next &gt;'),
266 266
 		'prev' => __('&lt; Prev'),
267 267
 		'image' => __('Image'),
@@ -269,11 +269,11 @@  discard block
 block discarded – undo
269 269
 		'close' => __('Close'),
270 270
 		'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'),
271 271
 		'loadingAnimation' => includes_url('js/thickbox/loadingAnimation.gif'),
272
-	) );
272
+	));
273 273
 
274
-	$scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop.min.js", array('jquery'), '0.9.12');
274
+	$scripts->add('jcrop', "/wp-includes/js/jcrop/jquery.Jcrop.min.js", array('jquery'), '0.9.12');
275 275
 
276
-	$scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", array(), '2.2-20120417');
276
+	$scripts->add('swfobject', "/wp-includes/js/swfobject.js", array(), '2.2-20120417');
277 277
 
278 278
 	// error message for both plupload and swfupload
279 279
 	$uploader_l10n = array(
@@ -302,82 +302,82 @@  discard block
 block discarded – undo
302 302
 		'error_uploading' => __('&#8220;%s&#8221; has failed to upload.')
303 303
 	);
304 304
 
305
-	$scripts->add( 'plupload', '/wp-includes/js/plupload/plupload.full.min.js', array(), '2.1.8' );
305
+	$scripts->add('plupload', '/wp-includes/js/plupload/plupload.full.min.js', array(), '2.1.8');
306 306
 	// Back compat handles:
307
-	foreach ( array( 'all', 'html5', 'flash', 'silverlight', 'html4' ) as $handle ) {
308
-		$scripts->add( "plupload-$handle", false, array( 'plupload' ), '2.1.1' );
307
+	foreach (array('all', 'html5', 'flash', 'silverlight', 'html4') as $handle) {
308
+		$scripts->add("plupload-$handle", false, array('plupload'), '2.1.1');
309 309
 	}
310 310
 
311
-	$scripts->add( 'plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array( 'plupload', 'jquery' ) );
312
-	did_action( 'init' ) && $scripts->localize( 'plupload-handlers', 'pluploadL10n', $uploader_l10n );
311
+	$scripts->add('plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array('plupload', 'jquery'));
312
+	did_action('init') && $scripts->localize('plupload-handlers', 'pluploadL10n', $uploader_l10n);
313 313
 
314
-	$scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array( 'plupload', 'jquery', 'json2', 'media-models' ), false, 1 );
315
-	did_action( 'init' ) && $scripts->localize( 'wp-plupload', 'pluploadL10n', $uploader_l10n );
314
+	$scripts->add('wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array('plupload', 'jquery', 'json2', 'media-models'), false, 1);
315
+	did_action('init') && $scripts->localize('wp-plupload', 'pluploadL10n', $uploader_l10n);
316 316
 
317 317
 	// keep 'swfupload' for back-compat.
318
-	$scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', array(), '2201-20110113');
319
-	$scripts->add( 'swfupload-swfobject', '/wp-includes/js/swfupload/plugins/swfupload.swfobject.js', array('swfupload', 'swfobject'), '2201a');
320
-	$scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2201');
321
-	$scripts->add( 'swfupload-speed', '/wp-includes/js/swfupload/plugins/swfupload.speed.js', array('swfupload'), '2201');
322
-	$scripts->add( 'swfupload-all', false, array('swfupload', 'swfupload-swfobject', 'swfupload-queue'), '2201');
323
-	$scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524');
324
-	did_action( 'init' ) && $scripts->localize( 'swfupload-handlers', 'swfuploadL10n', $uploader_l10n );
318
+	$scripts->add('swfupload', '/wp-includes/js/swfupload/swfupload.js', array(), '2201-20110113');
319
+	$scripts->add('swfupload-swfobject', '/wp-includes/js/swfupload/plugins/swfupload.swfobject.js', array('swfupload', 'swfobject'), '2201a');
320
+	$scripts->add('swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2201');
321
+	$scripts->add('swfupload-speed', '/wp-includes/js/swfupload/plugins/swfupload.speed.js', array('swfupload'), '2201');
322
+	$scripts->add('swfupload-all', false, array('swfupload', 'swfupload-swfobject', 'swfupload-queue'), '2201');
323
+	$scripts->add('swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524');
324
+	did_action('init') && $scripts->localize('swfupload-handlers', 'swfuploadL10n', $uploader_l10n);
325 325
 
326
-	$scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", array(), false, 1 );
326
+	$scripts->add('comment-reply', "/wp-includes/js/comment-reply$suffix.js", array(), false, 1);
327 327
 
328
-	$scripts->add( 'json2', "/wp-includes/js/json2$suffix.js", array(), '2015-05-03' );
329
-	did_action( 'init' ) && $scripts->add_data( 'json2', 'conditional', 'lt IE 8' );
328
+	$scripts->add('json2', "/wp-includes/js/json2$suffix.js", array(), '2015-05-03');
329
+	did_action('init') && $scripts->add_data('json2', 'conditional', 'lt IE 8');
330 330
 
331
-	$scripts->add( 'underscore', "/wp-includes/js/underscore$dev_suffix.js", array(), '1.8.3', 1 );
332
-	$scripts->add( 'backbone', "/wp-includes/js/backbone$dev_suffix.js", array( 'underscore','jquery' ), '1.2.3', 1 );
331
+	$scripts->add('underscore', "/wp-includes/js/underscore$dev_suffix.js", array(), '1.8.3', 1);
332
+	$scripts->add('backbone', "/wp-includes/js/backbone$dev_suffix.js", array('underscore', 'jquery'), '1.2.3', 1);
333 333
 
334
-	$scripts->add( 'wp-util', "/wp-includes/js/wp-util$suffix.js", array('underscore', 'jquery'), false, 1 );
335
-	did_action( 'init' ) && $scripts->localize( 'wp-util', '_wpUtilSettings', array(
334
+	$scripts->add('wp-util', "/wp-includes/js/wp-util$suffix.js", array('underscore', 'jquery'), false, 1);
335
+	did_action('init') && $scripts->localize('wp-util', '_wpUtilSettings', array(
336 336
 		'ajax' => array(
337
-			'url' => admin_url( 'admin-ajax.php', 'relative' ),
337
+			'url' => admin_url('admin-ajax.php', 'relative'),
338 338
 		),
339
-	) );
339
+	));
340 340
 
341
-	$scripts->add( 'wp-backbone', "/wp-includes/js/wp-backbone$suffix.js", array('backbone', 'wp-util'), false, 1 );
341
+	$scripts->add('wp-backbone', "/wp-includes/js/wp-backbone$suffix.js", array('backbone', 'wp-util'), false, 1);
342 342
 
343
-	$scripts->add( 'revisions', "/wp-admin/js/revisions$suffix.js", array( 'wp-backbone', 'jquery-ui-slider', 'hoverIntent' ), false, 1 );
343
+	$scripts->add('revisions', "/wp-admin/js/revisions$suffix.js", array('wp-backbone', 'jquery-ui-slider', 'hoverIntent'), false, 1);
344 344
 
345
-	$scripts->add( 'imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array('jquery'), false, 1 );
345
+	$scripts->add('imgareaselect', "/wp-includes/js/imgareaselect/jquery.imgareaselect$suffix.js", array('jquery'), false, 1);
346 346
 
347
-	$scripts->add( 'mediaelement', "/wp-includes/js/mediaelement/mediaelement-and-player.min.js", array('jquery'), '2.22.0', 1 );
348
-	did_action( 'init' ) && $scripts->localize( 'mediaelement', 'mejsL10n', array(
349
-		'language' => get_bloginfo( 'language' ),
347
+	$scripts->add('mediaelement', "/wp-includes/js/mediaelement/mediaelement-and-player.min.js", array('jquery'), '2.22.0', 1);
348
+	did_action('init') && $scripts->localize('mediaelement', 'mejsL10n', array(
349
+		'language' => get_bloginfo('language'),
350 350
 		'strings'  => array(
351
-			'Close'                   => __( 'Close' ),
352
-			'Fullscreen'              => __( 'Fullscreen' ),
353
-			'Turn off Fullscreen'     => __( 'Turn off Fullscreen' ),
354
-			'Go Fullscreen'           => __( 'Go Fullscreen' ),
355
-			'Download File'           => __( 'Download File' ),
356
-			'Download Video'          => __( 'Download Video' ),
357
-			'Play'                    => __( 'Play' ),
358
-			'Pause'                   => __( 'Pause' ),
359
-			'Captions/Subtitles'      => __( 'Captions/Subtitles' ),
360
-			'None'                    => __( 'None', 'no captions/subtitles' ),
361
-			'Time Slider'             => __( 'Time Slider' ),
351
+			'Close'                   => __('Close'),
352
+			'Fullscreen'              => __('Fullscreen'),
353
+			'Turn off Fullscreen'     => __('Turn off Fullscreen'),
354
+			'Go Fullscreen'           => __('Go Fullscreen'),
355
+			'Download File'           => __('Download File'),
356
+			'Download Video'          => __('Download Video'),
357
+			'Play'                    => __('Play'),
358
+			'Pause'                   => __('Pause'),
359
+			'Captions/Subtitles'      => __('Captions/Subtitles'),
360
+			'None'                    => __('None', 'no captions/subtitles'),
361
+			'Time Slider'             => __('Time Slider'),
362 362
 			/* translators: %1: number of seconds (30 by default) */
363
-			'Skip back %1 seconds'    => __( 'Skip back %1 seconds' ),
364
-			'Video Player'            => __( 'Video Player' ),
365
-			'Audio Player'            => __( 'Audio Player' ),
366
-			'Volume Slider'           => __( 'Volume Slider' ),
367
-			'Mute Toggle'             => __( 'Mute Toggle' ),
368
-			'Unmute'                  => __( 'Unmute' ),
369
-			'Mute'                    => __( 'Mute' ),
370
-			'Use Up/Down Arrow keys to increase or decrease volume.' => __( 'Use Up/Down Arrow keys to increase or decrease volume.' ),
371
-			'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' => __( 'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' ),
363
+			'Skip back %1 seconds'    => __('Skip back %1 seconds'),
364
+			'Video Player'            => __('Video Player'),
365
+			'Audio Player'            => __('Audio Player'),
366
+			'Volume Slider'           => __('Volume Slider'),
367
+			'Mute Toggle'             => __('Mute Toggle'),
368
+			'Unmute'                  => __('Unmute'),
369
+			'Mute'                    => __('Mute'),
370
+			'Use Up/Down Arrow keys to increase or decrease volume.' => __('Use Up/Down Arrow keys to increase or decrease volume.'),
371
+			'Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.' => __('Use Left/Right Arrow keys to advance one second, Up/Down arrows to advance ten seconds.'),
372 372
 		),
373
-	) );
373
+	));
374 374
 
375 375
 
376
-	$scripts->add( 'wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement$suffix.js", array('mediaelement'), false, 1 );
376
+	$scripts->add('wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement$suffix.js", array('mediaelement'), false, 1);
377 377
 	$mejs_settings = array(
378
-		'pluginPath' => includes_url( 'js/mediaelement/', 'relative' ),
378
+		'pluginPath' => includes_url('js/mediaelement/', 'relative'),
379 379
 	);
380
-	did_action( 'init' ) && $scripts->localize( 'mediaelement', '_wpmejsSettings',
380
+	did_action('init') && $scripts->localize('mediaelement', '_wpmejsSettings',
381 381
 		/**
382 382
 		 * Filters the MediaElement configuration settings.
383 383
 		 *
@@ -385,172 +385,172 @@  discard block
 block discarded – undo
385 385
 		 *
386 386
 		 * @param array $mejs_settings MediaElement settings array.
387 387
 		 */
388
-		apply_filters( 'mejs_settings', $mejs_settings )
388
+		apply_filters('mejs_settings', $mejs_settings)
389 389
 	);
390 390
 
391
-	$scripts->add( 'froogaloop',  "/wp-includes/js/mediaelement/froogaloop.min.js", array(), '2.0' );
392
-	$scripts->add( 'wp-playlist', "/wp-includes/js/mediaelement/wp-playlist$suffix.js", array( 'wp-util', 'backbone', 'mediaelement' ), false, 1 );
393
-
394
-	$scripts->add( 'zxcvbn-async', "/wp-includes/js/zxcvbn-async$suffix.js", array(), '1.0' );
395
-	did_action( 'init' ) && $scripts->localize( 'zxcvbn-async', '_zxcvbnSettings', array(
396
-		'src' => empty( $guessed_url ) ? includes_url( '/js/zxcvbn.min.js' ) : $scripts->base_url . '/wp-includes/js/zxcvbn.min.js',
397
-	) );
398
-
399
-	$scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array( 'jquery', 'zxcvbn-async' ), false, 1 );
400
-	did_action( 'init' ) && $scripts->localize( 'password-strength-meter', 'pwsL10n', array(
401
-		'unknown'  => _x( 'Password strength unknown', 'password strength' ),
402
-		'short'    => _x( 'Very weak', 'password strength' ),
403
-		'bad'      => _x( 'Weak', 'password strength' ),
404
-		'good'     => _x( 'Medium', 'password strength' ),
405
-		'strong'   => _x( 'Strong', 'password strength' ),
406
-		'mismatch' => _x( 'Mismatch', 'password mismatch' ),
407
-	) );
408
-
409
-	$scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 );
410
-	did_action( 'init' ) && $scripts->localize( 'user-profile', 'userProfileL10n', array(
411
-		'warn'     => __( 'Your new password has not been saved.' ),
412
-		'warnWeak' => __( 'Confirm use of weak password' ),
413
-		'show'     => __( 'Show' ),
414
-		'hide'     => __( 'Hide' ),
415
-		'cancel'   => __( 'Cancel' ),
416
-		'ariaShow' => esc_attr__( 'Show password' ),
417
-		'ariaHide' => esc_attr__( 'Hide password' ),
418
-	) );
419
-
420
-	$scripts->add( 'language-chooser', "/wp-admin/js/language-chooser$suffix.js", array( 'jquery' ), false, 1 );
421
-
422
-	$scripts->add( 'user-suggest', "/wp-admin/js/user-suggest$suffix.js", array( 'jquery-ui-autocomplete' ), false, 1 );
423
-
424
-	$scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 );
425
-
426
-	$scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 );
427
-	did_action( 'init' ) && $scripts->localize( 'wplink', 'wpLinkL10n', array(
391
+	$scripts->add('froogaloop', "/wp-includes/js/mediaelement/froogaloop.min.js", array(), '2.0');
392
+	$scripts->add('wp-playlist', "/wp-includes/js/mediaelement/wp-playlist$suffix.js", array('wp-util', 'backbone', 'mediaelement'), false, 1);
393
+
394
+	$scripts->add('zxcvbn-async', "/wp-includes/js/zxcvbn-async$suffix.js", array(), '1.0');
395
+	did_action('init') && $scripts->localize('zxcvbn-async', '_zxcvbnSettings', array(
396
+		'src' => empty($guessed_url) ? includes_url('/js/zxcvbn.min.js') : $scripts->base_url.'/wp-includes/js/zxcvbn.min.js',
397
+	));
398
+
399
+	$scripts->add('password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array('jquery', 'zxcvbn-async'), false, 1);
400
+	did_action('init') && $scripts->localize('password-strength-meter', 'pwsL10n', array(
401
+		'unknown'  => _x('Password strength unknown', 'password strength'),
402
+		'short'    => _x('Very weak', 'password strength'),
403
+		'bad'      => _x('Weak', 'password strength'),
404
+		'good'     => _x('Medium', 'password strength'),
405
+		'strong'   => _x('Strong', 'password strength'),
406
+		'mismatch' => _x('Mismatch', 'password mismatch'),
407
+	));
408
+
409
+	$scripts->add('user-profile', "/wp-admin/js/user-profile$suffix.js", array('jquery', 'password-strength-meter', 'wp-util'), false, 1);
410
+	did_action('init') && $scripts->localize('user-profile', 'userProfileL10n', array(
411
+		'warn'     => __('Your new password has not been saved.'),
412
+		'warnWeak' => __('Confirm use of weak password'),
413
+		'show'     => __('Show'),
414
+		'hide'     => __('Hide'),
415
+		'cancel'   => __('Cancel'),
416
+		'ariaShow' => esc_attr__('Show password'),
417
+		'ariaHide' => esc_attr__('Hide password'),
418
+	));
419
+
420
+	$scripts->add('language-chooser', "/wp-admin/js/language-chooser$suffix.js", array('jquery'), false, 1);
421
+
422
+	$scripts->add('user-suggest', "/wp-admin/js/user-suggest$suffix.js", array('jquery-ui-autocomplete'), false, 1);
423
+
424
+	$scripts->add('admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1);
425
+
426
+	$scripts->add('wplink', "/wp-includes/js/wplink$suffix.js", array('jquery', 'wp-a11y'), false, 1);
427
+	did_action('init') && $scripts->localize('wplink', 'wpLinkL10n', array(
428 428
 		'title' => __('Insert/edit link'),
429 429
 		'update' => __('Update'),
430 430
 		'save' => __('Add Link'),
431 431
 		'noTitle' => __('(no title)'),
432 432
 		'noMatchesFound' => __('No results found.'),
433
-		'linkSelected' => __( 'Link selected.' ),
434
-		'linkInserted' => __( 'Link inserted.' ),
435
-	) );
433
+		'linkSelected' => __('Link selected.'),
434
+		'linkInserted' => __('Link inserted.'),
435
+	));
436 436
 
437
-	$scripts->add( 'wpdialogs', "/wp-includes/js/wpdialog$suffix.js", array( 'jquery-ui-dialog' ), false, 1 );
437
+	$scripts->add('wpdialogs', "/wp-includes/js/wpdialog$suffix.js", array('jquery-ui-dialog'), false, 1);
438 438
 
439
-	$scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array(), false, 1 );
440
-	did_action( 'init' ) && $scripts->localize( 'word-count', 'wordCountL10n', array(
439
+	$scripts->add('word-count', "/wp-admin/js/word-count$suffix.js", array(), false, 1);
440
+	did_action('init') && $scripts->localize('word-count', 'wordCountL10n', array(
441 441
 		/*
442 442
 		 * translators: If your word count is based on single characters (e.g. East Asian characters),
443 443
 		 * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
444 444
 		 * Do not translate into your own language.
445 445
 		 */
446
-		'type' => _x( 'words', 'Word count type. Do not translate!' ),
447
-		'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array()
448
-	) );
449
-
450
-	$scripts->add( 'media-upload', "/wp-admin/js/media-upload$suffix.js", array( 'thickbox', 'shortcode' ), false, 1 );
451
-
452
-	$scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array('jquery'), '1.8.1', 1 );
453
-
454
-	$scripts->add( 'customize-base',     "/wp-includes/js/customize-base$suffix.js",     array( 'jquery', 'json2', 'underscore' ), false, 1 );
455
-	$scripts->add( 'customize-loader',   "/wp-includes/js/customize-loader$suffix.js",   array( 'customize-base' ), false, 1 );
456
-	$scripts->add( 'customize-preview',  "/wp-includes/js/customize-preview$suffix.js",  array( 'wp-a11y', 'customize-base' ), false, 1 );
457
-	$scripts->add( 'customize-models',   "/wp-includes/js/customize-models.js", array( 'underscore', 'backbone' ), false, 1 );
458
-	$scripts->add( 'customize-views',    "/wp-includes/js/customize-views.js",  array( 'jquery', 'underscore', 'imgareaselect', 'customize-models', 'media-editor', 'media-views' ), false, 1 );
459
-	$scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base', 'wp-a11y', 'wp-util' ), false, 1 );
460
-	did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array(
461
-		'activate'           => __( 'Save &amp; Activate' ),
462
-		'save'               => __( 'Save &amp; Publish' ),
463
-		'saveAlert'          => __( 'The changes you made will be lost if you navigate away from this page.' ),
464
-		'saved'              => __( 'Saved' ),
465
-		'cancel'             => __( 'Cancel' ),
466
-		'close'              => __( 'Close' ),
467
-		'cheatin'            => __( 'Cheatin&#8217; uh?' ),
468
-		'notAllowed'         => __( 'Sorry, you are not allowed to customize this site.' ),
469
-		'previewIframeTitle' => __( 'Site Preview' ),
470
-		'loginIframeTitle'   => __( 'Session expired' ),
471
-		'collapseSidebar'    => _x( 'Hide Controls', 'label for hide controls button without length constraints' ),
472
-		'expandSidebar'      => _x( 'Show Controls', 'label for hide controls button without length constraints' ),
473
-		'untitledBlogName'   => __( '(Untitled)' ),
446
+		'type' => _x('words', 'Word count type. Do not translate!'),
447
+		'shortcodes' => ! empty($GLOBALS['shortcode_tags']) ? array_keys($GLOBALS['shortcode_tags']) : array()
448
+	));
449
+
450
+	$scripts->add('media-upload', "/wp-admin/js/media-upload$suffix.js", array('thickbox', 'shortcode'), false, 1);
451
+
452
+	$scripts->add('hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array('jquery'), '1.8.1', 1);
453
+
454
+	$scripts->add('customize-base', "/wp-includes/js/customize-base$suffix.js", array('jquery', 'json2', 'underscore'), false, 1);
455
+	$scripts->add('customize-loader', "/wp-includes/js/customize-loader$suffix.js", array('customize-base'), false, 1);
456
+	$scripts->add('customize-preview', "/wp-includes/js/customize-preview$suffix.js", array('wp-a11y', 'customize-base'), false, 1);
457
+	$scripts->add('customize-models', "/wp-includes/js/customize-models.js", array('underscore', 'backbone'), false, 1);
458
+	$scripts->add('customize-views', "/wp-includes/js/customize-views.js", array('jquery', 'underscore', 'imgareaselect', 'customize-models', 'media-editor', 'media-views'), false, 1);
459
+	$scripts->add('customize-controls', "/wp-admin/js/customize-controls$suffix.js", array('customize-base', 'wp-a11y', 'wp-util'), false, 1);
460
+	did_action('init') && $scripts->localize('customize-controls', '_wpCustomizeControlsL10n', array(
461
+		'activate'           => __('Save &amp; Activate'),
462
+		'save'               => __('Save &amp; Publish'),
463
+		'saveAlert'          => __('The changes you made will be lost if you navigate away from this page.'),
464
+		'saved'              => __('Saved'),
465
+		'cancel'             => __('Cancel'),
466
+		'close'              => __('Close'),
467
+		'cheatin'            => __('Cheatin&#8217; uh?'),
468
+		'notAllowed'         => __('Sorry, you are not allowed to customize this site.'),
469
+		'previewIframeTitle' => __('Site Preview'),
470
+		'loginIframeTitle'   => __('Session expired'),
471
+		'collapseSidebar'    => _x('Hide Controls', 'label for hide controls button without length constraints'),
472
+		'expandSidebar'      => _x('Show Controls', 'label for hide controls button without length constraints'),
473
+		'untitledBlogName'   => __('(Untitled)'),
474 474
 		// Used for overriding the file types allowed in plupload.
475
-		'allowedFiles'       => __( 'Allowed Files' ),
476
-	) );
477
-	$scripts->add( 'customize-selective-refresh', "/wp-includes/js/customize-selective-refresh$suffix.js", array( 'jquery', 'wp-util', 'customize-preview' ), false, 1 );
475
+		'allowedFiles'       => __('Allowed Files'),
476
+	));
477
+	$scripts->add('customize-selective-refresh', "/wp-includes/js/customize-selective-refresh$suffix.js", array('jquery', 'wp-util', 'customize-preview'), false, 1);
478 478
 
479
-	$scripts->add( 'customize-widgets', "/wp-admin/js/customize-widgets$suffix.js", array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-droppable', 'wp-backbone', 'customize-controls' ), false, 1 );
480
-	$scripts->add( 'customize-preview-widgets', "/wp-includes/js/customize-preview-widgets$suffix.js", array( 'jquery', 'wp-util', 'customize-preview', 'customize-selective-refresh' ), false, 1 );
479
+	$scripts->add('customize-widgets', "/wp-admin/js/customize-widgets$suffix.js", array('jquery', 'jquery-ui-sortable', 'jquery-ui-droppable', 'wp-backbone', 'customize-controls'), false, 1);
480
+	$scripts->add('customize-preview-widgets', "/wp-includes/js/customize-preview-widgets$suffix.js", array('jquery', 'wp-util', 'customize-preview', 'customize-selective-refresh'), false, 1);
481 481
 
482
-	$scripts->add( 'customize-nav-menus', "/wp-admin/js/customize-nav-menus$suffix.js", array( 'jquery', 'wp-backbone', 'customize-controls', 'accordion', 'nav-menu' ), false, 1 );
483
-	$scripts->add( 'customize-preview-nav-menus', "/wp-includes/js/customize-preview-nav-menus$suffix.js", array( 'jquery', 'wp-util', 'customize-preview', 'customize-selective-refresh' ), false, 1 );
482
+	$scripts->add('customize-nav-menus', "/wp-admin/js/customize-nav-menus$suffix.js", array('jquery', 'wp-backbone', 'customize-controls', 'accordion', 'nav-menu'), false, 1);
483
+	$scripts->add('customize-preview-nav-menus', "/wp-includes/js/customize-preview-nav-menus$suffix.js", array('jquery', 'wp-util', 'customize-preview', 'customize-selective-refresh'), false, 1);
484 484
 
485
-	$scripts->add( 'wp-custom-header', "/wp-includes/js/wp-custom-header$suffix.js", array( 'wp-a11y' ), false, 1 );
485
+	$scripts->add('wp-custom-header', "/wp-includes/js/wp-custom-header$suffix.js", array('wp-a11y'), false, 1);
486 486
 
487
-	$scripts->add( 'accordion', "/wp-admin/js/accordion$suffix.js", array( 'jquery' ), false, 1 );
487
+	$scripts->add('accordion', "/wp-admin/js/accordion$suffix.js", array('jquery'), false, 1);
488 488
 
489
-	$scripts->add( 'shortcode', "/wp-includes/js/shortcode$suffix.js", array( 'underscore' ), false, 1 );
490
-	$scripts->add( 'media-models', "/wp-includes/js/media-models$suffix.js", array( 'wp-backbone' ), false, 1 );
491
-	did_action( 'init' ) && $scripts->localize( 'media-models', '_wpMediaModelsL10n', array(
489
+	$scripts->add('shortcode', "/wp-includes/js/shortcode$suffix.js", array('underscore'), false, 1);
490
+	$scripts->add('media-models', "/wp-includes/js/media-models$suffix.js", array('wp-backbone'), false, 1);
491
+	did_action('init') && $scripts->localize('media-models', '_wpMediaModelsL10n', array(
492 492
 		'settings' => array(
493
-			'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ),
494
-			'post' => array( 'id' => 0 ),
493
+			'ajaxurl' => admin_url('admin-ajax.php', 'relative'),
494
+			'post' => array('id' => 0),
495 495
 		),
496
-	) );
496
+	));
497 497
 
498
-	$scripts->add( 'wp-embed', "/wp-includes/js/wp-embed$suffix.js" );
498
+	$scripts->add('wp-embed', "/wp-includes/js/wp-embed$suffix.js");
499 499
 
500 500
 	// To enqueue media-views or media-editor, call wp_enqueue_media().
501 501
 	// Both rely on numerous settings, styles, and templates to operate correctly.
502
-	$scripts->add( 'media-views',  "/wp-includes/js/media-views$suffix.js",  array( 'utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement' ), false, 1 );
503
-	$scripts->add( 'media-editor', "/wp-includes/js/media-editor$suffix.js", array( 'shortcode', 'media-views' ), false, 1 );
504
-	$scripts->add( 'media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array( 'media-editor' ), false, 1 );
505
-	$scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'jquery', 'media-views', 'media-audiovideo' ), false, 1 );
506
-
507
-	$scripts->add( 'wp-api', "/wp-includes/js/wp-api$suffix.js", array( 'jquery', 'backbone', 'underscore' ), false, 1 );
508
-	did_action( 'init' ) && $scripts->localize( 'wp-api', 'wpApiSettings', array(
509
-		'root'          => esc_url_raw( get_rest_url() ),
510
-		'nonce'         => ( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'wp_rest' ),
502
+	$scripts->add('media-views', "/wp-includes/js/media-views$suffix.js", array('utils', 'media-models', 'wp-plupload', 'jquery-ui-sortable', 'wp-mediaelement'), false, 1);
503
+	$scripts->add('media-editor', "/wp-includes/js/media-editor$suffix.js", array('shortcode', 'media-views'), false, 1);
504
+	$scripts->add('media-audiovideo', "/wp-includes/js/media-audiovideo$suffix.js", array('media-editor'), false, 1);
505
+	$scripts->add('mce-view', "/wp-includes/js/mce-view$suffix.js", array('shortcode', 'jquery', 'media-views', 'media-audiovideo'), false, 1);
506
+
507
+	$scripts->add('wp-api', "/wp-includes/js/wp-api$suffix.js", array('jquery', 'backbone', 'underscore'), false, 1);
508
+	did_action('init') && $scripts->localize('wp-api', 'wpApiSettings', array(
509
+		'root'          => esc_url_raw(get_rest_url()),
510
+		'nonce'         => (wp_installing() && ! is_multisite()) ? '' : wp_create_nonce('wp_rest'),
511 511
 		'versionString' => 'wp/v2/',
512
-	) );
512
+	));
513 513
 
514
-	if ( is_admin() ) {
515
-		$scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 );
516
-		did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
514
+	if (is_admin()) {
515
+		$scripts->add('admin-tags', "/wp-admin/js/tags$suffix.js", array('jquery', 'wp-ajax-response'), false, 1);
516
+		did_action('init') && $scripts->localize('admin-tags', 'tagsl10n', array(
517 517
 			'noPerm' => __('Sorry, you are not allowed to do that.'),
518 518
 			'broken' => __('An unidentified error has occurred.')
519 519
 		));
520 520
 
521
-		$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'quicktags', 'jquery-query'), false, 1 );
522
-		did_action( 'init' ) && $scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
521
+		$scripts->add('admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'quicktags', 'jquery-query'), false, 1);
522
+		did_action('init') && $scripts->localize('admin-comments', 'adminCommentsL10n', array(
523 523
 			'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
524 524
 			'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']),
525
-			'replyApprove' => __( 'Approve and Reply' ),
526
-			'reply' => __( 'Reply' ),
527
-			'warnQuickEdit' => __( "Are you sure you want to edit this comment?\nThe changes you made will be lost." ),
528
-			'warnCommentChanges' => __( "Are you sure you want to do this?\nThe comment changes you made will be lost." ),
529
-			'docTitleComments' => __( 'Comments' ),
525
+			'replyApprove' => __('Approve and Reply'),
526
+			'reply' => __('Reply'),
527
+			'warnQuickEdit' => __("Are you sure you want to edit this comment?\nThe changes you made will be lost."),
528
+			'warnCommentChanges' => __("Are you sure you want to do this?\nThe comment changes you made will be lost."),
529
+			'docTitleComments' => __('Comments'),
530 530
 			/* translators: %s: comments count */
531
-			'docTitleCommentsCount' => __( 'Comments (%s)' ),
532
-		) );
531
+			'docTitleCommentsCount' => __('Comments (%s)'),
532
+		));
533 533
 
534
-		$scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array('jquery'), false, 1 );
534
+		$scripts->add('xfn', "/wp-admin/js/xfn$suffix.js", array('jquery'), false, 1);
535 535
 
536
-		$scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), false, 1 );
537
-		did_action( 'init' ) && $scripts->localize( 'postbox', 'postBoxL10n', array(
538
-			'postBoxEmptyString' => __( 'Drag boxes here' ),
539
-		) );
536
+		$scripts->add('postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), false, 1);
537
+		did_action('init') && $scripts->localize('postbox', 'postBoxL10n', array(
538
+			'postBoxEmptyString' => __('Drag boxes here'),
539
+		));
540 540
 
541
-		$scripts->add( 'tags-box', "/wp-admin/js/tags-box$suffix.js", array( 'jquery', 'tags-suggest' ), false, 1 );
541
+		$scripts->add('tags-box', "/wp-admin/js/tags-box$suffix.js", array('jquery', 'tags-suggest'), false, 1);
542 542
 
543
-		$scripts->add( 'tags-suggest', "/wp-admin/js/tags-suggest$suffix.js", array( 'jquery-ui-autocomplete', 'wp-a11y' ), false, 1 );
544
-		did_action( 'init' ) && $scripts->localize( 'tags-suggest', 'tagsSuggestL10n', array(
545
-			'tagDelimiter' => _x( ',', 'tag delimiter' ),
546
-			'removeTerm'   => __( 'Remove term:' ),
547
-			'termSelected' => __( 'Term selected.' ),
548
-			'termAdded'    => __( 'Term added.' ),
549
-			'termRemoved'  => __( 'Term removed.' ),
550
-		) );
543
+		$scripts->add('tags-suggest', "/wp-admin/js/tags-suggest$suffix.js", array('jquery-ui-autocomplete', 'wp-a11y'), false, 1);
544
+		did_action('init') && $scripts->localize('tags-suggest', 'tagsSuggestL10n', array(
545
+			'tagDelimiter' => _x(',', 'tag delimiter'),
546
+			'removeTerm'   => __('Remove term:'),
547
+			'termSelected' => __('Term selected.'),
548
+			'termAdded'    => __('Term added.'),
549
+			'termRemoved'  => __('Term removed.'),
550
+		));
551 551
 
552
-		$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y' ), false, 1 );
553
-		did_action( 'init' ) && $scripts->localize( 'post', 'postL10n', array(
552
+		$scripts->add('post', "/wp-admin/js/post$suffix.js", array('suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y'), false, 1);
553
+		did_action('init') && $scripts->localize('post', 'postL10n', array(
554 554
 			'ok' => __('OK'),
555 555
 			'cancel' => __('Cancel'),
556 556
 			'publishOn' => __('Publish on:'),
@@ -573,191 +573,191 @@  discard block
 block discarded – undo
573 573
 			'published' => __('Published'),
574 574
 			'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'),
575 575
 			'savingText' => __('Saving Draft&#8230;'),
576
-			'permalinkSaved' => __( 'Permalink saved' ),
577
-		) );
578
-
579
-		$scripts->add( 'press-this', "/wp-admin/js/press-this$suffix.js", array( 'jquery', 'tags-box' ), false, 1 );
580
-		did_action( 'init' ) && $scripts->localize( 'press-this', 'pressThisL10n', array(
581
-			'newPost' => __( 'Title' ),
582
-			'serverError' => __( 'Connection lost or the server is busy. Please try again later.' ),
583
-			'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
576
+			'permalinkSaved' => __('Permalink saved'),
577
+		));
578
+
579
+		$scripts->add('press-this', "/wp-admin/js/press-this$suffix.js", array('jquery', 'tags-box'), false, 1);
580
+		did_action('init') && $scripts->localize('press-this', 'pressThisL10n', array(
581
+			'newPost' => __('Title'),
582
+			'serverError' => __('Connection lost or the server is busy. Please try again later.'),
583
+			'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'),
584 584
 			/* translators: %d: nth embed found in a post */
585
-			'suggestedEmbedAlt' => __( 'Suggested embed #%d' ),
585
+			'suggestedEmbedAlt' => __('Suggested embed #%d'),
586 586
 			/* translators: %d: nth image found in a post */
587
-			'suggestedImgAlt' => __( 'Suggested image #%d' ),
588
-		) );
587
+			'suggestedImgAlt' => __('Suggested image #%d'),
588
+		));
589 589
 
590
-		$scripts->add( 'editor-expand', "/wp-admin/js/editor-expand$suffix.js", array( 'jquery', 'underscore' ), false, 1 );
590
+		$scripts->add('editor-expand', "/wp-admin/js/editor-expand$suffix.js", array('jquery', 'underscore'), false, 1);
591 591
 
592
-		$scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 );
592
+		$scripts->add('link', "/wp-admin/js/link$suffix.js", array('wp-lists', 'postbox'), false, 1);
593 593
 
594
-		$scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array( 'jquery', 'postbox' ) );
595
-		$scripts->add_data( 'comment', 'group', 1 );
596
-		did_action( 'init' ) && $scripts->localize( 'comment', 'commentL10n', array(
597
-			'submittedOn' => __( 'Submitted on:' ),
594
+		$scripts->add('comment', "/wp-admin/js/comment$suffix.js", array('jquery', 'postbox'));
595
+		$scripts->add_data('comment', 'group', 1);
596
+		did_action('init') && $scripts->localize('comment', 'commentL10n', array(
597
+			'submittedOn' => __('Submitted on:'),
598 598
 			/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
599
-			'dateFormat' => __( '%1$s %2$s, %3$s @ %4$s:%5$s' )
600
-		) );
601
-
602
-		$scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) );
603
-
604
-		$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), false, 1 );
605
-
606
-		$scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone', 'wp-a11y' ), false, 1 );
607
-
608
-		$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'tags-suggest', 'wp-a11y' ), false, 1 );
609
-		did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
610
-			'error'      => __( 'Error while saving the changes.' ),
611
-			'ntdeltitle' => __( 'Remove From Bulk Edit' ),
612
-			'notitle'    => __( '(no title)' ),
613
-			'comma'      => trim( _x( ',', 'tag delimiter' ) ),
614
-			'saved'      => __( 'Changes saved.' ),
615
-		) );
616
-
617
-		$scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 );
618
-		did_action( 'init' ) && $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array(
619
-			'error' => __( 'Error while saving the changes.' ),
620
-			'saved' => __( 'Changes saved.' ),
621
-		) );
622
-
623
-		$scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'jquery-ui-core', 'thickbox' ), false, 1 );
624
-		did_action( 'init' ) && $scripts->localize( 'plugin-install', 'plugininstallL10n', array(
625
-			'plugin_information' => __( 'Plugin:' ),
626
-			'plugin_modal_label' => __( 'Plugin details' ),
599
+			'dateFormat' => __('%1$s %2$s, %3$s @ %4$s:%5$s')
600
+		));
601
+
602
+		$scripts->add('admin-gallery', "/wp-admin/js/gallery$suffix.js", array('jquery-ui-sortable'));
603
+
604
+		$scripts->add('admin-widgets', "/wp-admin/js/widgets$suffix.js", array('jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable'), false, 1);
605
+
606
+		$scripts->add('theme', "/wp-admin/js/theme$suffix.js", array('wp-backbone', 'wp-a11y'), false, 1);
607
+
608
+		$scripts->add('inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array('jquery', 'tags-suggest', 'wp-a11y'), false, 1);
609
+		did_action('init') && $scripts->localize('inline-edit-post', 'inlineEditL10n', array(
610
+			'error'      => __('Error while saving the changes.'),
611
+			'ntdeltitle' => __('Remove From Bulk Edit'),
612
+			'notitle'    => __('(no title)'),
613
+			'comma'      => trim(_x(',', 'tag delimiter')),
614
+			'saved'      => __('Changes saved.'),
615
+		));
616
+
617
+		$scripts->add('inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array('jquery', 'wp-a11y'), false, 1);
618
+		did_action('init') && $scripts->localize('inline-edit-tax', 'inlineEditL10n', array(
619
+			'error' => __('Error while saving the changes.'),
620
+			'saved' => __('Changes saved.'),
621
+		));
622
+
623
+		$scripts->add('plugin-install', "/wp-admin/js/plugin-install$suffix.js", array('jquery', 'jquery-ui-core', 'thickbox'), false, 1);
624
+		did_action('init') && $scripts->localize('plugin-install', 'plugininstallL10n', array(
625
+			'plugin_information' => __('Plugin:'),
626
+			'plugin_modal_label' => __('Plugin details'),
627 627
 			'ays' => __('Are you sure you want to install this plugin?')
628
-		) );
628
+		));
629 629
 
630
-		$scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ), false, 1 );
631
-		did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array(
632
-			'ajax_nonce' => wp_create_nonce( 'updates' ),
630
+		$scripts->add('updates', "/wp-admin/js/updates$suffix.js", array('jquery', 'wp-util', 'wp-a11y'), false, 1);
631
+		did_action('init') && $scripts->localize('updates', '_wpUpdatesSettings', array(
632
+			'ajax_nonce' => wp_create_nonce('updates'),
633 633
 			'l10n'       => array(
634 634
 				/* translators: %s: Search string */
635
-				'searchResults'              => __( 'Search results for &#8220;%s&#8221;' ),
636
-				'searchResultsLabel'         => __( 'Search Results' ),
637
-				'noPlugins'                  => __( 'You do not appear to have any plugins available at this time.' ),
638
-				'noItemsSelected'            => __( 'Please select at least one item to perform this action on.' ),
639
-				'updating'                   => __( 'Updating...' ), // No ellipsis.
640
-				'updated'                    => __( 'Updated!' ),
641
-				'update'                     => __( 'Update' ),
642
-				'updateNow'                  => __( 'Update Now' ),
635
+				'searchResults'              => __('Search results for &#8220;%s&#8221;'),
636
+				'searchResultsLabel'         => __('Search Results'),
637
+				'noPlugins'                  => __('You do not appear to have any plugins available at this time.'),
638
+				'noItemsSelected'            => __('Please select at least one item to perform this action on.'),
639
+				'updating'                   => __('Updating...'), // No ellipsis.
640
+				'updated'                    => __('Updated!'),
641
+				'update'                     => __('Update'),
642
+				'updateNow'                  => __('Update Now'),
643 643
 				/* translators: %s: Plugin name and version */
644
-				'updateNowLabel'             => __( 'Update %s now' ),
645
-				'updateFailedShort'          => __( 'Update Failed!' ),
644
+				'updateNowLabel'             => __('Update %s now'),
645
+				'updateFailedShort'          => __('Update Failed!'),
646 646
 				/* translators: %s: Error string for a failed update */
647
-				'updateFailed'               => __( 'Update Failed: %s' ),
647
+				'updateFailed'               => __('Update Failed: %s'),
648 648
 				/* translators: %s: Plugin name and version */
649
-				'updatingLabel'              => __( 'Updating %s...' ), // No ellipsis.
649
+				'updatingLabel'              => __('Updating %s...'), // No ellipsis.
650 650
 				/* translators: %s: Plugin name and version */
651
-				'updatedLabel'               => __( '%s updated!' ),
651
+				'updatedLabel'               => __('%s updated!'),
652 652
 				/* translators: %s: Plugin name and version */
653
-				'updateFailedLabel'          => __( '%s update failed' ),
653
+				'updateFailedLabel'          => __('%s update failed'),
654 654
 				/* translators: JavaScript accessible string */
655
-				'updatingMsg'                => __( 'Updating... please wait.' ), // No ellipsis.
655
+				'updatingMsg'                => __('Updating... please wait.'), // No ellipsis.
656 656
 				/* translators: JavaScript accessible string */
657
-				'updatedMsg'                 => __( 'Update completed successfully.' ),
657
+				'updatedMsg'                 => __('Update completed successfully.'),
658 658
 				/* translators: JavaScript accessible string */
659
-				'updateCancel'               => __( 'Update canceled.' ),
660
-				'beforeunload'               => __( 'Updates may not complete if you navigate away from this page.' ),
661
-				'installNow'                 => __( 'Install Now' ),
659
+				'updateCancel'               => __('Update canceled.'),
660
+				'beforeunload'               => __('Updates may not complete if you navigate away from this page.'),
661
+				'installNow'                 => __('Install Now'),
662 662
 				/* translators: %s: Plugin name */
663
-				'installNowLabel'            => __( 'Install %s now' ),
664
-				'installing'                 => __( 'Installing...' ),
665
-				'installed'                  => __( 'Installed!' ),
666
-				'installFailedShort'         => __( 'Install Failed!' ),
663
+				'installNowLabel'            => __('Install %s now'),
664
+				'installing'                 => __('Installing...'),
665
+				'installed'                  => __('Installed!'),
666
+				'installFailedShort'         => __('Install Failed!'),
667 667
 				/* translators: %s: Error string for a failed installation */
668
-				'installFailed'              => __( 'Installation failed: %s' ),
668
+				'installFailed'              => __('Installation failed: %s'),
669 669
 				/* translators: %s: Plugin name and version */
670
-				'pluginInstallingLabel'      => _x( 'Installing %s...', 'plugin' ), // no ellipsis
670
+				'pluginInstallingLabel'      => _x('Installing %s...', 'plugin'), // no ellipsis
671 671
 				/* translators: %s: Theme name and version */
672
-				'themeInstallingLabel'       => _x( 'Installing %s...', 'theme' ), // no ellipsis
672
+				'themeInstallingLabel'       => _x('Installing %s...', 'theme'), // no ellipsis
673 673
 				/* translators: %s: Plugin name and version */
674
-				'pluginInstalledLabel'       => _x( '%s installed!', 'plugin' ),
674
+				'pluginInstalledLabel'       => _x('%s installed!', 'plugin'),
675 675
 				/* translators: %s: Theme name and version */
676
-				'themeInstalledLabel'        => _x( '%s installed!', 'theme' ),
676
+				'themeInstalledLabel'        => _x('%s installed!', 'theme'),
677 677
 				/* translators: %s: Plugin name and version */
678
-				'pluginInstallFailedLabel'   => _x( '%s installation failed', 'plugin' ),
678
+				'pluginInstallFailedLabel'   => _x('%s installation failed', 'plugin'),
679 679
 				/* translators: %s: Theme name and version */
680
-				'themeInstallFailedLabel'    => _x( '%s installation failed', 'theme' ),
681
-				'installingMsg'              => __( 'Installing... please wait.' ),
682
-				'installedMsg'               => __( 'Installation completed successfully.' ),
680
+				'themeInstallFailedLabel'    => _x('%s installation failed', 'theme'),
681
+				'installingMsg'              => __('Installing... please wait.'),
682
+				'installedMsg'               => __('Installation completed successfully.'),
683 683
 				/* translators: %s: Activation URL */
684
-				'importerInstalledMsg'       => __( 'Importer installed successfully. <a href="%s">Run importer</a>' ),
684
+				'importerInstalledMsg'       => __('Importer installed successfully. <a href="%s">Run importer</a>'),
685 685
 				/* translators: %s: Theme name */
686
-				'aysDelete'                  => __( 'Are you sure you want to delete %s?' ),
686
+				'aysDelete'                  => __('Are you sure you want to delete %s?'),
687 687
 				/* translators: %s: Plugin name */
688
-				'aysDeleteUninstall'         => __( 'Are you sure you want to delete %s and its data?' ),
689
-				'aysBulkDelete'              => __( 'Are you sure you want to delete the selected plugins and their data?' ),
690
-				'aysBulkDeleteThemes'        => __( 'Caution: These themes may be active on other sites in the network. Are you sure you want to proceed?' ),
691
-				'deleting'                   => __( 'Deleting...' ),
688
+				'aysDeleteUninstall'         => __('Are you sure you want to delete %s and its data?'),
689
+				'aysBulkDelete'              => __('Are you sure you want to delete the selected plugins and their data?'),
690
+				'aysBulkDeleteThemes'        => __('Caution: These themes may be active on other sites in the network. Are you sure you want to proceed?'),
691
+				'deleting'                   => __('Deleting...'),
692 692
 				/* translators: %s: Error string for a failed deletion */
693
-				'deleteFailed'               => __( 'Deletion failed: %s' ),
694
-				'deleted'                    => __( 'Deleted!' ),
695
-				'livePreview'                => __( 'Live Preview' ),
696
-				'activatePlugin'             => is_network_admin() ? __( 'Network Activate' ) : __( 'Activate' ),
697
-				'activateTheme'              => is_network_admin() ? __( 'Network Enable' ) : __( 'Activate' ),
693
+				'deleteFailed'               => __('Deletion failed: %s'),
694
+				'deleted'                    => __('Deleted!'),
695
+				'livePreview'                => __('Live Preview'),
696
+				'activatePlugin'             => is_network_admin() ? __('Network Activate') : __('Activate'),
697
+				'activateTheme'              => is_network_admin() ? __('Network Enable') : __('Activate'),
698 698
 				/* translators: %s: Plugin name */
699
-				'activatePluginLabel'        => is_network_admin() ? _x( 'Network Activate %s', 'plugin' ) : _x( 'Activate %s', 'plugin' ),
699
+				'activatePluginLabel'        => is_network_admin() ? _x('Network Activate %s', 'plugin') : _x('Activate %s', 'plugin'),
700 700
 				/* translators: %s: Theme name */
701
-				'activateThemeLabel'         => is_network_admin() ? _x( 'Network Activate %s', 'theme' ) : _x( 'Activate %s', 'theme' ),
702
-				'activateImporter'           => __( 'Run Importer' ),
701
+				'activateThemeLabel'         => is_network_admin() ? _x('Network Activate %s', 'theme') : _x('Activate %s', 'theme'),
702
+				'activateImporter'           => __('Run Importer'),
703 703
 				/* translators: %s: Importer name */
704
-				'activateImporterLabel'      => __( 'Run %s' ),
705
-				'unknownError'               => __( 'An unknown error occurred' ),
706
-				'connectionError'            => __( 'Connection lost or the server is busy. Please try again later.' ),
707
-				'nonceError'                 => __( 'An error has occurred. Please reload the page and try again.' ),
708
-				'pluginsFound'               => __( 'Number of plugins found: %d' ),
709
-				'noPluginsFound'             => __( 'No plugins found. Try a different search.' ),
704
+				'activateImporterLabel'      => __('Run %s'),
705
+				'unknownError'               => __('An unknown error occurred'),
706
+				'connectionError'            => __('Connection lost or the server is busy. Please try again later.'),
707
+				'nonceError'                 => __('An error has occurred. Please reload the page and try again.'),
708
+				'pluginsFound'               => __('Number of plugins found: %d'),
709
+				'noPluginsFound'             => __('No plugins found. Try a different search.'),
710 710
 			),
711
-		) );
711
+		));
712 712
 
713
-		$scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' );
713
+		$scripts->add('farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2');
714 714
 
715
-		$scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 );
716
-		$scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 );
717
-		did_action( 'init' ) && $scripts->localize( 'wp-color-picker', 'wpColorPickerL10n', array(
718
-			'clear' => __( 'Clear' ),
719
-			'defaultString' => __( 'Default' ),
720
-			'pick' => __( 'Select Color' ),
721
-			'current' => __( 'Current Color' ),
722
-		) );
715
+		$scripts->add('iris', '/wp-admin/js/iris.min.js', array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), '1.0.7', 1);
716
+		$scripts->add('wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array('iris'), false, 1);
717
+		did_action('init') && $scripts->localize('wp-color-picker', 'wpColorPickerL10n', array(
718
+			'clear' => __('Clear'),
719
+			'defaultString' => __('Default'),
720
+			'pick' => __('Select Color'),
721
+			'current' => __('Current Color'),
722
+		));
723 723
 
724
-		$scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox' ), false, 1 );
724
+		$scripts->add('dashboard', "/wp-admin/js/dashboard$suffix.js", array('jquery', 'admin-comments', 'postbox'), false, 1);
725 725
 
726
-		$scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js" );
726
+		$scripts->add('list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js");
727 727
 
728
-		$scripts->add( 'media-grid', "/wp-includes/js/media-grid$suffix.js", array( 'media-editor' ), false, 1 );
729
-		$scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery' ), false, 1 );
730
-		did_action( 'init' ) && $scripts->localize( 'media', 'attachMediaBoxL10n', array(
731
-			'error' => __( 'An error has occurred. Please reload the page and try again.' ),
728
+		$scripts->add('media-grid', "/wp-includes/js/media-grid$suffix.js", array('media-editor'), false, 1);
729
+		$scripts->add('media', "/wp-admin/js/media$suffix.js", array('jquery'), false, 1);
730
+		did_action('init') && $scripts->localize('media', 'attachMediaBoxL10n', array(
731
+			'error' => __('An error has occurred. Please reload the page and try again.'),
732 732
 		));
733 733
 
734
-		$scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array('jquery', 'json2', 'imgareaselect'), false, 1 );
735
-		did_action( 'init' ) && $scripts->localize( 'image-edit', 'imageEditL10n', array(
736
-			'error' => __( 'Could not load the preview image. Please reload the page and try again.' )
734
+		$scripts->add('image-edit', "/wp-admin/js/image-edit$suffix.js", array('jquery', 'json2', 'imgareaselect'), false, 1);
735
+		did_action('init') && $scripts->localize('image-edit', 'imageEditL10n', array(
736
+			'error' => __('Could not load the preview image. Please reload the page and try again.')
737 737
 		));
738 738
 
739
-		$scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), false, 1 );
740
-		did_action( 'init' ) && $scripts->localize( 'set-post-thumbnail', 'setPostThumbnailL10n', array(
741
-			'setThumbnail' => __( 'Use as featured image' ),
742
-			'saving' => __( 'Saving...' ), // no ellipsis
743
-			'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' ),
744
-			'done' => __( 'Done' )
745
-		) );
739
+		$scripts->add('set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array('jquery'), false, 1);
740
+		did_action('init') && $scripts->localize('set-post-thumbnail', 'setPostThumbnailL10n', array(
741
+			'setThumbnail' => __('Use as featured image'),
742
+			'saving' => __('Saving...'), // no ellipsis
743
+			'error' => __('Could not set that as the thumbnail image. Try a different attachment.'),
744
+			'done' => __('Done')
745
+		));
746 746
 
747 747
 		// Navigation Menus
748
-		$scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-lists', 'postbox', 'json2' ) );
749
-		did_action( 'init' ) && $scripts->localize( 'nav-menu', 'navMenuL10n', array(
750
-			'noResultsFound' => __( 'No results found.' ),
751
-			'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ),
752
-			'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
753
-			'untitled' => _x( '(no label)', 'missing menu item navigation label' )
754
-		) );
755
-
756
-		$scripts->add( 'custom-header', "/wp-admin/js/custom-header.js", array( 'jquery-masonry' ), false, 1 );
757
-		$scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array( 'wp-color-picker', 'media-views' ), false, 1 );
758
-		$scripts->add( 'media-gallery', "/wp-admin/js/media-gallery$suffix.js", array('jquery'), false, 1 );
759
-
760
-		$scripts->add( 'svg-painter', '/wp-admin/js/svg-painter.js', array( 'jquery' ), false, 1 );
748
+		$scripts->add('nav-menu', "/wp-admin/js/nav-menu$suffix.js", array('jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-lists', 'postbox', 'json2'));
749
+		did_action('init') && $scripts->localize('nav-menu', 'navMenuL10n', array(
750
+			'noResultsFound' => __('No results found.'),
751
+			'warnDeleteMenu' => __("You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete."),
752
+			'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'),
753
+			'untitled' => _x('(no label)', 'missing menu item navigation label')
754
+		));
755
+
756
+		$scripts->add('custom-header', "/wp-admin/js/custom-header.js", array('jquery-masonry'), false, 1);
757
+		$scripts->add('custom-background', "/wp-admin/js/custom-background$suffix.js", array('wp-color-picker', 'media-views'), false, 1);
758
+		$scripts->add('media-gallery', "/wp-admin/js/media-gallery$suffix.js", array('jquery'), false, 1);
759
+
760
+		$scripts->add('svg-painter', '/wp-admin/js/svg-painter.js', array('jquery'), false, 1);
761 761
 	}
762 762
 }
763 763
 
@@ -776,19 +776,19 @@  discard block
 block discarded – undo
776 776
  *
777 777
  * @param WP_Styles $styles
778 778
  */
779
-function wp_default_styles( &$styles ) {
780
-	include( ABSPATH . WPINC . '/version.php' ); // include an unmodified $wp_version
779
+function wp_default_styles(&$styles) {
780
+	include(ABSPATH.WPINC.'/version.php'); // include an unmodified $wp_version
781 781
 
782
-	if ( ! defined( 'SCRIPT_DEBUG' ) )
783
-		define( 'SCRIPT_DEBUG', false !== strpos( $wp_version, '-src' ) );
782
+	if ( ! defined('SCRIPT_DEBUG'))
783
+		define('SCRIPT_DEBUG', false !== strpos($wp_version, '-src'));
784 784
 
785
-	if ( ! $guessurl = site_url() )
785
+	if ( ! $guessurl = site_url())
786 786
 		$guessurl = wp_guess_url();
787 787
 
788 788
 	$styles->base_url = $guessurl;
789
-	$styles->content_url = defined('WP_CONTENT_URL')? WP_CONTENT_URL : '';
790
-	$styles->default_version = get_bloginfo( 'version' );
791
-	$styles->text_direction = function_exists( 'is_rtl' ) && is_rtl() ? 'rtl' : 'ltr';
789
+	$styles->content_url = defined('WP_CONTENT_URL') ? WP_CONTENT_URL : '';
790
+	$styles->default_version = get_bloginfo('version');
791
+	$styles->text_direction = function_exists('is_rtl') && is_rtl() ? 'rtl' : 'ltr';
792 792
 	$styles->default_dirs = array('/wp-admin/', '/wp-includes/css/');
793 793
 
794 794
 	// Open Sans is no longer used by core, but may be relied upon by themes and plugins.
@@ -797,19 +797,19 @@  discard block
 block discarded – undo
797 797
 	/* translators: If there are characters in your language that are not supported
798 798
 	 * by Open Sans, translate this to 'off'. Do not translate into your own language.
799 799
 	 */
800
-	if ( 'off' !== _x( 'on', 'Open Sans font: on or off' ) ) {
800
+	if ('off' !== _x('on', 'Open Sans font: on or off')) {
801 801
 		$subsets = 'latin,latin-ext';
802 802
 
803 803
 		/* translators: To add an additional Open Sans character subset specific to your language,
804 804
 		 * translate this to 'greek', 'cyrillic' or 'vietnamese'. Do not translate into your own language.
805 805
 		 */
806
-		$subset = _x( 'no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)' );
806
+		$subset = _x('no-subset', 'Open Sans font: add new subset (greek, cyrillic, vietnamese)');
807 807
 
808
-		if ( 'cyrillic' == $subset ) {
808
+		if ('cyrillic' == $subset) {
809 809
 			$subsets .= ',cyrillic,cyrillic-ext';
810
-		} elseif ( 'greek' == $subset ) {
810
+		} elseif ('greek' == $subset) {
811 811
 			$subsets .= ',greek,greek-ext';
812
-		} elseif ( 'vietnamese' == $subset ) {
812
+		} elseif ('vietnamese' == $subset) {
813 813
 			$subsets .= ',vietnamese';
814 814
 		}
815 815
 
@@ -818,66 +818,66 @@  discard block
 block discarded – undo
818 818
 	}
819 819
 
820 820
 	// Register a stylesheet for the selected admin color scheme.
821
-	$styles->add( 'colors', true, array( 'wp-admin', 'buttons' ) );
821
+	$styles->add('colors', true, array('wp-admin', 'buttons'));
822 822
 
823 823
 	$suffix = SCRIPT_DEBUG ? '' : '.min';
824 824
 
825 825
 	// Admin CSS
826
-	$styles->add( 'common',              "/wp-admin/css/common$suffix.css" );
827
-	$styles->add( 'forms',               "/wp-admin/css/forms$suffix.css" );
828
-	$styles->add( 'admin-menu',          "/wp-admin/css/admin-menu$suffix.css" );
829
-	$styles->add( 'dashboard',           "/wp-admin/css/dashboard$suffix.css" );
830
-	$styles->add( 'list-tables',         "/wp-admin/css/list-tables$suffix.css" );
831
-	$styles->add( 'edit',                "/wp-admin/css/edit$suffix.css" );
832
-	$styles->add( 'revisions',           "/wp-admin/css/revisions$suffix.css" );
833
-	$styles->add( 'media',               "/wp-admin/css/media$suffix.css" );
834
-	$styles->add( 'themes',              "/wp-admin/css/themes$suffix.css" );
835
-	$styles->add( 'about',               "/wp-admin/css/about$suffix.css" );
836
-	$styles->add( 'nav-menus',           "/wp-admin/css/nav-menus$suffix.css" );
837
-	$styles->add( 'widgets',             "/wp-admin/css/widgets$suffix.css" );
838
-	$styles->add( 'site-icon',           "/wp-admin/css/site-icon$suffix.css" );
839
-	$styles->add( 'l10n',                "/wp-admin/css/l10n$suffix.css" );
840
-
841
-	$styles->add( 'wp-admin', false, array( 'dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n' ) );
842
-
843
-	$styles->add( 'login',               "/wp-admin/css/login$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) );
844
-	$styles->add( 'install',             "/wp-admin/css/install$suffix.css", array( 'buttons' ) );
845
-	$styles->add( 'wp-color-picker',     "/wp-admin/css/color-picker$suffix.css" );
846
-	$styles->add( 'customize-controls',  "/wp-admin/css/customize-controls$suffix.css", array( 'wp-admin', 'colors', 'ie', 'imgareaselect' ) );
847
-	$styles->add( 'customize-widgets',   "/wp-admin/css/customize-widgets$suffix.css", array( 'wp-admin', 'colors' ) );
848
-	$styles->add( 'customize-nav-menus', "/wp-admin/css/customize-nav-menus$suffix.css", array( 'wp-admin', 'colors' ) );
849
-	$styles->add( 'press-this',          "/wp-admin/css/press-this$suffix.css", array( 'buttons' ) );
850
-
851
-	$styles->add( 'ie', "/wp-admin/css/ie$suffix.css" );
852
-	$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
826
+	$styles->add('common', "/wp-admin/css/common$suffix.css");
827
+	$styles->add('forms', "/wp-admin/css/forms$suffix.css");
828
+	$styles->add('admin-menu', "/wp-admin/css/admin-menu$suffix.css");
829
+	$styles->add('dashboard', "/wp-admin/css/dashboard$suffix.css");
830
+	$styles->add('list-tables', "/wp-admin/css/list-tables$suffix.css");
831
+	$styles->add('edit', "/wp-admin/css/edit$suffix.css");
832
+	$styles->add('revisions', "/wp-admin/css/revisions$suffix.css");
833
+	$styles->add('media', "/wp-admin/css/media$suffix.css");
834
+	$styles->add('themes', "/wp-admin/css/themes$suffix.css");
835
+	$styles->add('about', "/wp-admin/css/about$suffix.css");
836
+	$styles->add('nav-menus', "/wp-admin/css/nav-menus$suffix.css");
837
+	$styles->add('widgets', "/wp-admin/css/widgets$suffix.css");
838
+	$styles->add('site-icon', "/wp-admin/css/site-icon$suffix.css");
839
+	$styles->add('l10n', "/wp-admin/css/l10n$suffix.css");
840
+
841
+	$styles->add('wp-admin', false, array('dashicons', 'common', 'forms', 'admin-menu', 'dashboard', 'list-tables', 'edit', 'revisions', 'media', 'themes', 'about', 'nav-menus', 'widgets', 'site-icon', 'l10n'));
842
+
843
+	$styles->add('login', "/wp-admin/css/login$suffix.css", array('dashicons', 'buttons', 'forms', 'l10n'));
844
+	$styles->add('install', "/wp-admin/css/install$suffix.css", array('buttons'));
845
+	$styles->add('wp-color-picker', "/wp-admin/css/color-picker$suffix.css");
846
+	$styles->add('customize-controls', "/wp-admin/css/customize-controls$suffix.css", array('wp-admin', 'colors', 'ie', 'imgareaselect'));
847
+	$styles->add('customize-widgets', "/wp-admin/css/customize-widgets$suffix.css", array('wp-admin', 'colors'));
848
+	$styles->add('customize-nav-menus', "/wp-admin/css/customize-nav-menus$suffix.css", array('wp-admin', 'colors'));
849
+	$styles->add('press-this', "/wp-admin/css/press-this$suffix.css", array('buttons'));
850
+
851
+	$styles->add('ie', "/wp-admin/css/ie$suffix.css");
852
+	$styles->add_data('ie', 'conditional', 'lte IE 7');
853 853
 
854 854
 	// Common dependencies
855
-	$styles->add( 'buttons',   "/wp-includes/css/buttons$suffix.css" );
856
-	$styles->add( 'dashicons', "/wp-includes/css/dashicons$suffix.css" );
855
+	$styles->add('buttons', "/wp-includes/css/buttons$suffix.css");
856
+	$styles->add('dashicons', "/wp-includes/css/dashicons$suffix.css");
857 857
 
858 858
 	// Includes CSS
859
-	$styles->add( 'admin-bar',            "/wp-includes/css/admin-bar$suffix.css", array( 'dashicons' ) );
860
-	$styles->add( 'wp-auth-check',        "/wp-includes/css/wp-auth-check$suffix.css", array( 'dashicons' ) );
861
-	$styles->add( 'editor-buttons',       "/wp-includes/css/editor$suffix.css", array( 'dashicons' ) );
862
-	$styles->add( 'media-views',          "/wp-includes/css/media-views$suffix.css", array( 'buttons', 'dashicons', 'wp-mediaelement' ) );
863
-	$styles->add( 'wp-pointer',           "/wp-includes/css/wp-pointer$suffix.css", array( 'dashicons' ) );
864
-	$styles->add( 'customize-preview',    "/wp-includes/css/customize-preview$suffix.css", array( 'dashicons' ) );
865
-	$styles->add( 'wp-embed-template-ie', "/wp-includes/css/wp-embed-template-ie$suffix.css" );
866
-	$styles->add_data( 'wp-embed-template-ie', 'conditional', 'lte IE 8' );
859
+	$styles->add('admin-bar', "/wp-includes/css/admin-bar$suffix.css", array('dashicons'));
860
+	$styles->add('wp-auth-check', "/wp-includes/css/wp-auth-check$suffix.css", array('dashicons'));
861
+	$styles->add('editor-buttons', "/wp-includes/css/editor$suffix.css", array('dashicons'));
862
+	$styles->add('media-views', "/wp-includes/css/media-views$suffix.css", array('buttons', 'dashicons', 'wp-mediaelement'));
863
+	$styles->add('wp-pointer', "/wp-includes/css/wp-pointer$suffix.css", array('dashicons'));
864
+	$styles->add('customize-preview', "/wp-includes/css/customize-preview$suffix.css", array('dashicons'));
865
+	$styles->add('wp-embed-template-ie', "/wp-includes/css/wp-embed-template-ie$suffix.css");
866
+	$styles->add_data('wp-embed-template-ie', 'conditional', 'lte IE 8');
867 867
 
868 868
 	// External libraries and friends
869
-	$styles->add( 'imgareaselect',       '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.8' );
870
-	$styles->add( 'wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array( 'dashicons' ) );
871
-	$styles->add( 'mediaelement',        "/wp-includes/js/mediaelement/mediaelementplayer.min.css", array(), '2.22.0' );
872
-	$styles->add( 'wp-mediaelement',     "/wp-includes/js/mediaelement/wp-mediaelement$suffix.css", array( 'mediaelement' ) );
873
-	$styles->add( 'thickbox',            '/wp-includes/js/thickbox/thickbox.css', array( 'dashicons' ) );
869
+	$styles->add('imgareaselect', '/wp-includes/js/imgareaselect/imgareaselect.css', array(), '0.9.8');
870
+	$styles->add('wp-jquery-ui-dialog', "/wp-includes/css/jquery-ui-dialog$suffix.css", array('dashicons'));
871
+	$styles->add('mediaelement', "/wp-includes/js/mediaelement/mediaelementplayer.min.css", array(), '2.22.0');
872
+	$styles->add('wp-mediaelement', "/wp-includes/js/mediaelement/wp-mediaelement$suffix.css", array('mediaelement'));
873
+	$styles->add('thickbox', '/wp-includes/js/thickbox/thickbox.css', array('dashicons'));
874 874
 
875 875
 	// Deprecated CSS
876
-	$styles->add( 'deprecated-media', "/wp-admin/css/deprecated-media$suffix.css" );
877
-	$styles->add( 'farbtastic',       "/wp-admin/css/farbtastic$suffix.css", array(), '1.3u1' );
878
-	$styles->add( 'jcrop',            "/wp-includes/js/jcrop/jquery.Jcrop.min.css", array(), '0.9.12' );
879
-	$styles->add( 'colors-fresh', false, array( 'wp-admin', 'buttons' ) ); // Old handle.
880
-	$styles->add( 'open-sans', $open_sans_font_url ); // No longer used in core as of 4.6
876
+	$styles->add('deprecated-media', "/wp-admin/css/deprecated-media$suffix.css");
877
+	$styles->add('farbtastic', "/wp-admin/css/farbtastic$suffix.css", array(), '1.3u1');
878
+	$styles->add('jcrop', "/wp-includes/js/jcrop/jquery.Jcrop.min.css", array(), '0.9.12');
879
+	$styles->add('colors-fresh', false, array('wp-admin', 'buttons')); // Old handle.
880
+	$styles->add('open-sans', $open_sans_font_url); // No longer used in core as of 4.6
881 881
 
882 882
 	// RTL CSS
883 883
 	$rtl_styles = array(
@@ -892,10 +892,10 @@  discard block
 block discarded – undo
892 892
 		'deprecated-media', 'farbtastic',
893 893
 	);
894 894
 
895
-	foreach ( $rtl_styles as $rtl_style ) {
896
-		$styles->add_data( $rtl_style, 'rtl', 'replace' );
897
-		if ( $suffix ) {
898
-			$styles->add_data( $rtl_style, 'suffix', $suffix );
895
+	foreach ($rtl_styles as $rtl_style) {
896
+		$styles->add_data($rtl_style, 'rtl', 'replace');
897
+		if ($suffix) {
898
+			$styles->add_data($rtl_style, 'suffix', $suffix);
899 899
 		}
900 900
 	}
901 901
 }
@@ -908,19 +908,19 @@  discard block
 block discarded – undo
908 908
  * @param array $js_array JavaScript scripts array
909 909
  * @return array Reordered array, if needed.
910 910
  */
911
-function wp_prototype_before_jquery( $js_array ) {
912
-	if ( false === $prototype = array_search( 'prototype', $js_array, true ) )
911
+function wp_prototype_before_jquery($js_array) {
912
+	if (false === $prototype = array_search('prototype', $js_array, true))
913 913
 		return $js_array;
914 914
 
915
-	if ( false === $jquery = array_search( 'jquery', $js_array, true ) )
915
+	if (false === $jquery = array_search('jquery', $js_array, true))
916 916
 		return $js_array;
917 917
 
918
-	if ( $prototype < $jquery )
918
+	if ($prototype < $jquery)
919 919
 		return $js_array;
920 920
 
921 921
 	unset($js_array[$prototype]);
922 922
 
923
-	array_splice( $js_array, $jquery, 0, 'prototype' );
923
+	array_splice($js_array, $jquery, 0, 'prototype');
924 924
 
925 925
 	return $js_array;
926 926
 }
@@ -934,10 +934,10 @@  discard block
 block discarded – undo
934 934
  */
935 935
 function wp_just_in_time_script_localization() {
936 936
 
937
-	wp_localize_script( 'autosave', 'autosaveL10n', array(
937
+	wp_localize_script('autosave', 'autosaveL10n', array(
938 938
 		'autosaveInterval' => AUTOSAVE_INTERVAL,
939 939
 		'blog_id' => get_current_blog_id(),
940
-	) );
940
+	));
941 941
 }
942 942
 
943 943
 /**
@@ -952,7 +952,7 @@  discard block
 block discarded – undo
952 952
 function wp_localize_jquery_ui_datepicker() {
953 953
 	global $wp_locale;
954 954
 
955
-	if ( ! wp_script_is( 'jquery-ui-datepicker', 'enqueued' ) ) {
955
+	if ( ! wp_script_is('jquery-ui-datepicker', 'enqueued')) {
956 956
 		return;
957 957
 	}
958 958
 
@@ -968,25 +968,25 @@  discard block
 block discarded – undo
968 968
 			'MM', 'M', 'm', 'mm',
969 969
 			'yy', 'y'
970 970
 		),
971
-		get_option( 'date_format' )
971
+		get_option('date_format')
972 972
 	);
973 973
 
974
-	$datepicker_defaults = wp_json_encode( array(
975
-		'closeText'       => __( 'Close' ),
976
-		'currentText'     => __( 'Today' ),
977
-		'monthNames'      => array_values( $wp_locale->month ),
978
-		'monthNamesShort' => array_values( $wp_locale->month_abbrev ),
979
-		'nextText'        => __( 'Next' ),
980
-		'prevText'        => __( 'Previous' ),
981
-		'dayNames'        => array_values( $wp_locale->weekday ),
982
-		'dayNamesShort'   => array_values( $wp_locale->weekday_abbrev ),
983
-		'dayNamesMin'     => array_values( $wp_locale->weekday_initial ),
974
+	$datepicker_defaults = wp_json_encode(array(
975
+		'closeText'       => __('Close'),
976
+		'currentText'     => __('Today'),
977
+		'monthNames'      => array_values($wp_locale->month),
978
+		'monthNamesShort' => array_values($wp_locale->month_abbrev),
979
+		'nextText'        => __('Next'),
980
+		'prevText'        => __('Previous'),
981
+		'dayNames'        => array_values($wp_locale->weekday),
982
+		'dayNamesShort'   => array_values($wp_locale->weekday_abbrev),
983
+		'dayNamesMin'     => array_values($wp_locale->weekday_initial),
984 984
 		'dateFormat'      => $datepicker_date_format,
985
-		'firstDay'        => absint( get_option( 'start_of_week' ) ),
985
+		'firstDay'        => absint(get_option('start_of_week')),
986 986
 		'isRTL'           => $wp_locale->is_rtl(),
987
-	) );
987
+	));
988 988
 
989
-	wp_add_inline_script( 'jquery-ui-datepicker', "jQuery(document).ready(function(jQuery){jQuery.datepicker.setDefaults({$datepicker_defaults});});" );
989
+	wp_add_inline_script('jquery-ui-datepicker', "jQuery(document).ready(function(jQuery){jQuery.datepicker.setDefaults({$datepicker_defaults});});");
990 990
 }
991 991
 
992 992
 /**
@@ -1009,29 +1009,29 @@  discard block
 block discarded – undo
1009 1009
  * @param string $handle Either 'colors' or 'colors-rtl'.
1010 1010
  * @return string|false URL path to CSS stylesheet for Administration Screens.
1011 1011
  */
1012
-function wp_style_loader_src( $src, $handle ) {
1012
+function wp_style_loader_src($src, $handle) {
1013 1013
 	global $_wp_admin_css_colors;
1014 1014
 
1015
-	if ( wp_installing() )
1016
-		return preg_replace( '#^wp-admin/#', './', $src );
1015
+	if (wp_installing())
1016
+		return preg_replace('#^wp-admin/#', './', $src);
1017 1017
 
1018
-	if ( 'colors' == $handle ) {
1018
+	if ('colors' == $handle) {
1019 1019
 		$color = get_user_option('admin_color');
1020 1020
 
1021
-		if ( empty($color) || !isset($_wp_admin_css_colors[$color]) )
1021
+		if (empty($color) || ! isset($_wp_admin_css_colors[$color]))
1022 1022
 			$color = 'fresh';
1023 1023
 
1024 1024
 		$color = $_wp_admin_css_colors[$color];
1025 1025
 		$url = $color->url;
1026 1026
 
1027
-		if ( ! $url ) {
1027
+		if ( ! $url) {
1028 1028
 			return false;
1029 1029
 		}
1030 1030
 
1031
-		$parsed = parse_url( $src );
1032
-		if ( isset($parsed['query']) && $parsed['query'] ) {
1033
-			wp_parse_str( $parsed['query'], $qv );
1034
-			$url = add_query_arg( $qv, $url );
1031
+		$parsed = parse_url($src);
1032
+		if (isset($parsed['query']) && $parsed['query']) {
1033
+			wp_parse_str($parsed['query'], $qv);
1034
+			$url = add_query_arg($qv, $url);
1035 1035
 		}
1036 1036
 
1037 1037
 		return $url;
@@ -1057,9 +1057,9 @@  discard block
 block discarded – undo
1057 1057
 function print_head_scripts() {
1058 1058
 	global $concatenate_scripts;
1059 1059
 
1060
-	if ( ! did_action('wp_print_scripts') ) {
1060
+	if ( ! did_action('wp_print_scripts')) {
1061 1061
 		/** This action is documented in wp-includes/functions.wp-scripts.php */
1062
-		do_action( 'wp_print_scripts' );
1062
+		do_action('wp_print_scripts');
1063 1063
 	}
1064 1064
 
1065 1065
 	$wp_scripts = wp_scripts();
@@ -1075,7 +1075,7 @@  discard block
 block discarded – undo
1075 1075
 	 *
1076 1076
 	 * @param bool $print Whether to print the head scripts. Default true.
1077 1077
 	 */
1078
-	if ( apply_filters( 'print_head_scripts', true ) ) {
1078
+	if (apply_filters('print_head_scripts', true)) {
1079 1079
 		_print_scripts();
1080 1080
 	}
1081 1081
 
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
 function print_footer_scripts() {
1097 1097
 	global $wp_scripts, $concatenate_scripts;
1098 1098
 
1099
-	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
1099
+	if ( ! ($wp_scripts instanceof WP_Scripts)) {
1100 1100
 		return array(); // No need to run if not instantiated.
1101 1101
 	}
1102 1102
 	script_concat_settings();
@@ -1110,7 +1110,7 @@  discard block
 block discarded – undo
1110 1110
 	 *
1111 1111
 	 * @param bool $print Whether to print the footer scripts. Default true.
1112 1112
 	 */
1113
-	if ( apply_filters( 'print_footer_scripts', true ) ) {
1113
+	if (apply_filters('print_footer_scripts', true)) {
1114 1114
 		_print_scripts();
1115 1115
 	}
1116 1116
 
@@ -1130,12 +1130,12 @@  discard block
 block discarded – undo
1130 1130
 	global $wp_scripts, $compress_scripts;
1131 1131
 
1132 1132
 	$zip = $compress_scripts ? 1 : 0;
1133
-	if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP )
1133
+	if ($zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP)
1134 1134
 		$zip = 'gzip';
1135 1135
 
1136
-	if ( $concat = trim( $wp_scripts->concat, ', ' ) ) {
1136
+	if ($concat = trim($wp_scripts->concat, ', ')) {
1137 1137
 
1138
-		if ( !empty($wp_scripts->print_code) ) {
1138
+		if ( ! empty($wp_scripts->print_code)) {
1139 1139
 			echo "\n<script type='text/javascript'>\n";
1140 1140
 			echo "/* <![CDATA[ */\n"; // not needed in HTML 5
1141 1141
 			echo $wp_scripts->print_code;
@@ -1143,14 +1143,14 @@  discard block
 block discarded – undo
1143 1143
 			echo "</script>\n";
1144 1144
 		}
1145 1145
 
1146
-		$concat = str_split( $concat, 128 );
1147
-		$concat = 'load%5B%5D=' . implode( '&load%5B%5D=', $concat );
1146
+		$concat = str_split($concat, 128);
1147
+		$concat = 'load%5B%5D='.implode('&load%5B%5D=', $concat);
1148 1148
 
1149
-		$src = $wp_scripts->base_url . "/wp-admin/load-scripts.php?c={$zip}&" . $concat . '&ver=' . $wp_scripts->default_version;
1150
-		echo "<script type='text/javascript' src='" . esc_attr($src) . "'></script>\n";
1149
+		$src = $wp_scripts->base_url."/wp-admin/load-scripts.php?c={$zip}&".$concat.'&ver='.$wp_scripts->default_version;
1150
+		echo "<script type='text/javascript' src='".esc_attr($src)."'></script>\n";
1151 1151
 	}
1152 1152
 
1153
-	if ( !empty($wp_scripts->print_html) )
1153
+	if ( ! empty($wp_scripts->print_html))
1154 1154
 		echo $wp_scripts->print_html;
1155 1155
 }
1156 1156
 
@@ -1167,14 +1167,14 @@  discard block
 block discarded – undo
1167 1167
  * @return array
1168 1168
  */
1169 1169
 function wp_print_head_scripts() {
1170
-	if ( ! did_action('wp_print_scripts') ) {
1170
+	if ( ! did_action('wp_print_scripts')) {
1171 1171
 		/** This action is documented in wp-includes/functions.wp-scripts.php */
1172
-		do_action( 'wp_print_scripts' );
1172
+		do_action('wp_print_scripts');
1173 1173
 	}
1174 1174
 
1175 1175
 	global $wp_scripts;
1176 1176
 
1177
-	if ( ! ( $wp_scripts instanceof WP_Scripts ) ) {
1177
+	if ( ! ($wp_scripts instanceof WP_Scripts)) {
1178 1178
 		return array(); // no need to run if nothing is queued
1179 1179
 	}
1180 1180
 	return print_head_scripts();
@@ -1201,7 +1201,7 @@  discard block
 block discarded – undo
1201 1201
 	 *
1202 1202
 	 * @since 2.8.0
1203 1203
 	 */
1204
-	do_action( 'wp_print_footer_scripts' );
1204
+	do_action('wp_print_footer_scripts');
1205 1205
 }
1206 1206
 
1207 1207
 /**
@@ -1218,7 +1218,7 @@  discard block
 block discarded – undo
1218 1218
 	 *
1219 1219
 	 * @since 2.8.0
1220 1220
 	 */
1221
-	do_action( 'wp_enqueue_scripts' );
1221
+	do_action('wp_enqueue_scripts');
1222 1222
 }
1223 1223
 
1224 1224
 /**
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
 	 *
1247 1247
 	 * @param bool $print Whether to print the admin styles. Default true.
1248 1248
 	 */
1249
-	if ( apply_filters( 'print_admin_styles', true ) ) {
1249
+	if (apply_filters('print_admin_styles', true)) {
1250 1250
 		_print_styles();
1251 1251
 	}
1252 1252
 
@@ -1267,7 +1267,7 @@  discard block
 block discarded – undo
1267 1267
 function print_late_styles() {
1268 1268
 	global $wp_styles, $concatenate_scripts;
1269 1269
 
1270
-	if ( ! ( $wp_styles instanceof WP_Styles ) ) {
1270
+	if ( ! ($wp_styles instanceof WP_Styles)) {
1271 1271
 		return;
1272 1272
 	}
1273 1273
 
@@ -1282,7 +1282,7 @@  discard block
 block discarded – undo
1282 1282
 	 *
1283 1283
 	 * @param bool $print Whether to print the 'late' styles. Default true.
1284 1284
 	 */
1285
-	if ( apply_filters( 'print_late_styles', true ) ) {
1285
+	if (apply_filters('print_late_styles', true)) {
1286 1286
 		_print_styles();
1287 1287
 	}
1288 1288
 
@@ -1304,27 +1304,27 @@  discard block
 block discarded – undo
1304 1304
 	$wp_styles = wp_styles();
1305 1305
 
1306 1306
 	$zip = $compress_css ? 1 : 0;
1307
-	if ( $zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP )
1307
+	if ($zip && defined('ENFORCE_GZIP') && ENFORCE_GZIP)
1308 1308
 		$zip = 'gzip';
1309 1309
 
1310
-	if ( $concat = trim( $wp_styles->concat, ', ' ) ) {
1310
+	if ($concat = trim($wp_styles->concat, ', ')) {
1311 1311
 		$dir = $wp_styles->text_direction;
1312 1312
 		$ver = $wp_styles->default_version;
1313 1313
 
1314
-		$concat = str_split( $concat, 128 );
1315
-		$concat = 'load%5B%5D=' . implode( '&load%5B%5D=', $concat );
1314
+		$concat = str_split($concat, 128);
1315
+		$concat = 'load%5B%5D='.implode('&load%5B%5D=', $concat);
1316 1316
 
1317
-		$href = $wp_styles->base_url . "/wp-admin/load-styles.php?c={$zip}&dir={$dir}&" . $concat . '&ver=' . $ver;
1318
-		echo "<link rel='stylesheet' href='" . esc_attr($href) . "' type='text/css' media='all' />\n";
1317
+		$href = $wp_styles->base_url."/wp-admin/load-styles.php?c={$zip}&dir={$dir}&".$concat.'&ver='.$ver;
1318
+		echo "<link rel='stylesheet' href='".esc_attr($href)."' type='text/css' media='all' />\n";
1319 1319
 
1320
-		if ( !empty($wp_styles->print_code) ) {
1320
+		if ( ! empty($wp_styles->print_code)) {
1321 1321
 			echo "<style type='text/css'>\n";
1322 1322
 			echo $wp_styles->print_code;
1323 1323
 			echo "\n</style>\n";
1324 1324
 		}
1325 1325
 	}
1326 1326
 
1327
-	if ( !empty($wp_styles->print_html) )
1327
+	if ( ! empty($wp_styles->print_html))
1328 1328
 		echo $wp_styles->print_html;
1329 1329
 }
1330 1330
 
@@ -1340,23 +1340,23 @@  discard block
 block discarded – undo
1340 1340
 function script_concat_settings() {
1341 1341
 	global $concatenate_scripts, $compress_scripts, $compress_css;
1342 1342
 
1343
-	$compressed_output = ( ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler') );
1343
+	$compressed_output = (ini_get('zlib.output_compression') || 'ob_gzhandler' == ini_get('output_handler'));
1344 1344
 
1345
-	if ( ! isset($concatenate_scripts) ) {
1345
+	if ( ! isset($concatenate_scripts)) {
1346 1346
 		$concatenate_scripts = defined('CONCATENATE_SCRIPTS') ? CONCATENATE_SCRIPTS : true;
1347
-		if ( ( ! is_admin() && ! did_action( 'login_init' ) ) || ( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) )
1347
+		if (( ! is_admin() && ! did_action('login_init')) || (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG))
1348 1348
 			$concatenate_scripts = false;
1349 1349
 	}
1350 1350
 
1351
-	if ( ! isset($compress_scripts) ) {
1351
+	if ( ! isset($compress_scripts)) {
1352 1352
 		$compress_scripts = defined('COMPRESS_SCRIPTS') ? COMPRESS_SCRIPTS : true;
1353
-		if ( $compress_scripts && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
1353
+		if ($compress_scripts && ( ! get_site_option('can_compress_scripts') || $compressed_output))
1354 1354
 			$compress_scripts = false;
1355 1355
 	}
1356 1356
 
1357
-	if ( ! isset($compress_css) ) {
1357
+	if ( ! isset($compress_css)) {
1358 1358
 		$compress_css = defined('COMPRESS_CSS') ? COMPRESS_CSS : true;
1359
-		if ( $compress_css && ( ! get_site_option('can_compress_scripts') || $compressed_output ) )
1359
+		if ($compress_css && ( ! get_site_option('can_compress_scripts') || $compressed_output))
1360 1360
 			$compress_css = false;
1361 1361
 	}
1362 1362
 }
Please login to merge, or discard this patch.
src/wp-includes/class-wp-http-encoding.php 2 patches
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 	 * @param string $supports Optional, not used. When implemented it will choose the right compression based on what the server supports.
31 31
 	 * @return string|false False on failure.
32 32
 	 */
33
-	public static function compress( $raw, $level = 9, $supports = null ) {
34
-		return gzdeflate( $raw, $level );
33
+	public static function compress($raw, $level = 9, $supports = null) {
34
+		return gzdeflate($raw, $level);
35 35
 	}
36 36
 
37 37
 	/**
@@ -50,24 +50,24 @@  discard block
 block discarded – undo
50 50
 	 * @param int $length The optional length of the compressed data.
51 51
 	 * @return string|bool False on failure.
52 52
 	 */
53
-	public static function decompress( $compressed, $length = null ) {
53
+	public static function decompress($compressed, $length = null) {
54 54
 
55
-		if ( empty($compressed) )
55
+		if (empty($compressed))
56 56
 			return $compressed;
57 57
 
58
-		if ( false !== ( $decompressed = @gzinflate( $compressed ) ) )
58
+		if (false !== ($decompressed = @gzinflate($compressed)))
59 59
 			return $decompressed;
60 60
 
61
-		if ( false !== ( $decompressed = self::compatible_gzinflate( $compressed ) ) )
61
+		if (false !== ($decompressed = self::compatible_gzinflate($compressed)))
62 62
 			return $decompressed;
63 63
 
64
-		if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) )
64
+		if (false !== ($decompressed = @gzuncompress($compressed)))
65 65
 			return $decompressed;
66 66
 
67
-		if ( function_exists('gzdecode') ) {
68
-			$decompressed = @gzdecode( $compressed );
67
+		if (function_exists('gzdecode')) {
68
+			$decompressed = @gzdecode($compressed);
69 69
 
70
-			if ( false !== $decompressed )
70
+			if (false !== $decompressed)
71 71
 				return $decompressed;
72 72
 		}
73 73
 
@@ -99,29 +99,29 @@  discard block
 block discarded – undo
99 99
 	public static function compatible_gzinflate($gzData) {
100 100
 
101 101
 		// Compressed data might contain a full header, if so strip it for gzinflate().
102
-		if ( substr($gzData, 0, 3) == "\x1f\x8b\x08" ) {
102
+		if (substr($gzData, 0, 3) == "\x1f\x8b\x08") {
103 103
 			$i = 10;
104
-			$flg = ord( substr($gzData, 3, 1) );
105
-			if ( $flg > 0 ) {
106
-				if ( $flg & 4 ) {
107
-					list($xlen) = unpack('v', substr($gzData, $i, 2) );
104
+			$flg = ord(substr($gzData, 3, 1));
105
+			if ($flg > 0) {
106
+				if ($flg & 4) {
107
+					list($xlen) = unpack('v', substr($gzData, $i, 2));
108 108
 					$i = $i + 2 + $xlen;
109 109
 				}
110
-				if ( $flg & 8 )
110
+				if ($flg & 8)
111 111
 					$i = strpos($gzData, "\0", $i) + 1;
112
-				if ( $flg & 16 )
112
+				if ($flg & 16)
113 113
 					$i = strpos($gzData, "\0", $i) + 1;
114
-				if ( $flg & 2 )
114
+				if ($flg & 2)
115 115
 					$i = $i + 2;
116 116
 			}
117
-			$decompressed = @gzinflate( substr($gzData, $i, -8) );
118
-			if ( false !== $decompressed )
117
+			$decompressed = @gzinflate(substr($gzData, $i, -8));
118
+			if (false !== $decompressed)
119 119
 				return $decompressed;
120 120
 		}
121 121
 
122 122
 		// Compressed data from java.util.zip.Deflater amongst others.
123
-		$decompressed = @gzinflate( substr($gzData, 2) );
124
-		if ( false !== $decompressed )
123
+		$decompressed = @gzinflate(substr($gzData, 2));
124
+		if (false !== $decompressed)
125 125
 			return $decompressed;
126 126
 
127 127
 		return false;
@@ -138,25 +138,25 @@  discard block
 block discarded – undo
138 138
 	 * @param array  $args
139 139
 	 * @return string Types of encoding to accept.
140 140
 	 */
141
-	public static function accept_encoding( $url, $args ) {
141
+	public static function accept_encoding($url, $args) {
142 142
 		$type = array();
143 143
 		$compression_enabled = self::is_available();
144 144
 
145
-		if ( ! $args['decompress'] ) // Decompression specifically disabled.
145
+		if ( ! $args['decompress']) // Decompression specifically disabled.
146 146
 			$compression_enabled = false;
147
-		elseif ( $args['stream'] ) // Disable when streaming to file.
147
+		elseif ($args['stream']) // Disable when streaming to file.
148 148
 			$compression_enabled = false;
149
-		elseif ( isset( $args['limit_response_size'] ) ) // If only partial content is being requested, we won't be able to decompress it.
149
+		elseif (isset($args['limit_response_size'])) // If only partial content is being requested, we won't be able to decompress it.
150 150
 			$compression_enabled = false;
151 151
 
152
-		if ( $compression_enabled ) {
153
-			if ( function_exists( 'gzinflate' ) )
152
+		if ($compression_enabled) {
153
+			if (function_exists('gzinflate'))
154 154
 				$type[] = 'deflate;q=1.0';
155 155
 
156
-			if ( function_exists( 'gzuncompress' ) )
156
+			if (function_exists('gzuncompress'))
157 157
 				$type[] = 'compress;q=0.5';
158 158
 
159
-			if ( function_exists( 'gzdecode' ) )
159
+			if (function_exists('gzdecode'))
160 160
 				$type[] = 'gzip;q=0.5';
161 161
 		}
162 162
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		 * @param string $url  URL of the HTTP request.
171 171
 		 * @param array  $args HTTP request arguments.
172 172
 		 */
173
-		$type = apply_filters( 'wp_http_accept_encoding', $type, $url, $args );
173
+		$type = apply_filters('wp_http_accept_encoding', $type, $url, $args);
174 174
 
175 175
 		return implode(', ', $type);
176 176
 	}
@@ -199,11 +199,11 @@  discard block
 block discarded – undo
199 199
 	 * @return bool
200 200
 	 */
201 201
 	public static function should_decode($headers) {
202
-		if ( is_array( $headers ) ) {
203
-			if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) )
202
+		if (is_array($headers)) {
203
+			if (array_key_exists('content-encoding', $headers) && ! empty($headers['content-encoding']))
204 204
 				return true;
205
-		} elseif ( is_string( $headers ) ) {
206
-			return ( stripos($headers, 'content-encoding:') !== false );
205
+		} elseif (is_string($headers)) {
206
+			return (stripos($headers, 'content-encoding:') !== false);
207 207
 		}
208 208
 
209 209
 		return false;
@@ -223,6 +223,6 @@  discard block
 block discarded – undo
223 223
 	 * @return bool
224 224
 	 */
225 225
 	public static function is_available() {
226
-		return ( function_exists('gzuncompress') || function_exists('gzdeflate') || function_exists('gzinflate') );
226
+		return (function_exists('gzuncompress') || function_exists('gzdeflate') || function_exists('gzinflate'));
227 227
 	}
228 228
 }
Please login to merge, or discard this patch.
Braces   +49 added lines, -31 removed lines patch added patch discarded remove patch
@@ -52,23 +52,28 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public static function decompress( $compressed, $length = null ) {
54 54
 
55
-		if ( empty($compressed) )
56
-			return $compressed;
55
+		if ( empty($compressed) ) {
56
+					return $compressed;
57
+		}
57 58
 
58
-		if ( false !== ( $decompressed = @gzinflate( $compressed ) ) )
59
-			return $decompressed;
59
+		if ( false !== ( $decompressed = @gzinflate( $compressed ) ) ) {
60
+					return $decompressed;
61
+		}
60 62
 
61
-		if ( false !== ( $decompressed = self::compatible_gzinflate( $compressed ) ) )
62
-			return $decompressed;
63
+		if ( false !== ( $decompressed = self::compatible_gzinflate( $compressed ) ) ) {
64
+					return $decompressed;
65
+		}
63 66
 
64
-		if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) )
65
-			return $decompressed;
67
+		if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) ) {
68
+					return $decompressed;
69
+		}
66 70
 
67 71
 		if ( function_exists('gzdecode') ) {
68 72
 			$decompressed = @gzdecode( $compressed );
69 73
 
70
-			if ( false !== $decompressed )
71
-				return $decompressed;
74
+			if ( false !== $decompressed ) {
75
+							return $decompressed;
76
+			}
72 77
 		}
73 78
 
74 79
 		return $compressed;
@@ -107,22 +112,27 @@  discard block
 block discarded – undo
107 112
 					list($xlen) = unpack('v', substr($gzData, $i, 2) );
108 113
 					$i = $i + 2 + $xlen;
109 114
 				}
110
-				if ( $flg & 8 )
111
-					$i = strpos($gzData, "\0", $i) + 1;
112
-				if ( $flg & 16 )
113
-					$i = strpos($gzData, "\0", $i) + 1;
114
-				if ( $flg & 2 )
115
-					$i = $i + 2;
115
+				if ( $flg & 8 ) {
116
+									$i = strpos($gzData, "\0", $i) + 1;
117
+				}
118
+				if ( $flg & 16 ) {
119
+									$i = strpos($gzData, "\0", $i) + 1;
120
+				}
121
+				if ( $flg & 2 ) {
122
+									$i = $i + 2;
123
+				}
116 124
 			}
117 125
 			$decompressed = @gzinflate( substr($gzData, $i, -8) );
118
-			if ( false !== $decompressed )
119
-				return $decompressed;
126
+			if ( false !== $decompressed ) {
127
+							return $decompressed;
128
+			}
120 129
 		}
121 130
 
122 131
 		// Compressed data from java.util.zip.Deflater amongst others.
123 132
 		$decompressed = @gzinflate( substr($gzData, 2) );
124
-		if ( false !== $decompressed )
125
-			return $decompressed;
133
+		if ( false !== $decompressed ) {
134
+					return $decompressed;
135
+		}
126 136
 
127 137
 		return false;
128 138
 	}
@@ -142,22 +152,29 @@  discard block
 block discarded – undo
142 152
 		$type = array();
143 153
 		$compression_enabled = self::is_available();
144 154
 
145
-		if ( ! $args['decompress'] ) // Decompression specifically disabled.
155
+		if ( ! $args['decompress'] ) {
156
+			// Decompression specifically disabled.
146 157
 			$compression_enabled = false;
147
-		elseif ( $args['stream'] ) // Disable when streaming to file.
158
+		} elseif ( $args['stream'] ) {
159
+			// Disable when streaming to file.
148 160
 			$compression_enabled = false;
149
-		elseif ( isset( $args['limit_response_size'] ) ) // If only partial content is being requested, we won't be able to decompress it.
161
+		} elseif ( isset( $args['limit_response_size'] ) ) {
162
+			// If only partial content is being requested, we won't be able to decompress it.
150 163
 			$compression_enabled = false;
164
+		}
151 165
 
152 166
 		if ( $compression_enabled ) {
153
-			if ( function_exists( 'gzinflate' ) )
154
-				$type[] = 'deflate;q=1.0';
167
+			if ( function_exists( 'gzinflate' ) ) {
168
+							$type[] = 'deflate;q=1.0';
169
+			}
155 170
 
156
-			if ( function_exists( 'gzuncompress' ) )
157
-				$type[] = 'compress;q=0.5';
171
+			if ( function_exists( 'gzuncompress' ) ) {
172
+							$type[] = 'compress;q=0.5';
173
+			}
158 174
 
159
-			if ( function_exists( 'gzdecode' ) )
160
-				$type[] = 'gzip;q=0.5';
175
+			if ( function_exists( 'gzdecode' ) ) {
176
+							$type[] = 'gzip;q=0.5';
177
+			}
161 178
 		}
162 179
 
163 180
 		/**
@@ -200,8 +217,9 @@  discard block
 block discarded – undo
200 217
 	 */
201 218
 	public static function should_decode($headers) {
202 219
 		if ( is_array( $headers ) ) {
203
-			if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) )
204
-				return true;
220
+			if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) ) {
221
+							return true;
222
+			}
205 223
 		} elseif ( is_string( $headers ) ) {
206 224
 			return ( stripos($headers, 'content-encoding:') !== false );
207 225
 		}
Please login to merge, or discard this patch.
src/wp-includes/pomo/entry.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  * @subpackage entry
8 8
  */
9 9
 
10
-if ( ! class_exists( 'Translation_Entry', false ) ):
10
+if ( ! class_exists('Translation_Entry', false)):
11 11
 /**
12 12
  * Translation_Entry class encapsulates a translatable string
13 13
  */
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
 	 * 	- references (array) -- places in the code this strings is used, in relative_to_root_path/file.php:linenum form
41 41
 	 * 	- flags (array) -- flags like php-format
42 42
 	 */
43
-	function __construct( $args = array() ) {
43
+	function __construct($args = array()) {
44 44
 		// if no singular -- empty object
45
-		if (!isset($args['singular'])) {
45
+		if ( ! isset($args['singular'])) {
46 46
 			return;
47 47
 		}
48 48
 		// get member variable values from args hash
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
 			$this->$varname = $value;
51 51
 		}
52 52
 		if (isset($args['plural']) && $args['plural']) $this->is_plural = true;
53
-		if (!is_array($this->translations)) $this->translations = array();
54
-		if (!is_array($this->references)) $this->references = array();
55
-		if (!is_array($this->flags)) $this->flags = array();
53
+		if ( ! is_array($this->translations)) $this->translations = array();
54
+		if ( ! is_array($this->references)) $this->references = array();
55
+		if ( ! is_array($this->flags)) $this->flags = array();
56 56
 	}
57 57
 
58 58
 	/**
59 59
 	 * PHP4 constructor.
60 60
 	 */
61
-	public function Translation_Entry( $args = array() ) {
62
-		self::__construct( $args );
61
+	public function Translation_Entry($args = array()) {
62
+		self::__construct($args);
63 63
 	}
64 64
 
65 65
 	/**
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
 	 * @return string|bool the key or false if the entry is empty
69 69
 	 */
70 70
 	function key() {
71
-		if ( null === $this->singular || '' === $this->singular ) return false;
71
+		if (null === $this->singular || '' === $this->singular) return false;
72 72
 
73 73
 		// Prepend context and EOT, like in MO files
74
-		$key = !$this->context? $this->singular : $this->context.chr(4).$this->singular;
74
+		$key = ! $this->context ? $this->singular : $this->context.chr(4).$this->singular;
75 75
 		// Standardize on \n line endings
76
-		$key = str_replace( array( "\r\n", "\r" ), "\n", $key );
76
+		$key = str_replace(array("\r\n", "\r"), "\n", $key);
77 77
 
78 78
 		return $key;
79 79
 	}
@@ -82,9 +82,9 @@  discard block
 block discarded – undo
82 82
 	 * @param object $other
83 83
 	 */
84 84
 	function merge_with(&$other) {
85
-		$this->flags = array_unique( array_merge( $this->flags, $other->flags ) );
86
-		$this->references = array_unique( array_merge( $this->references, $other->references ) );
87
-		if ( $this->extracted_comments != $other->extracted_comments ) {
85
+		$this->flags = array_unique(array_merge($this->flags, $other->flags));
86
+		$this->references = array_unique(array_merge($this->references, $other->references));
87
+		if ($this->extracted_comments != $other->extracted_comments) {
88 88
 			$this->extracted_comments .= $other->extracted_comments;
89 89
 		}
90 90
 
Please login to merge, or discard this patch.
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -49,10 +49,18 @@  discard block
 block discarded – undo
49 49
 		foreach ($args as $varname => $value) {
50 50
 			$this->$varname = $value;
51 51
 		}
52
-		if (isset($args['plural']) && $args['plural']) $this->is_plural = true;
53
-		if (!is_array($this->translations)) $this->translations = array();
54
-		if (!is_array($this->references)) $this->references = array();
55
-		if (!is_array($this->flags)) $this->flags = array();
52
+		if (isset($args['plural']) && $args['plural']) {
53
+			$this->is_plural = true;
54
+		}
55
+		if (!is_array($this->translations)) {
56
+			$this->translations = array();
57
+		}
58
+		if (!is_array($this->references)) {
59
+			$this->references = array();
60
+		}
61
+		if (!is_array($this->flags)) {
62
+			$this->flags = array();
63
+		}
56 64
 	}
57 65
 
58 66
 	/**
@@ -68,7 +76,9 @@  discard block
 block discarded – undo
68 76
 	 * @return string|bool the key or false if the entry is empty
69 77
 	 */
70 78
 	function key() {
71
-		if ( null === $this->singular || '' === $this->singular ) return false;
79
+		if ( null === $this->singular || '' === $this->singular ) {
80
+			return false;
81
+		}
72 82
 
73 83
 		// Prepend context and EOT, like in MO files
74 84
 		$key = !$this->context? $this->singular : $this->context.chr(4).$this->singular;
Please login to merge, or discard this patch.
src/wp-includes/widgets/class-wp-nav-menu-widget.php 2 patches
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,16 +41,18 @@
 block discarded – undo
41 41
 		// Get menu
42 42
 		$nav_menu = ! empty( $instance['nav_menu'] ) ? wp_get_nav_menu_object( $instance['nav_menu'] ) : false;
43 43
 
44
-		if ( !$nav_menu )
45
-			return;
44
+		if ( !$nav_menu ) {
45
+					return;
46
+		}
46 47
 
47 48
 		/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
48 49
 		$instance['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
49 50
 
50 51
 		echo $args['before_widget'];
51 52
 
52
-		if ( !empty($instance['title']) )
53
-			echo $args['before_title'] . $instance['title'] . $args['after_title'];
53
+		if ( !empty($instance['title']) ) {
54
+					echo $args['before_title'] . $instance['title'] . $args['after_title'];
55
+		}
54 56
 
55 57
 		$nav_menu_args = array(
56 58
 			'fallback_cb' => '',
Please login to merge, or discard this patch.
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 	 */
25 25
 	public function __construct() {
26 26
 		$widget_ops = array(
27
-			'description' => __( 'Add a custom menu to your sidebar.' ),
27
+			'description' => __('Add a custom menu to your sidebar.'),
28 28
 			'customize_selective_refresh' => true,
29 29
 		);
30
-		parent::__construct( 'nav_menu', __('Custom Menu'), $widget_ops );
30
+		parent::__construct('nav_menu', __('Custom Menu'), $widget_ops);
31 31
 	}
32 32
 
33 33
 	/**
@@ -40,20 +40,20 @@  discard block
 block discarded – undo
40 40
 	 *                        'before_widget', and 'after_widget'.
41 41
 	 * @param array $instance Settings for the current Custom Menu widget instance.
42 42
 	 */
43
-	public function widget( $args, $instance ) {
43
+	public function widget($args, $instance) {
44 44
 		// Get menu
45
-		$nav_menu = ! empty( $instance['nav_menu'] ) ? wp_get_nav_menu_object( $instance['nav_menu'] ) : false;
45
+		$nav_menu = ! empty($instance['nav_menu']) ? wp_get_nav_menu_object($instance['nav_menu']) : false;
46 46
 
47
-		if ( !$nav_menu )
47
+		if ( ! $nav_menu)
48 48
 			return;
49 49
 
50 50
 		/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
51
-		$instance['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
51
+		$instance['title'] = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
52 52
 
53 53
 		echo $args['before_widget'];
54 54
 
55
-		if ( !empty($instance['title']) )
56
-			echo $args['before_title'] . $instance['title'] . $args['after_title'];
55
+		if ( ! empty($instance['title']))
56
+			echo $args['before_title'].$instance['title'].$args['after_title'];
57 57
 
58 58
 		$nav_menu_args = array(
59 59
 			'fallback_cb' => '',
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		 * @param array    $args          Display arguments for the current widget.
77 77
 		 * @param array    $instance      Array of settings for the current widget.
78 78
 		 */
79
-		wp_nav_menu( apply_filters( 'widget_nav_menu_args', $nav_menu_args, $nav_menu, $args, $instance ) );
79
+		wp_nav_menu(apply_filters('widget_nav_menu_args', $nav_menu_args, $nav_menu, $args, $instance));
80 80
 
81 81
 		echo $args['after_widget'];
82 82
 	}
@@ -92,12 +92,12 @@  discard block
 block discarded – undo
92 92
 	 * @param array $old_instance Old settings for this instance.
93 93
 	 * @return array Updated settings to save.
94 94
 	 */
95
-	public function update( $new_instance, $old_instance ) {
95
+	public function update($new_instance, $old_instance) {
96 96
 		$instance = array();
97
-		if ( ! empty( $new_instance['title'] ) ) {
98
-			$instance['title'] = sanitize_text_field( $new_instance['title'] );
97
+		if ( ! empty($new_instance['title'])) {
98
+			$instance['title'] = sanitize_text_field($new_instance['title']);
99 99
 		}
100
-		if ( ! empty( $new_instance['nav_menu'] ) ) {
100
+		if ( ! empty($new_instance['nav_menu'])) {
101 101
 			$instance['nav_menu'] = (int) $new_instance['nav_menu'];
102 102
 		}
103 103
 		return $instance;
@@ -112,45 +112,45 @@  discard block
 block discarded – undo
112 112
 	 * @param array $instance Current settings.
113 113
 	 * @global WP_Customize_Manager $wp_customize
114 114
 	 */
115
-	public function form( $instance ) {
115
+	public function form($instance) {
116 116
 		global $wp_customize;
117
-		$title = isset( $instance['title'] ) ? $instance['title'] : '';
118
-		$nav_menu = isset( $instance['nav_menu'] ) ? $instance['nav_menu'] : '';
117
+		$title = isset($instance['title']) ? $instance['title'] : '';
118
+		$nav_menu = isset($instance['nav_menu']) ? $instance['nav_menu'] : '';
119 119
 
120 120
 		// Get menus
121 121
 		$menus = wp_get_nav_menus();
122 122
 
123 123
 		// If no menus exists, direct the user to go and create some.
124 124
 		?>
125
-		<p class="nav-menu-widget-no-menus-message" <?php if ( ! empty( $menus ) ) { echo ' style="display:none" '; } ?>>
125
+		<p class="nav-menu-widget-no-menus-message" <?php if ( ! empty($menus)) { echo ' style="display:none" '; } ?>>
126 126
 			<?php
127
-			if ( $wp_customize instanceof WP_Customize_Manager ) {
127
+			if ($wp_customize instanceof WP_Customize_Manager) {
128 128
 				$url = 'javascript: wp.customize.panel( "nav_menus" ).focus();';
129 129
 			} else {
130
-				$url = admin_url( 'nav-menus.php' );
130
+				$url = admin_url('nav-menus.php');
131 131
 			}
132 132
 			?>
133
-			<?php echo sprintf( __( 'No menus have been created yet. <a href="%s">Create some</a>.' ), esc_attr( $url ) ); ?>
133
+			<?php echo sprintf(__('No menus have been created yet. <a href="%s">Create some</a>.'), esc_attr($url)); ?>
134 134
 		</p>
135
-		<div class="nav-menu-widget-form-controls" <?php if ( empty( $menus ) ) { echo ' style="display:none" '; } ?>>
135
+		<div class="nav-menu-widget-form-controls" <?php if (empty($menus)) { echo ' style="display:none" '; } ?>>
136 136
 			<p>
137
-				<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:' ) ?></label>
138
-				<input type="text" class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo esc_attr( $title ); ?>"/>
137
+				<label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:') ?></label>
138
+				<input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr($title); ?>"/>
139 139
 			</p>
140 140
 			<p>
141
-				<label for="<?php echo $this->get_field_id( 'nav_menu' ); ?>"><?php _e( 'Select Menu:' ); ?></label>
142
-				<select id="<?php echo $this->get_field_id( 'nav_menu' ); ?>" name="<?php echo $this->get_field_name( 'nav_menu' ); ?>">
143
-					<option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option>
144
-					<?php foreach ( $menus as $menu ) : ?>
145
-						<option value="<?php echo esc_attr( $menu->term_id ); ?>" <?php selected( $nav_menu, $menu->term_id ); ?>>
146
-							<?php echo esc_html( $menu->name ); ?>
141
+				<label for="<?php echo $this->get_field_id('nav_menu'); ?>"><?php _e('Select Menu:'); ?></label>
142
+				<select id="<?php echo $this->get_field_id('nav_menu'); ?>" name="<?php echo $this->get_field_name('nav_menu'); ?>">
143
+					<option value="0"><?php _e('&mdash; Select &mdash;'); ?></option>
144
+					<?php foreach ($menus as $menu) : ?>
145
+						<option value="<?php echo esc_attr($menu->term_id); ?>" <?php selected($nav_menu, $menu->term_id); ?>>
146
+							<?php echo esc_html($menu->name); ?>
147 147
 						</option>
148 148
 					<?php endforeach; ?>
149 149
 				</select>
150 150
 			</p>
151
-			<?php if ( $wp_customize instanceof WP_Customize_Manager ) : ?>
152
-				<p class="edit-selected-nav-menu" style="<?php if ( ! $nav_menu ) { echo 'display: none;'; } ?>">
153
-					<button type="button" class="button"><?php _e( 'Edit Menu' ) ?></button>
151
+			<?php if ($wp_customize instanceof WP_Customize_Manager) : ?>
152
+				<p class="edit-selected-nav-menu" style="<?php if ( ! $nav_menu) { echo 'display: none;'; } ?>">
153
+					<button type="button" class="button"><?php _e('Edit Menu') ?></button>
154 154
 				</p>
155 155
 			<?php endif; ?>
156 156
 		</div>
Please login to merge, or discard this patch.
src/wp-includes/widgets/class-wp-widget-pages.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,8 +53,9 @@
 block discarded – undo
53 53
 		$sortby = empty( $instance['sortby'] ) ? 'menu_order' : $instance['sortby'];
54 54
 		$exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude'];
55 55
 
56
-		if ( $sortby == 'menu_order' )
57
-			$sortby = 'menu_order, post_title';
56
+		if ( $sortby == 'menu_order' ) {
57
+					$sortby = 'menu_order, post_title';
58
+		}
58 59
 
59 60
 		/**
60 61
 		 * Filter the arguments for the Pages widget.
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@  discard block
 block discarded – undo
25 25
 	public function __construct() {
26 26
 		$widget_ops = array(
27 27
 			'classname' => 'widget_pages',
28
-			'description' => __( 'A list of your site&#8217;s Pages.' ),
28
+			'description' => __('A list of your site&#8217;s Pages.'),
29 29
 			'customize_selective_refresh' => true,
30 30
 		);
31
-		parent::__construct( 'pages', __( 'Pages' ), $widget_ops );
31
+		parent::__construct('pages', __('Pages'), $widget_ops);
32 32
 	}
33 33
 
34 34
 	/**
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 *                        'before_widget', and 'after_widget'.
42 42
 	 * @param array $instance Settings for the current Pages widget instance.
43 43
 	 */
44
-	public function widget( $args, $instance ) {
44
+	public function widget($args, $instance) {
45 45
 
46 46
 		/**
47 47
 		 * Filter the widget title.
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
 		 * @param array  $instance An array of the widget's settings.
53 53
 		 * @param mixed  $id_base  The widget ID.
54 54
 		 */
55
-		$title = apply_filters( 'widget_title', empty( $instance['title'] ) ? __( 'Pages' ) : $instance['title'], $instance, $this->id_base );
55
+		$title = apply_filters('widget_title', empty($instance['title']) ? __('Pages') : $instance['title'], $instance, $this->id_base);
56 56
 
57
-		$sortby = empty( $instance['sortby'] ) ? 'menu_order' : $instance['sortby'];
58
-		$exclude = empty( $instance['exclude'] ) ? '' : $instance['exclude'];
57
+		$sortby = empty($instance['sortby']) ? 'menu_order' : $instance['sortby'];
58
+		$exclude = empty($instance['exclude']) ? '' : $instance['exclude'];
59 59
 
60
-		if ( $sortby == 'menu_order' )
60
+		if ($sortby == 'menu_order')
61 61
 			$sortby = 'menu_order, post_title';
62 62
 
63 63
 		/**
@@ -69,17 +69,17 @@  discard block
 block discarded – undo
69 69
 		 *
70 70
 		 * @param array $args An array of arguments to retrieve the pages list.
71 71
 		 */
72
-		$out = wp_list_pages( apply_filters( 'widget_pages_args', array(
72
+		$out = wp_list_pages(apply_filters('widget_pages_args', array(
73 73
 			'title_li'    => '',
74 74
 			'echo'        => 0,
75 75
 			'sort_column' => $sortby,
76 76
 			'exclude'     => $exclude
77
-		) ) );
77
+		)));
78 78
 
79
-		if ( ! empty( $out ) ) {
79
+		if ( ! empty($out)) {
80 80
 			echo $args['before_widget'];
81
-			if ( $title ) {
82
-				echo $args['before_title'] . $title . $args['after_title'];
81
+			if ($title) {
82
+				echo $args['before_title'].$title.$args['after_title'];
83 83
 			}
84 84
 		?>
85 85
 		<ul>
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
 	 * @param array $old_instance Old settings for this instance.
102 102
 	 * @return array Updated settings to save.
103 103
 	 */
104
-	public function update( $new_instance, $old_instance ) {
104
+	public function update($new_instance, $old_instance) {
105 105
 		$instance = $old_instance;
106
-		$instance['title'] = sanitize_text_field( $new_instance['title'] );
107
-		if ( in_array( $new_instance['sortby'], array( 'post_title', 'menu_order', 'ID' ) ) ) {
106
+		$instance['title'] = sanitize_text_field($new_instance['title']);
107
+		if (in_array($new_instance['sortby'], array('post_title', 'menu_order', 'ID'))) {
108 108
 			$instance['sortby'] = $new_instance['sortby'];
109 109
 		} else {
110 110
 			$instance['sortby'] = 'menu_order';
111 111
 		}
112 112
 
113
-		$instance['exclude'] = sanitize_text_field( $new_instance['exclude'] );
113
+		$instance['exclude'] = sanitize_text_field($new_instance['exclude']);
114 114
 
115 115
 		return $instance;
116 116
 	}
@@ -123,27 +123,27 @@  discard block
 block discarded – undo
123 123
 	 *
124 124
 	 * @param array $instance Current settings.
125 125
 	 */
126
-	public function form( $instance ) {
126
+	public function form($instance) {
127 127
 		//Defaults
128
-		$instance = wp_parse_args( (array) $instance, array( 'sortby' => 'post_title', 'title' => '', 'exclude' => '') );
128
+		$instance = wp_parse_args((array) $instance, array('sortby' => 'post_title', 'title' => '', 'exclude' => ''));
129 129
 		?>
130 130
 		<p>
131
-			<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"><?php _e( 'Title:' ); ?></label>
132
-			<input class="widefat" id="<?php echo esc_attr( $this->get_field_id('title') ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $instance['title'] ); ?>" />
131
+			<label for="<?php echo esc_attr($this->get_field_id('title')); ?>"><?php _e('Title:'); ?></label>
132
+			<input class="widefat" id="<?php echo esc_attr($this->get_field_id('title')); ?>" name="<?php echo esc_attr($this->get_field_name('title')); ?>" type="text" value="<?php echo esc_attr($instance['title']); ?>" />
133 133
 		</p>
134 134
 		<p>
135
-			<label for="<?php echo esc_attr( $this->get_field_id( 'sortby' ) ); ?>"><?php _e( 'Sort by:' ); ?></label>
136
-			<select name="<?php echo esc_attr( $this->get_field_name( 'sortby' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'sortby' ) ); ?>" class="widefat">
137
-				<option value="post_title"<?php selected( $instance['sortby'], 'post_title' ); ?>><?php _e('Page title'); ?></option>
138
-				<option value="menu_order"<?php selected( $instance['sortby'], 'menu_order' ); ?>><?php _e('Page order'); ?></option>
139
-				<option value="ID"<?php selected( $instance['sortby'], 'ID' ); ?>><?php _e( 'Page ID' ); ?></option>
135
+			<label for="<?php echo esc_attr($this->get_field_id('sortby')); ?>"><?php _e('Sort by:'); ?></label>
136
+			<select name="<?php echo esc_attr($this->get_field_name('sortby')); ?>" id="<?php echo esc_attr($this->get_field_id('sortby')); ?>" class="widefat">
137
+				<option value="post_title"<?php selected($instance['sortby'], 'post_title'); ?>><?php _e('Page title'); ?></option>
138
+				<option value="menu_order"<?php selected($instance['sortby'], 'menu_order'); ?>><?php _e('Page order'); ?></option>
139
+				<option value="ID"<?php selected($instance['sortby'], 'ID'); ?>><?php _e('Page ID'); ?></option>
140 140
 			</select>
141 141
 		</p>
142 142
 		<p>
143
-			<label for="<?php echo esc_attr( $this->get_field_id( 'exclude' ) ); ?>"><?php _e( 'Exclude:' ); ?></label>
144
-			<input type="text" value="<?php echo esc_attr( $instance['exclude'] ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'exclude' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'exclude' ) ); ?>" class="widefat" />
143
+			<label for="<?php echo esc_attr($this->get_field_id('exclude')); ?>"><?php _e('Exclude:'); ?></label>
144
+			<input type="text" value="<?php echo esc_attr($instance['exclude']); ?>" name="<?php echo esc_attr($this->get_field_name('exclude')); ?>" id="<?php echo esc_attr($this->get_field_id('exclude')); ?>" class="widefat" />
145 145
 			<br />
146
-			<small><?php _e( 'Page IDs, separated by commas.' ); ?></small>
146
+			<small><?php _e('Page IDs, separated by commas.'); ?></small>
147 147
 		</p>
148 148
 		<?php
149 149
 	}
Please login to merge, or discard this patch.
src/wp-includes/widgets/class-wp-widget-links.php 2 patches
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -94,13 +94,15 @@  discard block
 block discarded – undo
94 94
 		$new_instance = (array) $new_instance;
95 95
 		$instance = array( 'images' => 0, 'name' => 0, 'description' => 0, 'rating' => 0 );
96 96
 		foreach ( $instance as $field => $val ) {
97
-			if ( isset($new_instance[$field]) )
98
-				$instance[$field] = 1;
97
+			if ( isset($new_instance[$field]) ) {
98
+							$instance[$field] = 1;
99
+			}
99 100
 		}
100 101
 
101 102
 		$instance['orderby'] = 'name';
102
-		if ( in_array( $new_instance['orderby'], array( 'name', 'rating', 'id', 'rand' ) ) )
103
-			$instance['orderby'] = $new_instance['orderby'];
103
+		if ( in_array( $new_instance['orderby'], array( 'name', 'rating', 'id', 'rand' ) ) ) {
104
+					$instance['orderby'] = $new_instance['orderby'];
105
+		}
104 106
 
105 107
 		$instance['category'] = intval( $new_instance['category'] );
106 108
 		$instance['limit'] = ! empty( $new_instance['limit'] ) ? intval( $new_instance['limit'] ) : -1;
@@ -121,8 +123,9 @@  discard block
 block discarded – undo
121 123
 		//Defaults
122 124
 		$instance = wp_parse_args( (array) $instance, array( 'images' => true, 'name' => true, 'description' => false, 'rating' => false, 'category' => false, 'orderby' => 'name', 'limit' => -1 ) );
123 125
 		$link_cats = get_terms( 'link_category' );
124
-		if ( ! $limit = intval( $instance['limit'] ) )
125
-			$limit = -1;
126
+		if ( ! $limit = intval( $instance['limit'] ) ) {
127
+					$limit = -1;
128
+		}
126 129
 			?>
127 130
 		<p>
128 131
 		<label for="<?php echo $this->get_field_id('category'); ?>"><?php _e( 'Select Link Category:' ); ?></label>
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 	 */
25 25
 	public function __construct() {
26 26
 		$widget_ops = array(
27
-			'description' => __( 'Your blogroll' ),
27
+			'description' => __('Your blogroll'),
28 28
 			'customize_selective_refresh' => true,
29 29
 		);
30
-		parent::__construct( 'links', __( 'Links' ), $widget_ops );
30
+		parent::__construct('links', __('Links'), $widget_ops);
31 31
 	}
32 32
 
33 33
 	/**
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
 	 *                        'before_widget', and 'after_widget'.
41 41
 	 * @param array $instance Settings for the current Links widget instance.
42 42
 	 */
43
-	public function widget( $args, $instance ) {
43
+	public function widget($args, $instance) {
44 44
 		$show_description = isset($instance['description']) ? $instance['description'] : false;
45 45
 		$show_name = isset($instance['name']) ? $instance['name'] : false;
46 46
 		$show_rating = isset($instance['rating']) ? $instance['rating'] : false;
47 47
 		$show_images = isset($instance['images']) ? $instance['images'] : true;
48 48
 		$category = isset($instance['category']) ? $instance['category'] : false;
49
-		$orderby = isset( $instance['orderby'] ) ? $instance['orderby'] : 'name';
49
+		$orderby = isset($instance['orderby']) ? $instance['orderby'] : 'name';
50 50
 		$order = $orderby == 'rating' ? 'DESC' : 'ASC';
51
-		$limit = isset( $instance['limit'] ) ? $instance['limit'] : -1;
51
+		$limit = isset($instance['limit']) ? $instance['limit'] : -1;
52 52
 
53
-		$before_widget = preg_replace( '/id="[^"]*"/', 'id="%id"', $args['before_widget'] );
53
+		$before_widget = preg_replace('/id="[^"]*"/', 'id="%id"', $args['before_widget']);
54 54
 
55 55
 		$widget_links_args = array(
56 56
 			'title_before'     => $args['before_title'],
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 		 * @param array $widget_links_args An array of arguments to retrieve the links list.
80 80
 		 * @param array $instance          The settings for the particular instance of the widget.
81 81
 		 */
82
-		wp_list_bookmarks( apply_filters( 'widget_links_args', $widget_links_args, $instance ) );
82
+		wp_list_bookmarks(apply_filters('widget_links_args', $widget_links_args, $instance));
83 83
 	}
84 84
 
85 85
 	/**
@@ -93,20 +93,20 @@  discard block
 block discarded – undo
93 93
 	 * @param array $old_instance Old settings for this instance.
94 94
 	 * @return array Updated settings to save.
95 95
 	 */
96
-	public function update( $new_instance, $old_instance ) {
96
+	public function update($new_instance, $old_instance) {
97 97
 		$new_instance = (array) $new_instance;
98
-		$instance = array( 'images' => 0, 'name' => 0, 'description' => 0, 'rating' => 0 );
99
-		foreach ( $instance as $field => $val ) {
100
-			if ( isset($new_instance[$field]) )
98
+		$instance = array('images' => 0, 'name' => 0, 'description' => 0, 'rating' => 0);
99
+		foreach ($instance as $field => $val) {
100
+			if (isset($new_instance[$field]))
101 101
 				$instance[$field] = 1;
102 102
 		}
103 103
 
104 104
 		$instance['orderby'] = 'name';
105
-		if ( in_array( $new_instance['orderby'], array( 'name', 'rating', 'id', 'rand' ) ) )
105
+		if (in_array($new_instance['orderby'], array('name', 'rating', 'id', 'rand')))
106 106
 			$instance['orderby'] = $new_instance['orderby'];
107 107
 
108
-		$instance['category'] = intval( $new_instance['category'] );
109
-		$instance['limit'] = ! empty( $new_instance['limit'] ) ? intval( $new_instance['limit'] ) : -1;
108
+		$instance['category'] = intval($new_instance['category']);
109
+		$instance['limit'] = ! empty($new_instance['limit']) ? intval($new_instance['limit']) : -1;
110 110
 
111 111
 		return $instance;
112 112
 	}
@@ -119,32 +119,32 @@  discard block
 block discarded – undo
119 119
 	 *
120 120
 	 * @param array $instance Current settings.
121 121
 	 */
122
-	public function form( $instance ) {
122
+	public function form($instance) {
123 123
 
124 124
 		//Defaults
125
-		$instance = wp_parse_args( (array) $instance, array( 'images' => true, 'name' => true, 'description' => false, 'rating' => false, 'category' => false, 'orderby' => 'name', 'limit' => -1 ) );
126
-		$link_cats = get_terms( 'link_category' );
127
-		if ( ! $limit = intval( $instance['limit'] ) )
125
+		$instance = wp_parse_args((array) $instance, array('images' => true, 'name' => true, 'description' => false, 'rating' => false, 'category' => false, 'orderby' => 'name', 'limit' => -1));
126
+		$link_cats = get_terms('link_category');
127
+		if ( ! $limit = intval($instance['limit']))
128 128
 			$limit = -1;
129 129
 			?>
130 130
 		<p>
131
-		<label for="<?php echo $this->get_field_id('category'); ?>"><?php _e( 'Select Link Category:' ); ?></label>
131
+		<label for="<?php echo $this->get_field_id('category'); ?>"><?php _e('Select Link Category:'); ?></label>
132 132
 		<select class="widefat" id="<?php echo $this->get_field_id('category'); ?>" name="<?php echo $this->get_field_name('category'); ?>">
133 133
 		<option value=""><?php _ex('All Links', 'links widget'); ?></option>
134 134
 		<?php
135
-		foreach ( $link_cats as $link_cat ) {
136
-			echo '<option value="' . intval( $link_cat->term_id ) . '"'
137
-				. selected( $instance['category'], $link_cat->term_id, false )
138
-				. '>' . $link_cat->name . "</option>\n";
135
+		foreach ($link_cats as $link_cat) {
136
+			echo '<option value="'.intval($link_cat->term_id).'"'
137
+				. selected($instance['category'], $link_cat->term_id, false)
138
+				. '>'.$link_cat->name."</option>\n";
139 139
 		}
140 140
 		?>
141 141
 		</select>
142
-		<label for="<?php echo $this->get_field_id('orderby'); ?>"><?php _e( 'Sort by:' ); ?></label>
142
+		<label for="<?php echo $this->get_field_id('orderby'); ?>"><?php _e('Sort by:'); ?></label>
143 143
 		<select name="<?php echo $this->get_field_name('orderby'); ?>" id="<?php echo $this->get_field_id('orderby'); ?>" class="widefat">
144
-			<option value="name"<?php selected( $instance['orderby'], 'name' ); ?>><?php _e( 'Link title' ); ?></option>
145
-			<option value="rating"<?php selected( $instance['orderby'], 'rating' ); ?>><?php _e( 'Link rating' ); ?></option>
146
-			<option value="id"<?php selected( $instance['orderby'], 'id' ); ?>><?php _e( 'Link ID' ); ?></option>
147
-			<option value="rand"<?php selected( $instance['orderby'], 'rand' ); ?>><?php _ex( 'Random', 'Links widget' ); ?></option>
144
+			<option value="name"<?php selected($instance['orderby'], 'name'); ?>><?php _e('Link title'); ?></option>
145
+			<option value="rating"<?php selected($instance['orderby'], 'rating'); ?>><?php _e('Link rating'); ?></option>
146
+			<option value="id"<?php selected($instance['orderby'], 'id'); ?>><?php _e('Link ID'); ?></option>
147
+			<option value="rand"<?php selected($instance['orderby'], 'rand'); ?>><?php _ex('Random', 'Links widget'); ?></option>
148 148
 		</select>
149 149
 		</p>
150 150
 		<p>
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 		<label for="<?php echo $this->get_field_id('rating'); ?>"><?php _e('Show Link Rating'); ?></label>
159 159
 		</p>
160 160
 		<p>
161
-		<label for="<?php echo $this->get_field_id('limit'); ?>"><?php _e( 'Number of links to show:' ); ?></label>
162
-		<input id="<?php echo $this->get_field_id('limit'); ?>" name="<?php echo $this->get_field_name('limit'); ?>" type="text" value="<?php echo $limit == -1 ? '' : intval( $limit ); ?>" size="3" />
161
+		<label for="<?php echo $this->get_field_id('limit'); ?>"><?php _e('Number of links to show:'); ?></label>
162
+		<input id="<?php echo $this->get_field_id('limit'); ?>" name="<?php echo $this->get_field_name('limit'); ?>" type="text" value="<?php echo $limit == -1 ? '' : intval($limit); ?>" size="3" />
163 163
 		</p>
164 164
 		<?php
165 165
 	}
Please login to merge, or discard this patch.
src/wp-includes/widgets/class-wp-widget-rss.php 2 patches
Braces   +27 added lines, -18 removed lines patch added patch discarded remove patch
@@ -39,19 +39,23 @@  discard block
 block discarded – undo
39 39
 	 * @param array $instance Settings for the current RSS widget instance.
40 40
 	 */
41 41
 	public function widget( $args, $instance ) {
42
-		if ( isset($instance['error']) && $instance['error'] )
43
-			return;
42
+		if ( isset($instance['error']) && $instance['error'] ) {
43
+					return;
44
+		}
44 45
 
45 46
 		$url = ! empty( $instance['url'] ) ? $instance['url'] : '';
46
-		while ( stristr($url, 'http') != $url )
47
-			$url = substr($url, 1);
47
+		while ( stristr($url, 'http') != $url ) {
48
+					$url = substr($url, 1);
49
+		}
48 50
 
49
-		if ( empty($url) )
50
-			return;
51
+		if ( empty($url) ) {
52
+					return;
53
+		}
51 54
 
52 55
 		// self-url destruction sequence
53
-		if ( in_array( untrailingslashit( $url ), array( site_url(), home_url() ) ) )
54
-			return;
56
+		if ( in_array( untrailingslashit( $url ), array( site_url(), home_url() ) ) ) {
57
+					return;
58
+		}
55 59
 
56 60
 		$rss = fetch_feed($url);
57 61
 		$title = $instance['title'];
@@ -60,23 +64,27 @@  discard block
 block discarded – undo
60 64
 
61 65
 		if ( ! is_wp_error($rss) ) {
62 66
 			$desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
63
-			if ( empty($title) )
64
-				$title = strip_tags( $rss->get_title() );
67
+			if ( empty($title) ) {
68
+							$title = strip_tags( $rss->get_title() );
69
+			}
65 70
 			$link = strip_tags( $rss->get_permalink() );
66
-			while ( stristr($link, 'http') != $link )
67
-				$link = substr($link, 1);
71
+			while ( stristr($link, 'http') != $link ) {
72
+							$link = substr($link, 1);
73
+			}
68 74
 		}
69 75
 
70
-		if ( empty($title) )
71
-			$title = empty($desc) ? __('Unknown Feed') : $desc;
76
+		if ( empty($title) ) {
77
+					$title = empty($desc) ? __('Unknown Feed') : $desc;
78
+		}
72 79
 
73 80
 		/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
74 81
 		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
75 82
 
76 83
 		$url = strip_tags( $url );
77 84
 		$icon = includes_url( 'images/rss.png' );
78
-		if ( $title )
79
-			$title = '<a class="rsswidget" href="' . esc_url( $url ) . '"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="' . esc_url( $icon ) . '" alt="RSS" /></a> <a class="rsswidget" href="' . esc_url( $link ) . '">'. esc_html( $title ) . '</a>';
85
+		if ( $title ) {
86
+					$title = '<a class="rsswidget" href="' . esc_url( $url ) . '"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="' . esc_url( $icon ) . '" alt="RSS" /></a> <a class="rsswidget" href="' . esc_url( $link ) . '">'. esc_html( $title ) . '</a>';
87
+		}
80 88
 
81 89
 		echo $args['before_widget'];
82 90
 		if ( $title ) {
@@ -85,8 +93,9 @@  discard block
 block discarded – undo
85 93
 		wp_widget_rss_output( $rss, $instance );
86 94
 		echo $args['after_widget'];
87 95
 
88
-		if ( ! is_wp_error($rss) )
89
-			$rss->__destruct();
96
+		if ( ! is_wp_error($rss) ) {
97
+					$rss->__destruct();
98
+		}
90 99
 		unset($rss);
91 100
 	}
92 101
 
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 	 */
25 25
 	public function __construct() {
26 26
 		$widget_ops = array(
27
-			'description' => __( 'Entries from any RSS or Atom feed.' ),
27
+			'description' => __('Entries from any RSS or Atom feed.'),
28 28
 			'customize_selective_refresh' => true,
29 29
 		);
30
-		$control_ops = array( 'width' => 400, 'height' => 200 );
31
-		parent::__construct( 'rss', __( 'RSS' ), $widget_ops, $control_ops );
30
+		$control_ops = array('width' => 400, 'height' => 200);
31
+		parent::__construct('rss', __('RSS'), $widget_ops, $control_ops);
32 32
 	}
33 33
 
34 34
 	/**
@@ -41,19 +41,19 @@  discard block
 block discarded – undo
41 41
 	 *                        'before_widget', and 'after_widget'.
42 42
 	 * @param array $instance Settings for the current RSS widget instance.
43 43
 	 */
44
-	public function widget( $args, $instance ) {
45
-		if ( isset($instance['error']) && $instance['error'] )
44
+	public function widget($args, $instance) {
45
+		if (isset($instance['error']) && $instance['error'])
46 46
 			return;
47 47
 
48
-		$url = ! empty( $instance['url'] ) ? $instance['url'] : '';
49
-		while ( stristr($url, 'http') != $url )
48
+		$url = ! empty($instance['url']) ? $instance['url'] : '';
49
+		while (stristr($url, 'http') != $url)
50 50
 			$url = substr($url, 1);
51 51
 
52
-		if ( empty($url) )
52
+		if (empty($url))
53 53
 			return;
54 54
 
55 55
 		// self-url destruction sequence
56
-		if ( in_array( untrailingslashit( $url ), array( site_url(), home_url() ) ) )
56
+		if (in_array(untrailingslashit($url), array(site_url(), home_url())))
57 57
 			return;
58 58
 
59 59
 		$rss = fetch_feed($url);
@@ -61,34 +61,34 @@  discard block
 block discarded – undo
61 61
 		$desc = '';
62 62
 		$link = '';
63 63
 
64
-		if ( ! is_wp_error($rss) ) {
64
+		if ( ! is_wp_error($rss)) {
65 65
 			$desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
66
-			if ( empty($title) )
67
-				$title = strip_tags( $rss->get_title() );
68
-			$link = strip_tags( $rss->get_permalink() );
69
-			while ( stristr($link, 'http') != $link )
66
+			if (empty($title))
67
+				$title = strip_tags($rss->get_title());
68
+			$link = strip_tags($rss->get_permalink());
69
+			while (stristr($link, 'http') != $link)
70 70
 				$link = substr($link, 1);
71 71
 		}
72 72
 
73
-		if ( empty($title) )
73
+		if (empty($title))
74 74
 			$title = empty($desc) ? __('Unknown Feed') : $desc;
75 75
 
76 76
 		/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
77
-		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
77
+		$title = apply_filters('widget_title', $title, $instance, $this->id_base);
78 78
 
79
-		$url = strip_tags( $url );
80
-		$icon = includes_url( 'images/rss.png' );
81
-		if ( $title )
82
-			$title = '<a class="rsswidget" href="' . esc_url( $url ) . '"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="' . esc_url( $icon ) . '" alt="RSS" /></a> <a class="rsswidget" href="' . esc_url( $link ) . '">'. esc_html( $title ) . '</a>';
79
+		$url = strip_tags($url);
80
+		$icon = includes_url('images/rss.png');
81
+		if ($title)
82
+			$title = '<a class="rsswidget" href="'.esc_url($url).'"><img class="rss-widget-icon" style="border:0" width="14" height="14" src="'.esc_url($icon).'" alt="RSS" /></a> <a class="rsswidget" href="'.esc_url($link).'">'.esc_html($title).'</a>';
83 83
 
84 84
 		echo $args['before_widget'];
85
-		if ( $title ) {
86
-			echo $args['before_title'] . $title . $args['after_title'];
85
+		if ($title) {
86
+			echo $args['before_title'].$title.$args['after_title'];
87 87
 		}
88
-		wp_widget_rss_output( $rss, $instance );
88
+		wp_widget_rss_output($rss, $instance);
89 89
 		echo $args['after_widget'];
90 90
 
91
-		if ( ! is_wp_error($rss) )
91
+		if ( ! is_wp_error($rss))
92 92
 			$rss->__destruct();
93 93
 		unset($rss);
94 94
 	}
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
 	 * @param array $old_instance Old settings for this instance.
105 105
 	 * @return array Updated settings to save.
106 106
 	 */
107
-	public function update( $new_instance, $old_instance ) {
108
-		$testurl = ( isset( $new_instance['url'] ) && ( !isset( $old_instance['url'] ) || ( $new_instance['url'] != $old_instance['url'] ) ) );
109
-		return wp_widget_rss_process( $new_instance, $testurl );
107
+	public function update($new_instance, $old_instance) {
108
+		$testurl = (isset($new_instance['url']) && ( ! isset($old_instance['url']) || ($new_instance['url'] != $old_instance['url'])));
109
+		return wp_widget_rss_process($new_instance, $testurl);
110 110
 	}
111 111
 
112 112
 	/**
@@ -117,12 +117,12 @@  discard block
 block discarded – undo
117 117
 	 *
118 118
 	 * @param array $instance Current settings.
119 119
 	 */
120
-	public function form( $instance ) {
121
-		if ( empty( $instance ) ) {
122
-			$instance = array( 'title' => '', 'url' => '', 'items' => 10, 'error' => false, 'show_summary' => 0, 'show_author' => 0, 'show_date' => 0 );
120
+	public function form($instance) {
121
+		if (empty($instance)) {
122
+			$instance = array('title' => '', 'url' => '', 'items' => 10, 'error' => false, 'show_summary' => 0, 'show_author' => 0, 'show_date' => 0);
123 123
 		}
124 124
 		$instance['number'] = $this->number;
125 125
 
126
-		wp_widget_rss_form( $instance );
126
+		wp_widget_rss_form($instance);
127 127
 	}
128 128
 }
Please login to merge, or discard this patch.