We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9a6528f commit e38d661Copy full SHA for e38d661
includes/actions.php
@@ -406,13 +406,12 @@ function wpum_reset_password_redirect() {
406
* @return void
407
*/
408
function wpum_restrict_profile_page() {
409
+ $profile_page = wpum_get_core_page_id( 'profile' );
410
- $is_profile_disabled = wpum_get_option( 'disable_profiles' );
411
- $profile_page = wpum_get_core_page_id( 'profile' );
412
-
413
- if ( true === boolval( $is_profile_disabled ) && is_page( $profile_page ) ) {
+ if ( $profile_page && is_page( $profile_page ) && true === boolval( wpum_get_option( 'disable_profiles' ) ) ) {
414
wp_safe_redirect( home_url() );
415
die();
416
}
417
+
418
add_action( 'template_redirect', 'wpum_restrict_profile_page' );
0 commit comments