class-view.php
1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/**
* BLC Dashboard admin page view.
*
* @link https://wordpress.org/plugins/broken-link-checker/
* @since 2.1
*
* @author WPMUDEV (https://wpmudev.com)
* @package WPMUDEV_BLC\App\Admin_Notice\Local
*
* @copyright (c) 2022, Incsub (http://incsub.com)
*/
namespace WPMUDEV_BLC\App\Admin_Notices\Local;
// Abort if called directly.
defined( 'WPINC' ) || die;
use WPMUDEV_BLC\Core\Utils\Abstracts\Base;
use WPMUDEV_BLC\App\Options\Settings\Model as Settings;
/**
* NOTE
* This Admin Notice is not going to be used. Keeping it as an archive temporarily.
*/
/**
* Class View
*
* @package WPMUDEV_BLC\App\Admin_Notice\Local
*/
class View extends Base {
/**
* Renders the output.
*
* @return void Renders the output.
* @since 2.1
*
*/
public function render( $params = array() ) {
$this->render_body();
}
public function render_body() {
if ( Settings::instance()->get( 'use_legacy_blc_version' ) ) {
return;
}
$dashborad_url = admin_url( 'admin.php?page=blc_dash' );
$message = sprintf(
__( 'Cloud-based Broken Link Checker is currently active on your site. <a href="%1$s">Activate the old version</a> to go back to using Local BLC.', 'broken-link-checker' ),
$dashborad_url
);
printf( '
<div id="activate-local-blc-notice" class="wrap wrap-blc-local-notice activate-local-blc-notice notice-info">
<table>
<tr>
<td><span class="sui-icon-warning-alert" aria-hidden="true"></span></td>
<td>%1$s</td>
</tr>
</table>
</div>
',
$message
);
}
}