Issues (377)

modules/preset/preset.js (3 issues)

arguments for multi-line function calls are on separate lines.

Coding Style Informational
1
/* global kirkiSetSettingValue */
2
jQuery( document ).ready( function() {
3
4
	// Loop Controls.
5
	wp.customize.control.each( function( control ) {
6
7
		// Check if we have a preset defined.
8
		if ( control.params && control.params.preset && ! _.isEmpty( control.params.preset ) ) {
9
			wp.customize( control.id, function( value ) {
0 ignored issues
show
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
10
11
				// Listen to value changes.
12
				value.bind( function( to ) {
13
14
					// Loop preset definitions.
15
					_.each( control.params.preset, function( preset, valueToListen ) {
0 ignored issues
show
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
16
17
						// Check if the value set want is the same as the one we're looking for.
18
						if ( valueToListen === to ) {
19
20
							// Loop settings defined inside the preset.
21
							_.each( preset.settings, function( controlValue, controlID ) {
0 ignored issues
show
For multi-line function calls, each argument should be on a separate line.

For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
);
Loading history...
22
23
								// Set the value.
24
								kirkiSetSettingValue.set( controlID, controlValue );
25
							} );
26
						}
27
					} );
28
				} );
29
			} );
30
		}
31
	} );
32
} );
33