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 | |
#Read article here https://worcesterwideweb.com/woocommerce-add-single-product-notice-on-a-per-category-basis-with-hierarchy/ | |
add_filter( 'the_content', 'customizing_woocommerce_description' ); | |
function customizing_woocommerce_description( $content ) { | |
global $post; | |
// Only for single product pages (woocommerce) | |
if ( is_product() ) { | |
# get the terms for this post | |
$terms = get_the_terms( $post->ID, 'product_cat' ); |
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: Check Pages to see if WooCommerce pages are set. | |
Description: Woocommerce check page ID and if not there then set it. Sometimes the woocommerce pages because unset for some reasons, use this to check it and set it automatically. | |
Params: None | |
Author: Anthony Brown (Codeable) | |
Email: [email protected] | |
*/ | |
function check_wp_pages_installed(){ |
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 | |
#service date | |
if($burial_date != ''){ | |
echo '<p class="wpfh-service-line"><strong>'.get_option('wpfh_burial_date_text',__("Burial Date","sp-wpfh")).'</strong> ' .$burial_date . '</p>'; | |
} | |
#service lines | |
if(wpfh_feature_disabled('Obituary: Service Lines') != true){ | |
$services_information =array(); |
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
{ | |
"current_page": 1, | |
"data": [ | |
{ | |
"id": 12209, | |
"title": "Taste Of The Wild High Prairie Dry Dog Food", | |
"brand": "Taste Of The Wild", | |
"description": "<html><p>Taste of the Wild High Prairie Dry Dog Food is a roasted bison and venison, grain-free recipe with sweet potatoes and peas providing healthy, digestible energy for your active dog. With roasted buffalo as the first ingredient, this diet mimics an ancestral diet free of grains, packed with real meat and supplemented with fruits and vegetables. Taste of the Wild High Prairie delivers antioxidants and vitamins and minerals for a healthy lifestyle with no fillers or by-products.</p><br /><h3>Why We Love It</h3><ul><li>Grain-free recipe to mimic an ancestral diet</li><li>High protein diet supplemented with fruits and vegetables</li><li>Made in the USA!</li></ul></html>\r\n\r\n<h3>About Taste of the Wi |
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 | |
/** | |
* Plugin Name: Gravity Forms Authorize.net Custom Fields | |
* Plugin URI: http://codeable.io | |
* Description: GF Extra fields for beyer | |
* Author: Anthony Brown | |
* Author URI: http://codeable.io | |
* Version: 1.0.0 | |
* WC tested up to: 3.5.4 |
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 | |
#make the directory | |
$upload_dir = '' . SP_CDM_UPLOADS_DIR . '' . $uid . '/'; | |
if (!is_dir(SP_CDM_UPLOADS_DIR)) { | |
mkdir(SP_CDM_UPLOADS_DIR, 0777); | |
} | |
if (!is_dir($dir)) { | |
mkdir($dir, 0777); | |
} | |
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 | |
add_filter('sp_cdm_viewfile_image', '_cdm_custom_images',10,2); | |
function _cdm_custom_images($img,$r){ | |
$ext = preg_replace('/^.*\./', '', $r['file']); | |
if ($ext == 'pdf') { |
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 | |
add_action('wp_head','_express_css'); | |
function _express_css(){ | |
if($_COOKIE['viewed_cookie_policy'] == ''){ | |
echo '<style type="text/css"> | |
.footer-padding{margin-bottom:45px} |
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 | |
add_action('wpseo_title','optima_wpseo'); | |
function optima_wpseo($title ){ | |
global $post; | |
if ($post->ID == 0 && $post->post_author == 0 && $post->post_type == 'page') { |
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 cdm_custom_styles() { | |
wp_enqueue_style( 'my-cdm-custom-styles', get_stylesheet_directory_uri().'cdm.css', array('cdm-style','cdm-premium-style') ); | |
} | |
add_action( 'wp_enqueue_scripts', 'cdm_custom_styles' ); | |
?> |