{"id":19828,"date":"2012-09-09T19:49:00","date_gmt":"2012-09-09T19:49:00","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/easy-widgets\/"},"modified":"2012-09-17T15:10:07","modified_gmt":"2012-09-17T15:10:07","slug":"easy-widgets","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/easy-widgets\/","author":7956269,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.1.1","stable_tag":"1.1.1","tested":"3.4.2","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Easy Widgets","header_author":"Talasan Nicholson","header_description":"","assets_banners_color":"","last_updated":"2012-09-17 15:10:07","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/easy-widgets\/","header_author_uri":"http:\/\/www.nicholsonws.com\/","rating":3.7,"author_block_rating":0,"active_installs":10,"downloads":1881,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":"1","2":0,"3":0,"4":0,"5":"2"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1","1.1.1"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[5176,20955,241],"plugin_category":[43],"plugin_contributors":[91654],"plugin_business_model":[],"class_list":["post-19828","plugin","type-plugin","status-closed","hentry","plugin_tags-custom-widgets","plugin_tags-dynamic-widgets","plugin_tags-widgets","plugin_category-customization","plugin_contributors-outthislife","plugin_committers-outthislife"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/easy-widgets.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Easy Widgets plugin provides an API to easily add widgets in WordPress.<\/p>\n\n<h4>Example of Use<\/h4>\n\n<ol>\n<li>Create a file \"widgets.php\" in your themes \/inc\/ folder<\/li>\n<li>In functions.php use locate_template to include your widgets.php file: locate_template(array('\/inc\/widgets.php'), true);<\/li>\n<li><p>In widgets.php, do something like below:<\/p>\n\n<pre><code>\/**\n * Custom widgets.\n *\/\n\n$prefix = 'replaceMe_';\n$widgets = array();\n\n\/\/ -----------------------------------------------\n\n\/**\n * easyBox widget\n *\/\n$widgets[] = array(\n    'id' =&gt; 'easyBox',\n    'title' =&gt; $prefix.'easyBox',\n    'desc' =&gt; 'Create a simple text widget',\n\n    \/\/ All fields can be called by their\n    \/\/ simple variables: title =&gt; $title\n    'fields' =&gt; array(\n        array(\n            'name' =&gt; 'Title',\n            'id' =&gt; 'title',\n            'type' =&gt; 'text'\n        ),\n\n        array(\n            'name' =&gt; 'Body',\n            'id' =&gt; 'body',\n            'type' =&gt; 'textarea'\n        ),\n\n        array(\n            'name' =&gt; 'Category',\n            'id' =&gt; 'category',\n            'type' =&gt; 'select',\n            'options' =&gt; array(\n                'one',\n                'two',\n                'three'\n            )\n        )\n    ),\n\n    \/\/ This is what will appear in the sidebar as HTML\n    'output' =&gt; '\n        &lt;article class=\"easyBox\"&gt;\n            &lt;h1&gt;&lt;?=$title?&gt;&lt;\/h1&gt;\n            &lt;small&gt;&lt;?=$category?&gt;&lt;\/small&gt;\n            &lt;p&gt;&lt;?=$body?&gt;&lt;\/p&gt;\n        &lt;\/article&gt;\n    '\n);\n\n\/\/ -----------------------------------------------\n\n\/**\n * Iterate and register the widgets\n *\/\nif (class_exists('WidgetCreator')) {\n    foreach ($widgets AS &amp;$w) {\n        $WC = new WidgetCreator($w);\n        eval($WC-&gt;render());\n    }\n}\n\nelse trigger_error('WidgetCreator does not exist.', E_USER_ERROR);\n<\/code><\/pre><\/li>\n<\/ol>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Easily create custom widgets to use on your website.<\/li>\n<li>Lets you control the output of the widget.<\/li>\n<li>Flawlessly integrates itself into your themes.<\/li>\n<\/ul>\n\n<h4>Supported Field Types<\/h4>\n\n<ul>\n<li>text<\/li>\n<li>textarea<\/li>\n<li>checkbox<\/li>\n<li>select<\/li>\n<\/ul>\n\n<p>More to come soon, as it seems necessary. You may request new fields.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload \/easy-widgets\/ to wp-content\/plugins\/ directory.<\/li>\n<li>Activate the plugin via the Plugins menu in WordPress.<\/li>\n<li>Follow the sample document.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>Why do widgets start with a \"!\"?<\/dt>\n<dd><p>This pushes the widget to the top of the widgets list, allowing your custom widgets to come first.<\/p><\/dd>\n<dt>Can I use HTML?<\/dt>\n<dd><p>Yes, you may use basic tags:\n        <strong><a><br \/><\/a><\/strong><\/p>\n\n<p>&lt;<\/p>\n\n<p>p&gt;<\/p>\n\n<p>&lt;<\/p>\n\n<p>iframe&gt;<\/p>\n\n<p>&lt;<\/p>\n\n<p>ul&gt;<li><\/li><\/p>\n\n<p>&lt;<\/p>\n\n<p>ol&gt;<em><\/em><\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Added a few new HTML tags<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Added select support<\/li>\n<li>Streamlined some string concatenation<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Listed on WP.<\/li>\n<\/ul>","raw_excerpt":"Easy Widgets plugin lets you easily create widgets in WordPress.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/19828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=19828"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/outthislife"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=19828"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=19828"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=19828"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=19828"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=19828"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=19828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}