git add -p
This file contains 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
upstream plex-upstream { | |
# change plex-server.example.com:32400 to the hostname:port of your plex server. | |
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx. | |
server plex-server.example.com:32400; | |
} | |
server { | |
listen 80; | |
# server names for this server. |
This file contains 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 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 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 // Media Library // Set Upload Directory | |
* http://gravitywiz.com/documentation/gravity-forms-media-library/ | |
*/ | |
add_filter( 'gpml_media_data', function( $return ) { | |
add_filter( 'upload_dir', 'gpml_set_upload_dir' ); | |
if( ! function_exists( 'gpml_set_upload_dir' ) ) { | |
function gpml_set_upload_dir( $upload_dir ) { | |
$upload_dir['path'] = ABSPATH . 'wp-content/uploads/paramountregistry'; |
This file contains 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 // Email Header to Identify Notification Source | |
* | |
* You've installed Gravity Forms on a ton of sites and now you're getting a ton of notifications. The problem is there | |
* is no clear indicator which site is sending the notification. How frustrating! | |
* | |
* This simple plugin automatically adds a custom header that identifies the URL that generated the Gravity Forms notification. | |
* This is most useful when installed as an MU plugin at the start of development on each site. | |
* |
This file contains 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
import sys | |
import dropbox | |
from dropbox.files import WriteMode | |
from dropbox.exceptions import ApiError, AuthError | |
import datetime | |
dt = datetime.datetime.today() | |
TOKEN = '<Replace with your Access Token>' | |
LOCALFILE = '<Replace with the file that you want to backup>' | |
# Don't forget to add the file extension at the end of BACKUPPATH. |
This file contains 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
<? | |
// Change 'XXX' to your form id | |
$location_form_id = XXX; | |
add_filter( 'gform_pre_render_'.$location_form_id, 'limit_choices' ); | |
add_filter( 'gform_pre_validation_'.$location_form_id, 'limit_choices' ); | |
add_filter( 'gform_pre_submission_'.$location_form_id, 'limit_choices' ); | |
add_filter( 'gform_pre_submission_filter_'.$location_form_id, 'limit_choices' ); | |
add_filter( 'gform_admin_pre_render_'.$location_form_id, 'limit_choices' ); | |
function limit_choices( $form ) { |
This file contains 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 // Give First Validation Error Focus | |
* http://gravitywiz.com/ | |
* | |
* Plugin Name: Gravity Forms First Error Focus | |
* Plugin URI: https://gravitywiz.com/make-gravity-forms-validation-errors-mobile-friendlyer/ | |
* Description: Automatically focus (and scroll) to the first field with a validation error. | |
* Author: Gravity Wiz | |
* Version: 1.1 |
OlderNewer