Solves 'call to undefined function is_plugin_active() issue when Tainacan plugin is not active.

This commit is contained in:
mateuswetah 2020-08-14 13:34:40 -03:00
parent 192f118a99
commit 18c1c42de4
5 changed files with 24 additions and 20 deletions

View File

@ -186,7 +186,7 @@ body.loading-content main:before {
@import "_media_query"; @import "_media_query";
nav{ nav {
&.menu-shadow{ &.menu-shadow{
min-height: 50px; min-height: 50px;
border-bottom: none; border-bottom: none;
@ -245,7 +245,7 @@ nav{
h1 { h1 {
font-size: 1.5rem; font-size: 1.5rem;
font-weight: normal; font-weight: normal;
margin: 0.36rem 0; margin: 0.3rem 0 0.36rem 0;
} }
.logo { .logo {
width: auto; width: auto;
@ -746,6 +746,10 @@ nav{
margin-bottom: 0; margin-bottom: 0;
} }
} }
.page-template-landing .tainacan-footer,
.page-template-landing-breadcrumb .tainacan-footer {
margin-top: 0px !important;
}
.tainacan-title{ .tainacan-title{
.tainacan-title-page{ .tainacan-title-page{

View File

@ -268,6 +268,8 @@ add_action( 'widgets_init', 'tainacan_widgets_footer_init' );
function tainacan_block_patterns_init() { function tainacan_block_patterns_init() {
global $wp_version; global $wp_version;
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if ((is_plugin_active('gutenberg/gutenberg.php') || $wp_version >= '5') && function_exists('register_block_pattern_category')) { if ((is_plugin_active('gutenberg/gutenberg.php') || $wp_version >= '5') && function_exists('register_block_pattern_category')) {
register_block_pattern_category( register_block_pattern_category(
'tainacan-interface', 'tainacan-interface',

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,10 @@
<div class="mt-3 tainacan-single-post"> <?php if ( comments_open() || get_comments_number() ) : ?>
<div class="row"> <div class="mt-3 tainacan-single-post">
<!-- Container --> <div class="row">
<div class="col mt-3 mx-auto"> <!-- Container -->
<?php <div class="col mt-3 mx-auto">
if ( comments_open() || get_comments_number() ) : <?php comments_template(); ?>
comments_template(); </div>
endif; ?>
</div> </div>
</div> </div>
</div> <?php endif; ?>

View File

@ -64,12 +64,11 @@
</footer> </footer>
<?php } ?> <?php } ?>
</article> </article>
<div class="row"> <?php if ( comments_open() || get_comments_number() ) : ?>
<!-- Container --> <div class="row">
<div class="col mt-3 mx-auto"> <!-- Container -->
<?php <div class="col mt-3 mx-auto">
if ( comments_open() || get_comments_number() ) : <?php comments_template(); ?>
comments_template(); </div>
endif; ?>
</div> </div>
</div> <?php endif; ?>