PluginProbe ʕ •ᴥ•ʔ
Category Order and Taxonomy Terms Order / 1.9.4
Category Order and Taxonomy Terms Order v1.9.4
1.9.9.1 1.9.9 1.9.8 1.5.3.1 1.5.3.2 1.5.4 1.5.5 1.5.6 1.5.7 1.5.7.1 1.5.7.2 1.5.7.3 1.5.7.4 1.5.7.5 1.5.7.6 1.5.7.7 1.5.9 1.6 1.6.1 1.7 1.7.1 1.7.3 1.7.4 1.7.5 1.7.7 1.7.9 1.8 1.8.1 1.8.2 1.8.4 1.8.5 1.8.6 1.8.7 1.8.8 1.9 1.9.1 1.9.3 1.9.4 1.9.5 1.9.7 trunk 1.2.4 1.2.6 1.2.7 1.2.9 1.3.0 1.3.4 1.3.6 1.4.0 1.4.1 1.4.2 1.4.4 1.4.6 1.4.7 1.4.8 1.4.9 1.5 1.5.2.2 1.5.3
taxonomy-terms-order / include / class.terms_walker.php
taxonomy-terms-order / include Last commit date
class.addons.php 3 months ago class.functions.php 3 months ago class.interface.php 3 months ago class.options.php 3 months ago class.terms_walker.php 3 months ago class.tto.php 3 months ago
class.terms_walker.php
51 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
4
5 class TO_Terms_Walker extends Walker
6 {
7
8 var $db_fields = array ('parent' => 'parent', 'id' => 'term_id');
9
10
11 function start_lvl(&$output, $depth = 0, $args = array() )
12 {
13 extract($args, EXTR_SKIP);
14
15 $indent = str_repeat("\t", $depth);
16 $output .= "\n$indent<ul class='children sortable'>\n";
17 }
18
19
20 function end_lvl(&$output, $depth = 0, $args = array())
21 {
22 extract($args, EXTR_SKIP);
23
24 $indent = str_repeat("\t", $depth);
25 $output .= "$indent</ul>\n";
26 }
27
28
29 function start_el(&$output, $term, $depth = 0, $args = array(), $current_object_id = 0)
30 {
31 if ( $depth )
32 $indent = str_repeat("\t", $depth);
33 else
34 $indent = '';
35
36 $currentScreen = get_current_screen();
37
38 $term_link = isset ( $currentScreen->post_type ) ? get_edit_term_link( $term, $term->taxonomy, $currentScreen->post_type ) : get_edit_term_link( $term );
39
40 $output .= $indent . '<li class="term_type_li" id="item_'.$term->term_id.'"><div class="item"><span class="title">'.apply_filters( 'to/term_title', $term->name, $term ).' </span> <span class="options ui-sortable-handle"><a href="' . $term_link .'"><span class="dashicons dashicons-edit"></span></a></span></div>';
41 }
42
43
44 function end_el(&$output, $object, $depth = 0, $args = array())
45 {
46 $output .= "</li>\n";
47 }
48
49 }
50
51 ?>