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 | |
// ex: | |
// With [time since="1997"] years experience | |
// outputs: With 20 years of experience | |
class SCCTimeShortcode { | |
static $add_script; | |
static function init() { |
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
#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/ |
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
#! /bin/bash | |
# | |
# slugify.sh by Ronan | |
# | |
# Distributed under terms of the MIT license. | |
# | |
cd photos | |
for file in *.png; do | |
filename=${file%.*} |
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 | |
// 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); |
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 | |
/** | |
* | |
* 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 |
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 | |
function squarecandy_add_to_gcal( | |
$name, | |
$startdate, | |
$enddate = false, | |
$description = false, | |
$location = false, | |
$allday = false, | |
$linktext = 'Add to gCal', | |
$classes = array('gcal-button, button') |
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 | |
/** | |
* 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. |
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' | |
); |