2017 © Pedro Peláez
 

wordpress-plugin menu-item-custom-fields

image

kucrut/menu-item-custom-fields

  • Saturday, February 3, 2018
  • by kucrut
  • Repository
  • 8 Watchers
  • 96 Stars
  • 96 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 33 Forks
  • 4 Open issues
  • 6 Versions
  • 380 % Grown

The README.md

Menu Item Custom Fields

Easily add custom fields to nav menu items., (*1)

Contributors: kucrut
Tags: menu, nav-menu, custom-fields, metadata
Requires at least: 3.8
Tested up to: 4.7.2
Stable tag: 1.0.0
License: GPLv2
Donate Link: https://www.paypal.me/kucrut, (*2)

Build Status, (*3)

Description

Breaking Change

Since version 1.0.0, the first parameter passed to the wp_nav_menu_item_custom_fields is the menu item ID, instead of the nav menu ID. This should not have a big impact, since the nav menu ID passed was always 0 (not used by core)., (*4)

This is a library plugin. It doesn't do anything visible on its own. It was written to allow other plugins/themes to add custom fields to menu items easily. See Installation., (*5)

Development of this plugin is done on GitHub. Pull requests welcome. Please see issues reported there before going to the plugin forum., (*6)

Installation

As regular plugin

  1. Upload menu-item-custom-fields to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

As library in your plugin/theme

Simply copy menu-item-custom-fields to your plugin directory and require the main plugin file, eg: require_once dirname( __FILE__ ) . '/menu-item-custom-fields/menu-item-custom-fields.php';, (*7)

Usage

Copy (and customize) and include the menu-item-custom-fields-example.php file found in the doc/ directory of this plugin into your plugin/theme., (*8)

Changelog

1.0.0

  • Pass correct parameters to the wp_nav_menu_item_custom_fields hook, props @helgatheviking.

0.4.0

0.3.0

  • Use wp_nav_menu_item_custom_fields as walker hook. See this blog post.
  • Update example plugin

0.2.1

  • Update compatibility info

0.2.0

  • Improve walker class loader

0.1.1

  • Move custom fields up (before <p.field-move />)

0.1.0

  • Initial public release

The Versions

03/02 2018

0.2.1

0.2.1.0

  Sources   Download

03/02 2018

0.3.0

0.3.0.0

  Sources   Download

03/02 2018

0.4.0

0.4.0.0

  Sources   Download

05/02 2017

dev-master

9999999-dev https://github.com/kucrut/wp-menu-item-custom-fields

Easily add custom fields to nav menu items.

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

plugin wordpress menu custom-fields

05/02 2017

dev-develop

dev-develop https://github.com/kucrut/wp-menu-item-custom-fields

Easily add custom fields to nav menu items.

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

plugin wordpress menu custom-fields

05/02 2017

1.0.0

1.0.0.0 https://github.com/kucrut/wp-menu-item-custom-fields

Easily add custom fields to nav menu items.

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

plugin wordpress menu custom-fields