This file contains 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 | |
/** | |
* TSW Listing Nano Directory | |
* Author: Larry Judd Oliver @tradesouthwest | http://tradesouthwest.com | |
* Contributors in readme.md file | |
* License in LICENSE.md file | |
* ///////////////////////////////////////////////////////////////////// | |
* MUST BE USED ALONG WITH [list-images.php] | |
* \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | |
*/ |
This file contains 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 | |
// checking terms since wc_product are not post terms | |
function product_cat_contingencies() | |
{ | |
global $post; | |
// get the product category term objects | |
$terms = wp_get_post_terms( $post->ID, 'product_cat' ); | |
foreach ( $terms as $term ) $categories[] = $term->slug; | |
if( in_array('custom-tarps', $categories) ) { | |
return true; |
This file contains 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 to add ADA compliant links | |
* .woocommerce-store-notice__dismiss-link andd all buttons, some with icons class | |
* @uses wp_footer() | |
*/ | |
function ibsen_child_hook_javascript_footer() | |
{ | |
?> | |
<script id="isben-add-ntccnt" type="text/javascript"> |
This file contains 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 | |
/** | |
* Get product attributes to display on yith-quote table | |
* @param string $attribute_name Taxonomy name | |
* @param string $product_id Global value | |
* @return array Attribute value | |
*/ | |
function betheme_child_get_product_terms_carton( $attribute_name, $product_id ) | |
{ |
This file contains 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 | |
/** | |
* Only display YITH Request A Quote button on Woo pages. | |
* @uses Shortcode from YITH | |
* Maybe translate manually. && $post->post_parent > 0 | |
* @see https://developer.wordpress.org/reference/functions/is_page/ | |
*/ | |
function betheme_child_request_aquote_echo( ) | |
{ | |
if ( is_home() || is_front_page() || is_page( array( |
This file contains 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 | |
/** | |
* Defer loading javascript for unregistered scripts (ads) | |
* @uses $tag(string) The <script> tag for the enqueued script. | |
* @uses $handle(string) The script's registered handle. | |
* @uses $src(string) The script's source URL. | |
* @see https://developer.wordpress.org/reference/hooks/script_loader_tag/ | |
*/ | |
/*function to add async and defer attributes*/ | |
function colormag_child_add_defer_jstags( $tag, $handle ){ |
NewerOlder