Submit
Path:
~
/
home
/
getwphos
/
public_html
/
kingpanel
/
wp-content
/
themes
/
mechano
/
admin
/
File Content:
override-post-class.php
<?php function mechano_portfolio_page__post_class() { $taxonomy = 'portfolio-category'; $categories_slugs = ""; $categories = get_the_terms(get_the_ID(), $taxonomy); if ($categories && (! is_wp_error($categories))) { foreach ($categories as $category) { // Get post's category slug and its parent category slug. $categories_slugs .= get_term_parents_list( $category->term_id, $taxonomy, array( 'format' => 'slug', 'separator' => ' ', 'link' => false, 'inclusive' => true, ) ); } } $post_class = esc_attr($categories_slugs); return $post_class; } function mechano_category_link_style() { return get_theme_mod('mechano_setting_meta_cat_link_style', 'is-cat-link-borders-light is-cat-link-rounded'); } function mechano_post_class($classes, $class, $post_id) { if (! is_admin()) { if (is_page_template('page_template-portfolio.php') || is_tax('portfolio-category')) // [Custom Post Type] Portfolio pages. (portfolio page template, portfolio category) { $classes[] = esc_attr(mechano_portfolio_page__post_class()); } elseif (get_post_type() == 'product') // [Plugin] WooCommerce products. { $classes[] = esc_attr('hentry'); } else { $classes[] = esc_attr(mechano_category_link_style()); } } return $classes; } add_filter('post_class', 'mechano_post_class', 10, 3);
Submit
FILE
FOLDER
Name
Size
Permission
Action
css
---
0755
demo-data
---
0755
js
---
0755
plugins
---
0755
about-author.php
1412 bytes
0644
admin--class-tgm-plugin-activation.php
126853 bytes
0644
admin--demo-import.php
10565 bytes
0644
admin--help-tab.php
2049 bytes
0644
admin--notice.php
9889 bytes
0644
archive-title.php
3072 bytes
0644
content-none.php
1105 bytes
0644
customizer-default-values.php
3280 bytes
0644
customizer-sections.php
8509 bytes
0644
customizer-settings.php
262878 bytes
0644
enqueue-inline-script.php
2601 bytes
0644
enqueue-inline-style.php
66490 bytes
0644
enqueue-styles-scripts.php
13122 bytes
0644
functions-core.php
8160 bytes
0644
functions-layout-grid.php
1082 bytes
0644
functions-layout-regular.php
802 bytes
0644
functions-portfolio.php
2917 bytes
0644
functions-singular.php
13678 bytes
0644
functions-woocommerce.php
4674 bytes
0644
html-attributes.php
18503 bytes
0644
image-sizes.php
1986 bytes
0644
index.php
30 bytes
0644
navigation-archive.php
1231 bytes
0644
navigation-single.php
4441 bytes
0644
override-post-class.php
1447 bytes
0644
override-post-gallery.php
7368 bytes
0644
post-meta.php
7608 bytes
0644
pre-get-posts.php
353 bytes
0644
theme-options.php
11646 bytes
0644
widget_area-register.php
10228 bytes
0644
widget_area-sidebar-singular.php
7161 bytes
0644
N4ST4R_ID | Naxtarrr