- Query Monitor
- Safe SVG
- Regenerate Thumbnails
- Enable Media Replace
- Fix Alt Text
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
git archive -o patch.zip HEAD $(git diff --name-only --diff-filter d HEAD~1 HEAD) && unzip patch.zip -d patch |
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
/** | |
* Wait some async stuff | |
* | |
* usage | |
let waitStuff = new Waiter('tns', 'function', () => { // callback }).check(); | |
*/ | |
class Waiter { | |
constructor(what, type, callback, timeout = 100, attempts = 50, from = window) { | |
this.what = what; | |
this.type = type; |
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 | |
/** | |
* Лог запросов | |
* [goods] => Array | |
* ( | |
* ... | |
* [7] => Array | |
* ( | |
* [weight] => 0.291 | |
* [length] => 1 |
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
/** | |
* Get YouTube ID from various YouTube URL | |
* @author: takien | |
* @url: http://takien.com | |
* For PHP YouTube parser, go here http://takien.com/864 | |
*/ | |
function YouTubeGetID(url){ | |
var ID = ''; | |
url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/); |
Скрипт позволяет упаковать в ZIP архив активную ветку git репозитория, для экономии места выделяемого под историю изменений.
- Нет необходимости хранить в истории изменений все архивы которые излишне раздувают размер директории
.git
храня всю историю изменения для не всегда необходимого архива - При коммите или отправке изменений на сервер, автоматически генерируется свежий архив с обновлённым кодом, очень подходит для заказчика который просит отправлять ему
zip
обновлённого кода
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
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"default_line_ending": "unix", | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Cascadia Code", | |
"font_size": 10.2, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, |
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
# за редирект отвечает | |
# RewriteRule ^wp-content/uploads/(.*)$ https://<production site>/wp-content/uploads/$1 [R=302,NC,L] | |
# должна быть сразу после RewriteEngine On | |
# <wp test directory> необходим если сайт лежит в директории основного домена, например site.com/dev | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteRule ^wp-content/uploads/(.*)$ https://<production site>/wp-content/uploads/$1 [R=302,NC,L] | |
# RewriteRule ^wp-content\/uploads\/(?!(2022\/08)\/)(.*)$ https://divina-bellezza.ru/wp-content/uploads/$2 [R=302,NC,L] | |
RewriteBase /<wp test directory>/ | |
RewriteRule ^index\.php$ - [L] |
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
/** | |
* В случае, если у одной из вариаций отсутсвует цена, скрипты WooCommerce выпиливают этот option из select | |
* что приводит к глюкам в работе FormStyler плагина | |
*/ | |
$('select').styler({ | |
onFormStyled: function() { | |
$('.variations_form.cart').on('woocommerce_update_variation_values', function() { | |
$(this).find('.jq-selectbox select').trigger('refresh'); | |
}); | |
}, |
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
/** | |
* Scroll to first invalid field | |
* WPCF7 on validation error event | |
*/ | |
document.addEventListener( 'wpcf7invalid', function( event ) { | |
setTimeout( function() { | |
$('html').stop().animate({ | |
scrollTop: $('.wpcf7-not-valid').eq(0).offset().top - 140, | |
}, 500, 'swing'); | |
}, 100); |
NewerOlder