This file contains hidden or 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 | |
| add_filter('phpmailer_init', 'stopCartNotifications'); | |
| function stopCartNotifications( $phpmailer ) { | |
| // Let's extract object variables so we can use them. | |
| $variabile = get_object_vars($phpmailer); | |
| // I' blocking based on subject so, i'm selecting Subject from the object below in phpmailer_object_data.php | |
| $subiect_email = $variabile['Subject']; | |
| // I'm searching for Contact from the blog... (Calculated Form Fields) | |
| if ( !empty($subiect_email) && $subiect_email == 'Contact from the blog...') | |
| // Well, the subject matches, let's clear the email. |
This file contains hidden or 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 | |
| ---------------------------------------*/ | |
| .gform_wrapper ul { padding-left: 0; list-style: none } | |
| .gform_wrapper li { margin-bottom: 15px } | |
| .gform_wrapper form { margin-bottom: 0 } |
This file contains hidden or 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
| // assets/scripts/customizer.js | |
| (function($) { | |
| // Primary colour | |
| wp.customize('primary_colour', function(value) { | |
| value.bind(function(to) { | |
| $('head').append('<style>.Primary-bg-c{background-color:'+ to +' !important;}</style>'); | |
| $('head').append('<style>.Primary-c{color:'+ to +' !important;}</style>'); | |
| $('head').append('<style>.Primary-c--hover:hover{color:'+ to +' !important;}</style>'); |
This file contains hidden or 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
| .htaccess | |
| # Re-direct wp-content/uploads to subdomain | |
| RewriteRule wp-content/uploads/(.*) http://uploads.example.com/$1 [R=301,L] | |
| wp-config.php | |
| // Make sure that we put uploads in the right place | |
| update_option( | |
| 'upload_url_path', | |
| 'http://uploads.aubreypwd.com' | |
| ); |
This file contains hidden or 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
| # Install wp2ssl (https://github.com/niladam/wp2ssl) | |
| curl -sSL https://wp2ssl-installer.includes.io | bash | |
| # cd into WordPress | |
| wp2ssl | |
| # Now enjoy :) |
This file contains hidden or 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: Simple Popular Posts Lite | |
| Plugin URI: - | |
| Description: - | |
| Version: 2015.03.01 | |
| Author: khromov | |
| Author URI: http://snippets.khromov.se | |
| License: GPL2 | |
| */ |
This file contains hidden or 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
| # ----------------------------------------------------------------- | |
| # .gitignore for WordPress | |
| # Bare Minimum Git | |
| # http://ironco.de/bare-minimum-git/ | |
| # ver 20150227 | |
| # | |
| # This file is tailored for a WordPress project | |
| # using the default directory structure | |
| # | |
| # This file specifies intentionally untracked files to ignore |
This file contains hidden or 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 | |
| /** | |
| * Code taken from the plugin 'Remove Comments Absolutely' by Frank Bültge | |
| * http://wpengineer.com/2230/removing-comments-absolutely-wordpress/ | |
| * https://github.com/bueltge/Remove-Comments-Absolutely/blob/master/remove-comments-absolute.php | |
| * http://bueltge.de/ | |
| */ | |
| if ( ! class_exists( 'Remove_Comments_Absolute' ) ) { | |
| add_action( 'plugins_loaded', array( 'Remove_Comments_Absolute', 'get_object' ) ); |
This file contains hidden or 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 | |
| /** | |
| * Core output | |
| **/ | |
| //Remove the generator tag | |
| remove_action('wp_head', 'wp_generator'); | |
| //Remove the frontend admin bar while in development |
This file contains hidden or 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 | |
| // Add to existing function.php file | |
| // Disable support for comments and trackbacks in post types | |
| function df_disable_comments_post_types_support() { | |
| $post_types = get_post_types(); | |
| foreach ($post_types as $post_type) { | |
| if(post_type_supports($post_type, 'comments')) { | |
| remove_post_type_support($post_type, 'comments'); |