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_get_edit_url', function( $url, $post ) { | |
return add_query_arg( array( 'PageSpeed' => 'off' ), $url ); | |
}, 9999, 2 ); |
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( 'display_post_states', function( $post_states, $post ) { | |
if ( get_post_meta( $post->ID, '_fl_builder_enabled', true ) ) { | |
$draft = get_post_meta( $post->ID, '_fl_builder_draft', true ); | |
$live = get_post_meta( $post->ID, '_fl_builder_data', true ); | |
if ( '' !== $draft && $draft != $live ) { | |
$post_states['bb_draft'] = 'Unpublished Changes'; | |
} | |
} |
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
** | |
* Convert BB drafted changes to live data on a certain date. | |
*/ | |
class Publish_BB_Draft { | |
public $date = 'Aug 10 17:00'; // Day/time to convert | |
public $post_id = 474688; // the post/page/layout id | |
public function __construct() { |
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_module_content', function( $content, $module ) { | |
if ( $module instanceof FLRichTextModule && strstr( $content, '<!--more' ) ) { | |
$content = str_replace( '<div class="fl-rich-text">', '', $content ); | |
$content = preg_replace( '#</div>$#', '', $content ); | |
$parts = get_extended( $content ); | |
$main = balanceTags( $parts['main'], true ); | |
$main = preg_replace( '/<([^<\/>]*)>([\s]*?|(?R))<\/\1>/imsU', '', $main ); | |
$main .= sprintf( '<a class="read-more-link-%s" href="#">%s</a><script>jQuery(".read-more-link-%s").on("click", function(e){e.preventDefault();jQuery(".read-more-%s").fadeIn()})</script>', $module->node, $parts['more_text'], $module->node, $module->node ); |
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 () { | |
jQuery( 'a.fl-tabs-label' ).on('click', function(){ | |
jQuery(window).trigger('resize'); | |
}); | |
}); |
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
/* | |
YUI 3.18.1-bb | |
Removed unload from events | |
Copyright 2012 Yahoo! Inc. All rights reserved. | |
Licensed under the BSD License. | |
http://yuilibrary.com/license/ | |
*/ | |
void 0!==YUI&&(YUI._YUI=YUI);var YUI=function(){var e=0,t=this,n=arguments,i=n.length,r=function(e,t){return e&&e.hasOwnProperty&&e instanceof t},s="undefined"!=typeof YUI_config&&YUI_config;if(r(t,YUI)?(t._init(),YUI.GlobalConfig&&t.applyConfig(YUI.GlobalConfig),s&&t.applyConfig(s),i||t._setup()):t=new YUI,i){for(;e<i;e++)t.applyConfig(n[e]);t._setup()}return t.instanceOf=r,t};!function(){var e,t,n="3.18.1",i="https://yui-s.yahooapis.com/",r="yui3-js-enabled",s="yui3-css-stamp",a=function(){},o=Array.prototype.slice,u={"io.xdrReady":1,"io.xdrResponse":1,"SWF.eventHandler":1},l="undefined"!=typeof window,c=l?window:null,d=l?c.document:null,h=d&&d.documentElement,f=h&&h.className,p={},g=new Date().getTime(),m=function(e,t,n,i){e&&e.addEventListener&&"unload"!==t?e.addEventListener(t,n,i):e&&e.attachEvent&&e.attachEvent("on"+t,n)},v=function(e,t,n,i){if(e& |
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
var oldFadeIn = jQuery.fn.fadeIn; | |
jQuery.fn.fadeIn = function(){ | |
jQuery(this).trigger('fadeInComplete'); | |
return oldFadeIn.apply( this, arguments ); | |
} | |
jQuery('.foo .fl-success-msg').on('fadeInComplete', function(){ | |
// do some magic here | |
console.log('bar') | |
}); |
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
diff --git a/common/helpers.php b/common/helpers.php | |
index 6fe1ca4..fc436fd 100644 | |
--- a/common/helpers.php | |
+++ b/common/helpers.php | |
@@ -16,8 +16,12 @@ if ( !class_exists( 'MeowCommon_Helpers' ) ) { | |
return isset( $_GET['cs-render'] ) && $_GET['cs-render'] === '1'; | |
} | |
+ static function is_beaver_builder() { | |
+ return isset( $_GET['fl_builder'] ); |
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 | |
/** | |
* Show hook location with fl_hooks $_GET is used. | |
*/ | |
add_action( 'template_redirect', function() { | |
if ( ! isset( $_REQUEST['fl_hooks'] ) ) { | |
return false; | |
} |
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('.fl-settings-form-content label').each(function(){if(~jQuery(this).prop('innerText').indexOf("( Not used )")){jQuery(this).find('input').prop('checked',false)}}); |
NewerOlder