I hereby claim:
- I am ihorvorotnov on github.
- I am ihorvorotnov (https://keybase.io/ihorvorotnov) on keybase.
- I have a public key whose fingerprint is A866 1403 6C25 E295 B6B4 CC47 C82E B589 1154 9391
To claim this, I am signing this object:
<?php | |
# Check: https://onexa.nl/wordpress/toolbar-link-redis-object-cache/ | |
/** | |
* Add a link to the Admin Toolbar to easily flush the Redis cache (Redis Object Cache plugin) | |
* | |
* @author Hiranthi Herlaar, onexa.nl | |
* @version 2.0 | |
* |
<?php | |
/** | |
* Class LocalValetDriver | |
* | |
* This class demonstrates how we might go about proxying any missing local images to a remote host. i.e; the production | |
* site. This has been created with WordPress in mind but could be adjusted to work with any other system. | |
*/ | |
class LocalValetDriver extends WordPressValetDriver { |
(function (context, trackingId, options) { | |
const history = context.history; | |
const doc = document; | |
const nav = navigator || {}; | |
const storage = localStorage; | |
const encode = encodeURIComponent; | |
const pushState = history.pushState; | |
const typeException = 'exception'; | |
const generateId = () => Math.random().toString(36); | |
const getId = () => { |
<?php | |
define( 'THEME_PATH', __DIR__ ); | |
/** | |
* A faster alternative to native get_template_part() function. | |
* | |
* @param string $template | |
* @param mixed $data | |
* | |
* @return void |
<?php | |
// Enqueue all js codes combined in a single file. | |
function enqueue_theme_assets() | |
{ | |
wp_enqueue_script( | |
'trackers', | |
get_stylesheet_directory_uri() . '/js/trackers.js', | |
null, | |
null, |
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Support\Facades\Storage; | |
class SnapshotCommand extends Command | |
{ |
<?php | |
/** | |
* Simple debug trace to wp-content/debug.log | |
* | |
* @usage _log( $var ); | |
* | |
* @param $log mixed A string|array|object you want to dump into wp-content/debug.log | |
*/ | |
if ( ! function_exists( '_log' ) ) { |
/** | |
* Default Body Class Styles | |
*/ | |
.rtl {} | |
.home {} | |
.blog {} | |
.archive {} | |
.date {} | |
.search {} |
<?php | |
/** | |
* Move image inside <p> tag above the <p> tag while preserving any link around image. | |
* Can be prevented by adding any attribute or whitespace to <p> tag, e.g. <p class="yolo"> or even <p > | |
*/ | |
function gc_remove_p_tags_around_images($content) | |
{ | |
$contentWithFixedPTags = preg_replace_callback('/<p>((?:.(?!p>))*?)(<a[^>]*>)?\s*(<img[^>]+>)(<\/a>)?(.*?)<\/p>/is', function($matches) | |
{ | |
/* |
I hereby claim:
To claim this, I am signing this object: