Version Description
Usability Optimization
Download this release
Release Info
Developer | Blog2Social |
Plugin | Blog2Social: Social Media Auto Post & Scheduler |
Version | 5.0.1 |
Comparing to | |
See all releases |
Code changes from version 5.0.0 to 5.0.1
- blog2social.php +2 -2
- includes/Ajax/Post.php +1 -1
- includes/B2S/Curation/View.php +1 -1
- includes/B2S/Post/Item.php +1 -1
- includes/B2S/PostBox.php +1 -1
- includes/B2S/Ship/Save.php +1 -1
- includes/Loader.php +1 -1
- includes/Util.php +10 -0
- 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.
|
11 |
* Author URI: https://www.blog2social.com
|
12 |
* License: GPL2+
|
13 |
*/
|
14 |
//B2SDefine
|
15 |
-
define('B2S_PLUGIN_VERSION', '
|
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.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__));
|
includes/Ajax/Post.php
CHANGED
@@ -62,7 +62,7 @@ class Ajax_Post {
|
|
62 |
if (isset($_POST['profile_select'])) {
|
63 |
$profilId = (int) $_POST['profile_select'];
|
64 |
if (isset($_POST['profile_data_' . $profilId]) && !empty($_POST['profile_data_' . $profilId])) {
|
65 |
-
$networkData =
|
66 |
if ($networkData !== false && is_array($networkData) && !empty($networkData)) {
|
67 |
$notAllowNetwork = array(4, 11, 14, 16, 18);
|
68 |
$allowNetworkOnlyImage = array(6, 7, 12);
|
62 |
if (isset($_POST['profile_select'])) {
|
63 |
$profilId = (int) $_POST['profile_select'];
|
64 |
if (isset($_POST['profile_data_' . $profilId]) && !empty($_POST['profile_data_' . $profilId])) {
|
65 |
+
$networkData = json_decode(base64_decode($_POST['profile_data_' . $profilId]));
|
66 |
if ($networkData !== false && is_array($networkData) && !empty($networkData)) {
|
67 |
$notAllowNetwork = array(4, 11, 14, 16, 18);
|
68 |
$allowNetworkOnlyImage = array(6, 7, 12);
|
includes/B2S/Curation/View.php
CHANGED
@@ -71,7 +71,7 @@ class B2S_Curation_View {
|
|
71 |
$content .='<select style="width:100%;" id="b2s-post-curation-profile-select" class="b2s-select" name="profile_select">';
|
72 |
foreach ($mandant as $k => $m) {
|
73 |
$content .= '<option value="' . $m->id . '">' . $m->name . '</option>';
|
74 |
-
$profilData = (isset($auth->{$m->id}) && isset($auth->{$m->id}[0]) && !empty($auth->{$m->id}[0])) ?
|
75 |
$authContent .= "<input type='hidden' id='b2s-post-curation-profile-data-" . $m->id . "' name='profile_data_" . $m->id . "' value='" . base64_encode($profilData) . "'/>";
|
76 |
}
|
77 |
$content .= '</select>';
|
71 |
$content .='<select style="width:100%;" id="b2s-post-curation-profile-select" class="b2s-select" name="profile_select">';
|
72 |
foreach ($mandant as $k => $m) {
|
73 |
$content .= '<option value="' . $m->id . '">' . $m->name . '</option>';
|
74 |
+
$profilData = (isset($auth->{$m->id}) && isset($auth->{$m->id}[0]) && !empty($auth->{$m->id}[0])) ? json_encode($auth->{$m->id}) : '';
|
75 |
$authContent .= "<input type='hidden' id='b2s-post-curation-profile-data-" . $m->id . "' name='profile_data_" . $m->id . "' value='" . base64_encode($profilData) . "'/>";
|
76 |
}
|
77 |
$content .= '</select>';
|
includes/B2S/Post/Item.php
CHANGED
@@ -530,7 +530,7 @@ class B2S_Post_Item {
|
|
530 |
$postData = get_post($var->post_id);
|
531 |
$data['url'] = (get_permalink($postData->ID) !== false ? get_permalink($postData->ID) : $postData->guid);
|
532 |
}
|
533 |
-
$content .= ' <a href="#" class="btn btn-primary btn-xs" onclick="wopApprove(\'' . B2S_PLUGIN_API_ENDPOINT . 'instant/share.php?data=' .
|
534 |
|
535 |
$content . '</p>
|
536 |
</div>
|
530 |
$postData = get_post($var->post_id);
|
531 |
$data['url'] = (get_permalink($postData->ID) !== false ? get_permalink($postData->ID) : $postData->guid);
|
532 |
}
|
533 |
+
$content .= ' <a href="#" class="btn btn-primary btn-xs" onclick="wopApprove(\'' . B2S_PLUGIN_API_ENDPOINT . 'instant/share.php?data=' . B2S_Util::urlsafe_base64_encode(json_encode($data)) . '\', \'Blog2Social\'); return false;" target="_blank">' . __('share', 'blog2social') . '</a>';
|
534 |
|
535 |
$content . '</p>
|
536 |
</div>
|
includes/B2S/PostBox.php
CHANGED
@@ -180,7 +180,7 @@ class B2S_PostBox {
|
|
180 |
<select style="width:100%;" id="b2s-post-meta-box-profil-dropdown" name="b2s-post-meta-box-profil-dropdown">';
|
181 |
foreach ($mandant as $k => $m) {
|
182 |
$content .= '<option value="' . $m->id . '">' . $m->name . '</option>';
|
183 |
-
$profilData = (isset($auth->{$m->id}) && isset($auth->{$m->id}[0]) && !empty($auth->{$m->id}[0])) ?
|
184 |
$authContent .= "<input type='hidden' id='b2s-post-meta-box-profil-data-" . $m->id . "' name='b2s-post-meta-box-profil-data-" . $m->id . "' value='" . base64_encode($profilData) . "'/>";
|
185 |
}
|
186 |
$content .= '</select></div>';
|
180 |
<select style="width:100%;" id="b2s-post-meta-box-profil-dropdown" name="b2s-post-meta-box-profil-dropdown">';
|
181 |
foreach ($mandant as $k => $m) {
|
182 |
$content .= '<option value="' . $m->id . '">' . $m->name . '</option>';
|
183 |
+
$profilData = (isset($auth->{$m->id}) && isset($auth->{$m->id}[0]) && !empty($auth->{$m->id}[0])) ? json_encode($auth->{$m->id}) : '';
|
184 |
$authContent .= "<input type='hidden' id='b2s-post-meta-box-profil-data-" . $m->id . "' name='b2s-post-meta-box-profil-data-" . $m->id . "' value='" . base64_encode($profilData) . "'/>";
|
185 |
}
|
186 |
$content .= '</select></div>';
|
includes/B2S/Ship/Save.php
CHANGED
@@ -397,7 +397,7 @@ class B2S_Ship_Save {
|
|
397 |
$html .='</div>';
|
398 |
}
|
399 |
|
400 |
-
$approveLink = '<a href="#" class="btn btn-primary" onclick="wopApprove(\'' . B2S_PLUGIN_API_ENDPOINT . 'instant/share.php?data=' .
|
401 |
$html .= '<span class="text-warning">' . $approveLink . ' (' . __('Please share your Facebook post now', 'blog2social') . ')</span><br>';
|
402 |
return $html;
|
403 |
}
|
397 |
$html .='</div>';
|
398 |
}
|
399 |
|
400 |
+
$approveLink = '<a href="#" class="btn btn-primary" onclick="wopApprove(\'' . B2S_PLUGIN_API_ENDPOINT . 'instant/share.php?data=' . B2S_Util::urlsafe_base64_encode(json_encode($data)) . '\', \'Blog2Social\'); return false;" target="_blank"><i class="glyphicon glyphicon-share"></i> ' . __('share', 'blog2social') . '</a>';
|
401 |
$html .= '<span class="text-warning">' . $approveLink . ' (' . __('Please share your Facebook post now', 'blog2social') . ')</span><br>';
|
402 |
return $html;
|
403 |
}
|
includes/Loader.php
CHANGED
@@ -370,7 +370,7 @@ class B2S_Loader {
|
|
370 |
if ((strtolower($_POST['post_status']) == "publish" || strtolower($_POST['post_status']) == "future") && isset($_POST['b2s-post-meta-box-profil-dropdown'])) {
|
371 |
$profilId = (int) $_POST['b2s-post-meta-box-profil-dropdown'];
|
372 |
if (isset($_POST['b2s-post-meta-box-profil-data-' . $profilId]) && !empty($_POST['b2s-post-meta-box-profil-data-' . $profilId])) {
|
373 |
-
$networkData =
|
374 |
if ($networkData !== false && is_array($networkData) && !empty($networkData)) {
|
375 |
$user_timezone = isset($_POST['b2s-user-timezone']) ? $_POST['b2s-user-timezone'] : 0;
|
376 |
$current_utc_date = gmdate('Y-m-d H:i:s');
|
370 |
if ((strtolower($_POST['post_status']) == "publish" || strtolower($_POST['post_status']) == "future") && isset($_POST['b2s-post-meta-box-profil-dropdown'])) {
|
371 |
$profilId = (int) $_POST['b2s-post-meta-box-profil-dropdown'];
|
372 |
if (isset($_POST['b2s-post-meta-box-profil-data-' . $profilId]) && !empty($_POST['b2s-post-meta-box-profil-data-' . $profilId])) {
|
373 |
+
$networkData = json_decode(base64_decode($_POST['b2s-post-meta-box-profil-data-' . $profilId]));
|
374 |
if ($networkData !== false && is_array($networkData) && !empty($networkData)) {
|
375 |
$user_timezone = isset($_POST['b2s-user-timezone']) ? $_POST['b2s-user-timezone'] : 0;
|
376 |
$current_utc_date = gmdate('Y-m-d H:i:s');
|
includes/Util.php
CHANGED
@@ -2,6 +2,16 @@
|
|
2 |
|
3 |
class B2S_Util {
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
public static function getUTCForDate($date, $userTimezone) {
|
6 |
$utcTime = strtotime($date) + ($userTimezone * 3600);
|
7 |
return date('Y-m-d H:i:s', $utcTime);
|
2 |
|
3 |
class B2S_Util {
|
4 |
|
5 |
+
public static function urlsafe_base64_encode($data) {
|
6 |
+
//return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
|
7 |
+
return base64_encode($data);
|
8 |
+
}
|
9 |
+
|
10 |
+
public static function urlsafe_base64_decode($data) {
|
11 |
+
//return base64_decode(strtr($data, '-_', '+/') . str_repeat('=', 3 - ( 3 + strlen($data)) % 4));
|
12 |
+
return base64_decode($data);
|
13 |
+
}
|
14 |
+
|
15 |
public static function getUTCForDate($date, $userTimezone) {
|
16 |
$utcTime = strtotime($date) + ($userTimezone * 3600);
|
17 |
return date('Y-m-d H:i:s', $utcTime);
|
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.
|
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.0 =
|
332 |
Content Curation with links, WooCommerce compatibility, gutenberg editor compatibility
|
333 |
= 4.9.2 =
|
@@ -376,6 +378,8 @@ Usabilitiy and Performance Optimization. Select link format or image format indi
|
|
376 |
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.
|
377 |
|
378 |
== Upgrade Notice ==
|
|
|
|
|
379 |
= 5.0.0 =
|
380 |
Content Curation with links, WooCommerce compatibility, gutenberg editor compatibility
|
381 |
= 4.9.2 =
|
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 |
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 =
|
334 |
Content Curation with links, WooCommerce compatibility, gutenberg editor compatibility
|
335 |
= 4.9.2 =
|
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 =
|
384 |
Content Curation with links, WooCommerce compatibility, gutenberg editor compatibility
|
385 |
= 4.9.2 =
|