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: CF7 Optimization | |
* Version: 0.1 | |
* Author: Luis Colomé | |
* Author URI: https://luiscolome.com | |
*/ | |
// By default don't load the script o style sheet. | |
add_filter( 'wpcf7_load_js', '__return_false' ); | |
add_filter( 'wpcf7_load_css', '__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 | |
/* Don't paste me | |
* | |
* | |
* Modify the meta info on post footer | |
*/ | |
add_filter( 'genesis_post_meta', 'lc_post_meta_filter' ); | |
function lc_post_meta_filter( $post_meta ) { | |
// where do we apply the filter |
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
// When the document is ready... | |
jQuery( document ).ready( function( $ ) { | |
// ... display the Full Screen search when: | |
// 1. The user focuses on a search field, or | |
// 2. The user clicks the Search button | |
// 3. The user clicks on a custom link with '#search' as a url | |
$( 'form[role=search] input, form[role=search] button, a[href="#search"]' ).on( 'focus, click', function( event ) { | |
// Prevent the default action | |
event.preventDefault(); |