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 | |
/* | |
Plugin Name: Wordpress Firewall | |
Plugin URI: http://www.seoegghead.com/software/wordpress-firewall.seo | |
Description: Blocks suspicious-looking requests to WordPress. | |
Author: SEO Egghead, Inc. | |
Version: 1.25 for WP 2.x | |
Author URI: http://www.seoegghead.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 | |
/** | |
* Gravity Wiz // Gravity Forms // Submit to Access | |
* | |
* Require that a form be submitted before a post or page can be accessed. | |
* | |
* @version 1.1 | |
* @author David Smith <david@gravitywiz.com> | |
* @license GPL-2.0+ | |
* @link http://gravitywiz.com/submit-a-gravity-form-to-access-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
<script type="text/javascript"> | |
/** | |
* Gravity Wiz // Gravity Forms // Disable Submission when Pressing Enter | |
* http://gravitywiz.com/disable-submission-when-pressing-enter-for-gravity-forms/ | |
*/ | |
jQuery(document).on( 'keypress', '.gform_wrapper', function (e) { | |
var code = e.keyCode || e.which; | |
if ( code == 13 && ! jQuery( e.target ).is( 'textarea,input[type="submit"],input[type="button"]' ) ) { | |
e.preventDefault(); | |
return 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
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // Export Multi-input Fields in a Single Column | |
* | |
* By default, Gravity Forms only allows you to export each input of a multi-input field (e.g. Checkbox field, | |
* Name Field, etc) as a separate column. This snippet allows you to export all inputs (of a specific field) in a | |
* single column. | |
* | |
* @version 1.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 | |
/** | |
* Gravity Perks // GP Limit Choies // Disable Limits for Admins | |
* http://gravitywiz.com/ | |
*/ | |
add_action( 'init', function() { | |
if( is_callable( 'gp_limit_choices' ) && current_user_can( 'administrator' ) ) { | |
add_filter( 'gplc_remove_choices', '__return_false' ); | |
add_filter( 'gplc_disable_choices', '__return_false' ); | |
remove_filter( 'gform_validation', array( gp_limit_choices(), 'validate' ) ); |
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 | |
/** | |
* Skip Registration for Logged In Users | |
* http://gravitywiz.com/2012/04/24/skip-user-registration-for-logged-in-users/ | |
* Works for GF User Registration 3.0 and greater. | |
*/ | |
add_filter( 'gform_is_delayed_pre_process_feed', 'maybe_delay_feeds', 10, 4 ); | |
function maybe_delay_feeds( $is_delayed, $form, $entry, $slug ) { | |
if ( is_user_logged_in() && $slug == 'gravityformsuserregistration' ) { | |
return gf_user_registration()->has_feed_type( 'create', $form ); |
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 // Manual Entries | |
* | |
* Create entries manually for Gravity Forms. Adds an "Add New" button next to the page title on all entry-related pages. | |
* | |
* @version 1.0 | |
* @author David Smith <david@gravitywiz.com> | |
* @license GPL-2.0+ | |
* @link http://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
body img.gform_ajax_spinner { | |
display: none !important; | |
} |
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 global $wp_query; ?> | |
<?php | |
/** | |
* If query contains less than 2 parameters (so basically 1) and this is used on archive.php that probably means we only have the post_type parameter. | |
*/ | |
if( count($wp_query->query) < 2 ): | |
?> | |
<p>Please select at least one filter above</p> |
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 | |
/* | |
Plugin Name: MU WP Native PHP Sessions | |
Plugin URI: https://wordpress.org/plugins/wp-native-php-sessions/ | |
Description: Building on Pantheon's and WordPress's strengths, together. | |
Version: 0.1 | |
Author: Pantheon | |
Author URI: http://getpantheon.com | |
*/ |