PHPCS fixes

This commit is contained in:
Shiva Poudel 2018-02-06 01:13:26 +05:45
parent 29ce5bf3c3
commit 750e0e78e4
1 changed files with 6 additions and 8 deletions

View File

@ -2,10 +2,8 @@
/**
* Setup menus in WP admin.
*
* @author Automattic
* @category Admin
* @package WooCommerce/Admin
* @version 2.5.0
* @package WooCommerce/Admin
* @version 2.5.0
*/
if ( ! defined( 'ABSPATH' ) ) {
@ -69,9 +67,9 @@ class WC_Admin_Menus {
*/
public function reports_menu() {
if ( current_user_can( 'manage_woocommerce' ) ) {
add_submenu_page( 'woocommerce', __( 'Reports', 'woocommerce' ), __( 'Reports', 'woocommerce' ) , 'view_woocommerce_reports', 'wc-reports', array( $this, 'reports_page' ) );
add_submenu_page( 'woocommerce', __( 'Reports', 'woocommerce' ), __( 'Reports', 'woocommerce' ), 'view_woocommerce_reports', 'wc-reports', array( $this, 'reports_page' ) );
} else {
add_menu_page( __( 'Sales reports', 'woocommerce' ), __( 'Sales reports', 'woocommerce' ) , 'view_woocommerce_reports', 'wc-reports', array( $this, 'reports_page' ), null, '55.6' );
add_menu_page( __( 'Sales reports', 'woocommerce' ), __( 'Sales reports', 'woocommerce' ), 'view_woocommerce_reports', 'wc-reports', array( $this, 'reports_page' ), null, '55.6' );
}
}
@ -79,7 +77,7 @@ class WC_Admin_Menus {
* Add menu item.
*/
public function settings_menu() {
$settings_page = add_submenu_page( 'woocommerce', __( 'WooCommerce settings', 'woocommerce' ), __( 'Settings', 'woocommerce' ) , 'manage_woocommerce', 'wc-settings', array( $this, 'settings_page' ) );
$settings_page = add_submenu_page( 'woocommerce', __( 'WooCommerce settings', 'woocommerce' ), __( 'Settings', 'woocommerce' ), 'manage_woocommerce', 'wc-settings', array( $this, 'settings_page' ) );
add_action( 'load-' . $settings_page, array( $this, 'settings_page_init' ) );
}
@ -121,7 +119,7 @@ class WC_Admin_Menus {
* Add menu item.
*/
public function status_menu() {
add_submenu_page( 'woocommerce', __( 'WooCommerce status', 'woocommerce' ), __( 'Status', 'woocommerce' ) , 'manage_woocommerce', 'wc-status', array( $this, 'status_page' ) );
add_submenu_page( 'woocommerce', __( 'WooCommerce status', 'woocommerce' ), __( 'Status', 'woocommerce' ), 'manage_woocommerce', 'wc-status', array( $this, 'status_page' ) );
}
/**