Skip to content

Commit 0fedff6

Browse files
authored
[IN-1950] Added post object to sailthru_horizon_meta_tags filter (#101)
* [IN-1950] Added post object to sailthru_horizon_meta_tags filter
1 parent ab0cbaa commit 0fedff6

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ img/.DS_Store
55
*.sublime-workspace
66
.vscode/launch.json
77
.vscode/settings.json
8-
.idea/shelf
9-
.idea/sonarlint
8+
.idea

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: sailthru-wp
33
Tags: personalization, email,
44
Requires at least: 5.5
55
Tested up to: 5.7
6-
Stable tag: 4.1.1
6+
Stable tag: 4.2.0
77

88
Provides an integration with Sailthru
99

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## v4.2.0 (2021-07-06)
4+
Added post object to sailthru_horizon_meta_tags filter
5+
36
## v4.1.1 (2021-05-25)
47
Fixed Bulk Edit not propagating category and Wordpress tags properly
58

classes/class-sailthru-content.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ function generate_payload( $post, $post_id ) {
323323
$data['tags'] = $this->generate_tags( $post->ID);
324324

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

328328
// Check if the filter has returned sailthru.tags and convert to string.
329329
if ( is_array( $data['tags'] ) && isset ( $data['tags']['sailthru.tags'] ) ) {

plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Plugin Name: Sailthru for WordPress
44
Plugin URI: http://sailthru.com/
55
Description: Add the power of Sailthru to your WordPress set up.
6-
Version: 4.1.1
6+
Version: 4.2.0
77
Requires at least: 5.5
88
Author: Sailthru
99
Author URI: http://sailthru.com
@@ -36,7 +36,7 @@
3636
* @var const $version The current version of the plugin.
3737
*/
3838
if ( ! defined( 'SAILTHRU_PLUGIN_VERSION' ) ) {
39-
define( 'SAILTHRU_PLUGIN_VERSION', '4.1.1' );
39+
define( 'SAILTHRU_PLUGIN_VERSION', '4.2.0' );
4040
}
4141

4242
if ( ! defined( 'SAILTHRU_PLUGIN_PATH' ) ) {

0 commit comments

Comments
 (0)