Skip to content

Instantly share code, notes, and snippets.

View bozzmedia's full-sized avatar

Bozz bozzmedia

View GitHub Profile
@thisbit
thisbit / gb-accordion-custom.js
Created June 9, 2023 08:50
Removing Default GenerateBlocks Accordion (variation on container) and creating my own Variant with predefined settings and styles
// this file is a part of learning process so this file will be changed as I learn stuff :)
const iconAttributes = {
iconLocation: 'right',
columnGap: '0.5em',
iconSize: 0.8,
iconPaddingRight: '',
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
sizing: { width: '100%' },
@mrwweb
mrwweb / readme.md
Last active May 18, 2023 18:57
The Events Calendar v2 Template Reset & Customizations - Now on Github
<?php
function reorder_admin_menu( $menu_items ) {
// Our top level items
$top_level = array();
// Post Types
$post_types = array();
// Our bottom level items
$bottom_level = array();
// And our penalty box...known that we want last
@westonruter
westonruter / amp-gravity-forms-submission-shim.php
Last active November 18, 2022 19:54
AMP shim support for Gravity Forms submissions
<?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
@BruceMcKinnon
BruceMcKinnon / gform-sections-accordion.js
Last active March 26, 2024 15:13
Collapsible Gravity Form Sections
/*
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
@zackkatz
zackkatz / gravityview-body-class.php
Created May 24, 2018 00:32
GravityView - Add body classes when View is being rendered
<?php
/**
* Add body class for GravityView contexts
*/
add_filter('body_class', function( $classes = array() ) {
if ( ! class_exists( '\GV\View_Collection' ) ) {
return $classes;
}
<?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
@spivurno
spivurno / gw-gravity-forms-advanced-conditional-logic.php
Last active March 5, 2024 11:32
Gravity Wiz // Gravity Forms // Advanced Conditional Logic
<?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 <david@gravitywiz.com>
@octalmage
octalmage / custom_timeout.php
Created July 14, 2016 18:38
PHP Compatibility Custom Timeout
<?php
/*
Plugin Name: PHP Compatibility Custom Timeout
*/
function custom_timeout( $timeout ) {
return 0;
}
add_filter( 'wpephpcompat_scan_timeout', 'custom_timeout', 10 );
@rqreyes
rqreyes / .htaccess
Last active November 22, 2017 01:00 — forked from cmg-jess/Page Speed Insights
leverage browser caching and enable gzip compression
## 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"