./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
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 // 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> |
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 /* | |
Template Name: Gallery | |
Gallery template based on Advanced Custom Fields gallery field | |
with pagination and categories. | |
ACF Fields for this page are: | |
- gallery (Gallery field) -> contain all images | |
- categories (Repeater field) -> images divided into categories | |
-- name | |
-- nice_name (for the url) | |
-- gallery |
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
jQuery.validator.addMethod("filesize_max", function(value, element, param) { | |
var isOptional = this.optional(element), | |
file; | |
if(isOptional) { | |
return isOptional; | |
} | |
if ($(element).attr("type") === "file") { | |
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 | |
/** | |
* 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. | |
*/ |
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
add_filter( 'post_type_link', 'my_post_type_link', 10, 3); | |
function my_post_type_link($permalink, $post, $leavename) { | |
if ($post->post_type == 'my-post-type') { | |
$meta = get_post_meta($post->ID, '_my-post-meta', true); | |
if (isset($meta) && !empty($meta)) | |
$permalink = home_url( "my-friendly-url/" . $meta . "/" . $post->post_name . "/"); | |
} | |
return $permalink; |
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
// 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 | |
*/ |
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
<opml version="1.0"> | |
<head> | |
<title>Swallowcatcher subscriptions</title> | |
</head> | |
<body> | |
<outline xmlUrl="http://feeds.feedburner.com/AMinuteWithBrendan" text="&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 |
NewerOlder