From aa9c519fe18b1a59f2c35ed09bbb2aab7af6838d Mon Sep 17 00:00:00 2001 From: Neil Gee Date: Sun, 17 Mar 2019 12:02:43 +1100 Subject: [PATCH] add ACF include file, all ACF functions going in there from now --- functions.php | 13 ++++++++- includes-child/acf.php | 30 ++++++++++++++++++++ includes-child/client-file.php | 51 ++++++++++------------------------ plugins.php | 8 +++--- style.css | 3 +- 5 files changed, 62 insertions(+), 43 deletions(-) create mode 100644 includes-child/acf.php diff --git a/functions.php b/functions.php index 077ac63..a71d006 100644 --- a/functions.php +++ b/functions.php @@ -110,6 +110,14 @@ function bt_theme_setup() { if ( class_exists( 'GFCommon' ) ) { include_once( get_stylesheet_directory() . '/includes-child/gravity.php' ); } + + /** + * Load in ACF functions + * @since 1.7.0 + */ + if ( class_exists( 'acf' ) ) { + include_once( get_stylesheet_directory() . '/includes-child/acf.php' ); + } /** * Get the plugins ffrom TGM Plugin Activation @@ -239,7 +247,10 @@ function bt_execute_php_widgets( $html ) { } add_filter( 'fl_ace_editor_settings', 'custom_ace_editor' ); - + /** + * Show line numbers and wrap text in Ace editor + * @since 1.7.0 + */ function custom_ace_editor() { $change_ace = array( 'showLineNumbers' => true, diff --git a/includes-child/acf.php b/includes-child/acf.php new file mode 100644 index 0000000..b426127 --- /dev/null +++ b/includes-child/acf.php @@ -0,0 +1,30 @@ + ACF_PRO_KEY, + 'url' => home_url() + ); + + $save = maybe_serialize($save); + $save = base64_encode($save); + + update_option('acf_pro_license', $save); + } +} \ No newline at end of file diff --git a/includes-child/client-file.php b/includes-child/client-file.php index 3d81cab..fb30a15 100644 --- a/includes-child/client-file.php +++ b/includes-child/client-file.php @@ -1,6 +1,6 @@ - #wp-admin-bar-wp-logo, - #wp-admin-bar-comments, - #wp-admin-bar-new-content, - #contextual-help-link-wrap, - #screen-options-link-wrap { - display: none !important; - } - - '; + echo ' + + '; } } @@ -117,30 +118,6 @@ function wsl_edit_text() { return "Site by WebsiteLove, contact us"; } - -add_action('after_switch_theme', 'bt_acf_auto_set_license_keys'); -/** - * ACF License - via constant defined in wp-config.php - * @link https://gist.github.com/mattradford/6d5b8f3cd11ce1f62480 - * - * @since 1.0.0 - */ -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 @@ -151,4 +128,4 @@ function bt_acf_auto_set_license_keys() { // $role_object = get_role( 'editor' ); // add $cap capability to this role object -// $role_object->add_cap( 'edit_theme_options' ); +// $role_object->add_cap( 'edit_theme_options' ); \ No newline at end of file diff --git a/plugins.php b/plugins.php index d5a041b..803bb25 100644 --- a/plugins.php +++ b/plugins.php @@ -64,7 +64,7 @@ function gsm_register_required_plugins() { 'slug' => 'advanced-custom-fields', // The plugin slug (typically the folder name). 'source' => get_theme_root() . '/lib/plugins/advanced-custom-fields-pro.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. - 'version' => '5.7.10', // E.g. 1.0.0. If set, the active plugin must be this version or higher. + 'version' => '5.7.13', // 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. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. 'external_url' => '', // If set, overrides default API URL and points to an external URL. @@ -87,7 +87,7 @@ function gsm_register_required_plugins() { 'slug' => 'bb-ultimate-addon', // The plugin slug (typically the folder name). 'source' => get_theme_root() . '/lib/plugins/bb-ultimate-addon.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. - 'version' => '1.14.3', // E.g. 1.0.0. If set, the active plugin must be this version or higher. + 'version' => '1.16.0', // 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. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. 'external_url' => '', // If set, overrides default API URL and points to an external URL. @@ -109,9 +109,9 @@ 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.4.2.4.zip', // The plugin source. + 'source' => get_theme_root() . '/lib/plugins/gravityforms_2.4.6.11.zip', // The plugin source. 'required' => false, // If false, the plugin is only 'recommended' instead of required. - 'version' => '2.4.5.4', // E.g. 1.0.0. If set, the active plugin must be this version or higher. + 'version' => '2.4.6.11', // 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. 'force_deactivation' => false, // If true, plugin is deactivated upon theme switch, useful for theme-specific plugins. 'external_url' => '', // If set, overrides default API URL and points to an external URL. diff --git a/style.css b/style.css index 21502c7..1b37bba 100644 --- a/style.css +++ b/style.css @@ -854,7 +854,8 @@ li.comment { .site-footer-widgets-row .fl-heading, .site-footer-widgets-row .fl-icon-group-left, .site-footer-widgets-row .menu li, - .site-footer-widgets-row .fl-rich-text p { + .site-footer-widgets-row .fl-rich-text p, + .site-footer-widgets-row .fl-module-icon { text-align: center !important; } .site-footer-widgets-row .uabb-business-hours-wrap {