This file contains hidden or 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 | |
/** | |
* == About this Gist == | |
* | |
* Code to add to wp-config.php to enhance information available for debugging. | |
* | |
* You would typically add this code below the database, language and salt settings | |
* | |
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists). | |
* |
This file contains hidden or 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
.front-page-2, | |
.front-page-3, | |
.front-page-4, | |
.front-page-5, | |
.front-page-6, | |
.front-page-7 { | |
border-top: 54px solid transparent; | |
margin-top: -54px; | |
-webkit-background-clip: padding-box; | |
-moz-background-clip: padding; |
This file contains hidden or 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
SOLUTIONS I have came across so far: | |
======================== SOLUTION 1 ==================== | |
In plugins (or somewhere) you probably have this code: | |
ini_set('zlib.output_compression', '1'); | |
so, I replaced that code with |
This file contains hidden or 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
## LEVERAGE BROWSER CACHING ## | |
## https://gtmetrix.com/leverage-browser-caching.html ## | |
<IfModule mod_expires.c> | |
ExpiresActive On | |
ExpiresByType image/jpg "access plus 1 year" | |
ExpiresByType image/jpeg "access plus 1 year" | |
ExpiresByType image/gif "access plus 1 year" | |
ExpiresByType image/png "access plus 1 year" | |
ExpiresByType text/css "access plus 1 month" | |
ExpiresByType application/pdf "access plus 1 month" |
This file contains hidden or 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 | |
/* | |
Plugin Name: PHP Compatibility Custom Timeout | |
*/ | |
function custom_timeout( $timeout ) { | |
return 0; | |
} | |
add_filter( 'wpephpcompat_scan_timeout', 'custom_timeout', 10 ); |
This file contains hidden or 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 | |
/** | |
* Gravity Wiz // Gravity Forms // Advanced Conditional Logic | |
* | |
* PLEASE NOTE: This snippet is a proof-of-concept. It is not supported and we have no plans to improve it. | |
* | |
* Allows multiple groups of conditional logic per field. | |
* | |
* @version 0.1 | |
* @author David Smith <[email protected]> |
This file contains hidden or 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 | |
// CREDIT: http://pastebin.com/Ju78M8Ax | |
// exclude field from {all_fields} merge tag by adding | |
// :exclude to merge tag | |
add_filter( 'gform_merge_tag_filter', 'exclude_from_all_fields', 10, 4 ); | |
function exclude_from_all_fields ( $value, $merge_tag, $options, $field ) { | |
$options_array = explode ( ",", $options ); | |
$exclude = in_array ( "exclude", $options_array ); | |
// if a field has the CSS Class Name gf_exclude the field will be excluded from the {all_fields:exclude} merge tag |
This file contains hidden or 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 | |
/** | |
* Add body class for GravityView contexts | |
*/ | |
add_filter('body_class', function( $classes = array() ) { | |
if ( ! class_exists( '\GV\View_Collection' ) ) { | |
return $classes; | |
} |
This file contains hidden or 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
/* | |
This JS creates collapsible Gravity Form sections breaks | |
IMPORTANT: | |
1 - Within the Gravity form, you must add the class collapsible to each section break. | |
2 - All fields within those section breaks must have the class collapsible_field | |
3 - You must include both the CSS and the JS |
This file contains hidden or 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 | |
/** | |
* AMP Gravity Forms Submission Shim plugin bootstrap. | |
* | |
* @package Google\AMP_Gravity_Forms_Submission_Shim | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2020 Google Inc. | |
* | |
* @wordpress-plugin |