Conditions | 3 |
Paths | 3 |
Total Lines | 37 |
Code Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
27 | protected function actions_section(){ |
||
28 | $html = ''; |
||
29 | |||
30 | $taxonomies = get_taxonomies(); |
||
31 | |||
32 | foreach ( $taxonomies as $tax ) : |
||
33 | |||
34 | $skipped_taxonomies = array( |
||
35 | 'post_format', // We shouldn't be making random post format classes |
||
36 | 'product_shipping_class', // These aren't used visually and are therefore skipped |
||
37 | 'nav_menu', // Menus are handled seperately of taxonomies |
||
38 | ); |
||
39 | |||
40 | // Skip banned taxonomies |
||
41 | if ( in_array( $tax, $skipped_taxonomies ) ){ |
||
42 | continue; |
||
43 | } |
||
44 | |||
45 | $taxonomy = get_taxonomy( $tax ); |
||
46 | |||
47 | $html .= "<div class='test-data-cpt'>"; |
||
48 | |||
49 | $html .= "<h3>"; |
||
50 | |||
51 | $html .= "<span class='label'>".$taxonomy->labels->name."</span>"; |
||
52 | |||
53 | $html .= $this->build_button( 'create', $tax, __( 'Create', 'otm-test-content' )." ".$taxonomy->labels->name ); |
||
54 | $html .= $this->build_button( 'delete', $tax, __( 'Delete', 'otm-test-content' )." ".$taxonomy->labels->name ); |
||
55 | |||
56 | $html .= "</h3>"; |
||
57 | |||
58 | $html .= "</div>"; |
||
59 | |||
60 | endforeach; |
||
61 | |||
62 | return $html; |
||
63 | } |
||
64 | |||
66 |