Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions classes/controllers/FrmFormsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -596,23 +596,25 @@ public static function preview_block_theme_body_classnames( $classes ) {
* @return void
*/
private static function fallback_when_page_template_part_is_not_supported_by_theme() {
if ( have_posts() ) {
the_post();
self::get_template( 'header' );
if ( ! have_posts() ) {
return;
}

// add some generic class names to the container to add some natural padding to the content.
// .entry-content catches the WordPress TwentyTwenty theme.
// .container catches Customizr content.
echo '<div class="container entry-content">';
the_content();
echo '</div>';
the_post();
self::get_template( 'header' );

// Prevent extra unexpected forms in the footer.
// For some reason this happens in the Twenty Twenty Five theme.
add_filter( 'frm_filter_final_form', '__return_empty_string' );
// add some generic class names to the container to add some natural padding to the content.
// .entry-content catches the WordPress TwentyTwenty theme.
// .container catches Customizr content.
echo '<div class="container entry-content">';
the_content();
echo '</div>';

self::get_template( 'footer' );
}
// Prevent extra unexpected forms in the footer.
// For some reason this happens in the Twenty Twenty Five theme.
add_filter( 'frm_filter_final_form', '__return_empty_string' );

self::get_template( 'footer' );
}

/**
Expand Down
26 changes: 14 additions & 12 deletions classes/controllers/FrmOnboardingWizardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,19 +203,21 @@ public static function do_admin_redirects() {
* @return void
*/
public static function maybe_load_page() {
if ( self::is_onboarding_wizard_page() ) {
// Dismiss the onboarding wizard message so it stops appearing after it is clicked.
$message = new FrmInbox();
$message->dismiss( 'onboarding_wizard' );

add_action( 'admin_menu', self::class . '::menu', 99 );
add_action( 'admin_init', self::class . '::assign_properties' );
add_action( 'admin_enqueue_scripts', self::class . '::enqueue_assets', 15 );
add_action( 'admin_head', self::class . '::remove_menu' );

add_filter( 'admin_body_class', self::class . '::add_admin_body_classes', 999 );
add_filter( 'frm_show_footer_links', '__return_false' );
if ( ! self::is_onboarding_wizard_page() ) {
return;
}

// Dismiss the onboarding wizard message so it stops appearing after it is clicked.
$message = new FrmInbox();
$message->dismiss( 'onboarding_wizard' );

add_action( 'admin_menu', self::class . '::menu', 99 );
add_action( 'admin_init', self::class . '::assign_properties' );
add_action( 'admin_enqueue_scripts', self::class . '::enqueue_assets', 15 );
add_action( 'admin_head', self::class . '::remove_menu' );

add_filter( 'admin_body_class', self::class . '::add_admin_body_classes', 999 );
add_filter( 'frm_show_footer_links', '__return_false' );
}

/**
Expand Down
Loading