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