Skip to content

Instantly share code, notes, and snippets.

View A5hleyRich's full-sized avatar

Ashley Rich A5hleyRich

View GitHub Profile
@A5hleyRich
A5hleyRich / .gitignore
Created December 6, 2014 14:10
WordPress Git
# Thanks to: https://gist.github.com/jdbartlett/444295
# Ignore everything in the root except the "wp-content" directory.
/*
!.gitignore
!wp-content/
# Ignore everything in the "wp-content" directory, except the "plugins" and "themes" directories.
wp-content/*
!wp-content/plugins/
@A5hleyRich
A5hleyRich / myplugin.php
Last active August 29, 2015 14:11
Post: Upgrade Procedure for WordPress Plugin Developers
<?php
define( 'MYPLUGIN_VERSION', '1.6.1' );
if ( is_admin() ) {
include_once( plugin_dir_path( __FILE__ ) . 'includes/admin/upgrades.php' );
}
@A5hleyRich
A5hleyRich / nginx.conf
Last active August 29, 2015 14:11
Post: WordPress Outbound Link Tracking using Google Analytics
# Affiliate Links
location /out/digitalocean {
add_header X-Robots-Tag: "noindex, nofollow";
return 302 https://www.digitalocean.com/?refcode=3196717b4908;
}
location /out/studiopress {
add_header X-Robots-Tag: "noindex, nofollow";
return 302 http://www.shareasale.com/r.cfm?b=241369&u=904813&m=28169&urllink=&afftra$
}
@A5hleyRich
A5hleyRich / buttons-1.php
Last active August 29, 2015 14:17
Delightful Download Docs
$buttons = array(
'black' => array(
'name' => __( 'Black', 'delightful-downloads' ),
'class' => 'button-black'
),
'blue' => array(
'name' => __( 'Blue', 'delightful-downloads' ),
'class' => 'button-blue'
),
'grey' => array(
@A5hleyRich
A5hleyRich / base64_test.php
Created June 9, 2015 15:00
Base64 Testing
<?php
/*
Plugin Name: Base64 Encoded Data Test
Plugin URI: http://github.com/deliciousbrains/wp-migrate-db-pro-tweaks
Description: Examples of using WP Migrate DB Pro's filters
Author: Delicious Brains
Version: 0.1
Author URI: http://deliciousbrains.com
*/
@A5hleyRich
A5hleyRich / add.php
Last active September 11, 2015 19:23
Delightful Downloads Custom Buttons
<?php
function dedo_custom_button( $buttons ) {
$buttons['custom'] = array(
'name' => __( 'Custom Button', 'delightful-downloads' ),
'class' => 'button-custom'
);
return $buttons;
}
@A5hleyRich
A5hleyRich / add.php
Last active September 11, 2015 19:29
Delightful Downloads Custom Outputs
<?php
function dedo_custom_output( $styles ) {
$styles['icon_link'] = array(
'name' => __( 'Icon Link', 'delightful-downloads' ),
'format' => '<div class="download_container"><i class="fa fa-download"></i><a href="%url%" title="%title%" rel="nofollow">%title%</a></div>'
);
return $styles;
}
@A5hleyRich
A5hleyRich / add.php
Last active September 11, 2015 19:35
Delightful Downloads Custom Lists
<?php
function custom_list( $lists ) {
$lists['icon_date'] = array(
'name' => 'Icon (Date)',
'format' => '<i class="fa fa-download"></i><a href="%url%" title="%title%" rel="nofollow">%title% - %date%</a>'
);
return $lists;
}
Verifying that +a5hleyrich is my blockchain ID. https://onename.com/a5hleyrich
@A5hleyRich
A5hleyRich / nginx.conf
Last active March 19, 2016 23:48
Hosting WordPress Yourself Multiple Sites
user ashley;
worker_processes 1;
pid /run/nginx.pid;
events {
worker_connections 1024;
multi_accept on;
}
http {