| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
die( 'You are not allowed to call this page directly.' ); |
| 4 |
} |
| 5 |
|
| 6 |
add_filter( |
| 7 |
'document_title', |
| 8 |
function ( $title ) use ( $form ) { |
| 9 |
$form_name = '' === $form->name ? FrmFormsHelper::get_no_title_text() : $form->name; |
| 10 |
return get_bloginfo( 'name', 'display' ) . ' | ' . wp_strip_all_tags( $form_name ); |
| 11 |
} |
| 12 |
); |
| 13 |
?> |
| 14 |
<!DOCTYPE html> |
| 15 |
<html <?php language_attributes(); ?>> |
| 16 |
<head> |
| 17 |
<meta charset="<?php bloginfo( 'charset' ); ?>" /> |
| 18 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> |
| 19 |
<?php |
| 20 |
if ( ! current_theme_supports( 'title-tag' ) ) { |
| 21 |
?> |
| 22 |
<title><?php bloginfo( 'name' ); ?> | <?php echo esc_html( $form->name ); ?></title> |
| 23 |
<?php |
| 24 |
} |
| 25 |
|
| 26 |
wp_head(); |
| 27 |
FrmFormsController::maybe_load_css( $form, 1, false ); |
| 28 |
?> |
| 29 |
</head> |
| 30 |
<body class="frm_preview_page"> |
| 31 |
<?php |
| 32 |
if ( is_callable( 'twentynineteen_setup' ) ) { |
| 33 |
?> |
| 34 |
<div class="site-branding frm_hidden"></div> |
| 35 |
<?php |
| 36 |
} |
| 37 |
echo FrmFormsController::show_form( $form->id, '', 'auto', 'auto' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 38 |
?> |
| 39 |
<?php wp_footer(); ?> |
| 40 |
</body> |
| 41 |
</html> |
| 42 |
|