Version Description
Usability Optimization
Download this release
Release Info
Developer | PR-Gateway |
Plugin | Blog2Social: Social Media Auto Post & Scheduler |
Version | 6.5.8 |
Comparing to | |
See all releases |
Code changes from version 6.5.7 to 6.5.8
- blog2social.php +2 -2
- includes/B2S/Api/Network/Pinterest.php +29 -11
- readme.txt +5 -1
blog2social.php
CHANGED
@@ -6,12 +6,12 @@
|
|
6 |
* Author: Blog2Social, Adenion
|
7 |
* Text Domain: blog2social
|
8 |
* Domain Path: /languages
|
9 |
-
* Version: 6.5.
|
10 |
* Author URI: https://www.blog2social.com
|
11 |
* License: GPL2+
|
12 |
*/
|
13 |
|
14 |
-
define('B2S_PLUGIN_VERSION', '
|
15 |
define('B2S_PLUGIN_LANGUAGE', serialize(array('de_DE', 'en_US')));
|
16 |
define('B2S_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
17 |
define('B2S_PLUGIN_URL', plugin_dir_url(__FILE__));
|
6 |
* Author: Blog2Social, Adenion
|
7 |
* Text Domain: blog2social
|
8 |
* Domain Path: /languages
|
9 |
+
* Version: 6.5.8
|
10 |
* Author URI: https://www.blog2social.com
|
11 |
* License: GPL2+
|
12 |
*/
|
13 |
|
14 |
+
define('B2S_PLUGIN_VERSION', '658');
|
15 |
define('B2S_PLUGIN_LANGUAGE', serialize(array('de_DE', 'en_US')));
|
16 |
define('B2S_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
17 |
define('B2S_PLUGIN_URL', plugin_dir_url(__FILE__));
|
includes/B2S/Api/Network/Pinterest.php
CHANGED
@@ -52,9 +52,9 @@ class B2S_Api_Network_Pinterest {
|
|
52 |
$cookie = $this->cookie;
|
53 |
$headerData = $this->setHeader($this->location);
|
54 |
$requestData = array('headers' => $headerData, 'cookies' => $cookie, 'timeout' => $this->timeout);
|
55 |
-
$result = wp_remote_get($this->location.'pinterest/', $requestData);
|
56 |
if (is_wp_error($result)) {
|
57 |
-
return array('error' => 1, 'error_pos' => 0, 'location' => 'setRoute', 'error_data' => serialize($result)
|
58 |
}
|
59 |
if ($result['response']['code'] == '302' && !empty($result['headers']['location'])) {
|
60 |
$this->route = 'https://' . $this->cutFromTo($result['headers']['location'] . '/', "//", '/') . '/';
|
@@ -75,17 +75,35 @@ class B2S_Api_Network_Pinterest {
|
|
75 |
$content = $result['body'];
|
76 |
$csrfToken = '';
|
77 |
$appVersion = trim($this->cutFromTo($content, '"app_version":"', '"'));
|
78 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
$loginData = array(
|
80 |
"options" => array(
|
|
|
81 |
"username_or_email" => $username,
|
82 |
-
"password" => $password
|
|
|
|
|
|
|
83 |
),
|
84 |
-
"context" => array(
|
85 |
-
"app_version" => $appVersion,
|
86 |
-
)
|
87 |
);
|
88 |
-
$fields = array('data' => json_encode($loginData), 'source_url' => '/login/'
|
|
|
|
|
89 |
foreach ($cookie as $c) {
|
90 |
if ($c->name == 'csrftoken') {
|
91 |
$csrfToken = $c->value;
|
@@ -167,10 +185,10 @@ class B2S_Api_Network_Pinterest {
|
|
167 |
$boardsData = array();
|
168 |
$boardsData[] = $response['resource_response'];
|
169 |
}
|
170 |
-
if(isset($boardsData[0]['error']['status'])&& $boardsData[0]['error']['status'] != 'success'){
|
171 |
-
|
172 |
}
|
173 |
-
|
174 |
foreach ($boardsData as $allBoards) {
|
175 |
if (!empty($allBoards) && !empty($allBoards['data']['all_boards'])) {
|
176 |
foreach ($allBoards['data']['all_boards'] as $board) {
|
52 |
$cookie = $this->cookie;
|
53 |
$headerData = $this->setHeader($this->location);
|
54 |
$requestData = array('headers' => $headerData, 'cookies' => $cookie, 'timeout' => $this->timeout);
|
55 |
+
$result = wp_remote_get($this->location . 'pinterest/', $requestData);
|
56 |
if (is_wp_error($result)) {
|
57 |
+
return array('error' => 1, 'error_pos' => 0, 'location' => 'setRoute', 'error_data' => serialize($result), 'error_code' => $result->get_error_code());
|
58 |
}
|
59 |
if ($result['response']['code'] == '302' && !empty($result['headers']['location'])) {
|
60 |
$this->route = 'https://' . $this->cutFromTo($result['headers']['location'] . '/', "//", '/') . '/';
|
75 |
$content = $result['body'];
|
76 |
$csrfToken = '';
|
77 |
$appVersion = trim($this->cutFromTo($content, '"app_version":"', '"'));
|
78 |
+
|
79 |
+
|
80 |
+
//DEPRECATED REQUEST 12/2020
|
81 |
+
/* $loginData = array(
|
82 |
+
"options" => array(
|
83 |
+
"username_or_email" => $username,
|
84 |
+
"password" => $password
|
85 |
+
),
|
86 |
+
"context" => array(
|
87 |
+
"app_version" => $appVersion,
|
88 |
+
)
|
89 |
+
);
|
90 |
+
$fields = array('data' => json_encode($loginData), 'source_url' => '/login/', 'module_path' => 'App()>LoginPage()>Login()>Button(class_name=primary, text=Log in, type=submit, tagName=button, size=large)'); */
|
91 |
+
|
92 |
+
//START SINCE 12/2020
|
93 |
$loginData = array(
|
94 |
"options" => array(
|
95 |
+
"get_user" => true,
|
96 |
"username_or_email" => $username,
|
97 |
+
"password" => $password,
|
98 |
+
"no_fetch_context_on_resource" => false,
|
99 |
+
"app_type_from_client" => 6,
|
100 |
+
"recaptchaV3Token" => str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
|
101 |
),
|
102 |
+
"context" => array()
|
|
|
|
|
103 |
);
|
104 |
+
$fields = array('data' => json_encode($loginData), 'source_url' => '/login/');
|
105 |
+
//END
|
106 |
+
|
107 |
foreach ($cookie as $c) {
|
108 |
if ($c->name == 'csrftoken') {
|
109 |
$csrfToken = $c->value;
|
185 |
$boardsData = array();
|
186 |
$boardsData[] = $response['resource_response'];
|
187 |
}
|
188 |
+
if (isset($boardsData[0]['error']['status']) && $boardsData[0]['error']['status'] != 'success') {
|
189 |
+
return array('error' => 2, 'error_pos' => 1, 'error_data' => 'access_denied');
|
190 |
}
|
191 |
+
|
192 |
foreach ($boardsData as $allBoards) {
|
193 |
if (!empty($allBoards) && !empty($allBoards['data']['all_boards'])) {
|
194 |
foreach ($allBoards['data']['all_boards'] as $board) {
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: auto post, auto publish, social media scheduling, social media calendar, s
|
|
5 |
Donate link: https://paypal.me/adenion
|
6 |
Requires at least: 4.7.0
|
7 |
Tested up to: 5.6
|
8 |
-
Stable tag: 6.5.
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -218,6 +218,8 @@ To get started with the basics of Blog2Social and maybe find some useful tips an
|
|
218 |
7. Keep track of your shared posts and scheduling plan with the Social Media Calendar.
|
219 |
|
220 |
== Changelog ==
|
|
|
|
|
221 |
= 6.5.7 =
|
222 |
Usability Optimization
|
223 |
= 6.5.6 =
|
@@ -302,6 +304,8 @@ Usability Optimization
|
|
302 |
Content Curation with links, WooCommerce compatibility, gutenberg editor compatibility
|
303 |
|
304 |
== Upgrade Notice ==
|
|
|
|
|
305 |
= 6.5.7 =
|
306 |
Usability Optimization
|
307 |
= 6.5.6 =
|
5 |
Donate link: https://paypal.me/adenion
|
6 |
Requires at least: 4.7.0
|
7 |
Tested up to: 5.6
|
8 |
+
Stable tag: 6.5.8
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
218 |
7. Keep track of your shared posts and scheduling plan with the Social Media Calendar.
|
219 |
|
220 |
== Changelog ==
|
221 |
+
= 6.5.8 =
|
222 |
+
Usability Optimization
|
223 |
= 6.5.7 =
|
224 |
Usability Optimization
|
225 |
= 6.5.6 =
|
304 |
Content Curation with links, WooCommerce compatibility, gutenberg editor compatibility
|
305 |
|
306 |
== Upgrade Notice ==
|
307 |
+
= 6.5.8 =
|
308 |
+
Usability Optimization
|
309 |
= 6.5.7 =
|
310 |
Usability Optimization
|
311 |
= 6.5.6 =
|