laipower/wp-content/upgrade-temp-backup/plugins/w3-total-cache/Generic_WidgetServices.php

69 lines
1.7 KiB
PHP
Raw Normal View History

2023-10-22 22:21:44 +00:00
<?php
/**
2023-12-08 23:23:36 +00:00
* File: Generic_WidgetServices.php
*
* @package W3TC
2023-10-22 22:21:44 +00:00
*/
2023-12-08 23:23:36 +00:00
namespace W3TC;
2023-10-22 22:21:44 +00:00
/**
* Class Generic_Plugin_WidgetServices
*/
class Generic_WidgetServices {
2023-12-08 23:23:36 +00:00
/**
* Constructor
*/
public function __construct() {
2023-10-22 22:21:44 +00:00
}
/**
* Dashboard setup action
*
* @return void
*/
2023-12-08 23:23:36 +00:00
public static function admin_init_w3tc_dashboard() {
2023-10-22 22:21:44 +00:00
$o = new Generic_WidgetServices();
add_action( 'w3tc_widget_setup', array( $o, 'wp_dashboard_setup' ), 5000 );
2023-12-08 23:23:36 +00:00
add_action( 'w3tc_network_dashboard_setup', array( $o, 'wp_dashboard_setup' ), 5000 );
2023-10-22 22:21:44 +00:00
}
2023-12-08 23:23:36 +00:00
/**
* W3TC dashboard Premium Services widget.
*/
public function wp_dashboard_setup() {
Util_Widget::add(
'w3tc_services',
'<div class="w3tc-widget-w3tc-logo"></div><div class="w3tc-widget-text">' . __( 'Premium Services', 'w3-total-cache' ) . '</div>',
2023-10-22 22:21:44 +00:00
array( $this, 'widget_form' ),
2023-12-08 23:23:36 +00:00
null,
'normal'
);
2023-10-22 22:21:44 +00:00
}
2023-12-08 23:23:36 +00:00
/**
* Premium Services widget content.
*/
2023-10-22 22:21:44 +00:00
public function widget_form() {
2023-12-08 23:23:36 +00:00
include W3TC_DIR . '/Generic_WidgetServices_View.php';
2023-10-22 22:21:44 +00:00
}
2023-12-08 23:23:36 +00:00
/**
* Premium Services widget services list.
*/
public static function get_services() {
return array(
__( 'Billing Support', 'w3-total-cache' ),
__( 'Sales Questions', 'w3-total-cache' ),
__( 'Submit a Bug Report', 'w3-total-cache' ),
__( 'Suggest a New Feature', 'w3-total-cache' ),
__( 'Performance Audit & Consultation', 'w3-total-cache' ),
__( 'Plugin Configuration', 'w3-total-cache' ),
__( 'CDN Configuration: Full-Site Delivery', 'w3-total-cache' ),
__( 'Hosting Environment Troubleshooting', 'w3-total-cache' ),
__( 'Eliminate render-blocking Javascripts', 'w3-total-cache' ),
__( 'Investigate Compatibility Issue', 'w3-total-cache' ),
2023-10-22 22:21:44 +00:00
);
}
}