Changeset 2797606
- Timestamp:
- 10/12/2022 06:56:47 AM (3 years ago)
- Location:
- ringier-bus/trunk
- Files:
-
- 6 edited
-
CHANGELOG.md (modified) (1 diff)
-
README.md (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
ringier-bus.php (modified) (2 diffs)
-
src/Core/Bus/BusHelper.php (modified) (1 diff)
-
src/Core/BusPluginClass.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ringier-bus/trunk/CHANGELOG.md
r2793833 r2797606 1 1 # Changelog Details 2 2 3 ### 1.3.0 (Oct 12, 2022) ### 4 * [NEW] custom post_type event | handle triggering of events separately for custom post_type 5 * [NEW] custom fields on admin UI | allow showing of acf custom fields on custom post_type as well, excluding page for now 6 3 7 ### 1.2.0 (Oct 04, 2022) ### 4 5 8 * [FIX] Events should not be triggered when "saving draft" 6 9 * [NEW] Logging | Add additional log message when an Event is not sent to know why -
ringier-bus/trunk/README.md
r2793833 r2797606 7 7 **Requires at least:** 5.7.0 8 8 **Tested up to:** 6.0.2 9 **Stable tag:** 1. 2.09 **Stable tag:** 1.3.0 10 10 **License:** GPLv2 or later 11 11 **License URI:** http://www.gnu.org/licenses/gpl-2.0.html -
ringier-bus/trunk/readme.txt
r2793833 r2797606 4 4 Requires at least: 4.7 5 5 Tested up to: 6.0.2 6 Stable tag: 1. 2.06 Stable tag: 1.3.0 7 7 Requires PHP: 7.0 8 8 License: GPLv2 or later … … 68 68 == Changelog == 69 69 70 ### 1.3.0 (Oct 12, 2022) ### 71 * [NEW] custom post_type event | handle triggering of events separately for custom post_type 72 * [NEW] custom fields on admin UI | allow showing of acf custom fields on custom post_type as well, excluding page for now 73 74 ### 1.2.0 (Oct 04, 2022) ### 75 * [FIX] Events should not be triggered when "saving draft" 76 * [NEW] Logging | Add additional log message when an Event is not sent to know why 77 * [NEW] Addition of new logic for new field: primary_media_type 78 70 79 ### 1.1.1 (Aug 16, 2022) ### 71 80 * [JSON Request] The API's field `description` field truncated to 2500 chars since the BUS API request will fail on more than 3000 chars. -
ringier-bus/trunk/ringier-bus.php
r2793833 r2797606 11 11 * Plugin URI: https://github.com/RingierIMU/mkt-plugin-wordpress-bus 12 12 * Description: A plugin to push events to Ringier CDE via the BUS API whenever an article is created, updated or deleted 13 * Version: 1. 2.013 * Version: 1.3.0 14 14 * Requires at least: 4.7.0 15 15 * Author: Ringier SA, Wasseem Khayrattee … … 50 50 */ 51 51 define('RINGIER_BUS_DS', DIRECTORY_SEPARATOR); 52 define('RINGIER_BUS_PLUGIN_VERSION', '1. 2.0');52 define('RINGIER_BUS_PLUGIN_VERSION', '1.3.0'); 53 53 define('RINGIER_BUS_PLUGIN_MINIMUM_WP_VERSION', '4.7'); 54 54 define('RINGIER_BUS_PLUGIN_DIR_URL', plugin_dir_url(__FILE__)); //has trailing slash at end -
ringier-bus/trunk/src/Core/Bus/BusHelper.php
r2793833 r2797606 49 49 //Register Bus Events ONLY IF it is enabled 50 50 if ($fieldsObject->is_bus_enabled === true) { 51 add_action('transition_post_status', [self::class, 'cater_for_custom_post'], 10, 3); 51 52 add_action('rest_after_insert_post', [self::class, 'triggerArticleEvent'], 10, 1); 52 53 add_action('publish_to_trash', [self::class, 'triggerArticleDeletedEvent'], 10, 3); 53 54 add_action(Enum::HOOK_NAME_SCHEDULED_EVENTS, [self::class, 'cronSendToBusScheduled'], 10, 3); 54 55 } 56 } 57 58 /** 59 * To cater for custom post_type only 60 * 61 * @param $new_status 62 * @param $old_status 63 * @param $post 64 */ 65 public function cater_for_custom_post($new_status, $old_status, $post) 66 { 67 //bail if a page 68 if (strcmp($post->post_type, 'page') == 0) { 69 return; 70 } 71 //bail is normal post, we are catering for custom posts 72 if (strcmp($post->post_type, 'post') == 0) { 73 return; 74 } 75 if (empty($post->post_type)) { 76 return; 77 } 78 79 // Bail if we're working on a draft or trashed item 80 if ($new_status == 'auto-draft' || $new_status == 'draft' || $new_status == 'inherit' || $new_status == 'trash') { 81 return; 82 } 83 84 // ringier_errorlogthis('post_type for this trigger: ' . print_r($post->post_type, true)); 85 add_action('rest_after_insert_' . trim($post->post_type), [self::class, 'triggerArticleEvent'], 15, 1); 86 87 return; 55 88 } 56 89 -
ringier-bus/trunk/src/Core/BusPluginClass.php
r2709549 r2797606 243 243 [ 244 244 'param' => 'post_type', 245 'operator' => ' ==',246 'value' => 'p ost',245 'operator' => '!=', 246 'value' => 'page', 247 247 ], 248 248 ],
Note: See TracChangeset
for help on using the changeset viewer.