Skip to content

Commit 666af85

Browse files
Merge pull request #111 from sailthru/INT-650_em_dash_character
[INT-650_EM_DASH_CHARACTER]
2 parents df3e601 + 2700182 commit 666af85

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

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.3.2
6+
Stable tag: 4.3.3
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.3.3 (2024-03-08)
4+
Fixed em dash character in image file name
5+
36
## v4.3.2 (2024-02-23)
47
Added for in label and id in input field
58

classes/class-sailthru-content.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,11 +311,17 @@ function generate_payload( $post, $post_id ) {
311311
if ( has_post_thumbnail( $post->ID ) ) {
312312
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
313313
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'concierge-thumb' );
314-
$post_image = $image[0];
315-
$data['images']['full']['url'] = esc_attr( $post_image );
316-
$post_thumbnail = $thumb[0];
317-
$data['images']['thumb']['url'] = $post_thumbnail;
318-
}
314+
$post_image = $image[0];
315+
$filename = basename($post_image);
316+
$encfilename = urlencode($filename);
317+
$post_image = str_replace($filename, $encfilename,$post_image);
318+
$data['images']['full']['url'] = $post_image ;
319+
$post_thumbnail = $thumb[0];
320+
$filename = basename($post_thumbnail);
321+
$encfilename = urlencode($filename);
322+
$post_thumbnail = str_replace($filename, $encfilename, $post_thumbnail);
323+
$data['images']['thumb']['url'] = $post_thumbnail;
324+
}
319325

320326
// Add any galleries from the post to the images.
321327
$data['images']['galleries'] = get_post_galleries_images( $post );

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.3.2
6+
Version: 4.3.3
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.3.2' );
39+
define( 'SAILTHRU_PLUGIN_VERSION', '4.3.3' );
4040
}
4141

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

0 commit comments

Comments
 (0)