Deprecated: Hook wpmem_inc_login_args is deprecated since version 3.3.0! Use wpmem_login_form_defaults instead. in /var/www/vhosts/rocketgeek.com/test.rocketgeek.com/wp/wp-includes/functions.php on line 6078
Deprecated: Hook wpmem_inc_login_args is deprecated since version 3.3.0! Use wpmem_login_form_defaults instead. in /var/www/vhosts/rocketgeek.com/test.rocketgeek.com/wp/wp-includes/functions.php on line 6078
Warning: Undefined array key "reconfirm_link_before" in /var/www/vhosts/rocketgeek.com/test.rocketgeek.com/wp/wp-content/plugins/wp-members/includes/class-wp-members-dialogs.php on line 268
Warning: Undefined array key "reconfirm_link" in /var/www/vhosts/rocketgeek.com/test.rocketgeek.com/wp/wp-content/plugins/wp-members/includes/class-wp-members-dialogs.php on line 268
Deprecated: Hook wpmem_inc_login_args is deprecated since version 3.3.0! Use wpmem_login_form_defaults instead. in /var/www/vhosts/rocketgeek.com/test.rocketgeek.com/wp/wp-includes/functions.php on line 6078
/** * Re-implement [wp-members] shortcode tag for status, page, and meta_key attributes. * * NOT intended to replace every possible use of the [wp-members] shortcode. That tag * is obsolete and the ideal would be to replace it accordingly. However, for instances * where that is not practical, this code snippet provides a solution. * * To use this code, copy/paste to your (child) theme's functions.php file or to * where you store custom code snippets (such as a custom plugin file for the site). * * A list of replacement shortcodes * @see https://test.rocketgeek.com/shortcodes/list-of-replacement-shortcodes/ * * This code snippet * @link https://test.rocketgeek.com/code-snippets/re-implement-wp-members-shortcode-tag/ */ add_shortcode( 'wp-members', function( $atts, $content, $tag ) { if ( isset( $atts['status'] ) ) { if ( 'in' == $atts['status'] ) { $content = do_shortcode( '[wpmem_logged_in]' . $content . '[/wpmem_logged_in]' ); } if ( 'out' == $atts['status'] ) { $content = do_shortcode( '[wpmem_logged_out]' . $content . '[/wpmem_logged_out]' ); } } if ( isset( $atts['page'] ) ) { $redirect_to = ( isset( $atts['redirect_to'] ) ) ? ' redirect_to="' . $atts['redirect_to'] . '"' : ''; switch ( $atts['page'] ) { case 'login': $content = do_shortcode( '[wpmem_form login' . $redirect_to . ']' . $content . '[/wpmem_form]' ); break; case 'register': $content = do_shortcode( '[wpmem_form register' . $redirect_to . ']' . $content . '[/wpmem_form]' ); break; case 'password': $content = do_shortcode( '[wpmem_form password]' ); break; case 'user-profile': $content = do_shortcode( '[wpmem_profile]' ); break; } } if ( isset( $atts['meta_key'] ) ) { $content = do_shortcode( '[wpmem_field ' . $atts['meta_key'] . ']' ); } return $content; });