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 | |
/** | |
* 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' ); |
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
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){ |
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 | |
// standard usage | |
new GWEmailDomainControl(array( | |
'form_id' => 152, | |
'field_id' => 9, | |
'domains' => array('gmail.com', 'hotmail.com', 'test.com') | |
)); | |
// all options |
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
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; |
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
#!/bin/bash | |
mkdir wordpress-site && cd wordpress-site | |
touch docker-compose.yml | |
cat > docker-compose.yml <<EOL | |
version: "2" | |
services: | |
my-wpdb: |
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
/////////////////////////////////////////////// | |
////// 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, |
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( 'script_loader_tag', 'yankiara_defer_scripts', 10, 3 ); | |
function yankiara_defer_scripts( $tag, $handle, $src ) { | |
$defer = array( 'script-handle-1', 'script-handle-2', 'script-handle-3' ); | |
if ( in_array( $handle, $defer ) ) | |
return '<script src="' . $src . '" defer="defer" type="text/javascript"></script>' . "\n"; | |
return $tag; | |
} |
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
body { | |
--base: 20; | |
--scale-headings: 1.44; | |
--scale-mobile: 0.7; | |
--scale-mobile-headings: 0.4; | |
--scale-icons: 1.4; | |
--min-viewport: 480; | |
--max-viewport: 1600; | |
--max-size: var(--base); | |
} |
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 // Map Submitted Field Values to Another Field | |
* | |
* Usage | |
* | |
* 1 - Enable "Allow field to be populated dynamically" option on field which should be populated. | |
* 2 - In the "Parameter Name" input, enter the merge tag (or merge tags) of the field whose value whould be populated into this field. | |
* | |
* Basic Fields |
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
(function( $ ) { | |
$.fn.photoswipe = function(options){ | |
var galleries = [], | |
_options = options; | |
var init = function($this){ | |
galleries = []; | |
$this.each(function(i, gallery){ | |
galleries.push({ | |
id: i, |
OlderNewer