https://codepen.io/jrobinsonc/pen/jYrxwb
To transpile the JavaScript, can use:
<?php | |
/** | |
* show_pagination | |
* | |
* Show pagination links. | |
* | |
* @author JoseRobinson.com | |
* @link https://gist.github.com/jrobinsonc/bb3829f9418d37c02a09 | |
* @version 2.0.0 |
<?php | |
/** | |
* Default: | |
*/ | |
$post_thumbnail_id = get_post_thumbnail_id(get_the_ID()); | |
$width = 640; | |
$height = 480; |
<?php | |
/** | |
* linkify | |
* | |
* @link Github: https://gist.github.com/jrobinsonc/e79578c41ca48bac9bde | |
* @param string $value | |
* @param array $protocols | |
* @param array $attributes | |
* @param string $mode |
<?php | |
function get_twitter_access_token($consumer_key, $consumer_secret) | |
{ | |
$options = array( | |
CURLOPT_POSTFIELDS => array('grant_type' => 'client_credentials'), | |
CURLOPT_HTTPHEADER => array('Authorization: Basic ' . base64_encode($consumer_key . ':' . $consumer_secret)), | |
CURLOPT_HEADER => FALSE, | |
CURLOPT_URL => 'https://api.twitter.com/oauth2/token', | |
CURLOPT_RETURNTRANSFER => TRUE |
https://codepen.io/jrobinsonc/pen/jYrxwb
To transpile the JavaScript, can use:
<?php | |
function time_elapsed_string($ptime) | |
{ | |
$etime = time() - $ptime; | |
if ($etime < 1) | |
{ | |
return '0 seconds'; | |
} |
This should help you get Sendmail installed with basic configuration on Ubuntu.
sudo apt-get install sendmail
/etc/hosts
file: nano /etc/hosts
127.0.0.1 localhost yourhostname
sudo sendmailconfig
sudo service apache2 restart
/* | |
Enable the "Request Desktop Site" functions on mobile chrome (android and iOS) allow users to see desktop layouts on responsive sites. Note that this is distinct from "opt out of mobile!" buttons built into your site: this is meant to work with the browser's native opt-in/opt-out functionality. | |
Since these functions work, in part, by simply spoofing the user agent to pretend to be desktop browsers, all we have to do is just remember that the browser once claimed to be android earlier in the same session and then alter the viewport tag in response to its fib. | |
Here's an example viewport tag <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> that we'd be setting to scaleable-yes,max scale=2. That's just an example of something that works on the site I was building: you should customize the "desktop" viewport content setting to whatever works for your site's needs. If you wanted, you could stick this code in the head just after the primary viewport tag so that the br |
<?php | |
function regenerateThumbnails() | |
{ | |
global $wpdb; | |
$images = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_type = 'attachment' AND post_mime_type LIKE 'image/%'"); | |
foreach ($images as $image) | |
{ |