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 | |
/** | |
* Make sure the function does not exist before defining it | |
*/ | |
if( ! function_exists( 'remove_class_filter' ) ){ | |
/** | |
* Remove Class Filter Without Access to Class Object | |
* | |
* In order to use the core WordPress remove_filter() on a filter added with the callback |
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 | |
if (is_single()) { | |
function get_post_data() { | |
global $post; return $post; | |
} | |
$json_metadata["@context"] = "http://schema.org/"; | |
$post_data = get_post_data(); |
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
/** | |
* Remove hentry from post_class | |
* This is important to not get schema errors | |
*/ | |
function visceral_remove_hentry_class( $classes ) { | |
$classes = array_diff( $classes, array( 'hentry' ) ); | |
return $classes; | |
} | |
add_filter( 'post_class', 'visceral_remove_hentry_class' ); |
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 | |
/* | |
Support WPML - 25/02/2019 | |
/* | |
function devvn_product_category_base_same_shop_base( $flash = false ){ | |
global $sitepress; | |
$languages = icl_get_languages('skip_missing=0&orderby=code'); | |
if($languages && !empty($languages)){ | |
$original_lang = ICL_LANGUAGE_CODE; | |
foreach($languages as $key=>$lang) { |