This is a simplified example of Smarter Link Underlines built for Sass rather than Stylus. Original code example by Adam Schwartz of eager.io.
View a live example on Codepen
<?php | |
/* | |
WORDPRESS SPECIFIC AJAX HANDLER (because admin-ajax.php does not render plugin shortcodes). | |
by [email protected] | |
credits: Raz Ohad https://coderwall.com/p/of7y2q/faster-ajax-for-wordpress | |
*/ | |
//mimic the actual admin-ajax | |
define('DOING_AJAX', true); | |
if (!isset( $_REQUEST['action'])) |
This is a simplified example of Smarter Link Underlines built for Sass rather than Stylus. Original code example by Adam Schwartz of eager.io.
View a live example on Codepen
<?php | |
/* purge.php | |
* Clears serverside caches (finetuned for wordpress on gandi.net simplehosting instances): Varnish, APC, WP Transients, WP Super Cache, W3 Total Cache | |
*/ | |
header("Cache-Control: max-age=1"); // don't cache ourself | |
error_reporting(E_ALL); | |
ini_set("display_errors", 1); | |
<?php | |
/** | |
* This file can be used to validate that the WordPress wp_mail() function is working. | |
* To use, change the email address in $to below, save, and upload to your WP root. | |
* Then browse to the file in your browser. | |
* | |
* For full discussion and instructions, see the associated post here: | |
* http://b.utler.co/9L | |
* | |
* Author: Chad Butler |
<?php | |
class OrderDeskApiClient | |
{ | |
private $store_id; | |
private $api_key; | |
private $base_url = "https://app.orderdesk.me/api/v2"; | |
public $last_status_code = ""; | |
public function __construct($store_id, $api_key) { |
NOTE I'm trying to find the most optimal fav/touch icon setup for my use-cases. Nothing new here. Read Mathias Bynens' articles on re-shortcut-icon and touch icons, a FAQ or a Cheat Sheet for all the details.
I'd like to hear how you approach this: @valuedstandards or comment on this gist.
You have to include a boatload of link
elements pointing to many different images to provide (mobile) devices with a 'favicon' or 'touch icon':
<?php | |
/** | |
* Return 'medium' image for mobile devices since that is what we're | |
* loading to display as the featured image on each post. | |
*/ | |
//* Filter WP SEO's OpenGraph image output | |
add_filter('wpseo_opengraph_image_size', 'disi_opengraph_image_size'); | |
function disi_opengraph_image_size($val) { | |
if( wp_is_mobile() ) { |
#!/bin/bash | |
# script useful to create hosting user accounts for Apache. | |
# It creates the system user, its home folder and the virtualhost | |
# Enter a dummy password if you wish to attach domain to an existing user. | |
: ' | |
USAGE | |
$ bash /home/pixeline/bin/create-hosting-user username password domain.tld | |
Arguments: |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent