Merge pull request #7234 from BFTrick/iss-7213
Adding Please Rate Our Plugin Footer Text
This commit is contained in:
commit
85adccb416
|
@ -27,6 +27,7 @@ class WC_Admin {
|
|||
add_action( 'admin_init', array( $this, 'prevent_admin_access' ) );
|
||||
add_action( 'admin_init', array( $this, 'preview_emails' ) );
|
||||
add_action( 'admin_footer', 'wc_print_js', 25 );
|
||||
add_filter( 'admin_footer_text', array( $this, 'admin_footer_text' ), 1, 2 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -137,6 +138,26 @@ class WC_Admin {
|
|||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Change the admin footer text on WooCommerce admin pages
|
||||
*
|
||||
* @since 2.3
|
||||
* @return string
|
||||
*/
|
||||
public function admin_footer_text( $footer_text ) {
|
||||
global $current_screen;
|
||||
|
||||
// check to make sure we're on a WooCommerce admin page
|
||||
if ( isset( $current_screen->id ) && in_array( $current_screen->id, wc_get_screen_ids() ) ) {
|
||||
// change the footer text
|
||||
$footer_text = sprintf( __( 'Please rate <strong>WooCommerce</strong> <a href="%1$s" target="_blank">★★★★★</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' ) );
|
||||
}
|
||||
|
||||
return $footer_text;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return new WC_Admin();
|
||||
|
|
Loading…
Reference in New Issue