Skip to content

Instantly share code, notes, and snippets.

@fastlinemedia
fastlinemedia / custom-hooks.php
Created May 16, 2017 04:16
Adding custom hooks for parts to Beaver Themer.
function my_theme_register_part_hooks( $parts ) {
$parts[] = array(
'label' => 'Custom Hooks',
'hooks' => array(
'genesis_after_before-footer_widget_area' => 'Before Footer Widgets',
)
);
return $parts;
}
add_filter( 'fl_theme_builder_part_hooks', 'my_theme_register_part_hooks', 11 );
@fastlinemedia
fastlinemedia / fl-gallery-grid-override.js
Created February 22, 2016 18:55
Override the FLBuilderGalleryGrid resize method to set a custom number of columns or adjust the 480px breakpoint.
@fastlinemedia
fastlinemedia / functions.php
Last active August 11, 2020 10:44
Import WordPress Customizer settings when a theme is activated.
/**
* This function assumes you have a Customizer export file in your theme directory
* at 'data/customizer.dat'. That file must be created using the Customizer Export/Import
* plugin found here... https://wordpress.org/plugins/customizer-export-import/
*/
function import_customizer_settings()
{
// Check to see if the settings have already been imported.
$template = get_template();
$imported = get_option( $template . '_customizer_import', false );
@fastlinemedia
fastlinemedia / gist:18b2b85686ee8aa37540
Created January 5, 2015 18:14
WordPress Customizer Export/Import Install Control
<?php
/**
* @class Export_Import_Install_Control
*/
final class Export_Import_Install_Control extends WP_Customize_Control {
/**
* @method render_content
* @protected