{"id":1323855,"date":"2017-07-20T08:38:39","date_gmt":"2017-07-20T15:38:39","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/"},"modified":"2017-07-20T08:38:39","modified_gmt":"2017-07-20T15:38:39","slug":"order-of-publishing-and-image","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/","title":{"rendered":"Order of publishing and image"},"content":{"rendered":"<p>I have a workflow that imports from FB, via EA, then uses a plugin &#8216;WP to Buffer Pro&#8217; to push events to Buffer on publish, or otherwise manually on updates, etc.<br \/>\nIts the publishing of events I have a question with. <\/p>\n<p>The issue has been that when a new event is imported from FB, and subsequently sent to Buffer, there is no &#8220;featured image&#8221; sent as well.<br \/>\nThis does not occur with updated events, or events that are manually published. <\/p>\n<p>I reached out the plugin author, and they indicated it may be due to the order that the EA triggers the publish and then attached the featured image? <\/p>\n<p>Please see their notes below<\/p>\n<blockquote><p>This is happening due to their plugin not considering third party plugins. Roughly speaking, on importing an event, their plugin:<br \/>\n1. Create the Post, using wp_insert_post(), in publish mode. This triggers transition_post_status, which will be &#8216;publish&#8217; and therefore trigger our plugin.<br \/>\n2. Assign the Featured Image to the created Post &#8211; this is too late, as by then the Post has already been published.<\/p>\n<p>We can&#8217;t control the above process, but can only recommend what we have done for several other third party plugins, which is to adjust their process as follows:<br \/>\n1. Create the Post, using wp_insert_post(), in draft mode. This doesn&#8217;t trigger transition_post_status to be &#8216;publish, and therefore doesn&#8217;t trigger ours (or any other plugins) that might reasonably rely on the publish event.<br \/>\n2. Assign the Featured Image to the created draft Post<br \/>\n3. Update the draft Post&#8217;s status to Published. This triggers transition_post_status, which will be &#8216;publish&#8217; and therefore trigger our plugin. As the Post now has the Featured Image, we&#8217;ll include it in the status update to Buffer.<\/p><\/blockquote>\n<p>I would at least like to see if this is how the EA publish works and if its possible to change? <\/p>\n","protected":false},"template":"","class_list":["post-1323855","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Order of publishing and image -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Order of publishing and image -\" \/>\n<meta property=\"og:description\" content=\"I have a workflow that imports from FB, via EA, then uses a plugin &#8216;WP to Buffer Pro&#8217; to push events to Buffer on publish, or otherwise manually on updates, etc. Its the publishing of events I have a question with. The issue has been that when a new event is imported from FB, and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/\",\"name\":\"Order of publishing and image -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-07-20T15:38:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Event Aggregator\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/event-aggregator\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Order of publishing and image\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Order of publishing and image -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/","og_locale":"en_US","og_type":"article","og_title":"Order of publishing and image -","og_description":"I have a workflow that imports from FB, via EA, then uses a plugin &#8216;WP to Buffer Pro&#8217; to push events to Buffer on publish, or otherwise manually on updates, etc. Its the publishing of events I have a question with. The issue has been that when a new event is imported from FB, and [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/","name":"Order of publishing and image -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-07-20T15:38:39+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/order-of-publishing-and-image\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Event Aggregator","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/event-aggregator\/"},{"@type":"ListItem","position":5,"name":"Order of publishing and image"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1323855","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1323855\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1323855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}