using wc_get_screen_ids instead of manually typing them out. see #7213

This commit is contained in:
Patrick Rauland 2015-01-28 17:20:38 -07:00
parent ee11ac6080
commit e7224cdc1d
1 changed files with 1 additions and 18 deletions

View File

@ -148,25 +148,8 @@ class WC_Admin {
public function admin_footer_text( $footer_text ) { public function admin_footer_text( $footer_text ) {
global $current_screen; global $current_screen;
// list of admin pages we want this to appear on
$pages = array(
'woocommerce_page_wc-settings',
'edit-shop_order',
'shop_order',
'edit-shop_coupon',
'shop_coupon',
'woocommerce_page_wc-reports',
'woocommerce_page_wc-addons',
'edit-product',
'product',
'edit-product_cat',
'edit-product_tag',
'edit-product_shipping_class',
'product_page_product_attributes'
);
// check to make sure we're on a WooCommerce admin page // check to make sure we're on a WooCommerce admin page
if ( isset( $current_screen->id ) && in_array( $current_screen->id, $pages ) ) { if ( isset( $current_screen->id ) && in_array( $current_screen->id, wc_get_screen_ids() ) ) {
// change the footer text // change the footer text
$footer_text = sprintf( __( 'Please rate <strong>WooCommerce</strong> <a href="%1$s" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href="%1$s" target="_blank">WordPress.org</a> to help us keep this plugin free. A huge thank you from WooThemes!', 'woocommerce' ), __( 'https://wordpress.org/support/view/plugin-reviews/woocommerce?filter=5', 'woocommerce' ) ); $footer_text = sprintf( __( 'Please rate <strong>WooCommerce</strong> <a href="%1$s" target="_blank">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href="%1$s" target="_blank">WordPress.org</a> to help us keep this plugin free. A huge thank you from WooThemes!', 'woocommerce' ), __( 'https://wordpress.org/support/view/plugin-reviews/woocommerce?filter=5', 'woocommerce' ) );
} }