(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/bin/bash | |
| array=( | |
| "Give" | |
| "Give-2Checkout" | |
| "Give-Recurring-Donations" | |
| "Give-Dwolla" | |
| "Give-Email-Reports" | |
| "Give-Fee-Recovery" | |
| "Give-Form-Field-Manager" | |
| "Give-Gift-Aid" |
| .in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent, | |
| #customize-theme-controls .customize-pane-child.current-section-parent { | |
| -webkit-transform: translateX(-100%); | |
| -ms-transform: translateX(-100%); | |
| transform: translateX(-100%); | |
| } |
| #!/bin/bash | |
| PLUGINS=$(wp plugin list --update=available --field=name | tr -d '\r'); | |
| wp plugin update-all; | |
| for plugin in $PLUGINS; do | |
| git add -A "wp-content/plugins/$plugin"; | |
| git commit -m "Update plugin: $plugin"; | |
| done; |
| var confirmDialog = function(message, headline, cb) { | |
| var dialog = '<div class="dialog confirm mfp-with-anim">'; | |
| if (headline) { | |
| dialog += '<h2>' + headline + '</h2>'; | |
| } | |
| dialog += '<div class="content"><p>' + message + '</p></div>'; | |
| dialog += '<div class="actions">'; | |
| dialog += '<button type="button" class="btn btn-default btn-cancel">Abbrechen</button> '; | |
| dialog += '<button type="button" class="btn btn-primary btn-submit">OK</button>'; | |
| dialog += '</div>'; |
| Example codes for article Learning accessibility in WordPress themes, part I. |
| <?php | |
| /** | |
| * This changes logging to only log fatal errors. This file should go in your mu-plugins directory. | |
| */ | |
| // Set the error logging to only log fatal errors | |
| error_reporting( E_ERROR ); | |
| // Optional: change the location of your error log, it might be wise to put it outside your WP content dir. | |
| // If you don't change it, the default place for this log is debug.log in your WP_CONTENT_DIR. |
| INITIALISATION | |
| ============== | |
| load wp-config.php | |
| set up default constants | |
| load wp-content/advanced-cache.php if it exists | |
| load wp-content/db.php if it exists | |
| connect to mysql, select db | |
| load object cache (object-cache.php if it exists, or wp-include/cache.php if not) | |
| load wp-content/sunrise.php if it exists (multisite only) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| <?php | |
| /** | |
| * Plugin Name: Change User Language | |
| * Description: Change the language depending on the user | |
| * Version: 0.1 | |
| * Author: AJ Zane | |
| * Author URI: http://AJZane.com | |
| * License: GPL2 | |
| */ |
| (function(){ | |
| var log = console.log; | |
| console.log = function(str) { | |
| var css = 'background: linear-gradient(to right, red, yellow, lime, aqua, blue, fuchsia, red); color: white; font-weight: bold;'; | |
| var args = Array.prototype.slice.call(arguments); | |
| args[0] = '%c' + args[0]; | |
| args.splice(1,0,css); | |
| return log.apply(console, args); | |
| } |