+ + %1$s

', esc_html__( 'Authentication failed. You cannot preview this item.', 'et_builder' ) ); + } elseif( ! current_user_can( 'edit_posts' ) ) { + // Auth user + printf( '

%1$s

', esc_html__( 'Authentication failed. You have no permission to preview this item.', 'et_builder' ) ); + } else { + $content = apply_filters( 'the_content', wp_unslash( $_POST['shortcode'] ) ); + $content = str_replace( ']]>', ']]>', $content ); + echo $content; + } + } else { + printf( '

%1$s

', esc_html__( 'Loading preview...', 'et_builder' ) ); + } + ?> + +