This file contains hidden or 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
L.drawLocal = { | |
draw: { | |
toolbar: { | |
actions: { | |
title: 'Прекратить рисование',//'Cancel drawing', | |
text: 'Отмена'//'Cancel' | |
}, | |
undo: { | |
title: '',//'Delete last point drawn', | |
text: 'Удалить последнюю точку'//'Delete last point' |
This file contains hidden or 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 | |
if ( is_shop() || is_product_category() || is_product_tag() ) { // Only run on shop archive pages, not single products or other pages | |
// Products per page | |
$per_page = 24; | |
if ( get_query_var( 'taxonomy' ) ) { // If on a product taxonomy archive (category or tag) | |
$args = array( |
This file contains hidden or 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
/******** Plugin creation ********/ | |
# Первые шаги в WP: | |
1) plugins(wp_content/plugins) | |
2) Там создаем папку с названием плагина в ней одноименный файлик .php | |
3) В него добавляем информацию о плагине, чтобы WP определил его в админке | |
4) Создаем файлик readme.txt, в котором пишем описание плагина (пример - https://wordpress.org/plugins/about/readme.txt) | |
5) Домашнаяя страница для плагина, в ней рассказывается о том как его установить, какие версии WP совместимы с плагином, что менялось от версии к версии вашего плагина, и как его использовать. | |
# В главный файл плагина в самое начало: |
This file contains hidden or 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 | |
/** | |
* Loop Add to Cart -- with quantity and AJAX | |
* requires associated JavaScript file qty-add-to-cart.js | |
* | |
* @link http://snippets.webaware.com.au/snippets/woocommerce-add-to-cart-with-quantity-and-ajax/ | |
* @link https://gist.github.com/mikejolley/2793710/ | |
*/ | |
// add this file to folder "woocommerce/loop" inside theme |