{"id":32410,"date":"2014-10-21T00:17:35","date_gmt":"2014-10-21T00:17:35","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/widgets-in-menu\/"},"modified":"2018-06-27T04:16:21","modified_gmt":"2018-06-27T04:16:21","slug":"widgets-in-menu","status":"publish","type":"plugin","link":"https:\/\/ewe.wordpress.org\/plugins\/widgets-in-menu\/","author":3953804,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.0","stable_tag":"trunk","tested":"4.7.33","requires":"3.5","requires_php":"","requires_plugins":"","header_name":"Widgets in Menu for WordPress","header_author":"saurabhshukla, yapapaya","header_description":"","assets_banners_color":"d0d8bb","last_updated":"2018-06-27 04:16:21","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/plugins\/widgets-in-menu\/","header_author_uri":"http:\/\/github.com\/yapapaya\/","rating":4.8,"author_block_rating":0,"active_installs":9000,"downloads":106792,"num_ratings":21,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"0.2.1":"<p>Fixed a notice. See changelog for details.<\/p>"},"ratings":{"1":"1","2":0,"3":0,"4":"1","5":"19"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1013882","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1013882","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1013882","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.0.1","0.1.0","0.1.1","0.2.0","0.2.1","1.0.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1013882","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1013882","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1013882","resolution":"3","location":"assets"},"screenshot-4.png":{"filename":"screenshot-4.png","revision":"1013882","resolution":"4","location":"assets"},"screenshot-5.png":{"filename":"screenshot-5.png","revision":"1013882","resolution":"5","location":"assets"}},"screenshots":{"1":"Add any widget to the 'Widgets in Menu' widget area.","2":"Your widgets appear in an new metabox on the Edit Menus screen.","3":"Add your widget to any menu, just like you add pages or posts.","4":"Your widget starts appearing in the navigation menu.","5":"Add css as per taste to finalise the look."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[40481,231,241],"plugin_category":[],"plugin_contributors":[78535],"plugin_business_model":[],"class_list":["post-32410","plugin","type-plugin","status-publish","hentry","plugin_tags-custom-link","plugin_tags-menus","plugin_tags-widgets","plugin_contributors-saurabhshukla","plugin_committers-saurabhshukla"],"banners":{"banner":"https:\/\/ps.w.org\/widgets-in-menu\/assets\/banner-772x250.png?rev=1013882","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/widgets-in-menu\/assets\/icon-128x128.png?rev=1013882","icon_2x":"https:\/\/ps.w.org\/widgets-in-menu\/assets\/icon-256x256.png?rev=1013882","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/widgets-in-menu\/assets\/screenshot-1.png?rev=1013882","caption":"Add any widget to the 'Widgets in Menu' widget area."},{"src":"https:\/\/ps.w.org\/widgets-in-menu\/assets\/screenshot-2.png?rev=1013882","caption":"Your widgets appear in an new metabox on the Edit Menus screen."},{"src":"https:\/\/ps.w.org\/widgets-in-menu\/assets\/screenshot-3.png?rev=1013882","caption":"Add your widget to any menu, just like you add pages or posts."},{"src":"https:\/\/ps.w.org\/widgets-in-menu\/assets\/screenshot-4.png?rev=1013882","caption":"Your widget starts appearing in the navigation menu."},{"src":"https:\/\/ps.w.org\/widgets-in-menu\/assets\/screenshot-5.png?rev=1013882","caption":"Add css as per taste to finalise the look."}],"raw_content":"<!--section=description-->\n<p>Allows you to add Widgets in WordPress Navigation Menus via a custom widget area and an extra box in menu edit screen.<\/p>\n\n<blockquote>\n  <p><strong>Warning<\/strong><\/p>\n  \n  <p>You will need to have some CSS skills for the widgets to display properly in nav menus.<\/p>\n<\/blockquote>\n\n<h4>Usage<\/h4>\n\n<p><a href=\"https:\/\/wordpress.org\/plugins\/widgets-in-menu\/screenshots\">View the screenshots<\/a> for usage instructions.<\/p>\n\n<h4>Source code and Contributions<\/h4>\n\n<p><a href=\"https:\/\/github.com\/yapapaya\/Widgets-In-Menu-for-WordPress\">Fork on Github<\/a><\/p>\n\n<p>Contributions are always welcome<\/p>\n\n<h4>Documentation<\/h4>\n\n<ul>\n<li>Most documentation is inline.<\/li>\n<li>The hooks (actions and filters) are documented in the <a href=\"https:\/\/wordpress.org\/plugins\/widgets-in-menu\/other_notes\/\">Other Notes<\/a>.<\/li>\n<li>Some useful stuff is in the <a href=\"https:\/\/wordpress.org\/plugins\/widgets-in-menu\/faq\/\">FAQ section<\/a>.<\/li>\n<\/ul>\n\n<h3>Hooks<\/h3>\n\n<h4>Actions<\/h4>\n\n<p><strong>yawp_wim_pre_callback<\/strong><\/p>\n\n<p>Fires before a widget's display callback is called. Similar to 'dynamic_sidebar' action.<\/p>\n\n<p><em>Parameters<\/em><\/p>\n\n<ul>\n<li><em>$yawp_wim_widget<\/em>    array    An associative array of widget arguments.\n\n<ol>\n<li>string <em>$name<\/em> Name of the widget.<\/li>\n<li>string <em>$id<\/em> Widget ID.<\/li>\n<li>array|callback <em>$callback<\/em> When the hook is fired on the front-end, $callback is an array containing the widget object. Fired on the back-end, $callback is 'wp_widget_control', see $_callback.<\/li>\n<li>array <em>$params<\/em> An associative array of multi-widget arguments.<\/li>\n<li>string <em>$classname<\/em> CSS class applied to the widget container.<\/li>\n<li>string <em>$description<\/em> The widget description.<\/li>\n<li>array <em>$_callback<\/em> When the hook is fired on the back-end, $_callback is populated with an array containing the widget object, see $callback.<\/li>\n<\/ol><\/li>\n<\/ul>\n\n<h4>Filters<\/h4>\n\n<p><strong>yawp_wim_attribute_prefix<\/strong><\/p>\n\n<p>Filters the prefix used in class\/id attributes in html display.<\/p>\n\n<p><em>Parameters<\/em><\/p>\n\n<ul>\n<li><em>$default_prefix<\/em>    string   The default prefix: 'yawp_wim'<\/li>\n<\/ul>\n\n<p><strong>yawp_wim_widget_params<\/strong><\/p>\n\n<p>Filter the parameters passed to the widget's display callback. Similar to 'dynamic_sidebar_params' filter<\/p>\n\n<p><em>Parameters<\/em><\/p>\n\n<ul>\n<li><em>$params<\/em>    array\n\n<ol>\n<li>array   <em>$args<\/em> An array of widget display arguments.\n\n<ol>\n<li>string <em>$name<\/em> Name of the sidebar the widget is assigned to.<\/li>\n<li>string <em>$id<\/em> ID of the sidebar the widget is assigned to.<\/li>\n<li>string <em>$description<\/em> The sidebar description.<\/li>\n<li>string <em>$class<\/em> CSS class applied to the sidebar container.<\/li>\n<li>string <em>$before_widget<\/em> HTML markup to prepend to each widget in the sidebar.<\/li>\n<li>string <em>$after_widget<\/em> HTML markup to append to each widget in the sidebar.<\/li>\n<li>string <em>$before_title<\/em> HTML markup to prepend to the widget title when displayed.<\/li>\n<li>string <em>$after_title<\/em> HTML markup to append to the widget title when displayed.<\/li>\n<li>string <em>$widget_id<\/em> ID of the widget.<\/li>\n<li>string <em>$widget_name<\/em> Name of the widget. }<\/li>\n<\/ol><\/li>\n<li>array   <em>$widget_args<\/em>  An array of multi-widget arguments.\n\n<ol>\n<li>int <em>$number<\/em> Number increment used for multiples of the same widget.<\/li>\n<\/ol><\/li>\n<\/ol><\/li>\n<\/ul>\n\n<p><strong>yawp_wim_no_widgets_message<\/strong><\/p>\n\n<p>Filters the html displayed if no widgets are present in the sidebar.<\/p>\n\n<p><em>Parameters<\/em><\/p>\n\n<ul>\n<li><strong>$no_widgets_output<\/strong>   array   The default output<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ul>\n<li>Install the plugin from the 'Plugins' section in your dashboard (Go to Plugins &gt; Add New &gt; Search and search for <em>Widgets in Menu for WordPress<\/em>).<\/li>\n<li>Alternatively, you can download the plugin from the repository. Unzip it and upload it to the plugins folder of your WordPress installation (wp-content\/plugins\/ directory of your WordPress installation).<\/li>\n<li>Activate it through the 'Plugins' section.<\/li>\n<\/ul>\n\n<!--section=faq-->\n<p><em>The widgets show up, but the display is all messed up.<\/em><\/p>\n\n<p>That's because the css for the nav menu was never meant to take care of widgets.<\/p>\n\n<p>For example, if the widget contains a link, you might have to redo it. If it's a calendar:<\/p>\n\n<pre><code>.yawp_wim_wrap a {\nwidth: auto !important;\npadding: 0 !important;\n}\n<\/code><\/pre>\n\n<p><em>How does one style the widgets?<\/em><\/p>\n\n<p>Inspect element is your friend. Otherwise, the menu item will have the classes <em>menu-item-type-yawp_wim<\/em>, <em>menu-item-object-yawp_wim<\/em>.<\/p>\n\n<p>Additionally, the widget will be wrapped in a div with the class <em>yawp_wim_wrap<\/em>.<\/p>\n\n<p>Using these selectors, one can style the widgets.<\/p>\n\n<p>Also, using various filters (see: Other Notes), especially <em>yawp_wim_attribute_prefix<\/em>, you can change this <em>yawp_wim<\/em> prefix to something of your own:<\/p>\n\n<pre><code>add_filter('yawp_wim_attribute_prefix','my_prefix');\n\nfunction my_prefix($default_prefix){\n    return 'my_prefix';\n}\n<\/code><\/pre>\n\n<p>The wrapper class will now be <em>my_prefix_wrap<\/em> and so on.<\/p>\n\n<p><em>How does one use the plugin?<\/em><\/p>\n\n<p><a href=\"https:\/\/wordpress.org\/plugins\/widgets-in-menu\/screenshots\">View the screenshots<\/a> for usage instructions.<\/p>\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ul>\n<li>Install the plugin from the 'Plugins' section in your dashboard (Go to Plugins &gt; Add New &gt; Search and search for <em>Widgets in Menu for WordPress<\/em>).<\/li>\n<li>Alternatively, you can download the plugin from the repository. Unzip it and upload it to the plugins folder of your WordPress installation (wp-content\/plugins\/ directory of your WordPress installation).<\/li>\n<li>Activate it through the 'Plugins' section.<\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Fixed i18n issues.<\/li>\n<li>Added Composer support<\/li>\n<li>Fix issues with empty widget titles thanks to Niklas Rosenqvist<\/li>\n<\/ul>\n\n<h4>0.2.1<\/h4>\n\n<ul>\n<li>Fixed notice.<\/li>\n<li>Moved attribute prefix to main file.<\/li>\n<\/ul>\n\n<h4>0.2.0<\/h4>\n\n<ul>\n<li>Refactored code completely in line with WP standards.<\/li>\n<li>Fixed notices by overriding WP's default add menu item function.<\/li>\n<\/ul>\n\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>Added translation support.<\/li>\n<li>Added label for single menu item.<\/li>\n<li>Added Widget type + Set title just like widget areas.<\/li>\n<li>Improved js.<\/li>\n<li>Added minified js.<\/li>\n<li>Better filter for html element attribute.<\/li>\n<li>Better inline documentation.<\/li>\n<li>Improved readme and help.<\/li>\n<li>Added screenshots.<\/li>\n<\/ul>\n\n<h4>0.0.1<\/h4>\n\n<ul>\n<li>Initial Plugin uploaded.<\/li>\n<\/ul>","raw_excerpt":"Allows you to add Widgets in WordPress Navigation Menus","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/32410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=32410"}],"author":[{"embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/saurabhshukla"}],"wp:attachment":[{"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=32410"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=32410"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=32410"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=32410"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=32410"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ewe.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=32410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}