Skip to content

Commit

Permalink
Merge pull request #89 from sailthru/v4.0.1
Browse files Browse the repository at this point in the history
[v.4.0.1] Fix warning for content vars
  • Loading branch information
lindsaycooper authored Dec 3, 2020
2 parents 6f7b89a + 1dfe143 commit 18134e6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
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.5.1
Stable tag: 4.0.0
Stable tag: 4.0.1

Provides an integration with Sailthru

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

## v4.0.1 (2020-12-03)
Fixed warning where post_type not set properly

## v4.0.0 (2020-10-14)
Supports Wordpress version 5.5.
This version isn't backwards compatible with older Wordpress versions.

## v3.6.2 (2020-12-03)
Fixed warning where post_type not set properly

## v3.6.1 (2020-10-14)
Fixed bug where double opt-in option adds users to list immediately

Expand Down
21 changes: 12 additions & 9 deletions classes/class-sailthru-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -291,15 +291,18 @@ function generate_payload( $post, $post_id ) {
$url = get_permalink( $post->ID );
$url_with_correct_protocol = set_url_scheme( $url );

$data = [
'url' => $url_with_correct_protocol,
'title' => $post->post_title,
'author' => get_the_author_meta( 'display_name', $post->post_author ),
'date' => $post->post_date,
'vars'['post_type'] => $post->post_type,
'spider' => $spider_value == "false" ? 0 : 1,
'description' => $post->post_excerpt
];
$data = array(
'url' => $url_with_correct_protocol,
'title' => $post->post_title,
'author' => get_the_author_meta( 'display_name', $post->post_author ),
'date' => $post->post_date,
'vars' => array(
'post_type' => $post->post_type,
),
'spider' => "false" == $spider_value ? 0 : 1,
'description' => $post->post_excerpt,
);

if ( empty( $post->post_excerpt ) ) {
$data['description'] = wp_trim_words( $post->post_content, 250, '' );
}
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.0.0
Version: 4.0.1
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.0.0' );
define( 'SAILTHRU_PLUGIN_VERSION', '4.0.1' );
}

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

0 comments on commit 18134e6

Please sign in to comment.