Conditions | 5 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | protected function process_value() { |
||
23 | |||
24 | if ( false === strpos( $this->value, 'gradient' ) && false === strpos( $this->value, 'url(' ) ) { |
||
25 | if ( empty( $this->value ) ) { |
||
26 | return; |
||
27 | } |
||
28 | |||
29 | if ( preg_match( '/^\d+$/', $this->value ) ) { |
||
30 | $this->value = 'url("' . wp_get_attachment_url( $this->value ) . '")'; |
||
31 | } else { |
||
32 | $this->value = 'url("' . $this->value . '")'; |
||
33 | } |
||
34 | } |
||
35 | } |
||
36 | } |
||
37 |