]+class="[^"]*field-move)/', $this->get_fields( $item, $depth, $args, $id ), $item_output ); } /** * Get custom fields HTML * * @since 5.0.0 * @since 5.7.2 Added action based on https://github.com/ineagu/wp-menu-item-custom-fields * * @param object $item Menu item data object. * @param int $depth Depth of menu item. Used for padding. * @param array $args Menu item args. * @param int $id Nav menu ID. * @return string */ function get_fields( $item, $depth, $args = array(), $id = 0 ) { ob_start(); /** * Get menu item custom fields from plugins/themes * * @since 5.7.2 * * @param int $item_id post ID of menu * @param object $item Menu item data object. * @param int $depth Depth of menu item. Used for padding. * @param array $args Menu item args. * @param int $id Nav menu ID. */ do_action( 'wp_nav_menu_item_custom_fields', $item->ID, $item, $depth, $args, $id ); return ob_get_clean(); } } endif; ?>