{"id":21996,"date":"2013-02-11T04:31:42","date_gmt":"2013-02-11T04:31:42","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/easy-featured-content\/"},"modified":"2014-05-23T16:56:52","modified_gmt":"2014-05-23T16:56:52","slug":"easy-featured-content","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/easy-featured-content\/","author":168057,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.0","stable_tag":"1.1.0","tested":"3.9.40","requires":"3.5.1","requires_php":"","requires_plugins":"","header_name":"Easy Featured Content","header_author":"Nick Ohrn of Plugin-Developer.com","header_description":"","assets_banners_color":"","last_updated":"2014-05-23 16:56:52","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"http:\/\/plugin-developer.com\/","rating":5,"author_block_rating":0,"active_installs":40,"downloads":5178,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.1.0":"<p>Only posts and pages can be featured by default now - if you wish to have other post types featurable, use <code>add_post_type_support<\/code> as detailed in the FAQ section<\/p>","1.0.0":"<p>Initial release of plugin<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"2"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0","1.1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"666355","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"666355","resolution":"2","location":"assets"}},"screenshots":{"1":"This is the metabox that will appear on all editing screens after plugin activation","2":"This screenshot shows the links you can click to feature or unfeature any content on your site"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[83,11887],"plugin_category":[],"plugin_contributors":[79208],"plugin_business_model":[],"class_list":["post-21996","plugin","type-plugin","status-publish","hentry","plugin_tags-admin","plugin_tags-featured-content","plugin_contributors-nickohrn","plugin_committers-nickohrn"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/easy-featured-content.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/easy-featured-content\/assets\/screenshot-1.png?rev=666355","caption":"This is the metabox that will appear on all editing screens after plugin activation"},{"src":"https:\/\/ps.w.org\/easy-featured-content\/assets\/screenshot-2.png?rev=666355","caption":"This screenshot shows the links you can click to feature or unfeature any content on your site"}],"raw_content":"<!--section=description-->\n<p>Quickly and easily mark any content that has an editing UI in the WordPress administrative section as featured. This plugin\nalso provides a template tag that you can use to display certain markup or styles for featured content and a query\nvariable that allows you to query for featured (or non-featured) content.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>featured-content<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Indicate featured content through the row actions on the content management screen or the meta box in the content editing screen<\/li>\n<li>Use the query variable <code>is_featured<\/code> in your queries or the template tag <code>featured_content_is_featured_content<\/code> in your templates<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How do I make a post type featurable?<\/dt>\n<dd><p>By default, the plugin only allows posts and pages to be featured. However, if you have a custom post type, you can easily add featured content support by modifying the following snippet:<\/p>\n\n<pre><code>function register_featured_content_support() {\n    \/\/ Adds featured content support to the custom post type 'my-post-type-slug'\n    add_post_type_support('my-post-type-slug', 'featured-content');\n\n    \/\/ Removes featured content support from pages\n    remove_post_type_support('page', 'featured-content');\n}\nadd_filter('after_setup_theme', 'register_featured_content_support');\n<\/code><\/pre><\/dd>\n<dt>Why would I want to use this plugin?<\/dt>\n<dd><p>If you have content on your site that you want to feature (maybe on the home page or in a sidebar) then you can use this plugin\nto enable marking that content as featured. It works for any post type that provides an editing UI.<\/p><\/dd>\n<dt>How do I use the query variable?<\/dt>\n<dd><p>In your custom queries (<code>new WP_Query<\/code>, <code>get_posts<\/code> or <code>query_posts<\/code>) simply pass in the query variable <code>is_featured<\/code> as follows:<\/p>\n\n<pre><code>$featured_posts = new WP_Query(array('is_featured' =&gt; 'yes', 'post_type' =&gt; 'post'));\n<\/code><\/pre>\n\n<p>If you need to get only non featured content, you would do something like the following:<\/p>\n\n<pre><code>$non_featured_posts = new WP_Query(array('is_featured' =&gt; 'no', 'post_type' =&gt; 'post'));\n<\/code><\/pre><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Better security<\/li>\n<li>Code cleanup<\/li>\n<li>Use <code>has_post_type_support<\/code> and <code>add_post_type_support<\/code><\/li>\n<li>Only posts and pages support featured content by default now<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release of plugin<\/li>\n<\/ul>","raw_excerpt":"This plugin allows you to mark content as featured and use the designation in your queries and via a template tag.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/21996","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=21996"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/nickohrn"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=21996"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=21996"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=21996"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=21996"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=21996"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=21996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}