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
[ | |
{ | |
"name": "Беларусь", | |
"regions": [ | |
{ | |
"name": "Брестская обл.", | |
"cities": [ | |
{ | |
"name": "Антополь", | |
"lat": 52.2041343, |
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
function is_touch_device() { | |
return !!("ontouchstart" in window) ? 1 : 0; | |
} | |
/* Mobile detection - Touch desktop device safe! */ | |
function isMobile() { | |
try{ document.createEvent("TouchEvent"); return true; } | |
catch(e){ return false; } | |
} |
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
// file from wp-content/plugins/advanced-gutenberg/assets/js/ | |
jQuery(document).ready(function ($) { | |
$('.wp-block-gallery').each(function () { | |
// Add lightbox for images | |
$(this).find('.blocks-gallery-item').colorbox({ | |
title: function () { | |
if (parseInt(advgb.imageCaption)) { | |
var imgCap = $(this).find('figcaption').text() || $(this).find('img').attr('alt'); | |
return imgCap; |
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 | |
/** | |
* WordPress Gutenberg gallery block fix to the gallery shortcode. | |
*/ | |
/** | |
* Replace Gutenberg gallery block with the gallery shortcode. | |
* Tested until Gutenberg 2.4 | |
* |