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 woo_field($property) { | |
$date_format = 'd - M - Y'; // Format Date | |
$info = null; | |
if (!in_array($property, ['cart_product_ids', 'cart_total_items', 'cart_total_price'])) { | |
global $product; | |
if (!$product) { | |
$product = wc_get_product(get_the_ID()); | |
} |
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
{"component":{"id":500,"name":"ct_div_block","options":{"ct_id":500,"ct_parent":100004,"selector":"div_block-500-72","original":[],"nicename":"Element Countdown"},"depth":5,"children":[{"id":520,"name":"ct_code_block","options":{"ct_id":520,"ct_parent":500,"selector":"code_block-520-72","original":{"code-js":"function updateTimers() {\n if (window.angular) return;\n\n var now = new Date();\n var containers = document.querySelectorAll(\".x-count\");\n\n containers.forEach(function(container) {\n var future = new Date(\n container.getAttribute(\"data-count-year\"),\n parseInt(container.getAttribute(\"data-count-mo\")) - 1,\n parseInt(container.getAttribute(\"data-count-day\")) + 0\n );\n\n var diff = future - now;\n\n var days = Math.floor(diff / (1000 * 60 * 60 * 24));\n var hours = Math.floor(diff / (1000 * 60 * 60)) % 24;\n var mins = Math.floor(diff / (1000 * 60)) % 60;\n var secs = Math.floor(diff / 1000) % 60;\n\n var daysElement = container.querySelector(\".x-co |
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
{"component":{"id":2,"name":"ct_section","options":{"ct_id":2,"ct_parent":0,"selector":"section-2-57","original":[],"nicename":"Element Count Section"},"depth":1,"children":[{"id":57,"name":"ct_div_block","options":{"ct_id":57,"ct_parent":2,"selector":"div_block-57-57","original":[],"nicename":"Element Count","classes":["full-width","is-center"],"activeselector":"is-center"},"depth":2,"children":[{"id":58,"name":"ct_code_block","options":{"ct_id":58,"ct_parent":57,"selector":"code_block-58-57","original":{"code-js":"function counter() {\n\n \tif( window.angular ) return;\n \n var xCountElements = document.querySelectorAll('.x-count');\n xCountElements.forEach(function(element) {\n if (element.classList.contains('x-start')) {\n var elementTop = element.offsetTop;\n var elementHeight = element.offsetHeight;\n var elementBottom = elementTop + elementHeight;\n var viewportTop = window.pageYOffset || document.documentElement.scrollTop;\n var vie |
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
//JSON OXYGEN BUILDER | |
{"component":{"id":216,"name":"ct_div_block","options":{"ct_id":216,"ct_parent":100004,"selector":"div_block-216-53","original":{"padding-bottom":"0"},"nicename":"Wishlist Elements","activeselector":false},"depth":5,"children":[{"id":217,"name":"ct_code_block","options":{"ct_id":217,"ct_parent":216,"selector":"code_block-217-53","nicename":"Code Wishlist Paste Global","activeselector":false,"original":{"code-php":"<script>\n\ndocument.addEventListener('DOMContentLoaded', function() {\n if (window.angular) return;\n assignButtonEvents();\n\n function assignButtonEvents() {\n const wishlistButtons = document.querySelectorAll('.oxy-add-to-wishlist, .oxy-remove-from-wishlist');\n\n wishlistButtons.forEach(button => {\n button.removeEventListener('click', handleWishlistButtonClick);\n button.addEventListener('click', handleWishlistButtonClick);\n });\n }\n\n function handleWishlistButtonClick(event) {\n const button = event.cur |
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
/*Paste this code into a plugin like Code Snippets or the one of your choice */ | |
function oxy_call_id_quickview() { | |
if (isset($_GET['quickterm']) && !empty($_GET['quickterm'])) { | |
return sanitize_text_field($_GET['quickterm']); | |
} else { | |
$args = array( | |
'post_type' => 'product', | |
'posts_per_page' => 1, | |
'orderby' => 'date', | |
'order' => 'ASC' |
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 custom_maintenance_mode_setting() { | |
add_settings_section( | |
'maintenance_mode_section', | |
'Maintenance Mode', | |
null, | |
'general' | |
); | |
add_settings_field( | |
'maintenance_mode', |
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_action('rest_api_init', function () { | |
register_rest_route('api-oxygen/v1', '/oxygen-content/(?P<id>\d+)', array( | |
'methods' => 'GET', | |
'callback' => 'call_oxygen_content_api', | |
)); | |
}); | |
function call_oxygen_content_api($data) { | |
$post_id = $data['id']; |
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
{"component":{"id":329,"name":"ct_div_block","options":{"ct_id":329,"ct_parent":3,"selector":"div_block-329-77","original":[],"nicename":"Element Load More"},"depth":4,"children":[{"id":330,"name":"ct_div_block","options":{"ct_id":330,"ct_parent":329,"selector":"div_block-330-77","original":{"custom-attributes":[{"name":"data-load-more-selector","value":"#id-and-class","pinned":true},{"name":"data-load-more","value":"click","pinned":true},{"name":"data-load-more-animation","value":"x-fadeZoomOut","pinned":true},{"name":"data-load-more-animation-initial","value":"false","pinned":true}],"custom-css":"","text-align":"left","flex-direction":"row","display":"flex","gap":"10","padding-top":"10","padding-bottom":"10","padding-left":"20","padding-right":"20","align-items":"center","border-radius":"100","background-color":"#5b2ae0","color":"#ffffff"},"nicename":"Load More","classes":["x-load-more"],"activeselector":false},"depth":5,"children":[{"id":331,"name":"ct_text_block","options":{"ct_id":331,"ct_parent":330,"se |