Skip to content

Commit

Permalink
[IN-1950] Added post object to sailthru_horizon_meta_tags filter (#101)
Browse files Browse the repository at this point in the history
* [IN-1950] Added post object to sailthru_horizon_meta_tags filter
  • Loading branch information
rzsouza-st committed Jul 7, 2021
1 parent ab0cbaa commit 0fedff6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ img/.DS_Store
*.sublime-workspace
.vscode/launch.json
.vscode/settings.json
.idea/shelf
.idea/sonarlint
.idea
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: sailthru-wp
Tags: personalization, email,
Requires at least: 5.5
Tested up to: 5.7
Stable tag: 4.1.1
Stable tag: 4.2.0

Provides an integration with Sailthru

Expand Down
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## v4.2.0 (2021-07-06)
Added post object to sailthru_horizon_meta_tags filter

## v4.1.1 (2021-05-25)
Fixed Bulk Edit not propagating category and Wordpress tags properly

Expand Down
2 changes: 1 addition & 1 deletion classes/class-sailthru-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ function generate_payload( $post, $post_id ) {
$data['tags'] = $this->generate_tags( $post->ID);

// Apply any filters to the tags.
$data['tags'] = apply_filters( 'sailthru_horizon_meta_tags', ['sailthru.tags' => $data['tags'] ] ) ;
$data['tags'] = apply_filters( 'sailthru_horizon_meta_tags', ['sailthru.tags' => $data['tags'], 'post' => $post] ) ;

// Check if the filter has returned sailthru.tags and convert to string.
if ( is_array( $data['tags'] ) && isset ( $data['tags']['sailthru.tags'] ) ) {
Expand Down
4 changes: 2 additions & 2 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Sailthru for WordPress
Plugin URI: http://sailthru.com/
Description: Add the power of Sailthru to your WordPress set up.
Version: 4.1.1
Version: 4.2.0
Requires at least: 5.5
Author: Sailthru
Author URI: http://sailthru.com
Expand Down Expand Up @@ -36,7 +36,7 @@
* @var const $version The current version of the plugin.
*/
if ( ! defined( 'SAILTHRU_PLUGIN_VERSION' ) ) {
define( 'SAILTHRU_PLUGIN_VERSION', '4.1.1' );
define( 'SAILTHRU_PLUGIN_VERSION', '4.2.0' );
}

if ( ! defined( 'SAILTHRU_PLUGIN_PATH' ) ) {
Expand Down

0 comments on commit 0fedff6

Please sign in to comment.