| Conditions | 7 |
| Paths | 5 |
| Total Lines | 24 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | protected function process_output( $output, $value ) { |
||
| 25 | |||
| 26 | if ( ! isset( $output['element'] ) || ! isset( $output['property'] ) ) { |
||
| 27 | return; |
||
| 28 | } |
||
| 29 | $output = wp_parse_args( $output, array( |
||
| 30 | 'media_query' => 'global', |
||
| 31 | 'prefix' => '', |
||
| 32 | 'units' => '', |
||
| 33 | 'suffix' => '', |
||
| 34 | ) ); |
||
| 35 | if ( is_array( $value ) ) { |
||
| 36 | if ( isset( $output['choice'] ) && $output['choice'] ) { |
||
| 37 | $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value[ $output['choice'] ] ) . $output['units'] . $output['suffix']; |
||
| 38 | return; |
||
| 39 | } |
||
| 40 | if ( isset( $value['url'] ) ) { |
||
| 41 | $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value['url'] ) . $output['units'] . $output['suffix']; |
||
| 42 | return; |
||
| 43 | } |
||
| 44 | return; |
||
| 45 | } |
||
| 46 | $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $this->process_property_value( $output['property'], $value ) . $output['units'] . $output['suffix']; |
||
| 47 | } |
||
| 48 | } |
||
| 49 |