{"id":17471,"date":"2012-03-24T03:35:35","date_gmt":"2012-03-24T03:35:35","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/maga-category-images\/"},"modified":"2013-01-12T02:24:32","modified_gmt":"2013-01-12T02:24:32","slug":"maga-category-images","status":"publish","type":"plugin","link":"https:\/\/pl.wordpress.org\/plugins\/maga-category-images\/","author":9204344,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.1","stable_tag":"trunk","tested":"3.5.2","requires":"3.3.1","requires_php":"","requires_plugins":"","header_name":"Maga Category Images","header_author":"Ricardo Magallanes Arco (@rMaga56)","header_description":"","assets_banners_color":"","last_updated":"2013-01-12 02:24:32","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/divisionentrecero.mx","header_author_uri":"http:\/\/divisionentrecero.mx","rating":0,"author_block_rating":0,"active_installs":10,"downloads":3249,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[89,163],"plugin_category":[50],"plugin_contributors":[93770],"plugin_business_model":[],"class_list":["post-17471","plugin","type-plugin","status-publish","hentry","plugin_tags-category","plugin_tags-images","plugin_category-media","plugin_contributors-maga56","plugin_committers-maga56"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/maga-category-images.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Maga Category Images v1.2.1 By Ricardo Magallanes.<\/p>\n\n<p>Associates an image file (jpg or png) to a given category.<\/p>\n\n<h3>Upgrading to 1.2.1<\/h3>\n\n<p>If you are upgrading from an older version of this plugin it is very important that you backup your img folder found on this plugin's directory before you upgrade.<\/p>\n\n<p>After you update the plugin overwrite the img folder with the old one, otherwise you will lose your images.<\/p>\n\n<p>I will provide a fix so that this is not necessary on the next update. Sorry for the inconvenience.<\/p>\n\n<h3>1.2.1<\/h3>\n\n<p>I reorganized the files so that the automatic plugin installer would work properly.<\/p>\n\n<h3>1.2<\/h3>\n\n<p>Addressed several bugfixes regarding the wordpress prefix and some icons that weren't visible.<\/p>\n\n<p>The category selection box now features a recursive function to traverse through all the categories at all levels.<\/p>\n\n<h3>1.1<\/h3>\n\n<p>Added a table where you can view the images that are assigned to the category and added a cleanup functions that will clean\nthe database of all records that belong to categories that are not in wordpress anymore.<\/p>\n\n<p>For any bug reports, comments or feedback, please email me at ricardo.magallanes@gmail.com<\/p>\n\n<!--section=installation-->\n<p>Setup Instructions:<\/p>\n\n<ol>\n<li><p>Drag the 'maga-category-images' folder into your Plugins Folder.<\/p><\/li>\n<li><p>Find the plugin in the Wordpress Admin and Activate it.<\/p><\/li>\n<li><p>After Activation you will find the 'Category Images' section under Settings.<\/p><\/li>\n<li><p>Fill out the form, choosing the images you want and the category you wish to associate them with.<\/p><\/li>\n<li><p>In your wordpress theme.. you can use two functions that are called invoking the $maga object.<\/p>\n\n<p>$maga-&gt;getSpecficImage($id) : Returns the url of the image corresponding to that category. This method can be used anywhere as long as you can fetch the ID you want.<\/p>\n\n<p>$maga-&gt;getImageInCategory : Returns the url of the image corresponding to the category you are currently browsing. This method is better suited for its use in your category.php files.<\/p><\/li>\n<\/ol>\n\n<p>Example Usage:<\/p>\n\n<pre><code>&lt;?php if($maga) : ?&gt;\n        &lt;img src = \"&lt;?php echo $maga-&gt;getImageInCategory(); ?&gt;\"\/&gt;       \n&lt;?php endif; ?&gt; \n\n&lt;?php if($maga) : ?&gt;\n        &lt;img src = \"&lt;?php echo $maga-&gt;getSpecificImage(3); ?&gt;\"\/&gt;        \n&lt;?php endif; ?&gt;\n<\/code><\/pre>","raw_excerpt":"Maga Category Images v1.2.1 By Ricardo Magallanes. Associates an image file (jpg or png) to a given category.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/17471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=17471"}],"author":[{"embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/maga56"}],"wp:attachment":[{"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=17471"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=17471"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=17471"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=17471"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=17471"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pl.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=17471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}