| Conditions | 8 |
| Paths | 12 |
| Total Lines | 30 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | protected function process_output( $output, $value ) { |
||
| 25 | |||
| 26 | $output = wp_parse_args( |
||
| 27 | $output, array( |
||
| 28 | 'element' => '', |
||
| 29 | 'property' => '', |
||
| 30 | 'media_query' => 'global', |
||
| 31 | 'prefix' => '', |
||
| 32 | 'suffix' => '', |
||
| 33 | ) |
||
| 34 | ); |
||
| 35 | |||
| 36 | if ( ! is_array( $value ) ) { |
||
|
|
|||
| 37 | return; |
||
| 38 | } |
||
| 39 | |||
| 40 | foreach ( array_keys( $value ) as $key ) { |
||
| 41 | |||
| 42 | $property = ( empty( $output['property'] ) ) ? $key : $output['property'] . '-' . $key; |
||
| 43 | if ( isset( $output['choice'] ) && $output['property'] ) { |
||
| 44 | if ( $key === $output['choice'] ) { |
||
| 45 | $property = $output['property']; |
||
| 46 | } else { |
||
| 47 | continue; |
||
| 48 | } |
||
| 49 | } |
||
| 50 | if ( false !== strpos( $output['property'], '%%' ) ) { |
||
| 51 | $property = str_replace( '%%', $key, $output['property'] ); |
||
| 52 | } |
||
| 53 | $this->styles[ $output['media_query'] ][ $output['element'] ][ $property ] = $output['prefix'] . $this->process_property_value( $property, $value[ $key ] ) . $output['suffix']; |
||
| 54 | } |
||
| 57 |