/
AdminCallbacks.php
52 lines (43 loc) · 1.18 KB
/
AdminCallbacks.php
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
<?php
/**
* @package AlecadddPlugin
*/
namespace Inc\Api\Callbacks;
use Inc\Base\BaseController;
class AdminCallbacks extends BaseController
{
public function adminDashboard()
{
return require_once( "$this->plugin_path/templates/admin.php" );
}
public function adminCpt()
{
return require_once( "$this->plugin_path/templates/cpt.php" );
}
public function adminTaxonomy()
{
return require_once( "$this->plugin_path/templates/taxonomy.php" );
}
public function adminWidget()
{
return require_once( "$this->plugin_path/templates/widget.php" );
}
// public function alecadddOptionsGroup( $input )
// {
// return $input;
// }
// public function alecadddAdminSection()
// {
// echo 'Check this beautiful section!';
// }
public function alecadddTextExample()
{
$value = esc_attr( get_option( 'text_example' ) );
echo '<input type="text" class="regular-text" name="text_example" value="' . $value . '" placeholder="Write Something Here!">';
}
public function alecadddFirstName()
{
$value = esc_attr( get_option( 'first_name' ) );
echo '<input type="text" class="regular-text" name="first_name" value="' . $value . '" placeholder="Write your First Name">';
}
}