PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.1.3
Adminify – White Label, Admin Menu Editor, Login Customizer v4.1.3
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 4.1.3, at Inc/Modules/PostTypesOrder/PostTypesOrderWalker.php

61 lines 1.2 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' ) ) {
7 exit;
8 }
9
10 /**
11 * WP Adminify
12 *
13 * @package WP Adminify: Post Types Order
14 *
15 * @author WP Adminify <support@wpadminify.com>
16 */
17
18
19 class PostTypesOrderWalker extends \Walker {
20
21
22 var $db_fields = [
23 'parent' => 'post_parent',
24 'id' => 'ID',
25 ];
26
27
28 function start_lvl( &$output, $depth = 0, $args = [] ) {
29 $indent = str_repeat( "\t", $depth );
30 $output .= "\n$indent<ul class='children'>\n";
31 }
32
33
34 function end_lvl( &$output, $depth = 0, $args = [] ) {
35 $indent = str_repeat( "\t", $depth );
36 $output .= "$indent</ul>\n";
37 }
38
39
40 function start_el( &$output, $page, $depth = 0, $args = [], $id = 0 ) {
41 if ( $depth ) {
42 $indent = str_repeat( "\t", $depth );
43 } else {
44 $indent = '';
45 }
46
47 extract( $args, EXTR_SKIP );
48
49 $item_details = apply_filters( 'the_title', $page->post_title, $page->ID );
50
51 $item_details = apply_filters( 'adminify_pto/pto_media_item_data', $item_details, $page );
52
53 $output .= $indent . '<li id="item_' . esc_attr( $page->ID ) . '"><span>' . esc_html( $item_details ) . '</span>';
54 }
55
56
57 function end_el( &$output, $page, $depth = 0, $args = [] ) {
58 $output .= "</li>\n";
59 }
60 }
61