- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
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 | |
| /** | |
| * Fix network admin URL to include the "/wp/" base | |
| * | |
| * @see https://core.trac.wordpress.org/ticket/23221 | |
| */ | |
| add_filter( 'network_site_url', function( $url, $path, $scheme ){ | |
| $urls_to_fix = array( | |
| '/wp-admin/network/', |
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 | |
| error_reporting( E_ALL ^ E_STRICT ); // le sigh | |
| require __DIR__ . '/wordpress/tools/i18n/makepot.php'; | |
| /** | |
| * Additionally scans for localized strings in Mustache templates. | |
| */ | |
| class MustachePOT extends MakePOT { |
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
| # Be sure to change or omit the --network parameter; it defaults to 1. | |
| wp site list --network=4 --field=url | while read line; do wp theme list --status=active --field=name --url=$line >> /tmp/wpcli-themes.txt; done && sort /tmp/wpcli-themes.txt | uniq -c |
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 | |
| // Do NOT include the opening php tag above | |
| add_filter( 'tgmsp_individual_slide', 'jmw_soliloquy_add_custom_slides', 10, 4 ); | |
| /** | |
| * Filter the slide html to append another slide. | |
| * | |
| * @link http://soliloquywp.com/docs/appending-custom-slides-to-your-slider/ | |
| * | |
| * @param string $slider_html Existing slide HTML. |
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 | |
| /** | |
| * Autoload class files on demand | |
| * | |
| * `Dokan_Installer` becomes => installer.php | |
| * `Dokan_Template_Report` becomes => template-report.php | |
| * | |
| * @param string $class requested class name | |
| */ |
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 | |
| /** | |
| * Change Upload Directory for one Custom Post-Type | |
| * | |
| * This will change the upload directory for a custom post-type. Attachments for this custom post type will | |
| * now be uploaded to a seperate "uploads" directory. Make | |
| * sure you swap out "post-type" and the "my-dir" with the appropriate values... | |
| * credits to: http://wordpress.stackexchange.com/users/4044/jhdenham | |
| * and http://yoast.com/smarter-upload-handling-wp-plugins/ | |
| */ |
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 | |
| add_filter( 'oembed_providers', 'oembed_fix_twitter', 10, 1 ); | |
| function oembed_fix_twitter( $providers ) { | |
| $providers[ '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i' ] = array( 'https://api.twitter.com/1/statuses/oembed.{format}', true ); | |
| return $providers; | |
| } |
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 | |
| /** | |
| * Remove Gravity Forms Update Check | |
| */ | |
| add_action( 'init', 'gform_remove_update_check', 11 ); | |
| function gform_remove_update_check() { | |
| remove_filter( 'transient_update_plugins', array( 'RGForms', 'check_update' ) ); | |
| remove_filter( 'site_transient_update_plugins', array( 'RGForms', 'check_update' ) ); | |
| remove_filter( 'transient_update_plugins', array( 'GFForms', 'check_update' ) ); | |
| remove_filter( 'site_transient_update_plugins', array( 'GFForms', 'check_update' ) ); |
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
| http://www.youtube.com/watch?v=-FRm3VPhseI Google's Clean Code Talks | |
| http://blog.gordon-oheim.biz/2011-01-17-Why-Singletons-have-no-use-in-PHP/ | |
| http://sebastian-bergmann.de/archives/882-Testing-Code-That-Uses-Singletons.html | |
| http://eamann.com/tech/making-singletons-safe-in-php/ | |
| http://hakre.wordpress.com/2012/06/10/the-missing-patterns-of-the-php-manual/#p2 | |
| http://blogs.msdn.com/b/scottdensmore/archive/2004/05/25/140827.aspx | |
| http://www.phptherightway.com/pages/Design-Patterns.html ("You should be wary when using the singleton pattern, as by its very nature it introduces global state into your application, reducing testability.") | |
| http://www.practicaldesignpatternsinphp.com/ ("The Singleton Pattern is perhaps the most well known - and most often misused - pattern in all of PHP design pattern development. Its simplicity, combined with its seeming benefits makes it a widely-used (and overused) pattern. The Singleton is not so much a recommended pattern, as a pattern I recommend you shy away from.") | |
| http://www.sli |