Search Documentation

WP Travel Developer Documentation

  1. Home
  2. Docs
  3. WP Travel Developer Documentation
  4. Filters
  5. Filter :wp_travel_submenus

Filter :wp_travel_submenus

WP Travel submenus list filter.

Source

File: /inc/helpers.php
Used by: /inc/helpers.php

Parameters
$all_submenus

Example:

function prefix_wp_travel_submenus( $all_submenus ) {
    $all_submenus[‘bookings’][‘settings2’] = array(
    'priority' => '130',
    'page_title' => __( 'WP Travel Settings2',
    'wp-travel' ),
    'menu_title' => __( 'Settings2', 'wp-travel' ),
    'menu_slug' => 'settings2',
    'callback' => 'setting_page_callback',
    );
    return $all_submenus;
}
add_filter( 'wp_travel_submenus', 'prefix_wp_travel_submenus' );
Was this article helpful to you? Yes No

How can we help?