Skip to content

Commit

Permalink
medium error message added
Browse files Browse the repository at this point in the history
  • Loading branch information
shuvo7670 committed Oct 8, 2024
1 parent 45ebe26 commit e10c32f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions includes/Social/Medium.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public function get_image_url( $post ) {
* @since 2.5.0
* @return array
*/
public function remote_post($app_id, $app_secret, $app_access_token, $type, $ID, $post_id, $profile_key, $force_share = false, $medium_id)
public function remote_post($app_id, $app_secret, $app_access_token, $type, $ID, $post_id, $profile_key, $force_share = false, $medium_id = '')
{
// get share count
$count_meta_key = '__wpsp_medium_share_count_'.$ID;
Expand Down Expand Up @@ -236,7 +236,9 @@ public function remote_post($app_id, $app_secret, $app_access_token, $type, $ID,
'publish_date' => time(),
);
$errorFlag = true;
}else {
}else if(!empty($response->errors[0]->message)){
$response = $response->errors[0]->message;
}else {
$errorFlag = false;
$response = 'Something went wrong..';
}
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ No, SchedulePress doesn’t require any additional plugin. All you have to do is

== Changelog ==

= 5.1.7 - 2024-10-07 =
= 5.1.7 - 2024-10-08 =
- Added: Support for Medium Social Share.
- Improvement: Optimized database queries for better performance.
- Few minor bug fixes & improvements.
Expand Down

0 comments on commit e10c32f

Please sign in to comment.