Blog2Social: Social Media Auto Post & Scheduler - Version 5.0.2

Version Description

Usability Optimization

Download this release

Release Info

Developer Blog2Social
Plugin Icon 128x128 Blog2Social: Social Media Auto Post & Scheduler
Version 5.0.2
Comparing to
See all releases

Code changes from version 5.0.1 to 5.0.2

Files changed (4) hide show
  1. blog2social.php +2 -2
  2. includes/Loader.php +10 -4
  3. includes/Meta.php +2 -1
  4. readme.txt +5 -1
blog2social.php CHANGED
@@ -7,12 +7,12 @@
7
  * Author: Blog2Social, Adenion
8
  * Text Domain: blog2social
9
  * Domain Path: /languages
10
- * Version: 5.0.1
11
  * Author URI: https://www.blog2social.com
12
  * License: GPL2+
13
  */
14
  //B2SDefine
15
- define('B2S_PLUGIN_VERSION', '501');
16
  define('B2S_PLUGIN_LANGUAGE', serialize(array('de_DE', 'en_US')));
17
  define('B2S_PLUGIN_DIR', plugin_dir_path(__FILE__));
18
  define('B2S_PLUGIN_URL', plugin_dir_url(__FILE__));
7
  * Author: Blog2Social, Adenion
8
  * Text Domain: blog2social
9
  * Domain Path: /languages
10
+ * Version: 5.0.2
11
  * Author URI: https://www.blog2social.com
12
  * License: GPL2+
13
  */
14
  //B2SDefine
15
+ define('B2S_PLUGIN_VERSION', '502');
16
  define('B2S_PLUGIN_LANGUAGE', serialize(array('de_DE', 'en_US')));
17
  define('B2S_PLUGIN_DIR', plugin_dir_path(__FILE__));
18
  define('B2S_PLUGIN_URL', plugin_dir_url(__FILE__));
includes/Loader.php CHANGED
@@ -324,12 +324,17 @@ class B2S_Loader {
324
 
325
  if (!isset($_POST['wp-preview']) || (isset($_POST['wp-preview']) && $_POST['wp-preview'] != 'dopreview')) {
326
  if (isset($_POST['post_ID']) && (int) $_POST['post_ID'] > 0) {
327
- //Gutenberg V5.0.0
328
  if (!isset($_POST['post_title']) || !isset($_POST['content'])) {
329
  $content = get_post((int) $_POST['post_ID']);
330
- $_POST['post_title'] = $content->post_title;
331
- $_POST['content'] = $content->post_content;
 
 
 
 
332
  }
 
333
  $b2sPostLang = (isset($_POST['b2s-user-lang']) && !empty($_POST['b2s-user-lang'])) ? $_POST['b2s-user-lang'] : 'en';
334
  //OgMeta
335
  if (isset($_POST['isOgMetaChecked']) && (int) $_POST['isOgMetaChecked'] == 1 && (int) $_POST['post_ID'] > 0 && isset($_POST['content']) && isset($_POST['post_title'])) {
@@ -542,7 +547,8 @@ class B2S_Loader {
542
  if ((int) $b2sAction == 1) {
543
  $b2sLink = get_option('siteurl') . ((substr(get_option('siteurl'), -1, 1) == '/') ? '' : '/') . 'wp-admin/admin.php?page=';
544
  if (isset($_GET['b2s_update_publish_date']) && !empty($_GET['b2s_update_publish_date'])) {
545
- echo '<div class="updated"><p>' . __('This post will be shared into your social media on', 'blog2social') . ' ' . $_GET['b2s_update_publish_date'] . ' <a target="_blank" href="' . $b2sLink . 'blog2social-sched">' . __('show details', 'blog2social') . '</a></p></div>';
 
546
  } else {
547
  echo '<div class="updated"><p>' . __('This post will be shared on social media in 2-3 minutes!', 'blog2social') . ' <a target="_blank" href="' . $b2sLink . 'blog2social-publish">' . __('show details', 'blog2social') . '</a></p></div>';
548
  }
324
 
325
  if (!isset($_POST['wp-preview']) || (isset($_POST['wp-preview']) && $_POST['wp-preview'] != 'dopreview')) {
326
  if (isset($_POST['post_ID']) && (int) $_POST['post_ID'] > 0) {
327
+ //Gutenberg WP V5.0 - B2S V5.1.0 optimization
328
  if (!isset($_POST['post_title']) || !isset($_POST['content'])) {
329
  $content = get_post((int) $_POST['post_ID']);
330
+ if (!isset($_POST['post_title'])) {
331
+ $_POST['post_title'] = $content->post_title;
332
+ }
333
+ if (!isset($_POST['content'])) {
334
+ $_POST['content'] = $content->post_content;
335
+ }
336
  }
337
+
338
  $b2sPostLang = (isset($_POST['b2s-user-lang']) && !empty($_POST['b2s-user-lang'])) ? $_POST['b2s-user-lang'] : 'en';
339
  //OgMeta
340
  if (isset($_POST['isOgMetaChecked']) && (int) $_POST['isOgMetaChecked'] == 1 && (int) $_POST['post_ID'] > 0 && isset($_POST['content']) && isset($_POST['post_title'])) {
547
  if ((int) $b2sAction == 1) {
548
  $b2sLink = get_option('siteurl') . ((substr(get_option('siteurl'), -1, 1) == '/') ? '' : '/') . 'wp-admin/admin.php?page=';
549
  if (isset($_GET['b2s_update_publish_date']) && !empty($_GET['b2s_update_publish_date'])) {
550
+ $publishDate = htmlspecialchars($_GET['b2s_update_publish_date']);
551
+ echo '<div class="updated"><p>' . __('This post will be shared into your social media on', 'blog2social') . ' ' . $publishDate . ' <a target="_blank" href="' . $b2sLink . 'blog2social-sched">' . __('show details', 'blog2social') . '</a></p></div>';
552
  } else {
553
  echo '<div class="updated"><p>' . __('This post will be shared on social media in 2-3 minutes!', 'blog2social') . ' <a target="_blank" href="' . $b2sLink . 'blog2social-publish">' . __('show details', 'blog2social') . '</a></p></div>';
554
  }
includes/Meta.php CHANGED
@@ -21,7 +21,8 @@ class B2S_Meta {
21
  global $post;
22
  $this->post = $post;
23
  $this->print = true;
24
- $this->getMeta($this->post->ID);
 
25
  $this->options = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
26
  $authorData = new B2S_Options((isset($this->post->post_author) ? $this->post->post_author : 0));
27
  $this->author = $authorData->_getOption('meta_author_data');
21
  global $post;
22
  $this->post = $post;
23
  $this->print = true;
24
+ $post_id = isset($this->post->ID) ? $this->post->ID : 0; //V5.1.0 optimization
25
+ $this->getMeta($post_id);
26
  $this->options = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
27
  $authorData = new B2S_Options((isset($this->post->post_author) ? $this->post->post_author : 0));
28
  $this->author = $authorData->_getOption('meta_author_data');
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: auto post, auto publish, social media scheduling, social media calendar, s
4
  Donate link: http://www.blog2social.com
5
  Requires at least: 4.2.2
6
  Tested up to: 4.9.8
7
- Stable tag: 5.0.1
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -328,6 +328,8 @@ We use the official authentication oAUTH methods to third-party applications pro
328
  9. Adjust the best times to schedule in the best time scheduler.
329
 
330
  == Changelog ==
 
 
331
  = 5.0.1 =
332
  Usability Optimization
333
  = 5.0.0 =
@@ -378,6 +380,8 @@ Usabilitiy and Performance Optimization. Select link format or image format indi
378
  Usabilitiy and Performance Optimization. NEW: Select individual images per post. Select link format or image format for your posts. Select your own time zone for scheduling posts. Emoji support.
379
 
380
  == Upgrade Notice ==
 
 
381
  = 5.0.1 =
382
  Usability Optimization
383
  = 5.0.0 =
4
  Donate link: http://www.blog2social.com
5
  Requires at least: 4.2.2
6
  Tested up to: 4.9.8
7
+ Stable tag: 5.0.2
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
328
  9. Adjust the best times to schedule in the best time scheduler.
329
 
330
  == Changelog ==
331
+ = 5.0.2 =
332
+ Usability Optimization
333
  = 5.0.1 =
334
  Usability Optimization
335
  = 5.0.0 =
380
  Usabilitiy and Performance Optimization. NEW: Select individual images per post. Select link format or image format for your posts. Select your own time zone for scheduling posts. Emoji support.
381
 
382
  == Upgrade Notice ==
383
+ = 5.0.2 =
384
+ Usability Optimization
385
  = 5.0.1 =
386
  Usability Optimization
387
  = 5.0.0 =