| Conditions | 2 |
| Paths | 2 |
| Total Lines | 24 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function json() { |
||
| 43 | $array = wp_array_slice_assoc( |
||
| 44 | (array) $this, array( |
||
|
|
|||
| 45 | 'id', |
||
| 46 | 'description', |
||
| 47 | 'priority', |
||
| 48 | 'panel', |
||
| 49 | 'type', |
||
| 50 | 'description_hidden', |
||
| 51 | 'section', |
||
| 52 | ) |
||
| 53 | ); |
||
| 54 | |||
| 55 | $array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
||
| 56 | $array['content'] = $this->get_content(); |
||
| 57 | $array['active'] = $this->active(); |
||
| 58 | $array['instanceNumber'] = $this->instance_number; |
||
| 59 | |||
| 60 | $array['customizeAction'] = esc_html__( 'Customizing', 'kirki' ); |
||
| 61 | if ( $this->panel ) { |
||
| 62 | /* translators: The title. */ |
||
| 63 | $array['customizeAction'] = sprintf( esc_html__( 'Customizing ▸ %s', 'kirki' ), esc_html( $this->manager->get_panel( $this->panel )->title ) ); |
||
| 64 | } |
||
| 65 | return $array; |
||
| 66 | } |
||
| 68 |
For a function calls that spawns multiple lines, the coding style suggests to split arguments to separate lines like this: