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
**/*.min.js | |
**/*.build.js | |
**/node_modules/** | |
**/vendor/** | |
build | |
coverage | |
cypress | |
node_modules | |
vendor |
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 | |
/** | |
* When using the WordPress Importer, update existing | |
* posts instead of skipping them. Updates content according | |
* to the import file even if the existing post was updated | |
* more recently. | |
* | |
* To use, drop this file into your /mu-plugins/ folder or | |
* copy this code into your functions.php 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
# RECOMMENDED BY WPENGINE | |
*~ | |
.DS_Store | |
.svn | |
.cvs | |
*.bak | |
*.swp | |
Thumbs.db | |
# large/disallowed file types |
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
var $ = jQuery; | |
$.each($(".databox").find("input[type='checkbox']"), function(){ | |
var label = $(this).next("label").text(); | |
if (label.indexOf('wp-content') > -1 && $(this).attr('disabled') !== true && $(this).attr('disabled') !== 'disabled'){ | |
console.log('check-me'); | |
$(this).attr('checked',true); | |
} else { | |
console.log('no-check'); | |
$(this).attr('checked', false); | |
} |
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
/** | |
* Filter Gravity Forms select field display to wrap optgroups where defined | |
* USE: | |
* set the value of the select option to `optgroup` within the form editor. The | |
* filter will then automagically wrap the options following until the start of | |
* the next option group | |
*/ | |
add_filter( 'gform_field_content', 'filter_gf_select_optgroup', 10, 2 ); | |
function filter_gf_select_optgroup( $input, $field ) { |
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
/** | |
* Adding Bootstrap Styles to Gravity Forms | |
*/ | |
add_filter("gform_field_content", "bootstrap_styles_for_gravityforms_fields", 10, 5); | |
function bootstrap_styles_for_gravityforms_fields($content, $field, $value, $lead_id, $form_id){ | |
// Currently only applies to most common field types, but can be expanded. | |
if($field["type"] != 'hidden' && $field["type"] != 'list' && $field["type"] != 'multiselect' && $field["type"] != 'checkbox' && $field["type"] != 'fileupload' && $field["type"] != 'date' && $field["type"] != 'html' && $field["type"] != 'address') { | |
$content = str_replace('class=\'medium', 'class=\'form-control medium', $content); |
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
# Apache .htaccess | |
RedirectMatch 301 ^/wp-content/uploads/(.*) http://livewebsite.com/wp-content/uploads/$1 | |
# Nginx | |
location ~ ^/wp-content/uploads/(.*) { | |
rewrite ^/wp-content/uploads/(.*)$ http://livewebsite.com/wp-content/uploads/$1 redirect; | |
} |