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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: Plugin Class Demo | |
* Description: How I am using the base class in plugins. | |
* Plugin URI: | |
* Version: 2012.09.29 | |
* Author: Thomas Scholz | |
* Author URI: http://toscho.de | |
* License: GPL | |
* Text Domain: plugin_unique_name |
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 | |
// I add a simple function to my functions.php that lets me do clean page-builder checks inside my template files. | |
// This is safe to include regardless of if bb-plugin is active or not. Won't trigger error. | |
function is_builder_layout() { | |
if (class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_enabled()) return true; | |
return false; | |
} | |
// Inside page.php I use is_builder_layout() to determine layout | |
if (is_builder_layout()) { |
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
#Get the size of each table, ordered by largest to smallest | |
SELECT table_name AS "Tables", | |
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB" | |
FROM information_schema.TABLES | |
WHERE table_schema = "YOU+TABLE+NAME+HERE" | |
ORDER BY (data_length + index_length) DESC; | |
#Get the size of the entire DB | |
SELECT table_schema "DB Name", | |
Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" |
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 | |
/* Apply the following snippet in the functions.php file of your theme (without the PHP tag at the top) */ | |
add_action( 'tribe_events_community_form', function() { | |
$event_form = Tribe__Events__Community__Main::instance()->form; | |
remove_action( 'tribe_events_date_display', array( $event_form, 'loadRecurrenceData' ) ); | |
}, 5 ); |
OlderNewer