| Conditions | 2 |
| Paths | 2 |
| Total Lines | 26 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function json() { |
||
| 36 | |||
| 37 | $array = wp_array_slice_assoc( (array) $this, array( |
||
| 38 | 'id', |
||
| 39 | 'description', |
||
| 40 | 'priority', |
||
| 41 | 'panel', |
||
| 42 | 'type', |
||
| 43 | 'description_hidden', |
||
| 44 | 'section', |
||
| 45 | )); |
||
| 46 | |||
| 47 | $array['title'] = html_entity_decode( $this->title, ENT_QUOTES, get_bloginfo( 'charset' ) ); |
||
| 48 | $array['content'] = $this->get_content(); |
||
| 49 | $array['active'] = $this->active(); |
||
| 50 | $array['instanceNumber'] = $this->instance_number; |
||
| 51 | |||
| 52 | $array['customizeAction'] = esc_attr__( 'Customizing', 'kirki' ); |
||
| 53 | if ( $this->panel ) { |
||
| 54 | $array['customizeAction'] = sprintf( |
||
| 55 | esc_attr__( 'Customizing ▸ %s', 'kirki' ), |
||
| 56 | esc_html( $this->manager->get_panel( $this->panel )->title ) |
||
| 57 | ); |
||
| 58 | } |
||
| 59 | return $array; |
||
| 60 | } |
||
| 61 | } |
||
| 62 |