' . esc_html_e( 'Something went wrong. Please verify if the email you want to preview exists or addon it is associated with is activated.', 'user-registration' ) . '
';
} else {
$class_instance = new $class_name();
$default_content = 'ur_get_' . $option_name;
if ( ! method_exists( $class_instance, $default_content ) ) {
$default_content = 'user_registration_get_' . $option_name;
}
if ( 'passwordless_login_email' === $option_name ) {
$email_content = get_option( 'user_registration_' . $option_name . '_content', $class_instance->$default_content() );
} elseif ( 'email_verified_admin_email' === $option_name ) {
$email_content = get_option( 'user_registration_pro_' . $option_name, $class_instance->$default_content() );
} else {
$email_content = get_option( 'user_registration_' . $option_name, $class_instance->$default_content() );
}
/**
* Filter to process the smart tags.
*
* @param string $email_content The email message content.
*/
$email_content = apply_filters( 'user_registration_process_smart_tags', $email_content );
ur_get_template(
'email-preview.php',
array(
'email_content' => $email_content,
'email_template' => $email_template,
)
);
}
}
/**
* Side panel content.
*
* @since 4.0
*/
public static function side_panel_content() {
$is_pro_active = is_plugin_active( 'user-registration-pro/user-registration.php' );
if ( ! $is_pro_active ) {
$heading = esc_html__( 'Upgrade to our Pro version for everything you need for advanced registration form building.', 'user-registration' );
$pro_features = array(
esc_html__( '40+ unique addons', 'user-registration' ),
esc_html__( 'Advanced fields for registration forms', 'user-registration' ),
esc_html__( 'WooCommerce with billing and shipping fields', 'user-registration' ),
esc_html__( 'Supports 12 file types for uploads', 'user-registration' ),
esc_html__( 'Stylish forms with customizer', 'user-registration' ),
esc_html__( 'Conditional Logic for dynamic forms', 'user-registration' ),
esc_html__( 'Control content with restrictions', 'user-registration' ),
esc_html__( 'All form templates included', 'user-registration' ),
);
} else {
$heading = esc_html__( 'Unlock more functionality with these popular add-ons, loved by users like you.', 'user-registration' );
$pro_features = array(
esc_html__( 'Advanced Fields', 'user-registration' ),
esc_html__( 'WooCommerce', 'user-registration' ),
esc_html__( 'Customize My Account', 'user-registration' ),
esc_html__( 'File Upload', 'user-registration' ),
esc_html__( 'Style Customizer', 'user-registration' ),
esc_html__( 'Multi-Part', 'user-registration' ),
esc_html__( 'Email Templates', 'user-registration' ),
esc_html__( 'Field Visibility', 'user-registration' ),
);
}
$is_theme_style = get_post_meta( $_GET['form_id'], 'user_registration_enable_theme_style', true );
if ( 'default' === $is_theme_style ) {
$checked = '';
$data_theme = 'default';
} else {
$checked = 'checked';
$data_theme = 'theme';
}
$html = '';
$html .= '