- fix profile form for guests

This commit is contained in:
ashubawork
2023-04-25 11:18:22 +03:00
parent 33c6968055
commit bcadcfc7bd
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ if ( ! class_exists( 'um\core\Blocks' ) ) {
public function um_forms_render( $atts ) {
$shortcode = '[ultimatemember';
$shortcode = '[ultimatemember widget="1"';
if ( isset( $atts['form_id'] ) && '' !== $atts['form_id'] ) {
$shortcode .= ' form_id="' . $atts['form_id'] . '"';
+4
View File
@@ -691,6 +691,10 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
}
}
if ( ! is_user_logged_in() && isset( $args['widget'] ) && 1 === (int) $args['widget'] && 'profile' === $mode ) {
return;
}
// for profiles only
if ( $mode == 'profile' && um_profile_id() ) {