Skip to content

Instantly share code, notes, and snippets.

@scottlyttle
Last active December 20, 2015 05:19
Show Gist options
  • Save scottlyttle/6077661 to your computer and use it in GitHub Desktop.
Save scottlyttle/6077661 to your computer and use it in GitHub Desktop.

Revisions

  1. scottlyttle revised this gist Jul 25, 2013. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,10 @@
    add_action( 'wp_print_scripts', 'deregister_cf7_javascript', 15 );
    add_action( 'wp_enqueue_scripts', 'deregister_cf7_javascript', 15 );
    function deregister_cf7_javascript() {
    if ( !is_page(15) ) {
    wp_deregister_script( 'contact-form-7' );
    }
    }
    add_action( 'wp_print_styles', 'deregister_cf7_styles', 15 );
    add_action( 'wp_enqueue_styles', 'deregister_cf7_styles', 15 );
    function deregister_cf7_styles() {
    if ( !is_page(15) ) {
    wp_deregister_style( 'contact-form-7' );
  2. scottlyttle created this gist Jul 25, 2013.
    12 changes: 12 additions & 0 deletions functions.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    add_action( 'wp_print_scripts', 'deregister_cf7_javascript', 15 );
    function deregister_cf7_javascript() {
    if ( !is_page(15) ) {
    wp_deregister_script( 'contact-form-7' );
    }
    }
    add_action( 'wp_print_styles', 'deregister_cf7_styles', 15 );
    function deregister_cf7_styles() {
    if ( !is_page(15) ) {
    wp_deregister_style( 'contact-form-7' );
    }
    }