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
// | |
// 1. Change the field name in line 20 instead of 'thumbnail_id'. | |
// 2. Change the taxonomy slug in line 30 instead of 'product_tag'. | |
// | |
// Display thumbnail in admin column as the second column | |
function display_custom_tag_thumbnail( $columns ) { | |
// Insert 'tag-thumbnail' as the second column | |
$columns_before = array_slice( $columns, 0, 1 ); // Extract the first column | |
$columns_after = array_slice( $columns, 1 ); // Extract the remaining columns | |
// Combine columns with 'tag-thumbnail' in the middle |
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
<script> | |
jQuery(document).ready(function($) { | |
// Select the input fields and apply button | |
var fromDateInput = jQuery('.jet-date-range__from'); | |
var toDateInput = jQuery('.jet-date-range__to'); | |
var applyButton = jQuery('.jet-date-range__submit'); | |
applyButton.hide(); | |
// Attach event listener for 'input' on the "from" date field |
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
<ul class="tab-steps--list"></ul> | |
<script> | |
jQuery(document).ready(function() { | |
let isDragging = false; | |
const tabStepsList = jQuery('.tab-steps--list'); | |
function startDrag() { | |
isDragging = true; | |
tabStepsList.addClass('dragg'); | |
} |
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
<ul class="tab-steps--list"></ul> | |
<script> | |
jQuery(document).ready(function() { | |
let isDragging = false; | |
const tabStepsList = jQuery('.tab-steps--list'); | |
function startDrag() { | |
isDragging = true; | |
tabStepsList.addClass('dragg'); | |
} |
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
<script> | |
document.addEventListener("DOMContentLoaded", function () { | |
const fileInputs = document.querySelectorAll(".jet-form-builder-file-upload__input"); | |
function toggleFileContentVisibility(fileContainer) { | |
const fileContent = fileContainer.querySelector(".jet-form-builder-file-upload__content"); | |
const files = fileContainer.querySelectorAll(".jet-form-builder-file-upload__files .jet-form-builder-file-upload__file"); | |
if (files.length < 1) { | |
fileContent.style.display = "none"; |
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
.custom-gallery .jet-engine-gallery-grid__item-wrap.is-lightbox::before { | |
display: none | |
} | |
.custom-gallery .jet-engine-gallery-grid { | |
display: grid; | |
grid-template-columns: repeat(var(--columns), 1fr); | |
} | |
.custom-gallery .jet-engine-gallery-grid__item { | |
max-width: 100%; | |
} |
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
<script> | |
(function() { | |
jQuery(document).on('jet-smart-filters/inited', function( initEvent ) { | |
// Initialize select2 on the select field | |
jQuery('.jet-select__control').select2({ | |
placeholder: 'Search...', | |
width: '100%', |
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
add_filter( 'jet-engine/listings/allowed-callbacks', 'jet_custom_callbacks' ); | |
/** | |
* Add callback to list. | |
*/ | |
function jet_custom_callbacks( $callbacks ) { | |
$callbacks['jet_number_to_duration'] = __( 'Number to duration', 'txt-domain' ); | |
return $callbacks; |
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
/** | |
* @snippet Expend WooCommerce Shipping Row in Cart and Checkout | |
*/ | |
add_action( 'wp_footer', 'expend_shipping_row_jscript', 9999 ); | |
function expend_shipping_row_jscript() { | |
if ( is_cart() || is_checkout() && empty( $wp->query_vars['order-pay'] ) && ! isset( $wp->query_vars['order-received'] ) ) { | |
?> | |
<script type="text/javascript"> |
NewerOlder