Skip to content

Instantly share code, notes, and snippets.

View zavod008's full-sized avatar
🎯
Focusing

zavod008

🎯
Focusing
View GitHub Profile
@kuzkok
kuzkok / leaflet.draw.ru.js
Last active January 12, 2023 14:20
Leaflet.draw russian localization
L.drawLocal = {
draw: {
toolbar: {
actions: {
title: 'Прекратить рисование',//'Cancel drawing',
text: 'Отмена'//'Cancel'
},
undo: {
title: '',//'Delete last point drawn',
text: 'Удалить последнюю точку'//'Delete last point'
@chodhary
chodhary / custom-woocommerce-loop.php
Last active October 21, 2019 11:58 — forked from UltimateWoo/custom-woocommerce-loop.php
Custom query and loop for WooCommerce
<?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(
@Alex-Space
Alex-Space / doc WordPress
Last active April 21, 2022 08:49
doc WordPress
/******** Plugin creation ********/
# Первые шаги в WP:
1) plugins(wp_content/plugins)
2) Там создаем папку с названием плагина в ней одноименный файлик .php
3) В него добавляем информацию о плагине, чтобы WP определил его в админке
4) Создаем файлик readme.txt, в котором пишем описание плагина (пример - https://wordpress.org/plugins/about/readme.txt)
5) Домашнаяя страница для плагина, в ней рассказывается о том как его установить, какие версии WP совместимы с плагином, что менялось от версии к версии вашего плагина, и как его использовать.
# В главный файл плагина в самое начало:
@webaware
webaware / add-to-cart.php
Last active October 22, 2023 05:55 — forked from mikejolley/functions.php
WooCommerce purchase page add-to-cart with quantity and AJAX, by customising the add-to-cart template in the WooCommerce loop. See blog post for details: http://snippets.webaware.com.au/snippets/woocommerce-add-to-cart-with-quantity-and-ajax/
<?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