ShiftNav icon
Content & Editing

ShiftNav hooks reference

  • By sevenspark
  • v1.8.2
  • Updated

ShiftNav 1.8.2 has 12 actions and 27 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.

How to use these hooks

Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.

functions.phpyour child theme
// Run your own code when ShiftNav fires an action
add_action( 'shiftnav_after', function( $id ) {
	// Your code runs here.
}, 10, 1 );

// Change a value ShiftNav is about to use
add_filter( 'nav_menu_item_id', function( $ID, $item, $args ) {
	// Change $ID here.
	return $ID;
}, 10, 3 );

Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.

All hooks

  • includes/ShiftNavWalker.class.php line 254
    /**
     * Filter the ID applied to a menu item's <li>.
     */
    apply_filters( 'nav_menu_item_id', 'menu-item-' . $item->ID, $item, $args );
  • the_title

    filter
    includes/ShiftNavWalker.class.php line 214
    /**
     * This filter is documented in wp-includes/post-template.php
     */
    apply_filters( 'the_title', $item->title, $item->ID );
  • includes/ShiftNavWalker.class.php line 355
    /**
     * Filter a menu item's starting output.
     */
    apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
  • includes/functions.php line 145 · used in 2 places
    apply_filters( 'shiftnav_main_toggle_target', $toggle_target );
  • includes/ShiftNavWalker.class.php line 240
    apply_filters( 'nav_menu_css_class', array_filter($classes), $item, $args, $depth );
  • plugin_locale

    filter
    includes/functions.php line 8
    apply_filters( 'plugin_locale', get_locale(), $domain );
  • includes/ShiftNavWalker.class.php line 332
    apply_filters( 'shiftnav_accordion_toggle_icon_close', '<i class="fa fa-' . $close_icon . '"></i>' );
  • includes/ShiftNavWalker.class.php line 331
    apply_filters( 'shiftnav_accordion_toggle_icon_open', '<i class="fa fa-' . $open_icon . '"></i>' );
  • includes/shiftnav.api.php line 107
    do_action( 'shiftnav_after', $id );
  • includes/functions.php line 381
    apply_filters( 'shiftnav_allowed_tags', $allowed_tags, $context );
  • includes/shiftnav.api.php line 45
    do_action( 'shiftnav_before', $id );
  • customizer/customizer.styles.manager.php line 103
    apply_filters( 'shiftnav_custom_styles', $styles );
  • shiftnav.class.php line 236
    apply_filters( 'shiftnav_display_now', $display );
  • shiftnav.class.php line 220
    apply_filters( 'shiftnav_is_mobile', wp_is_mobile() );
  • includes/functions.php line 270
    apply_filters( 'shiftnav_main_toggle_content', '<i class="' . $main_toggle_icon_class . '"></i>' );
  • includes/functions.php line 269
    apply_filters( 'shiftnav_main_toggle_icon_class', 'fa fa-bars' );
  • admin/settings.menu.php line 372
    apply_filters( 'shiftnav_menu_item_settings', $settings );
  • shiftnav_op

    filter
    admin/settings.config.php line 1010
    apply_filters( 'shiftnav_op', $value, $option, $section, $default, $defaulted );
  • includes/shiftnav.api.php line 112
    apply_filters( 'shiftnav_panel_sr_close_text', '× Close Panel' );
  • admin/settings.config.php line 955
    do_action( 'shiftnav_settings_after' );
  • admin/settings.config.php line 950
    do_action( 'shiftnav_settings_before' );
  • admin/settings.config.php line 941
    do_action( 'shiftnav_settings_before_title' );
  • admin/settings.config.php line 930
    do_action( 'shiftnav_settings_panel' );
  • admin/settings.config.php line 409
    apply_filters( 'shiftnav_settings_panel_fields', $fields );
  • admin/settings.config.php line 744
    apply_filters( 'shiftnav_settings_panel_fields_after', $fields );
  • admin/settings.config.php line 769
    apply_filters( 'shiftnav_settings_panel_sections', $sections );
  • admin/settings.config.php line 927
    do_action( 'shiftnav_settings_panel_updated' );
  • includes/ShiftNavWalker.class.php line 325
    apply_filters( 'shiftnav_shift_submenu_icon', '<i class="fa fa-chevron-right"></i>' );
  • includes/functions.php line 374
    do_action( 'shiftnav_toggle_after_content', $main_toggle, $target_id, $id );
  • includes/functions.php line 369
    do_action( 'shiftnav_toggle_before_content', $main_toggle, $target_id, $id );
  • includes/functions.php line 372
    apply_filters( 'shiftnav_toggle_content', $content, $target_id, $id );
  • includes/functions.php line 339
    apply_filters( 'shiftnav_toggle_tabindex', $tabindex, $args );
  • shiftnav.class.php line 112
    do_action( 'shiftnav_update' );
  • includes/ShiftNavWalker.class.php line 489
    apply_filters( 'ubermenu_display_item', true, $this, $element, $max_depth, $depth, $args, $umitem );
  • includes/ShiftNavWalker.class.php line 493
    apply_filters( 'uberMenu_display_item', true, $this, $element, $max_depth, $depth, $args );
  • includes/ShiftNavWalker.class.php line 486
    apply_filters( 'ubermenu_item_object_class', 'UberMenuItemDefault', $element, $id, '' );
  • admin/settings-api.class.php line 547
    do_action( "wsa_form_bottom_{$form['id']}", $form );
  • admin/settings-api.class.php line 544
    do_action( "wsa_form_top_{$form['id']}", $form );

Generated from ShiftNav's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.

Can't find the right hook?

We can build the customisation for you. Describe what you need: