resolve: {
alias: {
'npm-library-name': path.resolve(
__dirname,
'node_modules/npm-library-name/build/'
)
}
},
import 'npm-library-name/style.css'
<ul class="menu">
<li class="first">1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li class="last">5</li>
</ul>
const menu = document.querySelector('.menu')
console.log(menu.firstElementChild)
console.log(menu.children[2])
console.log(menu.lastElementChild)
console.log(menu.children[menu.children.length-1])
function wc_cancel_unpaid_orders() {
...
wp_clear_scheduled_hook( 'woocommerce_cancel_unpaid_orders' );
wp_schedule_single_event( time() + ( absint( $held_duration ) * 60 ), 'woocommerce_cancel_unpaid_orders' );
}
add_action( 'woocommerce_cancel_unpaid_orders', 'wc_cancel_unpaid_orders' );
add_action( 'wc_cancel_unpaid_orders', 'switips_update_order_test', 10, 1 );
function switips_update_order_test( $order_id )
{
setcookie('order', 'cancelled', time() + 3600 * 24 * 30, "/");
}
@media screen and (max-width: 991.98px)
.front-page
.grid
grid-template-columns: repeat(3, 1fr)
grid-row-gap: 0px
.x-col-1
grid-column-start: 1
grid-row-start: span 2
.x-col-2
grid-column-start: 2
grid-row-start: 1
.x-col-3
grid-column-start: 2
grid-row-start: 2
.x-col-4
grid-column-start: 3
grid-row-start: 1
.x-col-5
grid-column-start: 3
grid-row-start: 2
.x-col-6
grid-column-start: 1
grid-row-start: 3
.x-col-7
grid-column-start: 1
grid-row-start: 4
.x-col-8
grid-column-start: 2
grid-row-start: 3
.x-col-9
grid-column-start: 2
grid-row-start: 4
.x-col-10
grid-column-start: 3
grid-row-start: 3
.x-col-11
grid-column-start: 3
grid-row-start: 4
.general-card
background: #EFF3FC
min-width: auto
margin-right: 0
@media screen and (max-width: 767.98px)
.front-page
.grid
grid-template-columns: repeat(2, 1fr)
grid-row-gap: 0px
.x-col-1
grid-column-start: 1
grid-row-start: span 2
.x-col-2
grid-column-start: 2
grid-row-start: 1
.x-col-3
grid-column-start: 2
grid-row-start: 2
.x-col-4
grid-column-start: 1
grid-row-start: 3
.x-col-5
grid-column-start: 1
grid-row-start: 4
.x-col-6
grid-column-start: 2
grid-row-start: 3
.x-col-7
grid-column-start: 2
grid-row-start: 4
.x-col-8
grid-column-start: 1
grid-row-start: 5
.x-col-9
grid-column-start: 1
grid-row-start: 6
.x-col-10
grid-column-start: 2
grid-row-start: 5
.x-col-11
grid-column-start: 2
grid-row-start: 6
@media screen and (max-width: 576.98px)
.front-page
.grid
grid-template-columns: repeat(1, 1fr)
grid-row-gap: 0px
grid-auto-rows: 1fr 34px
.x-col-1
grid-column-start: 1
grid-row-start: 1
.x-col-2
grid-column-start: 1
grid-row-start: 2
.x-col-3
grid-column-start: 1
grid-row-start: 3
.x-col-4
grid-column-start: 1
grid-row-start: 4
.x-col-5
grid-column-start: 1
grid-row-start: 5
.x-col-6
grid-column-start: 1
grid-row-start: 6
.x-col-7
grid-column-start: 1
grid-row-start: 7
.x-col-8
grid-column-start: 1
grid-row-start: 8
.x-col-9
grid-column-start: 1
grid-row-start: 9
.x-col-10
grid-column-start: 1
grid-row-start: 10
.x-col-11
grid-column-start: 1
grid-row-start: 11
ymaps.ready(init);
//Set default center and zoom
function init() {
myMap = new ymaps.Map('map_page', {
center: [45.0701, 38.9048],
zoom: 9
});
//Set user Icon
s = {
iconLayout: 'default#image',
iconImageHref: '/wp-content/themes/okhall/img/logo-map.svg',
iconImageSize: [87, 74],
iconImageOffset: [-43, -56]
};
//Set some points
m = {
m1: new ymaps.Placemark([45.0710, 38.9038], {}, s),
m1center: [45.0701, 38.9048],
m2: new ymaps.Placemark([45.0349, 39.1317], {}, s),
m2center: [45.0349, 39.1317],
m3: new ymaps.Placemark([44.7491, 37.7263], {}, s),
m3center: [44.7491, 37.7265],
m4: new ymaps.Placemark([45.2299, 38.1138], {}, s),
m4center: [45.2299, 38.1138],
m5: new ymaps.Placemark([45.8417, 40.1357], {}, s),
m5center: [45.8417, 40.1357],
m6: new ymaps.Placemark([44.9367, 37.9675], {}, s),
m6center: [44.9367, 37.9675]
};
//Disabled scroll
//myMap.behaviors.disable('scrollZoom');
//on mobile disable touch
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
//... отключаем перетаскивание карты
myMap.behaviors.disable('drag');
}
//Add points on the map
myMap.geoObjects
.add(m['m1'])
.add(m['m2'])
.add(m['m3'])
.add(m['m4'])
.add(m['m5'])
.add(m['m6']);
// ON RESIZE
//Get curent center and zoom
var pixelCenter = myMap.getGlobalPixelCenter('map_page');
console.log(pixelCenter);
//
function onResizeMap() {
if ($(window).width() > '992') {
//Set New center
myMap.setCenter([45.0701, 37.0048]);
var pixelCenter2 = myMap.getGlobalPixelCenter('map_page');
console.log(pixelCenter2);
} else {
myMap.setCenter([45.0701, 38.9048]);
}
} onResizeMap();
window.onresize = function () {
onResizeMap();
};
};