Introduces the is_edit_account_page() function

For #10103
This commit is contained in:
Claudio Sanches 2016-01-22 17:30:10 -02:00
parent e0881121a3
commit 578a5515e4
1 changed files with 16 additions and 0 deletions

View File

@ -170,6 +170,22 @@ if ( ! function_exists( 'is_view_order_page' ) ) {
}
}
if ( ! function_exists( 'is_edit_account_page' ) ) {
/**
* Check for edit account page.
* Returns true when viewing the edit account page.
*
* @since 2.5.1
* @return bool
*/
function is_edit_account_page() {
global $wp;
return ( is_page( wc_get_page_id( 'myaccount' ) ) && isset( $wp->query_vars['edit-account'] ) );
}
}
if ( ! function_exists( 'is_order_received_page' ) ) {
/**