Skip to content

Commit

Permalink
new media breakpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
neilgee committed Apr 15, 2022
1 parent 59e1611 commit cedc07a
Show file tree
Hide file tree
Showing 17 changed files with 166 additions and 144 deletions.
3 changes: 0 additions & 3 deletions classes/class-fl-child-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ static public function enqueue_scripts()
// Load FA 5 Everywhere
wp_enqueue_style( 'font-awesome-5' );

// Business Profile CSS
//wp_enqueue_style( 'businessprofile', get_stylesheet_directory_uri() . '/css/business-profile.css' , array(), '2.0.0', 'all' );

// Take out the default BB Scripts if not used
// wp_dequeue_script( 'bootstrap' );

Expand Down
122 changes: 0 additions & 122 deletions css/business-profile.css

This file was deleted.

6 changes: 6 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ function bt_theme_setup() {
if ( class_exists( 'acf' ) ) {
include_once( get_stylesheet_directory() . '/includes-child/acf.php' );
}

/**
* Improve Cache Puging on Runcloud NGINX
* @since 1.0.0
*/
//require_once get_stylesheet_directory() . '/includes-child/cache-buster.php';

/**
* Get the plugins ffrom TGM Plugin Activation
Expand Down
11 changes: 11 additions & 0 deletions images/editor-quote.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 84 additions & 0 deletions includes-child/cache-buster.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?php

/**
* Plugin Name: Cache Purge Helper
* Plugin URI: https://github.com/jordantrizz/cache-purge-helper/blob/main/cache-purge-helper.php
* Description: Adding additional hooks to trigger nginx-helper or lscache plugin purges
* Version: 0.1e
* Author: Paul Stoute, Jordan Trask, Jeff Cleverly
* Author URI: https://wpinfo.net
* Text Domain: cache-purge-helper
* Domain Path: /languages
* Requires at least: 3.0
* Tested up to: 5.4
*
* @link https://wpinfo.net
* @since 0.1
* @package cache-purge-helper
*/

/* Purge Cache Function
*
* If both nginx-helper and litespeed-cache plugin exist, purges will happen for both.
* This is cover instances where nginx-helper is used for server cache but litespeed-cache
* is used for other functions, or there is a mis-configuration.
*
* A better idea would be to check what server is being used and warn that the wrong plugin
* is activated for purging server cache.
*/

function cache_purge_helper() {
// Purge WordPress Cache
$called_action_hook = current_filter();
write_log('cph - initiated');
write_log('cph - running on'. $called_action_hook );
write_log('cph - flusing WordPress Cache first');
wp_cache_flush();

// If nginx-helper plugins is enabled, purge cache.
write_log('cph - checking for nginx-helper plugin');
if ( is_plugin_active('nginx-helper/nginx-helper.php') ) {
write_log('cph - nginx-helper plugin installed, running $nginx_purger->purge_all();');
global $nginx_purger;
$nginx_purger->purge_all();
} else {
write_log('cph - nginx-helper plugin not installed or detected');
}

// If litespeed-cache plugins is enabled, purge cache.
write_log('cph - checking for litespeed-cache plugin');
if ( is_plugin_active('litespeed-cache/litespeed-cache.php') ) {
write_log('cph - litespeed-cache plugin installed, running do_action(\'litespeed_purge_all\');');
do_action( 'litespeed_purge_all' );
} else {
write_log('cph - litespeed-cache plugin not installed or detected');
}
write_log('cph - end of cache_purge_helper function');
}

/* Log to WordPress Debug Log */
if ( ! function_exists('write_log')) {
function write_log ( $log ) {
if ( is_array( $log ) || is_object( $log ) ) {
error_log( print_r( $log, true ) );
} else {
error_log( $log );
}
}
}

// Plugin Update Hooks
add_action( 'upgrader_process_complete', 'cache_purge_helper', 10, 0 ); // After plugins have been updated
add_action( 'activated_plugin', 'cache_purge_helper', 10, 0); // After a plugin has been activated
add_action( 'deactivated_plugin', 'cache_purge_helper', 10, 0); // After a plugin has been deactivated
add_action( 'switch_theme', 'cache_purge_helper', 10, 0); // After a theme has been changed

// Beaver Builder
add_action( 'fl_builder_cache_cleared', 'cache_purge_helper', 10, 3 );
add_action( 'fl_builder_after_save_layout', 'cache_purge_helper', 10, 3 );
add_action( 'fl_builder_after_save_user_template', 'cache_purge_helper', 10, 3 );
add_action( 'upgrader_process_complete', 'cache_purge_helper', 10, 3 );


// AutoOptimizer
add_action( 'autoptimize_action_cachepurged','cache_purge_helper', 10, 3 ); // Need to document this.
4 changes: 2 additions & 2 deletions includes-child/customizer-defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ function bt_customizer_options_filtered( $data, $key ) {

// Layout
$data['sections']['fl-layout']['options']['fl-content-width']['setting']['default']='1200';
$data['sections']['fl-layout']['options']['fl-medium-breakpoint']['setting']['default']='1024';
$data['sections']['fl-layout']['options']['fl-mobile-breakpoint']['setting']['default']='768';
$data['sections']['fl-layout']['options']['fl-medium-breakpoint']['setting']['default']='1080';
$data['sections']['fl-layout']['options']['fl-mobile-breakpoint']['setting']['default']='810';

$data['sections']['fl-layout']['options']['fl-framework']['setting']['default']='base-4';

Expand Down
17 changes: 11 additions & 6 deletions includes-child/woocommerce/woo.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ button.woocommerce-form-login__submit {
display: block;
}

@media(min-width:768px) {
@media(min-width:810px) {

.woocommerce-MyAccount-navigation {
margin-right: 20px;
Expand Down Expand Up @@ -261,15 +261,15 @@ button.woocommerce-form-login__submit {
width: 49%;
}

@media (min-width: 768px) {
@media (min-width: 810px) {
.woocommerce-page .related ul.products li.product {
width: 30.8%;
padding: 2%;
}
}

/* Reduce table padding on small devices */
@media (max-width: 767px) {
@media (max-width: 809px) {
.woocommerce table.shop_table th,
.woocommerce-page table.shop_table th,
.woocommerce table.shop_table td,
Expand Down Expand Up @@ -341,9 +341,9 @@ button.woocommerce-form-login__submit {
display: flex;
}

/* 2 Column Checkout */
/* 2 Column WooCommerce Checkout */

@media(min-width:768px) {
@media(min-width:809px) {
.woocommerce .col2-set .col-1,
.woocommerce-page .col2-set .col-1 {
width: 90%;
Expand All @@ -367,4 +367,9 @@ button.woocommerce-form-login__submit {
float: left;
clear: none;
}
}
}

/* Center Checkout Processing Icon Spinner */
.woocommerce .blockUI.blockOverlay:before {
position:fixed!important
}
22 changes: 11 additions & 11 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,13 @@ a.fl-post-slider-feed-more:hover {

/* Media Query Snippets
---------------------------------------------------------------------------------------------------- */
@media (max-width: 767px) {
@media (max-width: 809px) {
}

@media (min-width: 768px) and (max-width:1023px) {
@media (min-width: 810px) and (max-width:1079px) {
}

@media (min-width: 1024px) {
@media (min-width: 1080px) {
}

/* Client Colors
Expand Down Expand Up @@ -508,7 +508,7 @@ a.fl-post-slider-feed-more:hover {
* Black and white example below
---------------------------------------------------------------------------------------------------- */

@media (max-width: 767px) {
@media (max-width: 809px) {
.fl-page-nav-toggle-button.fl-page-nav-toggle-visible-mobile .fl-page-nav .navbar-toggle * {
color: #000000;
text-transform: uppercase;
Expand Down Expand Up @@ -539,7 +539,7 @@ a.fl-post-slider-feed-more:hover {
* Black example below
---------------------------------------------------------------------------------------------------- */

@media (max-width: 767px) {
@media (max-width: 809px) {
.fl-page .fl-menu-mobile-toggle * {
color: #000;
border: none;
Expand Down Expand Up @@ -855,7 +855,7 @@ li.comment {
}


@media (max-width: 767px) {
@media (max-width: 809px) {
.site-footer-widgets-row .fl-heading,
.site-footer-widgets-row .fl-icon-group-left,
.site-footer-widgets-row .menu li,
Expand Down Expand Up @@ -1002,7 +1002,7 @@ li.comment {
* Class is applied in Column Parent Column
*/

@media (min-width: 768px) {
@media (min-width: 810px) {
.two-row-three-parent .fl-col-group {
display: flex;
flex-flow: row wrap;
Expand All @@ -1018,7 +1018,7 @@ li.comment {
* 1st code is CSS cols, 2nd code is 2 text edit boxes with UL list in each
---------------------------------------------------------------------------------------------------- */

@media only screen and (min-width: 767px) {
@media (min-width: 810px) {
.three-column-list {
column-count: 3;
column-gap: 40px;
Expand All @@ -1030,7 +1030,7 @@ li.comment {
}
}

@media only screen and (max-width: 767px) {
@media (max-width:809px) {
/* Add into Module Class */
.fl-builder .split-list ul {
margin-bottom: 20px;
Expand Down Expand Up @@ -1059,7 +1059,7 @@ li.comment {
justify-content: flex-start;
}

@media (min-width: 768px) {
@media (min-width: 810px) {
.flex-bullet-list ul+ul {
margin-left: 40px;
}
Expand All @@ -1072,7 +1072,7 @@ li.comment {
}
}

@media (max-width: 767px) {
@media (max-width: 809px) {
.entry-content .you-list ul,
.you-list ul {
margin-top: 0 !important;
Expand Down
Binary file added webfonts/AvenirLTStd-Black.woff
Binary file not shown.
Binary file added webfonts/AvenirLTStd-Black.woff2
Binary file not shown.
Binary file added webfonts/AvenirLTStd-Book.woff
Binary file not shown.
Binary file added webfonts/AvenirLTStd-Book.woff2
Binary file not shown.
Binary file added webfonts/AvenirLTStd-Heavy.woff
Binary file not shown.
Binary file added webfonts/AvenirLTStd-Heavy.woff2
Binary file not shown.
Binary file added webfonts/AvenirLTStd-Roman.woff
Binary file not shown.
Binary file added webfonts/AvenirLTStd-Roman.woff2
Binary file not shown.
Loading

0 comments on commit cedc07a

Please sign in to comment.