{"id":61401,"date":"2012-11-13T09:33:06","date_gmt":"2012-11-13T09:33:06","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/sub-posts\/"},"modified":"2013-02-26T11:47:32","modified_gmt":"2013-02-26T11:47:32","slug":"sub-posts","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/sub-posts\/","author":9216909,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.2 BETA","stable_tag":"trunk","tested":"3.5.2","requires":"3.1","requires_php":"","requires_plugins":"","header_name":"Sub Posts","header_author":"Barry Kooij","header_description":"","assets_banners_color":"","last_updated":"2013-02-26 11:47:32","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/www.barrykooij.com\/sub-posts\/","header_author_uri":"http:\/\/www.barrykooij.com\/","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1915,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","screenshots","changelog"],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-61401","plugin","type-plugin","status-closed","hentry","plugin_committers-barrykooij"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/sub-posts.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>With the Sub Posts plugin you can easily link post types to other post types. Sub Posts contains an easy to use API to fetch linked posts as normal WordPress posts, please see the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/sub-posts\/faq\/\">FAQ section<\/a> for more information.<\/p>\n\n<p>Please note that his is a BETA version. If you have any questions or suggestions please create a support ticket <a href=\"http:\/\/wordpress.org\/support\/plugin\/sub-posts\">here<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload <code>sub-posts<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<\/ol>\n\n<!--section=faq-->\n<h4>How can I fetch the linked childs?<\/h4>\n\n<p>You can use the following code to fetch the childs:<\/p>\n\n<pre><code>SubPosts::API()-&gt;get_childs( $link_id, $parent_id )<\/code><\/pre>\n\n<h4>Can I add extra arguments like custom sorting or limitation to the 'get_childs' method?<\/h4>\n\n<p>Yes you can! Simply add the same arguments you would add to a 'WP_Query' call.<\/p>\n\n<pre><code>SubPosts::API()-&gt;get_childs( $link_id, $parent_id, $args )<\/code><\/pre>\n\n<h4>How can I fetch the parent of a child?<\/h4>\n\n<p>You can use the following code to fetch the parent:<\/p>\n\n<pre><code>SubPosts::API()-&gt;get_parent( $pt_link_id, $child_id )<\/code><\/pre>\n\n<h4>How can I fetch the first linked child?<\/h4>\n\n<p>You can use the following code to fetch the first linked child:<\/p>\n\n<pre><code>SubPosts::API()-&gt;get_first_child( $pt_link_id, $parent_id )<\/code><\/pre>\n\n<h4>How can I add a post link programmatically?<\/h4>\n\n<p>You can use the following code to add a post link programmatically:<\/p>\n\n<pre><code>SubPosts::API()-&gt;add_link( $pt_link_id, $parent_id, $child_id )<\/code><\/pre>\n\n<h4>How can I add a post type link programmatically?<\/h4>\n\n<p>You can use the following code to add a post type link programmatically:<\/p>\n\n<pre><code>SubPosts::API()-&gt;add_post_type_link( $title, $parent, $child, $sortable, $add_childs )<\/code><\/pre>\n\n<!--section=screenshots-->\n<ol class='screenshots'>\n\t<li>\n\t\t<img class='screenshot' src='http:\/\/s-plugins.wordpress.org\/sub-posts\/assets\/screenshot-1.jpg?rev=671127' alt='sub-posts screenshot 1' \/>\n\t\t<p>Overview page of what post type links are created.<\/p>\n\t<\/li>\n\t<li>\n\t\t<img class='screenshot' src='http:\/\/s-plugins.wordpress.org\/sub-posts\/assets\/screenshot-2.jpg?rev=671127' alt='sub-posts screenshot 2' \/>\n\t\t<p>Create new post type links, make them sortable and allow users to add links in the parent post edit screen.<\/p>\n\t<\/li>\n\t<li>\n\t\t<img class='screenshot' src='http:\/\/s-plugins.wordpress.org\/sub-posts\/assets\/screenshot-3.jpg?rev=671127' alt='sub-posts screenshot 3' \/>\n\t\t<p>Link posts to each other from the parent post edit screen.<\/p>\n\t<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.2.2 BETA<\/h4>\n\n<ul>\n<li>Meta information fix.<\/li>\n<\/ul>\n\n<h4>1.2.1 BETA<\/h4>\n\n<ul>\n<li>Fixed <code>get_first_child<\/code> bug.<\/li>\n<\/ul>\n\n<h4>1.2.0 BETA<\/h4>\n\n<ul>\n<li>Added API method <code>get_parent<\/code> (props erwin-knoop).<\/li>\n<li>Added API method <code>add_postlink<\/code> (props remyvv).<\/li>\n<li>Added API method <code>add_post_type_link<\/code>.<\/li>\n<li>Added API method <code>get_first_child<\/code>.<\/li>\n<li>Refactored PostLinkManager.<\/li>\n<li>API <code>get_childs<\/code> method now supports custom sorting (props remyvv).<\/li>\n<li>Changed API method to static method.<\/li>\n<li>Refactored hooking system.<\/li>\n<li>Added custom capability support (props erwin-knoop).<\/li>\n<li>Changed default capability from project to post (props erwin-knoop).<\/li>\n<\/ul>\n\n<h4>1.1.0 BETA<\/h4>\n\n<ul>\n<li>Added permission and nonce checks.<\/li>\n<li>Added nonces to all AJAX calls. <\/li>\n<li>Split JS class into 2 classes.<\/li>\n<\/ul>\n\n<h4>1.0.4 BETA<\/h4>\n\n<ul>\n<li>Fixed a reinstallation database error.<\/li>\n<li>Replaced get_the_id() with $post parameter in hook callback (props markoheijnen).<\/li>\n<li>Added plugin URL to admin sidebar box.<\/li>\n<\/ul>\n\n<h4>1.0.3 BETA<\/h4>\n\n<ul>\n<li>Changed globalizing $post_id to get_the_id() because of not working in 3.5.<\/li>\n<li>Added code comment to methods.<\/li>\n<\/ul>\n\n<h4>1.0.2 BETA<\/h4>\n\n<ul>\n<li>Fixed a hooking priority problem that prevented some metaboxes from saving (props erwin-knoop).<\/li>\n<\/ul>\n\n<h4>1.0.1 BETA<\/h4>\n\n<ul>\n<li>Changed priority of the save_post hook that prevented metaboxes to be saved.<\/li>\n<\/ul>\n\n<h4>1.0.0 BETA<\/h4>\n\n<ul>\n<li>Initial setup.<\/li>\n<\/ul>","raw_excerpt":"With the Sub Posts plugin you can easily link post types to other post types.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/61401","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"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/users\/9216909"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=61401"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=61401"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=61401"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=61401"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=61401"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=61401"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=61401"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}