- http://www.codanada.com -- Coming soon!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Recommended for BB | |
define('WP_MEMORY_LIMIT', '512M'); | |
define('FL_BUILDER_MODSEC_FIX', true); | |
// Enable Debugging | |
define('WP_DEBUG', true); | |
define('WP_DEBUG_LOG', true); | |
// Etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A shortcode to display the child pages of a parent page. | |
* | |
* Usage: Simply embed [show_childpages_on_parent] on the parent page. | |
* | |
*/ | |
add_shortcode('show_childpages_on_parent', function(){ | |
global $post; | |
$html = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
var $slider = $('#bbcw-content-slider .fl-content-slider-wrapper').data('bxSlider'), | |
slideCount = $slider.getSlideCount(); | |
$slider.goToSlide( Math.floor( Math.random() * slideCount ) ); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Template Name: BB Sample Archives | |
*/ | |
?> | |
<?php get_header(); ?> | |
<div class="fl-archive container"> | |
<div class="row"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Issue: Event Espresso is outputting data to the page which is not needed by BB. | |
// https://cl.ly/mxHS | |
// -------------------------------------------------------------------------------- | |
function ee_bb_suppress_notices(){ | |
if (class_exists('FLBuilderModel') && (FLBuilderModel::is_builder_enabled())){ | |
add_filter( 'FHEE__EE_Front_Controller__display_errors', '__return_false' ); | |
} | |
} | |
add_action('wp', 'ee_bb_suppress_notices', 1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'upgrader_process_complete', function() { | |
//rocket cache | |
if ( function_exists( 'rocket_clean_domain' ) ) { | |
rocket_clean_domain(); | |
} | |
// wp-super-cache | |
if ( function_exists( 'wp_cache_clear_cache' ) ) { | |
wp_cache_clear_cache(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp', function() { | |
if ( is_search() ) { | |
remove_action( 'wp_enqueue_scripts', 'FLBuilder::enqueue_all_layouts_styles_scripts' ); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Content Slider ID = "bbcw-content-slider" | |
// | |
jQuery(document).ready(function($){ | |
var $slider = $('#bbcw-content-slider .fl-content-slider-wrapper').data('bxSlider') | |
var slideCount = $slider.getSlideCount(); | |
$slider.goToSlide( Math.floor( Math.random() * slideCount ) ); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'fl_builder_render_css', function( $css ) { | |
return str_ireplace( 'example.com', 'cdn-url.example.com', $css ); | |
}); |