After installing dnsmasq, create a "zone file" for *.dev. Create a file /etc/dnsmasq.d/dev and add the following:
address=/dev/127.0.0.1
| <?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. |
| 0000e0dcce4a7a6c6589c17cd87f5b9c ./Headline-37399-1-600x389.jpg | |
| 0000e0dcce4a7a6c6589c17cd87f5b9c ./Headline-37399-600x389.jpg | |
| 000199a0fed1807f39809ae3b954ffd3 ./32912H-1-450x253.jpg | |
| 000199a0fed1807f39809ae3b954ffd3 ./32912H-450x253.jpg | |
| 0010b2446be707b2cfa76fc2fd9e0245 ./Headline-30939-1.jpg | |
| 0010b2446be707b2cfa76fc2fd9e0245 ./Headline-30939.jpg | |
| 00156f723e600cf2eb6070e9cff60257 ./Headline-37356-1-180x180.jpg | |
| 00156f723e600cf2eb6070e9cff60257 ./Headline-37356-180x180.jpg | |
| 001eef2c022dfde390d33a10792cfbae ./230832-1-600x520.jpg | |
| 001eef2c022dfde390d33a10792cfbae ./230832-600x520.jpg |
| <?php | |
| /** | |
| * On-the-fly CSS Compression | |
| * Copyright (c) 2009 and onwards, Manas Tungare. | |
| * Creative Commons Attribution, Share-Alike. | |
| * | |
| * In order to minimize the number and size of HTTP requests for CSS content, | |
| * this script combines multiple CSS files into a single file and compresses | |
| * it on-the-fly. |
| <?php | |
| function squarecandy_add_to_gcal( | |
| $name, | |
| $startdate, | |
| $enddate = false, | |
| $description = false, | |
| $location = false, | |
| $allday = false, | |
| $linktext = 'Add to gCal', | |
| $classes = array('gcal-button, button') |
| <?php | |
| /** | |
| * | |
| * This script will copy your wordpress from public_html (or wherever) | |
| * and place it in a staging folder. | |
| * It will then clone the database, reconfigure the config file | |
| * and replace URL's from the original URL to your staging URL. | |
| * It will then make sure to NOT allow search engines to index the page. | |
| * | |
| * Use this script to clone your main wp in order to test maintenance work |
| <?php | |
| // Deregister los dashicons si no se muestra la barra de admin | |
| add_action( 'wp_print_styles', function() { | |
| if (!is_admin_bar_showing()) wp_deregister_style( 'dashicons' ); | |
| }, 100); |
| #! /bin/bash | |
| # | |
| # slugify.sh by Ronan | |
| # | |
| # Distributed under terms of the MIT license. | |
| # | |
| cd photos | |
| for file in *.png; do | |
| filename=${file%.*} |
| #301 Redirects for .htaccess | |
| #Redirect a single page: | |
| Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
| #Redirect an entire site: | |
| Redirect 301 / http://www.domain.com/ | |
| #Redirect an entire site to a sub folder | |
| Redirect 301 / http://www.domain.com/subfolder/ |
| <?php | |
| // ex: | |
| // With [time since="1997"] years experience | |
| // outputs: With 20 years of experience | |
| class SCCTimeShortcode { | |
| static $add_script; | |
| static function init() { |
After installing dnsmasq, create a "zone file" for *.dev. Create a file /etc/dnsmasq.d/dev and add the following:
address=/dev/127.0.0.1