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 | |
/** | |
* This is a clone of the WP_Widget_Media_Image class that was introduced | |
* in WP version 4.8.0. | |
* | |
* By cloning this class we can add new fields without modifying the original | |
* class. This means we can extend it to do whatever we want :D | |
* | |
* @package WordPress | |
* @subpackage Widgets |
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
/* eslint consistent-this: [ "error", "control" ] */ | |
/** | |
* Continued from PHP Instructions on renaming / cloning image class. | |
* @link https://gist.github.com/StuffieStephie/4f654058545d693787a36e76d3521b1e | |
* | |
* Step 1: | |
* Assign previewTemplate variable to the script template ID defined in the | |
* PHP file sans 'tmpl-' (Step 6 of PHP instructions) |
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
<!DOCTYPE html> | |
<html <?php language_attributes(); ?>> | |
<head> | |
<meta charset="<?php bloginfo( 'charset' ); ?>"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<?php | |
$meta = array( | |
"title" => get_bloginfo( 'title' ), | |
"desc" => get_bloginfo( 'description'), | |
"url" => home_url( $_SERVER['REQUEST_URI'] ), |
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 | |
/*-------------------------------------------------------------- | |
# Dependancies | |
--------------------------------------------------------------*/ | |
if (!function_exists('mb_strlen')) { | |
function mb_strlen($input) { | |
if (preg_match('!!u', $input)) { | |
// this is utf-8 | |
return strlen( utf8_decode($input)); |