/** * Adds target=”_blank” to links within captions. * * @param string $caption The caption HTML. * @return string The modified caption HTML. */ function add_target_blank_to_caption_links($caption) { // Create a DOMDocument object to parse the HTML $doc = new DOMDocument();…Continue reading
// Disable auto-update emails. add_filter( ‘auto_core_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for plugins. add_filter( ‘auto_plugin_update_send_email’, ‘__return_false’ ); // Disable auto-update emails for themes. add_filter( ‘auto_theme_update_send_email’, ‘__return_false’ );Continue reading
add_action( ‘woocommerce_after_add_to_cart_form’, ‘QL_add_text_under_add_to_cart’ ); function QL_add_text_under_add_to_cart () { global $product; ?>Continue reading
add_action( ‘woocommerce_after_add_to_cart_form’, ‘QL_add_text_under_add_to_cart’ ); function QL_add_text_under_add_to_cart () { global $product; ?>Continue reading
//v2.7 ////Dynamic Location Tracking define(‘LOCATION_CSV_PATH’, ‘CSV/googloc.csv’); /** * Generate unique visitor ID based on IP and user agent */ function dl2_get_visitor_id() { return md5($_SERVER[‘REMOTE_ADDR’] . ($_SERVER[‘HTTP_USER_AGENT’] ?? ”)); } function validate_zip($zip) { return preg_match(‘/^[0-9]{4,5}$/’, $zip) ? $zip : ”; }…Continue reading
add_filter( ‘action_scheduler_retention_period’, function () { return WEEK_IN_SECONDS; } );Continue reading