Skip to content

Instantly share code, notes, and snippets.

View version-control's full-sized avatar

version-control version-control

View GitHub Profile
<?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 );
<?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' ) ) {
<?php
/**
* Gravity Perks // Multi-page Navigation + Easy Passthrough // Make Pages Navigable When Editing Entry
* http://gravitywiz.com/documentation/gravity-forms-multi-page-navigation/
* http://gravitywiz.com/documentation/gravity-forms-easy-passthrough/
*
* When repopulating an entry into a form for editing via Easy Passthrough and
* [this snippet](https://gravitywiz.com/edit-gravity-forms-entries-on-the-front-end/), make all pages navigable if
* Multi-page Navigation is enabled for the given form and configured to allow navigating to any completed page.
*/
@version-control
version-control / nginx.conf
Created December 26, 2017 08:37 — forked from spikegrobstein/nginx.conf
nginx config for proxying requests for plex over a hostname-based virtualhost.
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.