Various   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 45
rs 10
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A actions_section() 0 16 1
A options_section() 0 3 1
1
<?php
2
namespace testContent\Views;
3
use testContent\Abstracts as Abs;
4
5
/**
6
 * Generate view for other various test content action
7
 *
8
 * @abstract
9
 * @package    WordPress
10
 * @subpackage Test Content
11
 * @author     Old Town Media
12
 */
13
class Various extends Abs\View{
14
15
	protected $title	= 'Various';
16
	protected $type		= 'all';
17
	protected $priority	= 10;
18
19
20
	/**
21
	 * Our sections action block - button to create and delete.
22
	 *
23
	 * @access protected
24
	 *
25
	 * @return string HTML content.
26
	 */
27
	protected function actions_section(){
28
		$html = '';
29
30
		$html .= "<div class='test-data-cpt'>";
31
32
			$html .= "<h3>";
33
34
				$html .= "<span class='label'>" . __( 'Clean Site', 'otm-test-content' ) . "</span>";
35
				$html .= $this->build_button( 'delete', 'all', __( 'Delete All Test Data', 'otm-test-content' ) );
36
37
			$html .= "</h3>";
38
39
		$html .= "</div>";
40
41
		return $html;
42
	}
43
44
45
	/**
46
	 * We don't need any options on this page, so returning it empty
47
	 *
48
	 * @access protected
49
	 *
50
	 * @param string $html Existing HTML content.
51
	 * @return string HTML section content.
52
	 */
53
	protected function options_section( $html = '' ){
54
		return $html;
55
	}
56
57
}
58