S7 – Load delayed JS after 3 seconds
add_filter(‘perfmatters_delay_js_timeout’, function($timeout) { return ‘3’; });Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter(‘perfmatters_delay_js_timeout’, function($timeout) { return ‘3’; });Continue reading
document.addEventListener(“DOMContentLoaded”, function () { // Get all Read More buttons const readMoreButtons = document.querySelectorAll(‘.read-more’); readMoreButtons.forEach(button => { button.addEventListener(‘click’, function (event) { event.preventDefault(); const feature = this.closest(‘.feature’); const longDesc = feature.querySelector(‘.long-desc’); const shortDesc = feature.querySelector(‘.short-desc’); if (longDesc.style.display === “none”) { longDesc.style.display…Continue reading
/* Ajout de Ninja Tables */ .footable .open>.dropdown-menu { display: block !important; } .footable .dropdown-menu{ display: none !important; } .container { overflow: initial !important; } .post-page-numbers { border: 1px solid rgb(0 0 0); padding: 5px 10px; border-radius: 5px; }Continue reading
@property –nat-li-icon { syntax: ““; inherits: false; initial-value: disc; } @property –nat-bgcolor { syntax: ““; inherits: false; initial-value: white; } @property –nat-color { syntax: ““; inherits: false; initial-value: black; } /* Pour les listes */ .nat-li-tkome {–nat-li-icon:”※ “;} .nat-li-tnote {–nat-li-icon:”Note…Continue reading
/* Formattage des images */ img.natha { vertical-align: baseline;} .nath-text-top { vertical-align: text-top; } .nath-align-text-bottom { vertical-align: text-bottom; } .nath-align-sub { vertical-align: sub; } .nath-align-super { vertical-align: super; } .nath-size-square-50px { height : 50px; } .nath-img120par80 { height: 120px; width:…Continue reading
add_action(‘wp_footer’, ‘send_all_datalayer_events_to_clarity’); function send_all_datalayer_events_to_clarity() { ?>Continue reading
/* Customize the generated Gift Card Code */ function agcfw_change_prefix() { return array( ‘characters’ => ‘ABCDEFGHJKMNPQRSTUVWXYZ23456789’, // Defines the characters used in the coupon code ‘length’ => 10, // Sets the length of the generated code to 10 characters ‘prefix’…Continue reading
from reportlab.lib.pagesizes import A4 from datetime import datetime from reportlab.platypus import Table, TableStyle, Paragraph, SimpleDocTemplate, Image, Frame, PageTemplate from reportlab.lib import colors from reportlab.lib.styles import getSampleStyleSheet current_time = datetime.now() curr_date = current_time.date() time = current_time.strftime(“%H:%M:%S”) receipt_no = current_time.strftime(“%y%m%d%H%M%S”) # Style…Continue reading
add_action( ‘init’, function() { if ( function_exists( ‘aioseo’ ) ) { aioseo()->preUpdates->createCacheTable(); } });Continue reading
// Define the API URL const apiUrl = ‘https://api.example.com/data’; // Make a GET request fetch(apiUrl) .then(response => { if (!response.ok) { throw new Error(‘Network response was not ok’); } return response.json(); }) .then(data => { console.log(data); }) .catch(error => {…Continue reading