-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathGeneric_WidgetSettings.php
55 lines (51 loc) · 1.05 KB
/
Generic_WidgetSettings.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
53
54
55
<?php
/**
* File: Generic_WidgetSettings.php
*
* @since 2.7.0
* @package W3TC
*/
namespace W3TC;
/**
* Class Generic_WidgetSettings
*/
class Generic_WidgetSettings {
/**
* Dashboard setup action
*
* @since 2.7.0
*
* @return void
*/
public static function admin_init_w3tc_dashboard() {
$o = new Generic_WidgetSettings();
add_action( 'w3tc_widget_setup', array( $o, 'wp_dashboard_setup' ), 200 );
add_action( 'w3tc_network_dashboard_setup', array( $o, 'wp_dashboard_setup' ), 200 );
}
/**
* W3TC dashboard Premium Services widget.
*
* @since 2.7.0
*
* @return void
*/
public function wp_dashboard_setup() {
Util_Widget::add(
'w3tc_settings',
'<div class="w3tc-widget-w3tc-logo"></div><div class="w3tc-widget-text">' . __( 'General Settings', 'w3-total-cache' ) . '</div>',
array( $this, 'widget_form' ),
null,
'normal'
);
}
/**
* Premium Services widget content.
*
* @since 2.7.0
*
* @return void
*/
public function widget_form() {
include W3TC_DIR . '/Generic_WidgetSettings_View.php';
}
}