GithubHelp home page GithubHelp logo

lipsworld / wp-menu-item-custom-fields Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ineagu/wp-menu-item-custom-fields

0.0 2.0 0.0 382 KB

Easily add custom fields to nav menu items

License: GNU General Public License v2.0

PHP 100.00%

wp-menu-item-custom-fields's Introduction

Menu Item Custom Fields

Easily add custom fields to nav menu items.

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

Build Status

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).

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.

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

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';

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.

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

wp-menu-item-custom-fields's People

Contributors

kucrut avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.