Skip to content

Commit

Permalink
TOC icon broken #801
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaywali committed Sep 9, 2024
1 parent 80bc385 commit 73b0df0
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
12 changes: 11 additions & 1 deletion assets/css/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -412,4 +412,14 @@ label.cssiconcheckbox {
.eztoc_no_heading_found{
background-color: yellow;
padding-left: 10px;
}
}
.eztoc-hide{
display: none;
}
.term-description .ez-toc-title-container p:nth-child(2){
width:50px;
float:right;
margin:0;
}


2 changes: 1 addition & 1 deletion assets/css/screen.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 35 additions & 1 deletion includes/inc.plugin-compatibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -1071,4 +1071,38 @@ function( $tags_to_remove ) {
return $tags_to_remove;
}

);
);

/**
* To fix icon issue in TOC for the woo category page description
* @param mixed $allowed_tags
* @return mixed
*/
function eztoc_woo_category_toc_fix($allowed_tags) {

if( function_exists('is_product_category') && is_product_category() && true == ezTOC_Option::get( 'include_product_category', false)) {
$allowed_tags['svg'] = array(
'width' => true,
'height' => true,
'viewbox' => true,
'xmlns' => true,
'fill' => true,
'stroke' => true,
'style' => true,
'class'=> true
);

$allowed_tags['path'] = array(
'd' => true,
'fill' => true,
'stroke' => true,
);

$allowed_tags['span']['style'] = true;


}

return $allowed_tags;
}
add_filter('wp_kses_allowed_html', 'eztoc_woo_category_toc_fix', 10, 2);

0 comments on commit 73b0df0

Please sign in to comment.