| Conditions | 2 |
| Paths | 2 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function admin_init() { |
||
| 35 | |||
| 36 | $count = count( $this->data ); |
||
| 37 | |||
| 38 | if ( 0 < $count ) { |
||
| 39 | $that = $this; |
||
| 40 | add_action( 'admin_notices', function () use ( $count, $that ) { |
||
| 41 | ?> |
||
| 42 | <div class="notice notice-error"> |
||
| 43 | <p> |
||
| 44 | <?php |
||
| 45 | $image_compliance_link = sprintf( '<a href="%s">', admin_url( 'admin.php?page=' . $that->image_license_page->get_menu_slug() ) ) |
||
| 46 | . __( 'License Compliance', 'wordlift' ) . '</a>'; |
||
| 47 | $message = esc_html__( 'WordLift found %d image(s) that might not comply with their license. Open %s to fix this error.', 'wordlift' ); |
||
| 48 | echo sprintf( $message, $count, $image_compliance_link ); |
||
| 49 | ?> |
||
| 50 | </p> |
||
| 51 | </div> |
||
| 52 | <?php |
||
| 53 | } ); |
||
| 54 | } |
||
| 55 | |||
| 56 | } |
||
| 57 | |||
| 59 |