{"id":119480,"date":"2020-04-03T09:17:16","date_gmt":"2020-04-03T09:17:16","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/wp-menu-custom-fields\/"},"modified":"2024-11-15T04:11:15","modified_gmt":"2024-11-15T04:11:15","slug":"wp-menu-custom-fields","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/wp-menu-custom-fields\/","author":4286506,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1","stable_tag":"1.1","tested":"6.7.5","requires":"5.4","requires_php":"7.0","requires_plugins":null,"header_name":"WP Menu Custom Fields","header_author":"rtCamp","header_description":"Adds custom fields on menu items under Appearance -> Menus and shows it on front-end.","assets_banners_color":"c7d8eb","last_updated":"2024-11-15 04:11:15","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/wp-menu-custom-fields\/","header_author_uri":"https:\/\/rtcamp.com","rating":5,"author_block_rating":0,"active_installs":700,"downloads":7078,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0":{"tag":"1.0","author":"rtcamp","date":"2020-04-03 10:20:41"},"1.0.1":{"tag":"1.0.1","author":"rtcamp","date":"2020-04-23 10:48:47"},"1.0.2":{"tag":"1.0.2","author":"juhise","date":"2021-03-18 07:05:16"},"1.1":{"tag":"1.1","author":"pavanpatil1","date":"2024-11-15 04:11:15"}},"upgrade_notice":{"":"<p>WP Menu Custom Fields v1.0.2, with added fix for Audio Shortcode.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2274802,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2274802,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2274871,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2274871,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1","1.0.2","1.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2802081,"resolution":"1","location":"assets","locale":""},"screenshot-10.png":{"filename":"screenshot-10.png","revision":2802081,"resolution":"10","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":2802081,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":2802081,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":2802081,"resolution":"4","location":"assets","locale":""},"screenshot-5.png":{"filename":"screenshot-5.png","revision":2802081,"resolution":"5","location":"assets","locale":""},"screenshot-6.png":{"filename":"screenshot-6.png","revision":2802081,"resolution":"6","location":"assets","locale":""},"screenshot-7.png":{"filename":"screenshot-7.png","revision":2802081,"resolution":"7","location":"assets","locale":""},"screenshot-8.png":{"filename":"screenshot-8.png","revision":2802081,"resolution":"8","location":"assets","locale":""},"screenshot-9.png":{"filename":"screenshot-9.png","revision":2802081,"resolution":"9","location":"assets","locale":""}},"screenshots":{"1":"Custom text field added under Appearance -&gt; Menus","2":"Custom text field (frontend)","3":"Custom image field added under Appearance -&gt; Menus from WP-Media","4":"Custom image field (frontend from WP-Media)","5":"Custom image field added under Appearance -&gt; Menus from image url","6":"Custom image field (frontend from image url)","7":"Custom shortcode field added under Appearance -&gt; Menus","8":"Custom shortcode field (frontend)","9":"Custom HTML field added under Appearance -&gt; Menus","10":"Custom HTML field (frontend)"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2859,183847],"plugin_category":[],"plugin_contributors":[214753,168729,155988,78551,78794,204531,78533,214754,154736,164498],"plugin_business_model":[],"class_list":["post-119480","plugin","type-plugin","status-publish","hentry","plugin_tags-navigation-menu","plugin_tags-navigation-menu-custom-fields","plugin_contributors-alvitazwar052","plugin_contributors-deepaklalwani","plugin_contributors-devikvekariya","plugin_contributors-gagan0123","plugin_contributors-kiranpotphode","plugin_contributors-pradeep1308","plugin_contributors-rtcamp","plugin_contributors-shreyasikhar26","plugin_contributors-sid177","plugin_contributors-vaishuagola27","plugin_committers-rtcamp"],"banners":{"banner":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/banner-772x250.png?rev=2274871","banner_2x":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/banner-1544x500.png?rev=2274871","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/icon-128x128.png?rev=2274802","icon_2x":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/icon-256x256.png?rev=2274802","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/screenshot-1.png?rev=2802081","caption":"Custom text field added under Appearance -&gt; Menus"},{"src":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/screenshot-2.png?rev=2802081","caption":"Custom text field (frontend)"},{"src":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/screenshot-3.png?rev=2802081","caption":"Custom image field added under Appearance -&gt; Menus from WP-Media"},{"src":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/screenshot-4.png?rev=2802081","caption":"Custom image field (frontend from WP-Media)"},{"src":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/screenshot-5.png?rev=2802081","caption":"Custom image field added under Appearance -&gt; Menus from image url"},{"src":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/screenshot-6.png?rev=2802081","caption":"Custom image field (frontend from image url)"},{"src":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/screenshot-7.png?rev=2802081","caption":"Custom shortcode field added under Appearance -&gt; Menus"},{"src":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/screenshot-8.png?rev=2802081","caption":"Custom shortcode field (frontend)"},{"src":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/screenshot-9.png?rev=2802081","caption":"Custom HTML field added under Appearance -&gt; Menus"},{"src":"https:\/\/ps.w.org\/wp-menu-custom-fields\/assets\/screenshot-10.png?rev=2802081","caption":"Custom HTML field (frontend)"}],"raw_content":"<!--section=description-->\n<p>This plugin adds custom fields on the menu item's edit interface of wp-admin and supports only 1-level menu configuration.\nBelow is the list of custom fields this plugin adds.<\/p>\n\n<ul>\n<li>Custom text<\/li>\n<li>Image selection with link and caption<\/li>\n<li>Shortcode with caption<\/li>\n<li>Custom HTML with TinyMCE editor<\/li>\n<\/ul>\n\n<p><strong>Notes:<\/strong><\/p>\n\n<ul>\n<li>This plugin works with default themes. In order to use it with custom themes, please add the necessary styling in your theme\/child theme to override the plugin's CSS.<\/li>\n<li>The custom fields from this plugin should be used in the submenu for well-structured and responsive UI.<\/li>\n<li>Currently, this plugin is not supported with FSE themes.<\/li>\n<\/ul>\n\n<h3>Usage<\/h3>\n\n<ol>\n<li>After installing and activating this plugin, goto Appearance -&gt; Menus of your WordPress admin. Create a menu if you haven't already and add menu items according to your need.<\/li>\n<li>When you expand any menu item, you'll see the custom fields added here (see screenshots below). You can see <strong>Custom Field<\/strong> and <strong>Select Feature<\/strong> options.<\/li>\n<li>Along with Custom Text field, you can choose to use either Image, Shortcode or Custom HTML feature for a particular menu item.<\/li>\n<li>You can click on the option you want to use and the input fields of that option will be visible.<\/li>\n<\/ol>\n\n<h4>Using Custom Text field<\/h4>\n\n<ul>\n<li>You can enter any text here and it'll be displayed with this menu item.<\/li>\n<li>This field can be used by all menu items along with any other feature.<\/li>\n<\/ul>\n\n<h4>Using Image<\/h4>\n\n<ul>\n<li>By clicking on <strong>Select Image<\/strong> button, WordPress' media gallery window will be opened up. You can choose 1 image from already uploaded images or you can upload a new one and select that.<\/li>\n<li>The selected image will be shown below <strong>Select Image<\/strong> button after you select and close the media gallery window.<\/li>\n<li>To remove already selected image, click on <strong>Select Image<\/strong> button and deselect the already selected image. You can change the selected image by selecting any other image.<\/li>\n<li>You can enter a URL in <strong>Image Link<\/strong> text field. On front-end, clicking on the image will lead to this URL.<\/li>\n<li>You can enter a caption text in <strong>Image Caption<\/strong> field and it'll be displayed below the image on the front-end.<\/li>\n<\/ul>\n\n<h4>Using Shortcode<\/h4>\n\n<ul>\n<li>You can add a shortcode in <strong>Shortcode<\/strong> field. We've added some stylings to handle WordPress' default <code>[video]<\/code> and <code>[audio]<\/code> shortcode.<\/li>\n<li>You can enter a caption text in <strong>Shortcode Caption<\/strong> field and it'll be displayed below the shortcode on the front-end.<\/li>\n<\/ul>\n\n<h4>Using Custom HTML<\/h4>\n\n<ul>\n<li>TinyMCE editor is used to add custom HTML here.<\/li>\n<li>From the <strong>Visual<\/strong> tab, you can enter text and format it using tools given in toolbar.<\/li>\n<li>You can switch to <strong>Text<\/strong> tab to see\/change HTML code of the text you entered.<\/li>\n<\/ul>\n\n<h3>Hooks<\/h3>\n\n<h4>wp_menu_custom_fields_image_html Filter<\/h4>\n\n<ul>\n<li>Allows to change HTML generated for image feature.<\/li>\n<li>There are 3 parameters. <code>$html<\/code> (Generated HTML), <code>$data<\/code> (Custom fields data), <code>$item_id<\/code> (Menu item ID).<\/li>\n<li><p>Example:<\/p>\n\n<pre><code>    [selected-feature] =&gt; image\n    [image] =&gt; Array\n        (\n            [media-id] =&gt; 11\n            [media-type] =&gt; image\n            [media-link] =&gt; https:\/\/google.com\/\n            [media-caption] =&gt; This is image caption\n            [media-url] =&gt; http:\/\/example.com\/wp-content\/uploads\/2020\/03\/92d43b978cbcdc7b33e3596d131d5256.jpg\n        )\n<\/code><\/pre><\/li>\n<\/ul>\n\n<h4>wp_menu_custom_fields_shortcode_html Filter<\/h4>\n\n<ul>\n<li>Allows to change HTML generated for shortcode feature.<\/li>\n<li>Parameters are same as <code>wp_menu_custom_fields_image_html<\/code>.<\/li>\n<li><p>Example:<\/p>\n\n<pre><code>    [selected-feature] =&gt; shortcode\n    [shortcode] =&gt; Array\n        (\n            [shortcode] =&gt; [video src=\"https:\/\/file-examples.com\/wp-content\/uploads\/2017\/04\/file_example_MP4_480_1_5MG.mp4\"]\n            [shortcode-caption] =&gt; This is a shortcode caption\n        )\n<\/code><\/pre><\/li>\n<\/ul>\n\n<h4>wp_menu_custom_fields_custom_markup_html Filter<\/h4>\n\n<ul>\n<li>Allows to change HTML generated for custom HTML feature.<\/li>\n<li>Parameters are same as <code>wp_menu_custom_fields_image_html<\/code>.<\/li>\n<li><p>Example:<\/p>\n\n<pre><code>    [selected-feature] =&gt; html\n    [html] =&gt; Array\n        (\n            [custom-html] =&gt; &lt;em&gt;&lt;strong&gt;This is custom HTML&lt;\/strong&gt;&lt;\/em&gt;\n        )\n<\/code><\/pre><\/li>\n<\/ul>\n\n<h4>wp_menu_custom_fields_custom_text_html Filter<\/h4>\n\n<ul>\n<li>Allows to change HTML generated for custom text field.<\/li>\n<li>Parameters are same as <code>wp_menu_custom_fields_image_html<\/code>.<\/li>\n<li><p>Example:<\/p>\n\n<pre><code>    [custom-text] =&gt; This is a custom text\n<\/code><\/pre><\/li>\n<\/ul>\n\n<h4>wp_menu_custom_fields_fields_html Filter<\/h4>\n\n<ul>\n<li>Allows to change the final custom field's HTML generated for a particular menu item.<\/li>\n<li>Parameters are same as <code>wp_menu_custom_fields_image_html<\/code>.<\/li>\n<li><p>Example:<\/p>\n\n<pre><code>    Array\n    (\n        [custom-text] =&gt; This is a custom text\n        [selected-feature] =&gt; image\n        [image] =&gt; Array\n            (\n                [media-id] =&gt; 11\n                [media-type] =&gt; image\n                [media-link] =&gt; https:\/\/google.com\n                [media-caption] =&gt; This is image caption\n                [media-url] =&gt; http:\/\/example.com\/wp-content\/uploads\/2020\/03\/92d43b978cbcdc7b33e3596d131d5256.jpg\n            )\n\n    )\n<\/code><\/pre><\/li>\n<\/ul>\n\n<h3>Styling mega menu<\/h3>\n\n<p>A theme developer can add stylings for the custom fields added by this plugin by referring to the below sample HTML code.<\/p>\n\n<ul>\n<li><p>Image &amp; Custom text<\/p>\n\n<ul>\n<li><p>Sample HTML code<\/p>\n\n<pre><code>    &lt;div class=\"rt-wp-menu-custom-fields-wrapper\" style=\"padding-top: 10px; padding-right: 20px;\"&gt;\n        &lt;div class=\"rt-wp-menu-custom-fields-image-wrapper\"&gt;\n            &lt;a href=\"https:\/\/google.com\"&gt;\n                &lt;img class=\"rt-wp-menu-custom-fields-image\" src=\"http:\/\/example.com\/wp-content\/uploads\/2020\/03\/92d43b978cbcdc7b33e3596d131d5256.jpg\"&gt;\n            &lt;\/a&gt;\n            &lt;span class=\"rt-wp-menu-custom-fields-image-caption\"&gt;This is an image caption&lt;\/span&gt;\n        &lt;\/div&gt;\n        &lt;span class=\"rt-wp-menu-custom-fields-custom-text\"&gt;This is a custom text&lt;\/span&gt;\n    &lt;\/div&gt;\n<\/code><\/pre><\/li>\n<li><p>If <strong>Image Link<\/strong> is entered, then <code>img<\/code> tag will be wrapped inside <code>a<\/code>.<\/p><\/li>\n<li>Custom text will be displayed below the feature's HTML.<\/li>\n<\/ul><\/li>\n<li><p>Shortcode<\/p>\n\n<pre><code>        &lt;div class=\"rt-wp-menu-custom-fields-shortcode-wrapper\"&gt;\n            &lt;div class=\"rt-wp-menu-custom-fields-shortcode\"&gt;\n                &lt;!-- shortcode HTML will be here --&gt;\n            &lt;\/div&gt;\n            &lt;span class=\"rt-wp-menu-custom-fields-shortcode-caption\"&gt;This is shortcode caption!&lt;\/span&gt;\n        &lt;\/div&gt;\n<\/code><\/pre><\/li>\n<li><p>Custom HTML<\/p>\n\n<pre><code>        &lt;div class=\"rt-wp-menu-custom-fields-custom-html\"&gt;Welcome to &lt;strong&gt;WordPress&lt;\/strong&gt;. This is your first post. Edit or delete it, then start &lt;em&gt;writing&lt;\/em&gt;!&lt;\/div&gt;\n<\/code><\/pre><\/li>\n<\/ul>\n\n<h3>Important Links<\/h3>\n\n<ul>\n<li><a href=\"https:\/\/github.com\/rtCamp\/wp-menu-custom-fields\">GitHub<\/a> - Please mention your wordpress.org username when sending pull requests.<\/li>\n<\/ul>\n\n<h3>License<\/h3>\n\n<p>Same <a href=\"http:\/\/www.gnu.org\/licenses\/gpl-2.0.txt\">GPL<\/a> that WordPress uses!<\/p>\n\n<h3>See room for improvement?<\/h3>\n\n<p>Great! There are several ways you can get involved to help make this plugin better:<\/p>\n\n<ol>\n<li><strong>Report Bugs:<\/strong> If you find a bug, error or other problem, please report it! You can do this by <a href=\"https:\/\/github.com\/rtCamp\/wp-menu-custom-fields\/issues\">creating a new topic<\/a> in the issue tracker.<\/li>\n<li><strong>Suggest New Features:<\/strong> Have an awesome idea? Please share it! Simply <a href=\"https:\/\/github.com\/rtCamp\/wp-menu-custom-fields\/issues\">create a new topic<\/a> in the issure tracker to express your thoughts on why the feature should be included and get a discussion going around your idea.<\/li>\n<\/ol>\n\n<!--section=installation-->\n<ol>\n<li>Extract the zip file.<\/li>\n<li>Upload it to the <code>\/wp-content\/plugins\/<\/code> directory in your WordPress installation.<\/li>\n<li>Activate the WP Menu Custom Fields from your Plugins page.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.1<\/h4>\n\n<p>FIXED\n * Fix UI bugs with default themes\n * Fix fatal error related to unknown format specifier with PHP v8.x.x\n * Fix image not showing when added with a link<\/p>\n\n<h4>1.0.2<\/h4>\n\n<p>FIXED\n * Fix audio Shortcode not rendering on frontend\n * Fix few notices<\/p>\n\n<h4>1.0.1<\/h4>\n\n<p>FIXED\n * Class <code>WP_Menu_Custom_Fields\\Inc\\Plugin<\/code> not found error on Windows platform<\/p>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"This plugin adds custom fields on menu item&#039;s edit interface of wp-admin.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/119480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=119480"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/rtcamp"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=119480"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=119480"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=119480"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=119480"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=119480"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=119480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}