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 removeCSSVariableAndChangeColor() { | |
const selector = ".woocommerce div.product p.price"; | |
const elements = document.querySelectorAll(selector); | |
elements.forEach(element => { | |
// Remove the CSS variable | |
element.style.removeProperty('--color-1'); | |
// Change the color to #b3af54; | |
element.style.color = '#b3af54'; | |
}); |
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
boldgrid-diced/woocommerce/archive-product.php, | |
boldgrid-diced/woocommerce/cart/cart-empty.php version 3.5.0 is out of date. The core version is 7.0.1, | |
boldgrid-diced/woocommerce/cart/cart.php version 3.8.0 is out of date. The core version is 7.9.0, | |
boldgrid-diced/woocommerce/cart/proceed-to-checkout-button.php version 2.4.0 is out of date. The core version is 7.0.1, | |
boldgrid-diced/woocommerce/checkout/cart-errors.php, | |
boldgrid-diced/woocommerce/checkout/form-coupon.php version 3.4.4 is out of date. The core version is 7.0.1, | |
boldgrid-diced/woocommerce/checkout/payment-method.php, | |
boldgrid-diced/woocommerce/checkout/payment.php version 3.5.3 is out of date. The core version is 8.1.0, | |
boldgrid-diced/woocommerce/global/breadcrumb.php, | |
boldgrid-diced/woocommerce/global/form-login.php version 3.6.0 is out of date. The core version is 7.0.1, |
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 | |
function ezdump($variable){ | |
echo '<pre>' . print_r($variable, true) . '</pre>'; | |
} | |
$dataPoints1 = array(); | |
function logToData($logname){ | |
$logdata = file($logname); | |
$first = null; | |
foreach($logdata as $lineNumber => $logline){ | |
$logline = explode(" " , $logline); |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_ACCEPT} image/webp | |
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f | |
RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1] | |
</IfModule> | |
<IfModule mod_headers.c> | |
Header append Vary Accept env=REDIRECT_accept | |
</IfModule> |
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 | |
function load_scripts_based_on_browser() { | |
global $is_IE; | |
if (!$is_IE) { | |
// Modern browsers | |
wp_enqueue_script('modern-js', 'path_to_modern_script.js', array(), null, true); | |
} else { | |
// Legacy browsers | |
wp_enqueue_script('legacy-js', 'path_to_legacy_script.js', array(), null, true); |
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
<IfModule mod_expires.c> | |
ExpiresActive On | |
# Set default expiration to 1 month | |
ExpiresDefault "access plus 1 month" | |
# Specific expiration times by file type | |
ExpiresByType image/jpg "access plus 1 year" | |
ExpiresByType image/jpeg "access plus 1 year" | |
ExpiresByType image/gif "access plus 1 year" |
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 | |
// Register the custom post type 'todo' | |
function todo_register_post_type() { | |
register_post_type('todo', array( | |
'labels' => array( | |
'name' => __('Content Creation Center'), | |
'singular_name' => __('Content'), | |
'add_new' => __('Add New Content'), | |
'add_new_item' => __('Add New Content'), |
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 | |
// Hook into the attachment fields | |
add_filter('attachment_fields_to_edit', 'add_custom_audio_fields', 10, 2); | |
add_filter('attachment_fields_to_save', 'save_custom_audio_fields', 10, 2); | |
// Function to add custom fields | |
function add_custom_audio_fields($form_fields, $post) { | |
// Only show these fields for audio files | |
if ($post->post_mime_type == 'audio/mpeg' || $post->post_mime_type == 'audio/wav' || $post->post_mime_type == 'audio/ogg') { | |
// Record Label 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
<table class="bg-table table hide-header table-borderless" style="table-layout: fixed; width: 100%; height: 736px;"> | |
<thead> | |
<tr style="height: 0px;"> | |
<th style="width: 45%;">Header 1</th> | |
<th style="width: 40%;">Header 2</th> | |
<th style="width: 15%;">Header 3</th> | |
</tr> | |
</thead> | |
<tbody> | |
<!-- Your table rows here --> |
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 | |
// Register Custom Post Type: Shoppable Articles | |
function create_shoppable_articles_post_type() { | |
$labels = array( | |
'name' => _x('Shoppable Articles', 'Post Type General Name', 'your-text-domain'), | |
'singular_name' => _x('Shoppable Article', 'Post Type Singular Name', 'your-text-domain'), | |
'menu_name' => __('Shoppable Articles', 'your-text-domain'), | |
'name_admin_bar' => __('Shoppable Article', 'your-text-domain'), | |
'archives' => __('Shoppable Article Archives', 'your-text-domain'), |