class-view.php
1.3 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
<?php
/**
* BLC Cloud_Page admin page view.
*
* @link https://wordpress.org/plugins/broken-link-checker/
* @since 2.0.0
*
* @author WPMUDEV (https://wpmudev.com)
* @package WPMUDEV_BLC\App\Admin_Pages\Cloud_Page
*
* @copyright (c) 2022, Incsub (http://incsub.com)
*/
namespace WPMUDEV_BLC\App\Admin_Pages\Cloud_Page;
// Abort if called directly.
defined( 'WPINC' ) || die;
use WPMUDEV_BLC\Core\Views\Admin_Page;
/**
* Class View
*
* @package WPMUDEV_BLC\App\Admin_Pages\Cloud_Page
*/
class View extends Admin_Page {
/**
* Render the output.
*
* @since 2.0.0
*
* @return void Render the output.
*/
public function render( $params = array() ) {
self::$unique_id = isset( $params['unique_id'] ) ? $params['unique_id'] : null;
self::$slug = isset( $params['slug'] ) ? $params['slug'] : null;
$site_connected = isset( $params['site_connected'] ) ? boolval( $params['site_connected'] ) : false;
?>
<div class="sui-wrap wrap-blc wrap-blc-dashboard-page <?php echo 'wrap-' . esc_attr( self::$slug ); ?>">
<?php
$this->render_body();
if ( $site_connected ){
$this->render_footer();
}
?>
</div>
<?php
}
public function render_body() {
?>
<div id="<?php esc_attr_e( self::$unique_id ); ?>"></div>
<?php
}
}