This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
Install the WordPress Coding Standards (WPCS), WordPressVIPMinimum, and PHPCompatibility sniffs for use with PHPCS.
Install the sniffs, with git, into home dir…
cd ~
git clone https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
git clone https://github.com/Automattic/VIP-Coding-Standards.git
git clone https://github.com/wimg/PHPCompatibility.git
<?php | |
/** | |
* http://stackoverflow.com/questions/11305797/remove-zero-width-space-characters-from-a-javascript-string | |
* U+200B zero width space | |
* U+200C zero width non-joiner Unicode code point | |
* U+200D zero width joiner Unicode code point | |
* U+FEFF zero width no-break space Unicode code point | |
*/ | |
<?php | |
class StephanisAddition { | |
public static function add_two_numbers( $number_one, $number_two ) { | |
if ( ! is_numeric( $number_one ) || ! is_numeric( $number_two ) ) { | |
return null; | |
} | |
return $number_one + $number_two; | |
} |
I use HomeBrew as my OSX package manager.
I'm using Varying Vagrant Vagrants (VVV) from 10up as a MAMP replacement.
I use Variable VVV (vv) as a wizard to spin up new sites in VVV.
It is worth noting that VVV uses NGINX, not Apache. Not a deal breaker for me, but could be for others.
Install HomeBrew (assuming this is Mac OS X)
<?php | |
/** | |
* Add params back to oEmbed provider request URL. | |
* | |
* WordPress runs the embed URL through urlencode prior to constructing it's oEmbed provider endpoint call. | |
* This renders any passed in URL query params useless for Vimeo embeds (and probably others). | |
* This filter function will decode those URL query param, and add them as proper query args to the provider URL. | |
* | |
* The first function param, $provider, is the oEmbed provider endpoint. |
<?php | |
/** | |
* A "Proof Of Concept" Front Page template that displays the first gallery found in the_content, above the_content. | |
* | |
* The concept could be applied to any singular template, single posts, single pages, single custom post types, static | |
* front page, etc (not really for archive pages, or blog home). The function | |
* yourthemeprefix_remove_first_gallery_shortcode will then remove the first gallery shortcode that it finds in the | |
* content, from the front page, so that we only output the first one once, above our content, and not again, within | |
* our content. | |
* |
<?php | |
/** | |
* Increase the number of ACM posts that can be displayed in the ACM admin screen. | |
* | |
* For some unknown reason, ACM limits the display of ad codes on it's own management screens to 50 ads total out of the box. | |
* More than 50 ad codes may actually exist in the database, but the ACM screen will only show 2 pages, 25 each, for a total of 50, | |
* even if you have hundreds of ads codes stored in the database! Because of this you can never edit the ads that are on pages 3+! | |
* Increase the number of posts that ACM will retrieve for the admin screen with acm_ad_code_count filter. | |
* Increase the number of ads per paginated page with the acm_list_table_per_page filter. | |
* It appears some sort of caching may be involved, leading to this unexpected/unwanted behavior. |