Skip to content

Instantly share code, notes, and snippets.

View shawnhooper's full-sized avatar

Shawn Hooper shawnhooper

View GitHub Profile
<?php
/**
Plugin Name: CLI Export Multisite
*/
if ( ! defined( 'WP_CLI' ) ) return;
use \WP_CLI\Utils;
/**
<?php
/**
Plugin Name: CLI Export Multisite
*/
if ( ! defined( 'WP_CLI' ) ) return;
use \WP_CLI\Utils;
/**
add_rewrite_rule('^workshops/([^/]+)(/[0-9]+)?/([^/]+)/([^/]+)', 'index.php?&workshop=$matches[4]&page=', 'top');
add_rewrite_rule('^workshops/([^/]+)(/[0-9]+)?/([^/]+)', 'index.php?pagename=workshops&cat=$matches[1]&subcat=$matches[3]', 'top');
add_rewrite_rule('^workshops/([^/]+)/?', 'index.php?pagename=workshops&cat=$matches[1]', 'top');
add_rewrite_tag('%subcat%', '([^&]+)');
@shawnhooper
shawnhooper / gist:9967205
Created April 4, 2014 02:55
Response to WordPress Stack Exchange : 140202
<?php
/*idea to develop further would be, add a text box that the user can input the quote in
this then gets added to the DB and passed to the $quotes array. From here the results get
output the same way*/
/*
Plugin Name: Random Quotes
Plugin URI: xxx
Description: This Plugin randomly generates Quotes input by the user.
Version: 0.0.1