File manager - Edit - /home/xfekoga/rooftopcleaners/wp-includes/widgets/override-post-class.php.tar
Back
home/xfekoga/rooftopcleaners/wp-content/themes/roofy/admin/override-post-class.php 0000644 00000002631 15174423730 0024564 0 ustar 00 <?php function roofy_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 roofy_category_link_style() { return get_theme_mod('roofy_setting_meta_cat_link_style', 'is-cat-link-borders-light is-cat-link-rounded'); } function roofy_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(roofy_portfolio_page__post_class()); } elseif (get_post_type() == 'product') // [Plugin] WooCommerce products. { $classes[] = esc_attr('hentry'); } else { $classes[] = esc_attr(roofy_category_link_style()); } } return $classes; } add_filter('post_class', 'roofy_post_class', 10, 3);
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings