🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-07 08:18:41 | PHP 8.2.32
📂
/ (Root)
/
home
/
eliteewa
/
public_html
/
wp-content
/
themes
/
blocksy
/
inc
/
helpers
📍 /home/eliteewa/public_html/wp-content/themes/blocksy/inc/helpers
🔄 Refresh
✏️
Editing: cpt.php
Writable
<?php function blocksy_get_taxonomies_for_cpt($post_type, $args = []) { $args = wp_parse_args($args, [ 'return_empty' => false ]); if ($post_type === 'product') { return [ 'product_cat' => __('Category', 'blocksy'), 'product_tag' => __('Tag', 'blocksy') ]; } $result = []; $taxonomies = array_values(array_diff( get_object_taxonomies($post_type), ['post_format'] )); if (count($taxonomies) === 0) { if ($args['return_empty']) { return []; } return [ 'default' => __('Default', 'blocksy') ]; } foreach ($taxonomies as $single_taxonomy) { $taxonomy_object = get_taxonomy($single_taxonomy); $result[$single_taxonomy] = $taxonomy_object->label; } return $result; }
💾 Save Changes
❌ Cancel