Code Duplication    Length = 2-3 lines in 4 locations

json-endpoints/class.wpcom-json-api-render-endpoint.php 2 locations

@@ 61-63 (lines=3) @@
58
59
				// attach version and an extra query parameters
60
				$ver = $this->get_version( $wp_scripts->registered[ $handle ]->ver, $wp_scripts->default_version );
61
				if ( isset( $wp_scripts->args[ $handle ] ) ) {
62
					$ver = $ver ? $ver . '&' . $wp_scripts->args[$handle] : $wp_scripts->args[$handle];
63
				}
64
				$src = add_query_arg( 'ver', $ver, $src );
65
66
				// add to an aray so we can return all this info
@@ 88-90 (lines=3) @@
85
86
				// attach version and an extra query parameters
87
				$ver = $this->get_version( $wp_styles->registered[ $handle ]->ver, $wp_styles->default_version );
88
				if ( isset( $wp_styles->args[ $handle ] ) ) {
89
					$ver = $ver ? $ver . '&' . $wp_styles->args[$handle] : $wp_styles->args[$handle];
90
				}
91
				$src = add_query_arg( 'ver', $ver, $src );
92
93
				// is there a special media (print, screen, etc) for this? if not, default to 'all'

modules/infinite-scroll/infinity.php 2 locations

@@ 1130-1131 (lines=2) @@
1127
					else
1128
						$ver = $wp_scripts->registered[ $handle ]->ver ? $wp_scripts->registered[ $handle ]->ver : $wp_scripts->default_version;
1129
1130
					if ( isset( $wp_scripts->args[ $handle ] ) )
1131
						$ver = $ver ? $ver . '&' . $wp_scripts->args[$handle] : $wp_scripts->args[$handle];
1132
1133
					// Full script source with version info
1134
					$script_data['src'] = add_query_arg( 'ver', $ver, $src );
@@ 1208-1209 (lines=2) @@
1205
					else
1206
						$ver = $wp_styles->registered[ $handle ]->ver ? $wp_styles->registered[ $handle ]->ver : $wp_styles->default_version;
1207
1208
					if ( isset($wp_styles->args[ $handle ] ) )
1209
						$ver = $ver ? $ver . '&' . $wp_styles->args[$handle] : $wp_styles->args[$handle];
1210
1211
					// Full stylesheet source with version info
1212
					$style_data['src'] = add_query_arg( 'ver', $ver, $src );