Merge pull request #7660 from shivapoudel/system-status

Tweaks for System status
This commit is contained in:
Mike Jolley 2015-03-09 09:38:19 +00:00
commit 40c86a9e4a
4 changed files with 65 additions and 70 deletions

View File

@ -9,7 +9,7 @@
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit;
}
/**
@ -189,34 +189,33 @@ class WC_Admin_Status {
/**
* Get tools
*
* @return array of tools
*/
public static function get_tools() {
$tools = array(
'clear_transients' => array(
'name' => __( 'WC Transients','woocommerce'),
'button' => __('Clear transients','woocommerce'),
'name' => __( 'WC Transients', 'woocommerce' ),
'button' => __( 'Clear transients', 'woocommerce' ),
'desc' => __( 'This tool will clear the product/shop transients cache.', 'woocommerce' ),
),
'clear_expired_transients' => array(
'name' => __( 'Expired Transients','woocommerce'),
'button' => __('Clear expired transients','woocommerce'),
'name' => __( 'Expired Transients', 'woocommerce' ),
'button' => __( 'Clear expired transients', 'woocommerce' ),
'desc' => __( 'This tool will clear ALL expired transients from WordPress.', 'woocommerce' ),
),
'recount_terms' => array(
'name' => __('Term counts','woocommerce'),
'button' => __('Recount terms','woocommerce'),
'name' => __( 'Term counts', 'woocommerce' ),
'button' => __( 'Recount terms', 'woocommerce' ),
'desc' => __( 'This tool will recount product terms - useful when changing your settings in a way which hides products from the catalog.', 'woocommerce' ),
),
'reset_roles' => array(
'name' => __('Capabilities','woocommerce'),
'button' => __('Reset capabilities','woocommerce'),
'name' => __( 'Capabilities', 'woocommerce' ),
'button' => __( 'Reset capabilities', 'woocommerce' ),
'desc' => __( 'This tool will reset the admin, customer and shop_manager roles to default. Use this if your users cannot access all of the WooCommerce admin pages.', 'woocommerce' ),
),
'clear_sessions' => array(
'name' => __('Customer Sessions','woocommerce'),
'button' => __('Clear all sessions','woocommerce'),
'name' => __( 'Customer Sessions', 'woocommerce' ),
'button' => __( 'Clear all sessions', 'woocommerce' ),
'desc' => __( '<strong class="red">Warning:</strong> This tool will delete all customer session data from the database, including any current live carts.', 'woocommerce' ),
),
'install_pages' => array(
@ -265,7 +264,6 @@ class WC_Admin_Status {
/**
* Retrieve metadata from a file. Based on WP Core's get_file_data function
*
* @since 2.1.1
* @param string $file Path to the file
* @return string
@ -298,7 +296,6 @@ class WC_Admin_Status {
/**
* Scan the template files
*
* @param string $template_path
* @return array
*/
@ -329,7 +326,6 @@ class WC_Admin_Status {
/**
* Scan the log files
*
* @return array
*/
public static function scan_log_files() {

View File

@ -4,7 +4,7 @@
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit;
}
?>

View File

@ -4,7 +4,7 @@
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit;
}
?>
@ -127,8 +127,7 @@ if ( ! defined( 'ABSPATH' ) ) {
</tr>
<tr>
<td data-export-label="SUHOSIN Installed"><?php _e( 'SUHOSIN Installed', 'woocommerce' ); ?>:</td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself.
If enabled on your server, Suhosin may need to be configured to increase its data submission limits.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td class="help"><?php echo '<a href="#" class="help_tip" data-tip="' . esc_attr__( 'Suhosin is an advanced protection system for PHP installations. It was designed to protect your servers on the one hand against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. If enabled on your server, Suhosin may need to be configured to increase its data submission limits.', 'woocommerce' ) . '">[?]</a>'; ?></td>
<td><?php echo extension_loaded( 'suhosin' ) ? '&#10004;' : '&ndash;'; ?></td>
</tr>
<?php endif; ?>
@ -257,8 +256,8 @@ If enabled on your server, Suhosin may need to be configured to increase its dat
?>
<tr>
<td data-export-label="<?php echo esc_html( $post['name'] ); ?>"><?php echo esc_html( $post['name'] ); ?>:</td>
<td><?php echo isset( $post['help'] ) ? $post['help'] : ''; ?></td>
<td class="help">
<td class="help"><?php echo isset( $post['help'] ) ? $post['help'] : ''; ?></td>
<td>
<mark class="<?php echo $mark; ?>">
<?php echo ! empty( $post['success'] ) ? '&#10004' : '&#10005'; ?>
<?php echo ! empty( $post['note'] ) ? wp_kses_data( $post['note'] ) : ''; ?>
@ -321,7 +320,7 @@ If enabled on your server, Suhosin may need to be configured to increase its dat
$plugin_name = esc_html( $plugin_data['Name'] );
if ( ! empty( $plugin_data['PluginURI'] ) ) {
$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . __( 'Visit plugin homepage' , 'woocommerce' ) . '">' . $plugin_name . '</a>';
$plugin_name = '<a href="' . esc_url( $plugin_data['PluginURI'] ) . '" title="' . __( 'Visit plugin homepage' , 'woocommerce' ) . '" target="_blank">' . $plugin_name . '</a>';
}
if ( strstr( $dirname, 'woocommerce-' ) ) {

View File

@ -4,7 +4,7 @@
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit;
}
?>