%s

', $class, esc_html( $message ) ); $displayed = true; } add_action( 'rcp_profile_editor_messages', 'rcp_front_end_notices' ); add_action( 'rcp_subscription_details_top', 'rcp_front_end_notices' ); /** * Display messages on the Edit Profile and Membership Details pages * if the account is pending email verification. Also includes a link * to re-send the verification email. * * @since 2.8.2 * @return void */ function rcp_pending_verification_notice() { $customer = rcp_get_customer(); // currently logged in customer if ( empty( $customer ) || ! $customer->is_pending_verification() ) { return; } static $displayed = false; // Make sure we only display once in case both shortcodes are on the same page. if ( $displayed ) { return; } $resend_url = wp_nonce_url( add_query_arg( array( 'rcp_action' => 'resend_verification', 'redirect' => urlencode( rcp_get_current_url() ) ) ), 'rcp-verification-nonce' ); printf( '

' . __( 'Your account is pending email verification. Click here to re-send the verification email.', 'rcp' ) . '

', esc_url( $resend_url ) ); $displayed = true; } add_action( 'rcp_subscription_details_top', 'rcp_pending_verification_notice' ); add_action( 'rcp_profile_editor_messages', 'rcp_pending_verification_notice' ); /** * Display email preview. * * @return void */ function rcp_display_email_template_preview() { if ( ! isset( $_GET['rcp_preview_email'] ) ) { return; } if ( ! current_user_can( 'rcp_manage_settings' ) ) { return; } global $rcp_options; $email_type = $_GET['rcp_preview_email']; $emails = new RCP_Emails(); $emails->member_id = get_current_user_id(); if ( is_numeric( $email_type ) ) { // This is an expiration/reminder notice. $reminders = new RCP_Reminders(); $notice = $reminders->get_notice( $email_type ); $message = $notice['message']; } else { // This is a regular email template. $message = isset( $rcp_options[ $email_type ] ) ? $rcp_options[ $email_type ] : $rcp_options['active_email']; } echo $emails->generate_preview( $message ); exit; } add_action( 'template_redirect', 'rcp_display_email_template_preview' );