{"id":20010,"date":"2012-09-22T21:45:43","date_gmt":"2012-09-22T21:45:43","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/p2p-slides\/"},"modified":"2012-09-22T21:45:43","modified_gmt":"2012-09-22T21:45:43","slug":"p2p-slides","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/p2p-slides\/","author":8031383,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0","stable_tag":"1.0","tested":"3.5.2","requires":"3.4.2","requires_php":"","requires_plugins":"","header_name":"P2P Slides","header_author":"Christopher Davis","header_description":"","assets_banners_color":"","last_updated":"2012-09-22 21:45:43","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.pwsausa.org\/give.htm","header_plugin_uri":"https:\/\/github.com\/chrisguitarguy\/P2P-Slides","header_author_uri":"http:\/\/christopherdavis.me","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2916,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.0":"<ul>\n<li>It&#039;s new. try it.<\/li>\n<\/ul>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1539407","resolution":"1","location":"plugin"}},"screenshots":{"1":"The meta box."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[47686,611,612],"plugin_category":[50],"plugin_contributors":[78121],"plugin_business_model":[],"class_list":["post-20010","plugin","type-plugin","status-publish","hentry","plugin_tags-posts-to-posts","plugin_tags-slider","plugin_tags-slides","plugin_category-media","plugin_contributors-chrisguitarguy","plugin_committers-chrisguitarguy"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/p2p-slides.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/p2p-slides\/trunk\/screenshot-1.png?rev=1539407","caption":"The meta box."}],"raw_content":"<!--section=description-->\n<p><strong>Note:<\/strong> This plugin requires <a href=\"http:\/\/wordpress.org\/extend\/plugins\/posts-to-posts\/\">Posts 2 Posts<\/a><\/p>\n\n<p>Allows you to associate a custom post type (\"slides\") with any of your other post\ntypes (defaults to \"pages\").  This is useful for theme developers of those that\nwant to add custom sliders around your theme.<\/p>\n\n<p>This plugin does not provide you out of the box front end functionality. If you're\nlooking for a drop in and play slider, this isn't it.<\/p>\n\n<!--section=installation-->\n<p>First, install and active <a href=\"http:\/\/wordpress.org\/extend\/plugins\/posts-to-posts\/\">Posts 2 Posts<\/a>.<\/p>\n\n<p>Then, use the WordPress installer to install this plugin or ...<\/p>\n\n<ol>\n<li>Click the big orrange button to download the plugin<\/li>\n<li>Unzip the plugin files<\/li>\n<li>Upload the <code>p2p-slides<\/code> folder to your <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin in the admin area<\/li>\n<\/ol>\n\n<p>After installing, you should see a new meta box on your edit screen for pages.<\/p>\n\n<p>If you wish to modify what post types get associated with slides, simply hook\ninto <code>after_setup_theme<\/code> and add theme support for <code>p2p-slides<\/code>.<\/p>\n\n<pre><code>&lt;?php\nadd_action('after_setup_theme', 'my_special_setup');\nfunction my_special_setup()\n{\n    \/\/ this is the same as just having the plugin installed\n    add_theme_support('p2p-slides');\n\n    add_theme_support('p2p-slides', array('a-post-type', 'another-post-type'));\n}\n<\/code><\/pre>\n\n<p>To use the slides, you'll need to check the <code>slides<\/code> property of each <code>$post<\/code>.<\/p>\n\n<pre><code>&lt;?php\n\/\/ start the loop as normal\nwhile(have_posts()): the_post();\n?&gt;\n\n    &lt;?php if($post-&gt;slides): ?&gt;\n        We have slides! Loop through them.\n        &lt;?php foreach($post-&gt;slides as $slide): ?&gt;\n            Do stuff with $slide here, it's just a post object\n        &lt;?php endforeach; ?&gt;\n    &lt;?php endif; ?&gt;\n\n&lt;?php endwhile; ?&gt;\n<\/code><\/pre>\n\n<p>You can find a more complete example, in the form of a page template for <code>twentyeleven<\/code> in the P2P Slides' <code>inc<\/code> directory.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>Why no front end prettiness?<\/dt>\n<dd><p>Because that's a theme's job.  This plugin is only meant to provide you with\ntools to extend your theme or child theme.<\/p><\/dd>\n<dt>Is this Posts 2 Posts legit?<\/dt>\n<dd><p>Yes. <a href=\"http:\/\/wordpress.org\/extend\/plugins\/posts-to-posts\/\">Posts 2 Posts<\/a>\nis amazing.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial version.<\/li>\n<\/ul>","raw_excerpt":"A slider that uses Posts 2 Posts to associate post types with a new, custom slide post type.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/20010","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=20010"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/chrisguitarguy"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=20010"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=20010"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=20010"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=20010"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=20010"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=20010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}