Skip to content

Commit

Permalink
add cache buster
Browse files Browse the repository at this point in the history
  • Loading branch information
neilgee committed Sep 3, 2018
1 parent aad0b37 commit b24bee2
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 18 deletions.
23 changes: 6 additions & 17 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ function bt_theme_setup() {

// Load in required or optional files.
// Classes.

// Cache buster
if ( ! class_exists('FLCache\CacheHelper') ) {
require_once( get_stylesheet_directory() . '/classes/class-fl-builder-cache-helper.php');
}
// Core Class
require_once( get_stylesheet_directory() . '/classes/class-fl-child-theme.php');
// Actions - BB Default way - This theme calls required files below.
add_action( 'wp_enqueue_scripts', 'FLChildTheme::enqueue_scripts', 1000 );
Expand Down Expand Up @@ -210,24 +216,7 @@ function bt_added_fonts( $system ) {
);
return $system;
}


function bt_acf_auto_set_license_keys() {

if ( !get_option('acf_pro_license') && defined('ACF_PRO_KEY') ) {

$save = array(
'key' => ACF_PRO_KEY,
'url' => home_url()
);

$save = maybe_serialize($save);
$save = base64_encode($save);

update_option('acf_pro_license', $save);
}
}
add_action('after_switch_theme', 'bt_acf_auto_set_license_keys');



Expand Down
21 changes: 21 additions & 0 deletions includes-child/client-file.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,27 @@ function wsl_edit_text() {
}


add_action('after_switch_theme', 'bt_acf_auto_set_license_keys');
/**
* ACF License - via constant defined in wp-config.php
*/
function bt_acf_auto_set_license_keys() {

if ( !get_option('acf_pro_license') && defined('ACF_PRO_KEY') ) {

$save = array(
'key' => ACF_PRO_KEY,
'url' => home_url()
);

$save = maybe_serialize($save);
$save = base64_encode($save);

update_option('acf_pro_license', $save);
}
}


// Roles & Capabilities
// @link https://wordpress.stackexchange.com/questions/4191/allow-editors-to-edit-menus
// add editor the privilege to edit theme & menu
Expand Down
2 changes: 1 addition & 1 deletion plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function gsm_register_required_plugins() {
array(
'name' => 'Gravity Forms', // The plugin name.
'slug' => 'gravityforms', // The plugin slug (typically the folder name).
'source' => get_theme_root() . '/lib/plugins/gravityforms_2.2.6.1.zip', // The plugin source.
'source' => get_theme_root() . '/lib/plugins/gravityforms_2.3.3.6.zip', // The plugin source.
'required' => false, // If false, the plugin is only 'recommended' instead of required.
'version' => '2.3.3.6', // E.g. 1.0.0. If set, the active plugin must be this version or higher.
'force_activation' => false, // If true, plugin is activated upon theme activation and cannot be deactivated until theme switch.
Expand Down

0 comments on commit b24bee2

Please sign in to comment.