This file contains 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 a new WP site. | |
# Usage: wpinstall <sitename> | |
function wpinstall() { | |
# Make the directory in your local web root | |
mkdir ~/Sites/www/$@; | |
cd ~/Sites/www/$@; | |
# Download, config, and install WordPress using <sitename> for the database, URL, and site title | |
# Note: You'll need to configure your wp-cli defaults for core config and core install in a wp-cli.yml file | |
wp core download; |
This file contains 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
// Data courtesy http://country.io/data/ | |
$countries = [ | |
'AD' => [ 'name' => 'Andorra', 'alpha2' => 'AD', 'alpha3' => 'AND', 'currency' => 'EUR', ], | |
'AE' => [ 'name' => 'United Arab Emirates', 'alpha2' => 'AE', 'alpha3' => 'ARE', 'currency' => 'AED', ], | |
'AF' => [ 'name' => 'Afghanistan', 'alpha2' => 'AF', 'alpha3' => 'AFG', 'currency' => 'AFN', ], | |
'AG' => [ 'name' => 'Antigua and Barbuda', 'alpha2' => 'AG', 'alpha3' => 'ATG', 'currency' => 'XCD', ], | |
'AI' => [ 'name' => 'Anguilla', 'alpha2' => 'AI', 'alpha3' => 'AIA', 'currency' => 'XCD', ], | |
'AL' => [ 'name' => 'Albania', 'alpha2' => 'AL', 'alpha3' => 'ALB', 'currency' => 'ALL', ], | |
'AM' => [ 'name' => 'Armenia', 'alpha2' => 'AM', 'alpha3' => 'ARM', 'currency' => 'AMD', ], | |
'AO' => [ 'name' => 'Angola', 'alpha2' => 'AO', 'alpha3' => 'AGO', 'currency' => 'AOA', ], |
This file contains 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: StartBox GitHub .zip Generator | |
* Description: Generates a .zip download for StartBox from GitHub Master. | |
* | |
* @props Konstantin Kovshenin (@kovshenin) for sharing his work used on underscores.me (http://code.svn.wordpress.org/underscoresme/plugins/underscoresme-generator/underscoresme-generator.php) | |
*/ | |
class SB_Download_Generator { |
This file contains 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
h3:before { | |
display: inline-block; | |
margin-left: -45px; | |
padding-right: 45px; | |
width: 30px; | |
height: 30px; | |
background: url('https://cldup.com/_NaTHCOsGQ.svg') no-repeat; | |
content: ''; | |
} |
This file contains 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: Comments Page | |
* Plugin URI: https://WPSessions.com | |
* Description: Makes comments for a post accessible at <post_url>/comments/. | |
* Author: Brian Richards | |
* Author URI: https://rzen.net | |
* Text Domain: comments-page | |
* Domain Path: /languages | |
* Version: 0.1.0 |
This file contains 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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f [NC] | |
RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico)) http://example.com/$1 [NC,P,L] | |
</IfModule> |
This file contains 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
Using only this, hiting ^/bpa/whatever/ serves blog archive instead of static front page. | |
<?php | |
/** | |
* Create url endpoint for BPA | |
* | |
* @since 1.0.0 | |
*/ | |
function cfpurl_rewrite_rules() { |
This file contains 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 | |
/** | |
* Wrap an embedded video with a container for simpler styling. | |
* | |
* @since 1.0.0 | |
* | |
* @param string $output HTML Markup. | |
* @param string $url oEmbed URL. |
This file contains 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
=== Almost always running === | |
Google Chrome (10 tabs average) | |
Vagrant (running VirtualBox) | |
SublimeText 2 | |
iTerm2 | |
Alfred | |
Dropbox | |
Skype | |
Tweetbot | |
Hipchat |
This file contains 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 | |
/** | |
* Change "Featured Image" to "Achievement Image" throughout media modal. | |
* | |
* @since 1.3.0 | |
* | |
* @param array $strings All strings passed to media modal. | |
* @param object $post Post object. | |
* @return array Potentially modified strings. | |
*/ |
NewerOlder