This file contains 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 | |
/** | |
* The plugin bootstrap file. | |
* | |
* This file is read by WordPress to generate the plugin information in the plugin | |
* admin area. This file also includes all of the dependencies used by the plugin, | |
* registers the activation and deactivation functions, and defines a function | |
* that starts the plugin. | |
* |
This file contains 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
//// | |
/// mixins.scss | |
/// Mixins | |
/// @author Ash Whiting | |
//// | |
/// FONT SIZES IN REMS | |
/// Convert font sizes to rems with fallbacks | |
/// @param {size} $size - Font size in pixels | |
/// @param {line} $line - Line height in pixels |
This file contains 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
Afrikaans | |
Albanian | |
Arabic | |
Armenian | |
Basque | |
Bengali | |
Bulgarian | |
Catalan | |
Cambodian | |
Chinese (Mandarin) |
This file contains 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 | |
/** | |
* Payment subscriptions and updating billing and cancelling subscriptions takes place with these hooks | |
* We need the stripe customer user id for updating billing | |
* we need the entry id of subscription so we can cancel it. | |
*/ | |
/** | |
* @param $entry |
This file contains 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
//============================================================================== | |
// SORT OUT PAGINATION ON ARCHIVE | |
// This fixes the canonical link on custom post type archive pages | |
// Odd WordPress bug that only occurs on archives | |
//============================================================================== | |
add_filter('redirect_canonical', 'custom_disable_redirect_canonical'); | |
function custom_disable_redirect_canonical($redirect_url) | |
{ | |
global $post; |
This file contains 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
// You won't need the string conversion if this is already a date object. | |
$booking = '18/06/18'; // example string | |
$date_array = implode('-', array_reverse(explode('/', $booking))); | |
$now_booking = date('d/m/Y', strtotime($date_array)); | |
$bookDate = DateTime::createFromFormat('d/m/Y', $now_booking); | |
$waiting = $today->diff($bookDate); | |
$interval = $waiting->format('%a') / 7; | |
$weeks = number_format($interval, 1) + 0; |
This file contains 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
foreach ($terms as $term) : | |
$speciality = $term->term_id; | |
$speciality_val = $speciality; | |
$args_hs = array( | |
'numberposts' => -1, | |
'post_type' => 'clinician', | |
'suppress_filters' => false, | |
'meta_key' => 'hospitals_and_specialities_UNIQUE8765678_speciality', |
This file contains 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
$my_query = null; | |
$my_query = new WP_Query($args); | |
$docs = $my_query->posts; | |
function lastNameSort($a, $b) | |
{ | |
$aLast = end(explode(' ', $a->post_title)); | |
$bLast = end(explode(' ', $b->post_title)); |
This file contains 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
<select name="time-hours"> | |
<option value="1">01</option> | |
<option value="2">02</option> | |
<option value="3">03</option> | |
<option value="4">04</option> | |
<option value="5">05</option> | |
<option value="6">06</option> | |
<option value="7">07</option> | |
<option value="8">08</option> | |
<option value="9">09</option> |
This file contains 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
To minimize chances of permissions errors, you can configure npm to use a different directory. In this example, it will be a hidden directory on your home folder. | |
Back-up your computer before moving forward. | |
Make a directory for global installations: | |
mkdir ~/.npm-global | |
Configure npm to use the new directory path: | |
npm config set prefix '~/.npm-global' |