arguments for multi-line function calls are on separate lines.
1 | <?php |
||
2 | /** |
||
3 | * Nested section. |
||
4 | * |
||
5 | * @package Kirki |
||
6 | * @subpackage Custom Sections Module |
||
7 | * @copyright Copyright (c) 2017, Aristeides Stathopoulos |
||
8 | * @license https://opensource.org/licenses/MIT |
||
9 | * @since 3.0.0 |
||
10 | */ |
||
11 | |||
12 | /** |
||
13 | * Nested panel. |
||
14 | */ |
||
15 | class Kirki_Panels_Nested_Panel extends WP_Customize_Panel { |
||
16 | |||
17 | /** |
||
18 | * The parent panel. |
||
19 | * |
||
20 | * @access public |
||
21 | * @since 3.0.0 |
||
22 | * @var string |
||
23 | */ |
||
24 | public $panel; |
||
25 | |||
26 | /** |
||
27 | * Type of this panel. |
||
28 | * |
||
29 | * @access public |
||
30 | * @since 3.0.0 |
||
31 | * @var string |
||
32 | */ |
||
33 | public $type = 'kirki-nested'; |
||
34 | |||
35 | /** |
||
36 | * Gather the parameters passed to client JavaScript via JSON. |
||
37 | * |
||
38 | * @access public |
||
39 | * @since 3.0.0 |
||
40 | * @return array The array to be exported to the client as JSON. |
||
41 | */ |
||
42 | public function json() { |
||
43 | $array = wp_array_slice_assoc( |
||
44 | (array) $this, array( |
||
0 ignored issues
–
show
|
|||
45 | 'id', |
||
46 | 'description', |
||
47 | 'priority', |
||
48 | 'type', |
||
49 | 'panel', |
||
50 | ) |
||
51 | ); |
||
52 | |||
53 | $array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
||
54 | $array['content'] = $this->get_content(); |
||
55 | $array['active'] = $this->active(); |
||
56 | $array['instanceNumber'] = $this->instance_number; |
||
57 | |||
58 | return $array; |
||
59 | } |
||
60 | } |
||
61 |
For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this: