This file contains hidden or 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 | |
/* | |
Plugin Name: Beaver Builder Cleanup Tool | |
Description: Clears temporary data weekly | |
Author: <Simon> | |
Version: 1.0 | |
*/ | |
class BB_Cleanup { | |
protected $seconds = 604800; // Weekly. | |
function __construct() { |
This file contains hidden or 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 | |
add_filter( 'fl_builder_node_settings', function( $settings, $node ) { | |
if ( 'module' === $node->type ) { | |
$animations = array( | |
'fade-in', | |
'fade-left', | |
'fade-right', | |
'fade-up', |
This file contains hidden or 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 // this lines just here so the formatting works, ignore it. | |
add_filter( 'fl_builder_render_css', function( $css, $nodes, $global_settings, $include_global ) { | |
if ( isset( $_GET['fl_builder'] ) ) { | |
return $css; | |
} | |
// keep original in case this goes tits up | |
$original = $css; | |
$parse = preg_match_all( '/(https?:\/\/.*\.(?:png|jpe?g|gif|webp))/', $css, $urls, PREG_PATTERN_ORDER ); |
This file contains hidden or 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
(function($) { | |
var overlayText = 'Dont steal my godamn images!'; | |
var padding = '30px 20px'; | |
var background = 'black'; | |
var textColor = 'white'; | |
$(document).ready(function() { | |
$('img').on('contextmenu',function(e){ | |
var image = $(e.target), | |
wrap = image.parent(); | |
wrap.css('display', 'flex').css('flex-direction', 'column').css('position', 'relative'); |
This file contains hidden or 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
(function($){ | |
$(document).ready(function(){ | |
// This runs on ready function | |
// Add Copy+Pasta here | |
// assuming whut class is added to button group and we want the 2nd button | |
// if 3 buttons it would be 0,1,2 so we want child 1 | |
$('.whut').find('a').children().eq(1) | |
.on('click',function(e){ |
This file contains hidden or 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_register_settings_form', function( $form, $id ) { | |
if ( in_array( $id, array( 'row', 'col' ) ) ) { | |
$form['tabs']['notes'] = array( | |
'title' => 'Notes', | |
'sections' => array( | |
'notes' => array( | |
'title' => '', | |
'fields' => array( | |
'note' => array( | |
'title' => 'Note', |
This file contains hidden or 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( 'admin_init', function() { | |
remove_action( 'post_row_actions', 'FLBuilderUserTemplatesAdminList::row_actions' ); | |
} ); |
This file contains hidden or 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
From 7485624b4814ccafb6edefc1358be7ca3f531478 Mon Sep 17 00:00:00 2001 | |
From: Simon Prosser <[email protected]> | |
Date: Mon, 21 Sep 2020 20:06:41 +0100 | |
Subject: [PATCH] New filter fl_theme_disable_smoothscroll to disable | |
smoothscroll | |
add_filter( 'fl_theme_disable_smoothscroll', '__return_true' ); | |
Fixes #148 | |
--- | |
classes/class-fl-theme.php | 6 +++++- |
This file contains hidden or 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_shortcode( 'form1', function( $atts ) { | |
$rst = ( isset( $atts['rst'] ) ) ? $atts['rst'] : '9.00'; | |
$msp = ( isset( $atts['msp'] ) ) ? $atts['msp'] : '16.00'; | |
ob_start(); | |
?> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-route.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.7/angular-resource.js"></script> | |
<div id="rst_calc_main" ng-app="rstApp" ng-controller="rstCtrl"> | |
<div class="table-responsive"></div> |
This file contains hidden or 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 | |
/** | |
* Replace Pagely urls in Beaver Builder | |
* @author Simon Prosser | |
* @license MIT | |
*/ | |
class PagelyCDNReplace { | |
static $site_url = 'https://example.com'; // Your site url | |
static $cdn_url = 'https://cdn.example.io'; // Your CDN url |