PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 2.0.0
Adminify – White Label, Admin Menu Editor, Login Customizer v2.0.0
4.3.1 4.3.0 4.2.26 4.2.25 4.2.24 4.2.23 4.2.22 4.2.21 4.2.20 4.2.19 4.2.18 4.2.17 4.2.16 4.2.15 4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 4.1.17 All 164 releases
adminify / Inc / Modules / PostTypesOrder / PostTypesOrderWalker.php

PostTypesOrderWalker.php in Adminify – White Label, Admin Menu Editor, Login Customizer 2.0.0, at Inc/Modules/PostTypesOrder/PostTypesOrderWalker.php

61 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPAdminify\Inc\Modules\PostTypesOrder;
4
5 // no direct access allowed
6 if (!defined('ABSPATH')) exit;
7
8 /**
9 * WP Adminify
10 * @package WP Adminify: Post Types Order
11 *
12 * @author WP Adminify <support@wpadminify.com>
13 */
14
15
16 class PostTypesOrderWalker extends \Walker
17 {
18
19 var $db_fields = array(
20 'parent' => 'post_parent',
21 'id' => 'ID'
22 );
23
24
25 function start_lvl(&$output, $depth = 0, $args = array())
26 {
27 $indent = str_repeat("\t", $depth);
28 $output .= "\n$indent<ul class='children'>\n";
29 }
30
31
32 function end_lvl(&$output, $depth = 0, $args = array())
33 {
34 $indent = str_repeat("\t", $depth);
35 $output .= "$indent</ul>\n";
36 }
37
38
39 function start_el(&$output, $page, $depth = 0, $args = array(), $id = 0)
40 {
41 if ($depth)
42 $indent = str_repeat("\t", $depth);
43 else
44 $indent = '';
45
46 extract($args, EXTR_SKIP);
47
48 $item_details = apply_filters('the_title', $page->post_title, $page->ID);
49
50 $item_details = apply_filters('adminify_pto/pto_media_item_data', $item_details, $page);
51
52 $output .= $indent . '<li id="item_' . $page->ID . '"><span>' . $item_details . '</span>';
53 }
54
55
56 function end_el(&$output, $page, $depth = 0, $args = array())
57 {
58 $output .= "</li>\n";
59 }
60 }
61