Browse Source

Use more reliable check for FSE

FSE contant will always be defined due to the fact that this
plugin bundles other functionality (SPT). Because of that we
can't rely on it to determine if this feature has been activated.
Marko Andrijasevic 6 năm trước cách đây
mục cha
commit
f046edf2d2
2 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 2 2
      modern-business/footer.php
  2. 2 2
      modern-business/header.php

+ 2 - 2
modern-business/footer.php

@@ -17,14 +17,14 @@
 
 <?php
 // If FSE plugin is active, use Footer template part for content.
-if( defined( 'A8C_FSE_VERSION' ) ) {
+if( class_exists( 'Full_Site_Editing' ) ) {
 	fse_get_footer();
 }
 
 // Otherwise we'll fall back to default Twenty Nineteen footer below.
 ?>
 
-<?php if( ! defined( 'A8C_FSE_VERSION' ) ) : ?>
+<?php if( ! class_exists( 'Full_Site_Editing' ) ) : ?>
 	<footer id="colophon" class="site-footer">
 		<?php get_template_part( 'template-parts/footer/footer', 'widgets' ); ?>
 		<div class="site-info">

+ 2 - 2
modern-business/header.php

@@ -26,14 +26,14 @@
 
     <?php
         // If FSE plugin is active, use Header template part for content.
-        if( defined( 'A8C_FSE_VERSION' ) ) {
+        if( class_exists( 'Full_Site_Editing' ) ) {
             fse_get_header();
         }
 
         // Otherwise we'll fall back to default Twenty Nineteen header below.
     ?>
 
-    <?php if( ! defined( 'A8C_FSE_VERSION' ) ) : ?>
+    <?php if( ! class_exists( 'Full_Site_Editing' ) ) : ?>
 
         <header id="masthead" class="<?php echo is_singular() && twentynineteen_can_show_post_thumbnail() ? 'site-header featured-image' : 'site-header'; ?>">
             <div class="site-branding-container">