GenerateWP

Overview

Use this tool to create custom code for Toolbar (previously known as Admin Bar) with WP_Admin_Bar class.

Usage

  • Fill in the user-friendly form.
  • Click the “Update Code” button.
  • Copy the code to your project.
  • Or save it as a snippet and share with the community.

Function Name The function used in the code.

Toolbar 1 ID The ID of the menu.

Parent ID The ID of the parent menu.

Title Text/HTML shown in the Toolbar.

href The 'href' attribute for the link. If none set the menu will be a text menu.

Menu Group Group menu items together into distinct sections using add_group() method.

HTML The HTML used for the menu.

Class Attribute The class attribute for the list item containing the link or text.

Target Attribute The target attribute for the link. Will be set if 'href' is present.

onClick Attribute The onclick attribute for the link. Will be set if 'href' is present.

Title Attribute The title attribute. Will be set to the link or a div containing a text node.

Tabindex Attribute The tabindex attribute. Will be set to the link or a div containing a text node.

Toolbar 2 ID The ID of the menu.

Parent ID The ID of the parent menu.

Title Text/HTML shown in the Toolbar.

href The 'href' attribute for the link. If none set the menu will be a text menu.

Menu Group Group menu items together into distinct sections using add_group() method.

HTML The HTML used for the menu.

Class Attribute The class attribute for the list item containing the link or text.

Target Attribute The target attribute for the link. Will be set if 'href' is present.

onClick Attribute The onclick attribute for the link. Will be set if 'href' is present.

Title Attribute The title attribute. Will be set to the link or a div containing a text node.

Tabindex Attribute The tabindex attribute. Will be set to the link or a div containing a text node.

Toolbar 3 ID The ID of the menu.

Parent ID The ID of the parent menu.

Title Text/HTML shown in the Toolbar.

href The 'href' attribute for the link. If none set the menu will be a text menu.

Menu Group Group menu items together into distinct sections using add_group() method.

HTML The HTML used for the menu.

Class Attribute The class attribute for the list item containing the link or text.

Target Attribute The target attribute for the link. Will be set if 'href' is present.

onClick Attribute The onclick attribute for the link. Will be set if 'href' is present.

Title Attribute The title attribute. Will be set to the link or a div containing a text node.

Tabindex Attribute The tabindex attribute. Will be set to the link or a div containing a text node.

Toolbar 4 ID The ID of the menu.

Parent ID The ID of the parent menu.

Title Text/HTML shown in the Toolbar.

href The 'href' attribute for the link. If none set the menu will be a text menu.

Menu Group Group menu items together into distinct sections using add_group() method.

HTML The HTML used for the menu.

Class Attribute The class attribute for the list item containing the link or text.

Target Attribute The target attribute for the link. Will be set if 'href' is present.

onClick Attribute The onclick attribute for the link. Will be set if 'href' is present.

Title Attribute The title attribute. Will be set to the link or a div containing a text node.

Tabindex Attribute The tabindex attribute. Will be set to the link or a div containing a text node.

Toolbar 5 ID The ID of the menu.

Parent ID The ID of the parent menu.

Title Text/HTML shown in the Toolbar.

href The 'href' attribute for the link. If none set the menu will be a text menu.

Menu Group Group menu items together into distinct sections using add_group() method.

HTML The HTML used for the menu.

Class Attribute The class attribute for the list item containing the link or text.

Target Attribute The target attribute for the link. Will be set if 'href' is present.

onClick Attribute The onclick attribute for the link. Will be set if 'href' is present.

Title Attribute The title attribute. Will be set to the link or a div containing a text node.

Tabindex Attribute The tabindex attribute. Will be set to the link or a div containing a text node.

Read the original on generatewp.com ↗