{"id":38817,"date":"2015-10-29T18:15:28","date_gmt":"2015-10-29T18:15:28","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/just-post-preview\/"},"modified":"2017-03-06T09:07:31","modified_gmt":"2017-03-06T09:07:31","slug":"just-post-preview","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/just-post-preview\/","author":8080006,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.1.1","stable_tag":"trunk","tested":"4.8.28","requires":"4.0","requires_php":"","requires_plugins":"","header_name":"Just Post Preview Widget","header_author":"JustCoded \/ Alex Prokopenko","header_description":"","assets_banners_color":"08c4f3","last_updated":"2017-03-06 09:07:31","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"http:\/\/justcoded.com\/","rating":5,"author_block_rating":0,"active_installs":10,"downloads":2224,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog","faq"],"tags":[],"upgrade_notice":{"":"<p>To upgrade remove the old plugin folder. After than follow the installation steps 1-2. All settings will be saved.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1470609","resolution":"128x128","location":"assets"}},"assets_banners":{"banner-1554x500.png":{"filename":"banner-1554x500.png","revision":"1470609","resolution":"1554x500","location":"assets"},"banner-772x250.png":{"filename":"banner-772x250.png","revision":"1470609","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.1.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1748637","resolution":"1","location":"plugin"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1748637","resolution":"2","location":"plugin"}},"screenshots":{"1":"Widget edit screenshot","2":"Using widget inside the SiteOrigin Page builder plugin"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2275,21646,8479,162],"plugin_category":[43],"plugin_contributors":[80550],"plugin_business_model":[],"class_list":["post-38817","plugin","type-plugin","status-publish","hentry","plugin_tags-developer","plugin_tags-layouts","plugin_tags-post-preview","plugin_tags-widget","plugin_category-customization","plugin_contributors-aprokopenko","plugin_committers-aprokopenko"],"banners":{"banner":"https:\/\/ps.w.org\/just-post-preview\/assets\/banner-772x250.png?rev=1470609","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/just-post-preview\/assets\/icon-128x128.png?rev=1470609","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/just-post-preview\/trunk\/screenshot-1.png?rev=1748637","caption":"Widget edit screenshot"},{"src":"https:\/\/ps.w.org\/just-post-preview\/trunk\/screenshot-2.png?rev=1748637","caption":"Using widget inside the SiteOrigin Page builder plugin"}],"raw_content":"<!--section=description-->\n<p>This plugin is for developers who need easy to edit the complex layouts and insert different post tile blocks inside the layout,\nsidebars or page builders. By default, it has 3 pre-defined layouts; you can rewrite them in your theme or register custom layouts.\nUnfortunately the pre-defined layouts have no styles inside. (Because they will be overwritten in the theme 100% anyway).<\/p>\n\n<h4>Template files<\/h4>\n\n<p>To overwrite the pre-defined templates, you should create a folder with the name <code>\u201cjust-post-preview\u201d<\/code> in the root\nof your theme and copy required templates from the <code>\/wp-content\/plugins\/just-post-preview\/layous\/<\/code> folder.<\/p>\n\n<p>File names format: <code>jpp_layout_{layout key}.php<\/code><\/p>\n\n<p>You can find PHP comments on the top of the demo templates. They help your IDE to show you autocomplete boxes for available variables.<\/p>\n\n<h4>Adding custom layout<\/h4>\n\n<p>To add a custom layout, you need to add a new filter hook in your theme functions.php file:<\/p>\n\n<pre><code>add_filter('jpp_post_preview_layouts', 'my_post_preview_layouts');\nfunction my_post_preview_layouts($layouts){\n    $layouts['my_layout_key'] = 'My custom layout';\n    return $layouts;\n}\n<\/code><\/pre>\n\n<p>After that hook you will need to create a template file in the <code>\/path\/to\/theme\/just-post-preview<\/code> folder with the name <code>jpp_layout_my_layout_key.php<\/code>.<\/p>\n\n<h4>That's all!<\/h4>\n\n<p>FILL FREE TO CONTACT ME IF YOU FIND ANY BUGS\/ISSUES!<\/p>\n\n<p><strong>ISSUES TRACKER<\/strong>\nThe project is also available on github. Please post your issues or feedbacks there.\nhttps:\/\/github.com\/aprokopenko\/just-post-preview<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Download, unzip and upload to your WordPress plugins directory<\/li>\n<li>Activate the plugin within you WordPress Administration Backend<\/li>\n<li>That's it - you can add a new widget now<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>Version 1.1.1<\/h4>\n\n<pre><code>* Bug fix: Merged Pull Request from @rudibatt: missing break in templates load loop.\n<\/code><\/pre>\n\n<h4>Version 1.1<\/h4>\n\n<pre><code>* New feature: Ability to search without specifying post type (beta)\n* New hook: You can control the templates source with new hook `jpp_post_preview_template`\n* Bug fix: PHP 7+ compatibility fix\n<\/code><\/pre>\n\n<h4>Version 1.0<\/h4>\n\n<pre><code>* Plugin base with 3 pre-defined layouts\n<\/code><\/pre>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ol>\n<li>Download, unzip and upload to your WordPress plugins directory<\/li>\n<li>Activate the plugin within you WordPress Administration Backend<\/li>\n<li>That's it - you can add a new widget now<\/li>\n<\/ol><\/dd>\n\n<\/dl>","raw_excerpt":"Widget to easy add any post content preview blocks with different layouts, specified in the theme.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/38817","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=38817"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/aprokopenko"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=38817"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=38817"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=38817"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=38817"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=38817"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=38817"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}