Conditions | 4 |
Paths | 8 |
Total Lines | 21 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | function debug_output() { |
||
25 | global $wordads, $wordads_status_response; |
||
26 | $response = $wordads_status_response; |
||
27 | if ( empty( $response ) ) { |
||
28 | $response = 'No response from API :('; |
||
29 | } else { |
||
30 | $response = print_r( $response, 1 ); |
||
31 | } |
||
32 | |||
33 | $status = $wordads->option( 'wordads_approved' ) ? |
||
34 | '<span style="color:green;">Yes</span>' : |
||
35 | '<span style="color:red;">No</span>'; |
||
36 | |||
37 | $type = $wordads->option( 'wordads_approved' ) ? 'updated' : 'error'; |
||
38 | echo <<<HTML |
||
39 | <div class="notice $type is-dismissible"> |
||
40 | <p>Status: $status</p> |
||
41 | <pre>$response</pre> |
||
42 | </div> |
||
43 | HTML; |
||
44 | } |
||
45 | } |
||
49 |