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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_ACCEPT} image/webp | |
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f | |
# WordPress content directory only rule. | |
# To rewrite all files remove `wp-content/` from regular expression below. | |
RewriteRule ^(wp-content/.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1] | |
</IfModule> | |
AddType image/webp .webp |
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
#/bin/bash | |
# Usage | |
# ./generate-posts.sh post_type [taxonomy_name count] | |
# post_type - Reqired | |
# taxonomy_name - Optional | |
# count - Optional | |
# Example: | |
# ./generate-posts.sh post # will create one post with thumnail and meta fields | |
# ./generate-posts.sh post category 4 # will create 4 posts and one existsing term appended for every 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
brew install libvpx | |
brew install ffmpeg --with-chromaprint --with-fdk-aac --with-fontconfig --with-freetype --with-frei0r --with-game-music-emu --with-libass --with-libbluray --with-libbs2b --with-libcaca --with-libgsm --with-libmodplug --with-librsvg --with-libsoxr --with-libssh --with-libvidstab --with-libvorbis --with-libvpx --with-opencore-amr --with-openh264 --with-openjpeg --with-openssl --with-opus --with-rtmpdump --with-rubberband --with-sdl2 --with-snappy --with-speex --with-tesseract --with-theora --with-tools --with-two-lame --with-wavpack --with-webp --with-x265 --with-xz --with-zeromq --with-zimg |
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 | |
<? | |
// Hooks only for version 5 only, may be for previous version also works | |
if (!defined('WPCF7_VERSION') OR intval(WPCF7_VERSION) !== 5) | |
{ | |
return; | |
} | |
add_filter( 'wpcf7_validate_text', 'wpcf7_text_allowed_chars_validation_filter', 11, 2 ); | |
add_filter( 'wpcf7_validate_text*', 'wpcf7_text_allowed_chars_validation_filter', 11, 2 ); |
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
<? | |
define('GITHUB_UPDATER_OVERRIDE_DOT_ORG', TRUE); | |
function get_plugins_overrides() | |
{ | |
static $map = NULL; | |
if ($map !== NULL) | |
{ | |
return $map; |
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
#!/bin/sh | |
if [ -e ~/rsyncjob.lock ] | |
then | |
echo "Rsync job already running...exiting" | |
exit | |
fi | |
touch ~/rsyncjob.lock |
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
window.loadSvgIcons = function loadSvgIcons(el) { | |
Array.prototype.forEach.call(el.querySelectorAll('svg use'), function (svgUseNode) { | |
const context = this || window | |
const hrefAttributes = ['xlink:href', 'href'] | |
let hrefAttribute, href | |
hrefAttributes.some(function (attribute) { | |
href = svgUseNode.getAttribute(attribute) |
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
/** | |
* Detects browser's support for SVG stroke-dashoffset transition | |
* | |
* @return Promise | |
**/ | |
window.strokeDashOffsetTransitionSupport = function strokeDashOffsetTransitionSupport() { | |
const caller = strokeDashOffsetTransitionSupport | |
if (caller.previousResult) { |
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
/** | |
* @param string $container_id | |
* @param string $target_script Relative path to loader file | |
* @param array $loader_config | |
*/ | |
function product_block_loader($container_id, $target_script, Array $loader_config = []) | |
{ | |
$product_block_callback_name = sanitize_file_name(str_replace('-', '_', "callback{$container_id}")); | |
$loader_url = theme_base_url('static/third-paty/product-block/hype-loader.php'); |
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
define(['sharer'], function() { | |
Array.prototype.forEach.call(document.querySelectorAll('.socialShare'), function (shareLinksNode) { | |
socialShare(shareLinksNode) | |
}) | |
}) |