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 // DO NOT COPY THIS LINE | |
/** | |
* Remove the time from being displayed on a GravityView calendar | |
* | |
* @see https://docs.gravityview.co/category/647-calendar | |
* | |
* @param array $calendar_options Array of FullCalendar options | |
* | |
* @return mixed |
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: Defer Order Complete emails | |
Plugin URI: https://www.damiencarbery.com/ | |
Description: Defer Order Complete emails for a few minutes. | |
Author: Damien Carbery | |
Author URI: https://www.damiencarbery.com | |
Version: 0.1 | |
*/ |
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 | |
/** | |
* WooCommerce Ajax Handlers | |
* | |
* Handles AJAX requests via wp_ajax hook (both admin and front-end events) | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
/** Frontend AJAX events **************************************************/ |
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_filter( 'gravityflow_step_assignees', 'bypass_step_assignee_on_email_change', 10, 2 ); | |
function bypass_step_assignee_on_email_change( $assignees, $step ) { | |
//Update with the ID of your specific step to apply the bypass against | |
if ( $step->get_id() == '76' ) { | |
if ( isset( $_POST['gforms_save_entry'] ) && count( $_POST ) > 0 ) { | |
$reset = false; | |
if ( $assignees ) { | |
foreach ( $assignees as $key => $assignee ) { |
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 // DO NOT COPY THIS LINE | |
function gv_calendar_remove_time_display( $calendar_options ){ | |
$calendar_options['displayEventTime'] = false; // Disable displaying of time | |
return $calendar_options; | |
} | |
add_filter('gravityview/calendar/options', 'gv_calendar_remove_time_display', 10, 1); |
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
######################################################################## | |
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2020 | |
# ---------------------------------------------------------------------- | |
# @Author: Andreas Hecht | |
# @Author URI: https://seoagentur-hamburg.com | |
# License: GNU General Public License v2 or later | |
# License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
######################################################################## | |
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 Perks // Limit Submissions + Nested Forms // Scope Limit Feeds to Current Parent Entry | |
* http://gravitywiz.com/documentation/gravity-forms-limit-submissions/ | |
*/ | |
add_action( 'gpls_before_query', function( $ruletest ) { | |
global $wpdb; | |
// Update "123" to your child form ID. | |
if( $ruletest->form_id == 123 && class_exists( 'GPNF_Session' ) && $parent_form_id = rgpost( 'gpnf_parent_form_id' ) ) { |
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 Perks // eCommerce Fields // Show GPECF Fields in WooCommerce Cart Item Description | |
* http://gravitywiz.com/documentation/gravity-forms-ecommerce-fields/ | |
*/ | |
add_action( 'init', function() { | |
remove_filter( 'gform_pre_render', array( gp_ecommerce_fields(), 'add_wc_class_to_hide_fields_in_cart_description' ) ); | |
}, 11 ); |
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
#!/usr/bin/env bash | |
# Extract images from a PDF: https://askubuntu.com/questions/117143/command-line-tool-to-bulk-extract-images-from-a-pdf | |
sudo apt-get install poppler-utils | |
pdfimages -all input.pdf images/image | |
# Build PDF from images: https://stackoverflow.com/questions/8955425/how-can-i-convert-a-series-of-images-to-a-pdf-from-the-command-line-on-linux | |
sudo apt install img2pdf | |
img2pdf --output d.pdf images/image*.jpg |