Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| <?php | |
| /* | |
| Plugin Name: Rewrite Rule Tutorials | |
| */ | |
| add_action( 'init', 'pmg_rewrite_add_rewrites' ); | |
| function pmg_rewrite_add_rewrites() | |
| { | |
| add_rewrite_endpoint( 'json', EP_PERMALINK ); | |
| add_rewrite_rule( |
| <?php # -*- coding: utf-8 -*- | |
| /* | |
| Plugin Name: All Actions List | |
| Description: Lists all actions run during one request. | |
| Version: 1.0 | |
| Required: 3.1 | |
| Author: Thomas Scholz | |
| Author URI: http://toscho.de | |
| License: GPL | |
| */ |
| // This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref | |
| <?php | |
| /** | |
| * WordPress Query Comprehensive Reference | |
| * Compiled by luetkemj - luetkemj.github.io | |
| * | |
| * CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters | |
| * Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php | |
| */ |
| <?php | |
| // from http://php.net/manual/en/function.filesize.php | |
| function formatBytes($bytes, $precision = 2) { | |
| $units = array('B', 'KB', 'MB', 'GB', 'TB'); | |
| $bytes = max($bytes, 0); | |
| $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); | |
| $pow = min($pow, count($units) - 1); | |
| // One wp-config.php file for multiple environments setup from http://www.messaliberty.com/2010/01/how-to-create-a-single-wp-config-file-for-local-and-remote-wordpress-development/ | |
| if ($_SERVER['REMOTE_ADDR']=='127.0.0.1' || $_SERVER['REMOTE_ADDR']=='localhost' || preg_match('/^192\.168\.5\./', $_SERVER['REMOTE_ADDR'])) { | |
| define('WP_ENV', 'local'); | |
| } elseif ($_SERVER['HTTP_HOST']=='tld.stagingurl.com') { | |
| define('WP_ENV', 'staging'); | |
| } else { | |
| define('WP_ENV', 'production'); | |
| } | |
| if ( WP_ENV == 'local' ) { |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| <?php | |
| /** | |
| * [list_searcheable_acf list all the custom fields we want to include in our search query] | |
| * @return [array] [list of custom fields] | |
| */ | |
| function list_searcheable_acf(){ | |
| $list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF"); | |
| return $list_searcheable_acf; | |
| } |
| <?php | |
| /** | |
| * Plugin Name: EDD Heartbeat API test plugin | |
| * Description: Demonstrates how to use the Heartbeat API to update the payments count on the dashboard | |
| */ | |
| // Load the heartbeat JS | |
| function edd_heartbeat_enqueue( $hook_suffix ) { | |
| // Make sure the JS part of the Heartbeat API is loaded. | |
| wp_enqueue_script( 'heartbeat' ); |
| <?php | |
| /** | |
| * Plugin Name: Extend WooCommerce Subscription Intervals | |
| * Description: Add a "every 10 weeks" billing interval to WooCommerce Subscriptions | |
| * Author: Brent Shepherd | |
| * Author URI: http://brent.io | |
| * Version: 1.0 | |
| * License: GPL v2 | |
| */ |
People
:bowtie: |
π :smile: |
π :laughing: |
|---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |