| 1 | diff --git wp-includes/general-template.php wp-includes/general-template.php |
|---|
| 2 | index 939e9de..1a97424 100644 |
|---|
| 3 | --- wp-includes/general-template.php |
|---|
| 4 | +++ wp-includes/general-template.php |
|---|
| 5 | @@ -247,6 +247,31 @@ function wp_login_url($redirect = '', $force_reauth = false) { |
|---|
| 6 | } |
|---|
| 7 | |
|---|
| 8 | /** |
|---|
| 9 | + * Whether the current request is for a login page |
|---|
| 10 | + * |
|---|
| 11 | + * @since 3.5.0 |
|---|
| 12 | + * |
|---|
| 13 | + * @return bool |
|---|
| 14 | + */ |
|---|
| 15 | +function is_login_page() { |
|---|
| 16 | + return (bool) did_action( 'login_form_login' ); |
|---|
| 17 | +} |
|---|
| 18 | + |
|---|
| 19 | +/** |
|---|
| 20 | + * Whether the current request is for the registration page |
|---|
| 21 | + * |
|---|
| 22 | + * @since 3.5.0 |
|---|
| 23 | + * |
|---|
| 24 | + * @return bool |
|---|
| 25 | + */ |
|---|
| 26 | +function is_register_page() { |
|---|
| 27 | + if ( is_multisite() && 'wp-signup.php' == $GLOBALS['pagenow'] ) |
|---|
| 28 | + return true; |
|---|
| 29 | + |
|---|
| 30 | + return (bool) did_action( 'login_form_register' ); |
|---|
| 31 | +} |
|---|
| 32 | + |
|---|
| 33 | +/** |
|---|
| 34 | * Provides a simple login form for use anywhere within WordPress. By default, it echoes |
|---|
| 35 | * the HTML immediately. Pass array('echo'=>false) to return the string instead. |
|---|
| 36 | * |
|---|