Code Duplication    Length = 9-9 lines in 2 locations

wp-includes/class-wp-customize-manager.php 2 locations

@@ 886-894 (lines=9) @@
883
				 * serialization in order to avoid a peak memory usage spike.
884
				 * @todo We may not even need to export the values at all since the pane syncs them anyway.
885
				 */
886
				foreach ( $this->settings as $id => $setting ) {
887
					if ( $setting->check_capabilities() ) {
888
						printf(
889
							"v[%s] = %s;\n",
890
							wp_json_encode( $id ),
891
							wp_json_encode( $setting->js_value() )
892
						);
893
					}
894
				}
895
				?>
896
			})( _wpCustomizeSettings.values );
897
		</script>
@@ 1901-1909 (lines=9) @@
1898
1899
			// Serialize settings one by one to improve memory usage.
1900
			echo "(function ( s ){\n";
1901
			foreach ( $this->settings() as $setting ) {
1902
				if ( $setting->check_capabilities() ) {
1903
					printf(
1904
						"s[%s] = %s;\n",
1905
						wp_json_encode( $setting->id ),
1906
						wp_json_encode( $setting->json() )
1907
					);
1908
				}
1909
			}
1910
			echo "})( _wpCustomizeSettings.settings );\n";
1911
1912
			// Serialize controls one by one to improve memory usage.