Skip to content

Instantly share code, notes, and snippets.

View rvpatel's full-sized avatar

Ravikumar Patel rvpatel

View GitHub Profile
@jonahcoyote
jonahcoyote / gw-gravity-forms-advanced-conditional-logic.php
Last active February 21, 2019 13:14 — forked from spivurno/gw-gravity-forms-advanced-conditional-logic.php
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>
@kokers
kokers / gallery.php
Last active April 16, 2021 15:56
ACF Pagination Gallery with categories
@thenbrent
thenbrent / wcs-remove-my-subscriptions-buttons.php
Last active October 19, 2023 06:22
Remove any given button from the My Subscriptions table on the My Account page. By default, only the "Change Payment Method" button is removed, but you can uncomment additional actions to remove those buttons also.
<?php
/**
* Plugin Name: Remove Subscription Action Buttons from My Account
* Plugin URI: https://gist.github.com/thenbrent/8851287/
* Description: Remove any given button from the <a href="http://docs.woothemes.com/document/subscriptions/customers-view/#section-2">My Subscriptions</a> table on the My Account page. By default, only the "Change Payment Method" button is removed, but you can uncomment additional actions to remove those buttons also.
* Author: Brent Shepherd
* Author URI:
* Version: 2.0
*/
@dkesberg
dkesberg / jQuery.validator.filesize.js
Created November 15, 2013 08:32
jQuery Validator method for maximum filesize
jQuery.validator.addMethod("filesize_max", function(value, element, param) {
var isOptional = this.optional(element),
file;
if(isOptional) {
return isOptional;
}
if ($(element).attr("type") === "file") {
@hissy
hissy / nav-menu-exporter-importer.php
Last active August 13, 2023 17:06
[WordPress Plugin] Nav Menu Exporter and Importer / Export and Import nav menus. Requires WordPress Importer plugin.
<?php
/*
Plugin Name: Nav Menu Exporter and Importer
Description: Export and Import nav menus. Requires WordPress Importer plugin
Author: hissy, megumi themes
Version: 0.1
Text Domain: nav-menu-exporter-importer
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
<?php
/**
* A simple fix for a shell execution on preg_match('/[0-9]\.[0-9]+\.[0-9]+/', shell_exec('mysql -V'), $version);
* The only edit that was done is that shell_exec('mysql -V') was changed to mysql_get_server_info() because not all
* systems have shell access. XAMPP, WAMP, or any Windows system might not have this type of access. mysql_get_server_info()
* is easier to use because it pulls the MySQL version from phpinfo() and is compatible with all Operating Systems.
* @link http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento
* @author Magento Inc.
*/
@petenelson
petenelson / custom-permalink-from-meta.php
Created November 5, 2012 21:32
WordPress permalink for custom post type based on post meta
@arosenhagen
arosenhagen / magento-code-snippets.md
Last active April 8, 2024 09:21
[magento] - code snippets

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@luetkemj
luetkemj / wp-query-ref.php
Last active February 6, 2024 14:25
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@mcepl
mcepl / import.opml
Created February 2, 2012 13:22
my current subscriptions
<opml version="1.0">
<head>
<title>Swallowcatcher subscriptions</title>
</head>
<body>
<outline xmlUrl="http://feeds.feedburner.com/AMinuteWithBrendan" text="&amp;lt;" type="rss" title="A Minute With Brendan"/>
<outline xmlUrl="http://www2.madphilosopher.ca/bsdtalk_ogg.xml" text="Talking about the BSD family of free operating systems." type="rss" title="bsdtalk Ogg Vorbis feed"/>
<outline xmlUrl="http://faif.us/feeds/cast-ogg/" text="A bi-weekly discussion of legal, policy, and other issues in the FLOSS world, including interviews from Brooklyn, New York, USA. Presented by Karen Sandler and Bradley M. Kuhn." type="rss" title="Free as in Freedom"/>
<outline xmlUrl="http://feeds.feedburner.com/bostonvineyard/podcast" text="All of the Sunday Sermons for the Greater Boston Vineyard" type="rss" title="Greater Boston Vineyard - All Sunday Sermons"/>
<outline xmlUrl="http://www.npr.org/rss/podcast.php?id=35" text="NPR's weekly current events quiz. Have a laugh and test your news knowl