Skip to content

Instantly share code, notes, and snippets.

@forgeandsmith
forgeandsmith / Gravity Forms Reset Styles
Last active June 22, 2021 07:33
Gravity Forms SCSS reset styles for easy style editing and management
///////////////////////////////////////////////
////// GRAVITY FORMS RESET STYLES //////
///////////////////////////////////////////////
// These styles are made in mind to be used with SCSS or LESS
// If you use these styles, you must go to the Gravity Forms settings in the WordPress back end and set Output CSS to No.
////----- Core Containers
.gform_heading,
.gform_body,
@tatemz
tatemz / docker-wordpress.sh
Last active December 29, 2020 17:25
A quick way to get a WordPress installation up and running with Docker
#!/bin/bash
mkdir wordpress-site && cd wordpress-site
touch docker-compose.yml
cat > docker-compose.yml <<EOL
version: "2"
services:
my-wpdb:
@zioproto
zioproto / qtranslate_wordpress39.patch
Created April 17, 2014 10:11
Fix qTranslate plugin for Wordpress 3.9
diff --git a/wp-content/plugins/qtranslate/qtranslate_core.php b/wp-content/plugins/qtranslate/qtranslate_core.php
index 17b4669..9ac128a 100644
--- a/wp-content/plugins/qtranslate/qtranslate_core.php
+++ b/wp-content/plugins/qtranslate/qtranslate_core.php
@@ -414,6 +414,7 @@ function qtrans_updateTermLibrary() {
function qtrans_strftime($format, $date, $default = '', $before = '', $after = '') {
// don't do anything if format is not given
+ return $default;
@spivurno
spivurno / gw-gravity-forms-email-domain-name-validator-usage.php
Last active May 1, 2017 02:34
Gravity Wiz: Ban/Limit Email Domains Usage Examples
<?php
// standard usage
new GWEmailDomainControl(array(
'form_id' => 152,
'field_id' => 9,
'domains' => array('gmail.com', 'hotmail.com', 'test.com')
));
// all options
@benhuson
benhuson / sitepress.class.patch.php
Created July 6, 2012 11:16
WPML Serialised Custom Fields Patch
diff --git a/sitepress.class.php b/sitepress.class.php
index d5b2802be9a9de8b64244e889328b3e2ad776c9b..ecd861877107f00a7b111c3477bd65df12e86e6f 100644
--- a/sitepress.class.php
+++ b/sitepress.class.php
@@ -2775,7 +2775,7 @@ class SitePress{
// if the list of values has 1 element run update
// this will either ADD or UPDATE the value on the translated document
if(count($meta_values) == 1){
@jayj
jayj / gist:1190106
Created September 2, 2011 22:30
Full code for tutorial on Jayj.dk
<?php
/**
* Custom "Download" custom type for tutorial on Jayj.dk
*
* @link http://jayj.dk/2011/download-cpt-wordpress
*/
add_action( 'init', 'jayj_create_download_post_type' );