{"id":84895,"date":"2018-05-03T08:19:22","date_gmt":"2018-05-03T08:19:22","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/openpublishingplugin\/"},"modified":"2020-05-29T13:32:31","modified_gmt":"2020-05-29T13:32:31","slug":"openpublishing","status":"publish","type":"plugin","link":"https:\/\/kk.wordpress.org\/plugins\/openpublishing\/","author":16067856,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.6","stable_tag":"trunk","tested":"5.3.21","requires":"3.1","requires_php":"","requires_plugins":"","header_name":"OpenPublishing","header_author":"OpenPublishing GmbH","header_description":"Enrich content with data from the OpenPublishing service","assets_banners_color":"","last_updated":"2020-05-29 13:32:31","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1378,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation"],"tags":[],"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1868196","resolution":"128x128","location":"assets","locale":""}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1779,7629,186482],"plugin_category":[],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-84895","plugin","type-plugin","status-publish","hentry","plugin_tags-books","plugin_tags-ebook","plugin_tags-openpublishing","plugin_committers-openpublishing"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/openpublishing\/assets\/icon-128x128.png?rev=1868196","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>To visualize Open Publishing data on your page please use smart substitution tags in place you want to insert a data, like so <code>[large_document_view:document.123]<\/code> or <code>[sidebar:newest.1:de]<\/code><\/p>\n\n<p>This substitution tag will be replaced by the data this plugin retrieve from OP server.<\/p>\n\n<p>Smart substitution notation contain: <code>[ \"tag_name\":\"object\".\"object_id\":\"language\" ]<\/code>\n    language is an optional parameter, use it to get language specific results. Possible values: <code>en<\/code>, <code>de<\/code>, <code>fr<\/code>, <code>es<\/code>.<\/p>\n\n<p>You can use: <code>document<\/code>, <code>bestseller<\/code>, <code>newest<\/code>, <code>most_read<\/code> objects.<\/p>\n\n<p>Also you can access document count from brand statistics. \nTo print document count use 'openpublishing_document_count' option.<\/p>\n\n<h4>Special Features<\/h4>\n\n<p><strong>Openpublishing substitution<\/strong>\nTo make substitution work please create templates for each tag_name you would like to use. You can do this in two different ways.<\/p>\n\n<ul>\n<li><p>Using Elementor plugin:<\/p>\n\n<ol>\n<li>Go to Elementor <a href=\"\/wp-admin\/edit.php?post_type=elementor_library\">page<\/a><\/li>\n<li>Create new template, remember a template id (you can see it in the edit url)<\/li>\n<li>You can easily style your template by means of Elementor<\/li>\n<\/ol><\/li>\n<li><p>Using WordPress posts:<\/p>\n\n<ol>\n<li>Go to Pages &gt; Add New<\/li>\n<li>Create new post and treat it like a template, remember a template id (you can see it in the edit url)<\/li>\n<li>(Optional) you can assign special category (like op-templates) to each post to distinguish between others<\/li>\n<li>Use special keywords in your template:<code>{title} {subtitle} {price} {grin_url} {source_url} {document_id} {cdn_host} {realm_id}<\/code><\/li>\n<\/ol><\/li>\n<\/ul>\n\n<p>Add newly created templates\/posts on this page with corresponding ids.<\/p>\n\n<h3>Usage:<\/h3>\n\n<p>To use substitution please insert into your page this tag with desired 'tag_name' and 'object_id' like:<\/p>\n\n<pre><code>&lt;h2&gt;Our bestsellers:&lt;\/h2&gt;\n  &lt;div&gt;[large_document_view:bestseller.1] [large_document_view:bestseller.2] [large_document_view:bestseller.3]&lt;\/div&gt;\n<\/code><\/pre>\n\n<p>This tags should be replaced right away.<\/p>\n\n<p><strong>Openpublishing document count<\/strong>\nThere is a scheduled job which is retrieving the brand statistics from OP server and saves the value to Document count on a daily basis.<\/p>\n\n<h3>Debug:<\/h3>\n\n<p>To debug plugin work please add next code into your page after all text:<\/p>\n\n<pre><code>&lt;script type=\"text\/javascript\"&gt;\n  var debug = document.getElementsByClassName(\"OP_debug\");\n  for(i=0; i&lt;debug.length; i++) { debug[i].style.display = 'inline'; }\n&lt;\/script&gt;\n<\/code><\/pre>\n\n<p>This will allow you to see some more information about substitution.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install using the WordPress built-in Plugin installer, or clone repository and drop the contents in the <code>wp-content\/plugins\/openpublishing<\/code> directory of your WordPress installation.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Go to Open Publishing settings on left menu bar<\/li>\n<li>Proceed with further instructions: set realm id, brand name and API host.<\/li>\n<\/ol>","raw_excerpt":"Enrich content with data from the OpenPublishing service","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/84895","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=84895"}],"author":[{"embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/openpublishing"}],"wp:attachment":[{"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=84895"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=84895"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=84895"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=84895"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=84895"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/kk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=84895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}