PluginProbe
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) / 1.4.6
Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) v1.4.6
2.1.3 2.1.2 2.1.1 2.1.0 2.0.4 2.0.3 2.0.2 2.0.1 2.0.0 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 trunk 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 All 57 releases
darkify / src / Admin / Framework / functions / walker.php

walker.php in Darkify – Dark Mode & Night Mode for Website & Admin (Dark Theme Included) 1.4.6, at src/Admin/Framework/functions/walker.php

27 lines 732 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) {
2 die; } // Cannot access directly.
3 /**
4 *
5 * Custom Walker for Nav Menu Edit
6 *
7 * @since 1.0.0
8 * @version 1.0.0
9 */
10 if ( ! class_exists( 'DARKIFY_Walker_Nav_Menu_Edit' ) && class_exists( 'Walker_Nav_Menu_Edit' ) ) {
11 class DARKIFY_Walker_Nav_Menu_Edit extends Walker_Nav_Menu_Edit {
12
13 public function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
14
15 $html = '';
16
17 parent::start_el( $html, $item, $depth, $args, $id );
18
19 ob_start();
20 do_action( 'wp_nav_menu_item_custom_fields', $item->ID, $item, $depth, $args );
21 $custom_fields = ob_get_clean();
22
23 $output .= preg_replace( '/(?=<(fieldset|p)[^>]+class="[^"]*field-move)/', $custom_fields, $html );
24 }
25 }
26 }
27