Skip to content

Instantly share code, notes, and snippets.

Robert Staddon robertstaddon

Block or report user

Report or block robertstaddon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@robertstaddon
robertstaddon / myClassExcerpt.php
Created Sep 10, 2019
Fix Gravity PDF form submission delay when PDF is attached to notifications by using Gravity Forms Delayed Email Notifications
View myClassExcerpt.php
public function __construct() {
// Stop any PDFs from being immediately generated (require Gravity Forms Delayed Email Notifications)
add_filter( 'gfpdf_maybe_attach_to_notification', array( $this, 'require_delayed_notifications' ), 10, 5 );
}
public function require_delayed_notifications( $attach, $notification, $settings, $entry, $form ) {
// Disable Gravity PDF attachment if the notification has a flag (__AFTER_DELAY_FLAG__) letting us know that this notification is supposed to wait until after the delay
if ( preg_match( '/__AFTER_DELAY_FLAG__/', $notification['subject'] ) ) {
return false;
@robertstaddon
robertstaddon / functions.php
Last active Mar 8, 2019
Divi - remove Divi sidebar from all WooCommerce Product pages with a hook
View functions.php
<?php
/**
* Remove Divi sidebar from all WooCommerce Product pages
*/
function mytheme_divi_output_content_wrapper_end() {
echo '
</div> <!-- #left-area -->
</div> <!-- #content-area -->
</div> <!-- .container -->
</div> <!-- #main-content -->';
@robertstaddon
robertstaddon / functions.php
Last active May 10, 2019
Divi - remove Divi sidebar from all WooCommerce Product pages (as well as Shop and Category pages) pages with a hook
View functions.php
<?php
/**
* Remove Divi sidebar from all WooCommerce Product pages (as well as Shop and Category pages)
*/
function mytheme_divi_output_content_wrapper_end() {
echo '
</div> <!-- #left-area -->
</div> <!-- #content-area -->
</div> <!-- .container -->
@robertstaddon
robertstaddon / style.css
Created Aug 17, 2017
Divi - CSS rule for an overlay (with animation)
View style.css
.background-fade .et_pb_slide.et_pb_bg_layout_dark:after {
position: absolute;
content: '';
top: 0;
right: 0;
left: 0;
bottom: 0;
animation: customFadeToDark 3s ease-out 1s 1 both;
-webkit-animation: customFadeToDark 3s ease-out 1s 1 both;
}
@robertstaddon
robertstaddon / style.css
Created Aug 17, 2017
Divi - CSS rule for an overlay (with light overlay)
View style.css
.background-fade .et_pb_slide.et_pb_bg_layout_light:after {
position: absolute;
content: '';
top: 0;
right: 0;
left: 0;
bottom: 0;
background-color:rgba(255,255,255,.7);
}
@robertstaddon
robertstaddon / style.css
Created Aug 17, 2017
Divi - CSS rule for an overlay
View style.css
.background-fade .et_pb_slide:after {
position: absolute;
content: '';
top: 0;
right: 0;
left: 0;
bottom: 0;
background-color:rgba(0,0,0,.5);
}
@robertstaddon
robertstaddon / style.css
Created Aug 14, 2017
Divi - style the custom featured image (include default blog page)
View style.css
@media all and (min-width: 768px) {
.et_pb_posts img, .archive .post img, .category .post img, .search .post img, .blog .post img {
float: left;
margin-right: 1em;
}
.et_pb_posts article:after, .archive article:after, .category article:after, .search article:after, .blog article:after { /* Clear floated image */
content: "";
display: table;
clear: both;
}
@robertstaddon
robertstaddon / style.css
Created Aug 14, 2017
Divi - Style the custom featured image
View style.css
@media all and (min-width: 768px) {
.et_pb_posts img {
float: left;
margin-right: 1em;
}
.et_pb_posts article:after { /* Clear floated image */
content: "";
display: table;
clear: both;
}
@robertstaddon
robertstaddon / functions.php
Last active Aug 14, 2017
Divi - custom featured post image size (include default WordPress blog pages)
View functions.php
<?php
function mycustom_featured_width( ) { return 320; /* Custom featured post image width */ }
add_filter( 'et_pb_blog_image_width', 'mycustom_featured_width');
add_filter( 'et_pb_index_blog_image_width', 'mycustom_featured_width');
function mycustom_featured_height( ) { return 260; /* Custom featured post image height */ }
add_filter( 'et_pb_blog_image_height', 'mycustom_featured_height');
add_filter( 'et_pb_index_blog_image_height', 'mycustom_featured_height');
function mycustom_featured_size( $image_sizes ) {
@robertstaddon
robertstaddon / functions.php
Last active Aug 14, 2017
Divi - custom featured post image size
View functions.php
<?php
function mycustom_featured_width( ) { return 320; /* Custom featured post image width */ }
add_filter( 'et_pb_blog_image_width', 'mycustom_featured_width');
function mycustom_featured_height( ) { return 260; /* Custom featured post image height */ }
add_filter( 'et_pb_blog_image_height', 'mycustom_featured_height');
function mycustom_featured_size( $image_sizes ) {
$custom_size = mycustom_featured_width() . 'x' . mycustom_featured_height();
You can’t perform that action at this time.