Blog2Social: Social Media Auto Post & Scheduler - Version 5.4.0

Version Description

Usability Optimization

Download this release

Release Info

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

Code changes from version 5.3.0 to 5.4.0

assets/css/b2s/curation.css CHANGED
@@ -32,7 +32,7 @@
32
  .b2s-btn-change-url-preview{
33
  cursor: pointer;
34
  }
35
- #b2s-curation-no-review-info, #b2s-curation-no-auth-info, .b2s-post-curation-ship-date-area, #b2s-curation-no-data-info{
36
  display: none;
37
  }
38
 
@@ -97,4 +97,8 @@
97
 
98
  .b2s-post-curation-ship-date[readonly]{
99
  background-color: #fff !important;
 
 
 
 
100
  }
32
  .b2s-btn-change-url-preview{
33
  cursor: pointer;
34
  }
35
+ #b2s-curation-no-review-info, #b2s-curation-no-auth-info, .b2s-post-curation-ship-date-area, #b2s-curation-no-data-info, #b2s-curation-saved-draft-info{
36
  display: none;
37
  }
38
 
97
 
98
  .b2s-post-curation-ship-date[readonly]{
99
  background-color: #fff !important;
100
+ }
101
+
102
+ #b2s-btn-curation-draft {
103
+ margin-left: 10px;
104
  }
assets/css/b2s/settings.css CHANGED
@@ -121,4 +121,9 @@ ul.chosen-choices {
121
  }
122
  .b2s-user-network-shortener-account-area{
123
  vertical-align: middle;
 
 
 
 
 
124
  }
121
  }
122
  .b2s-user-network-shortener-account-area{
123
  vertical-align: middle;
124
+ }
125
+
126
+ .b2s-btn-link-txt{
127
+ font-size: 14px !important;
128
+ font-weight: 500 !important;
129
  }
assets/css/b2s/start.css CHANGED
@@ -137,4 +137,8 @@ body .fc-state-default{
137
  color: #000;
138
  background-color: #fff;
139
  border-color: #ccc;
 
 
 
 
140
  }
137
  color: #000;
138
  background-color: #fff;
139
  border-color: #ccc;
140
+ }
141
+
142
+ #b2s-mail-update-input, .b2s-mail-btn {
143
+ z-index: 0 !important;
144
  }
assets/css/b2s/support.css CHANGED
@@ -41,3 +41,15 @@
41
  .b2s-support-menu > li > a {
42
  padding: 10px 15px !important;
43
  }
 
 
 
 
 
 
 
 
 
 
 
 
41
  .b2s-support-menu > li > a {
42
  padding: 10px 15px !important;
43
  }
44
+
45
+ .thumbnail-no-border{
46
+ border: 0px !important;
47
+ }
48
+
49
+ .b2s-sharing-debugger-result-area{
50
+ display: block;
51
+ }
52
+
53
+ .b2s-padding-top-8{
54
+ padding-top:8px;
55
+ }
assets/css/general.css CHANGED
@@ -7581,4 +7581,8 @@ CSS CheckBOX
7581
  }
7582
  .b2s-text-underline{
7583
  text-decoration: underline;
7584
- }
 
 
 
 
7581
  }
7582
  .b2s-text-underline{
7583
  text-decoration: underline;
7584
+ }
7585
+
7586
+ .b2s-feature-img-with-24{
7587
+ max-width: 24px !important;
7588
+ }
assets/js/b2s/curation.draft.js ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery.noConflict();
2
+
3
+ if (typeof wp.heartbeat !== "undefined") {
4
+ jQuery(document).on('heartbeat-send', function (e, data) {
5
+ data['b2s_heartbeat'] = 'b2s_listener';
6
+ });
7
+ wp.heartbeat.connectNow();
8
+ }
9
+ jQuery(window).on("load", function () {
10
+ jQuery('#b2sPagination').val("1");
11
+ b2sSortFormSubmit();
12
+ });
13
+
14
+ function b2sSortFormSubmit() {
15
+ jQuery('.b2s-server-connection-fail').hide();
16
+ jQuery('.b2s-loading-area').show();
17
+ jQuery('.b2s-sort-result-area').hide();
18
+ jQuery('.b2s-sort-result-item-area').html("").hide();
19
+ jQuery('.b2s-sort-pagination-area').html("").hide();
20
+
21
+ var currentType = jQuery('#b2sType').val();
22
+ if (currentType != "undefined") {
23
+ jQuery('.b2s-post-btn').removeClass('btn-primary').addClass('btn-link');
24
+ jQuery('.b2s-post-' + currentType).removeClass('btn-link').addClass('btn-primary');
25
+ }
26
+
27
+ var data = {
28
+ 'action': 'b2s_sort_data',
29
+ 'b2sSortPostTitle': jQuery('#b2sSortPostTitle').val(),
30
+ 'b2sSortPostAuthor': jQuery('#b2sSortPostAuthor').val(),
31
+ 'b2sUserAuthId': jQuery('#b2sUserAuthId').val(),
32
+ 'b2sPostBlogId': jQuery('#b2sPostBlogId').val(),
33
+ 'b2sType': jQuery('#b2sType').val(),
34
+ 'b2sShowByDate': jQuery('#b2sShowByDate').val(),
35
+ 'b2sPagination': jQuery('#b2sPagination').val(),
36
+ 'b2sShowPagination': jQuery('#b2sShowPagination').length > 0 ? jQuery('#b2sShowPagination').val() : 1,
37
+ 'b2sUserLang': jQuery('#b2sUserLang').val()
38
+ };
39
+
40
+ if (jQuery('#b2sPostsPerPage').length > 0) {
41
+ data['b2sPostsPerPage'] = jQuery('#b2sPostsPerPage').val();
42
+ }
43
+
44
+ var legacyMode = true;
45
+ if (jQuery('#isLegacyMode').val() !== undefined) {
46
+ if (jQuery('#isLegacyMode').val() == "1") {
47
+ legacyMode = false; // loading is sync (stack)
48
+ }
49
+ }
50
+
51
+ jQuery.ajax({
52
+ url: ajaxurl,
53
+ type: "POST",
54
+ dataType: "json",
55
+ async: legacyMode,
56
+ cache: false,
57
+ data: data,
58
+ error: function () {
59
+ jQuery('.b2s-server-connection-fail').show();
60
+ return false;
61
+ },
62
+ success: function (data) {
63
+ if (typeof data === 'undefined' || data === null) {
64
+ jQuery('.b2s-server-connection-fail').show();
65
+ return false;
66
+ }
67
+ if (data.result == true) {
68
+ jQuery('.b2s-loading-area').hide();
69
+ jQuery('.b2s-sort-result-area').show();
70
+ jQuery('.b2s-sort-result-item-area').html(data.content).show();
71
+ jQuery('.b2s-sort-pagination-area').html(data.pagination).show();
72
+
73
+ //extern - Routing from dashboard
74
+ if (jQuery('#b2sPostBlogId').val() !== undefined) {
75
+ if (jQuery('#b2sPostBlogId').val() != "") {
76
+ jQuery('.b2sDetailsSchedPostBtn[data-post-id="' + jQuery('#b2sPostBlogId').val() + '"]').trigger('click');
77
+ }
78
+ }
79
+ } else {
80
+ jQuery('.b2s-server-connection-fail').show();
81
+ return false;
82
+ }
83
+ }
84
+ });
85
+ }
86
+
87
+ jQuery(document).on('click', '#b2s-sort-reset-btn', function () {
88
+ jQuery('#b2sPagination').val("1");
89
+ jQuery('#b2sSortPostTitle').val("");
90
+ jQuery('#b2sSortPostAuthor').prop('selectedIndex', 0);
91
+ jQuery('#b2sSortPostCat').prop('selectedIndex', 0);
92
+ jQuery('#b2sSortPostType').prop('selectedIndex', 0);
93
+ jQuery('#b2sSortPostSchedDate').prop('selectedIndex', 0);
94
+ jQuery('#b2sShowByDate').val("");
95
+ jQuery('#b2sUserAuthId').val("");
96
+ jQuery('#b2sPostBlogId').val("");
97
+ jQuery('#b2sShowByNetwork').val("0");
98
+ jQuery('#b2sSortPostStatus').prop('selectedIndex', 0);
99
+ jQuery('#b2sSortPostPublishDate').prop('selectedIndex', 0);
100
+ b2sSortFormSubmit();
101
+ return false;
102
+ });
103
+
104
+ jQuery(document).on('click', '#b2s-sort-submit-btn', function () {
105
+ jQuery('#b2sPagination').val("1");
106
+ b2sSortFormSubmit();
107
+ return false;
108
+ });
109
+
110
+ jQuery(document).on('click', '.b2s-pagination-btn', function () {
111
+ jQuery('#b2sPagination').val(jQuery(this).attr('data-page'));
112
+ b2sSortFormSubmit();
113
+ return false;
114
+ });
115
+
116
+ jQuery(document).on('change', '.b2s-select', function () {
117
+ jQuery('#b2sPagination').val("1");
118
+ b2sSortFormSubmit();
119
+ return false;
120
+ });
121
+
122
+ jQuery(document).on('keypress', '#b2sSortPostTitle', function (event) {
123
+ if (event.keyCode == 13) { //Hide Enter
124
+ return false;
125
+ }
126
+ });
assets/js/b2s/curation.js CHANGED
@@ -6,6 +6,15 @@ if (typeof wp.heartbeat !== "undefined") {
6
  });
7
  wp.heartbeat.connectNow();
8
  }
 
 
 
 
 
 
 
 
 
9
 
10
  jQuery(document).on('click', '.b2s-btn-curation-continue', function () {
11
  jQuery('#b2s-curation-input-url-help').hide();
@@ -138,8 +147,17 @@ function scrapeDetails(url) {
138
  if (jQuery('#b2sSelSchedDate').val() != "") {
139
  jQuery('#b2s-post-curation-ship-type').val('1').trigger('change');
140
  }
141
-
142
-
 
 
 
 
 
 
 
 
 
143
  } else {
144
  if (data.preview != "") {
145
  jQuery('.b2s-curation-preview-area').html(data.preview);
@@ -182,6 +200,7 @@ jQuery(document).on('click', '#b2s-btn-curation-share', function () {
182
  jQuery('#b2s-post-curation-action').val('b2s_curation_share');
183
  jQuery('#b2s-curation-no-data-info').hide();
184
  jQuery('#b2s-curation-no-auth-info').hide();
 
185
 
186
  if (jQuery('#b2s-post-curation-comment').val().length === 0) {
187
  jQuery('#b2s-post-curation-comment').addClass('error');
@@ -295,6 +314,7 @@ jQuery(document).on('click', '.b2s-approve-publish-confirm-btn', function () {
295
  jQuery(document).on('click', '#b2s-btn-curation-customize', function () {
296
  jQuery('#b2s-curation-no-data-info').hide();
297
  jQuery('#b2s-curation-no-auth-info').hide();
 
298
  jQuery('#b2s-post-curation-action').val('b2s_curation_customize');
299
  jQuery('.b2s-loading-area').show();
300
  jQuery('.b2s-curation-settings-area').hide();
@@ -373,4 +393,48 @@ function formatAMPM(date) {
373
  return strTime;
374
  }
375
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
376
 
6
  });
7
  wp.heartbeat.connectNow();
8
  }
9
+ jQuery(window).on("load", function () {
10
+ var url_string = window.location.href;
11
+ var url_param = new URL(url_string);
12
+ var url = url_param.searchParams.get("url");
13
+ if(typeof url != "undefined" && url != ""){
14
+ jQuery('#b2s-curation-input-url').val(url);
15
+ jQuery('.b2s-btn-curation-continue').trigger('click');
16
+ }
17
+ });
18
 
19
  jQuery(document).on('click', '.b2s-btn-curation-continue', function () {
20
  jQuery('#b2s-curation-input-url-help').hide();
147
  if (jQuery('#b2sSelSchedDate').val() != "") {
148
  jQuery('#b2s-post-curation-ship-type').val('1').trigger('change');
149
  }
150
+ var url_string = window.location.href;
151
+ var url_param = new URL(url_string);
152
+ var postId = url_param.searchParams.get("postId");
153
+ if(typeof postId != "undefined" && postId != ""){
154
+ jQuery('#b2s-draft-id').val(postId);
155
+ }
156
+ var comment = url_param.searchParams.get("comment");
157
+ if(typeof comment != "undefined" && comment != ""){
158
+ jQuery('#b2s-post-curation-comment').val(comment);
159
+ }
160
+
161
  } else {
162
  if (data.preview != "") {
163
  jQuery('.b2s-curation-preview-area').html(data.preview);
200
  jQuery('#b2s-post-curation-action').val('b2s_curation_share');
201
  jQuery('#b2s-curation-no-data-info').hide();
202
  jQuery('#b2s-curation-no-auth-info').hide();
203
+ jQuery('#b2s-curation-saved-draft-info').hide();
204
 
205
  if (jQuery('#b2s-post-curation-comment').val().length === 0) {
206
  jQuery('#b2s-post-curation-comment').addClass('error');
314
  jQuery(document).on('click', '#b2s-btn-curation-customize', function () {
315
  jQuery('#b2s-curation-no-data-info').hide();
316
  jQuery('#b2s-curation-no-auth-info').hide();
317
+ jQuery('#b2s-curation-saved-draft-info').hide();
318
  jQuery('#b2s-post-curation-action').val('b2s_curation_customize');
319
  jQuery('.b2s-loading-area').show();
320
  jQuery('.b2s-curation-settings-area').hide();
393
  return strTime;
394
  }
395
 
396
+ jQuery(document).on('click', '#b2s-btn-curation-draft', function () {
397
+ jQuery('#b2s-curation-no-data-info').hide();
398
+ jQuery('#b2s-curation-no-auth-info').hide();
399
+ jQuery('#b2s-curation-saved-draft-info').hide();
400
+ jQuery('#b2s-post-curation-action').val('b2s_curation_draft');
401
+ jQuery('.b2s-loading-area').show();
402
+ jQuery('.b2s-curation-settings-area').hide();
403
+ jQuery('.b2s-curation-preview-area').hide();
404
+ jQuery.ajax({
405
+ processData: false,
406
+ url: ajaxurl,
407
+ type: "POST",
408
+ dataType: "json",
409
+ cache: false,
410
+ data: jQuery("#b2s-curation-post-form").serialize(),
411
+ error: function () {
412
+ jQuery('.b2s-server-connection-fail').show();
413
+ return false;
414
+ },
415
+ success: function (data) {
416
+ if (data.result == true) {
417
+ if(typeof data.postId != undefined){
418
+ jQuery('#b2s-draft-id').val(data.postId);
419
+ }
420
+ jQuery('.b2s-loading-area').hide();
421
+ jQuery('.b2s-curation-settings-area').show();
422
+ jQuery('.b2s-curation-preview-area').show();
423
+ jQuery('#b2s-curation-saved-draft-info').show();
424
+ setTimeout(function() {
425
+ jQuery('#b2s-curation-saved-draft-info').fadeOut("slow");
426
+ }, 5000);
427
+ return false;
428
+ } else {
429
+ jQuery('.b2s-loading-area').hide();
430
+ jQuery('#b2s-curation-no-data-info').show();
431
+ jQuery('.b2s-curation-settings-area').show();
432
+ jQuery('.b2s-curation-preview-area').show();
433
+ }
434
+
435
+ }
436
+ });
437
+ return false;
438
+ });
439
+
440
 
assets/js/b2s/ship.js CHANGED
@@ -265,7 +265,7 @@ jQuery(document).on('click', '.b2s-get-settings-sched-time-default', function ()
265
  if (jQuery(this).is(':not(:disabled)')) {
266
  var networkAuthId = jQuery(this).attr('data-network-auth-id');
267
  //is not set special dates
268
- if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val() != '1') {
269
  jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val('1').trigger("change");
270
  }
271
  jQuery('.b2s-post-item-details-release-input-time[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(network_type_time);
@@ -411,7 +411,7 @@ jQuery(document).on('click', '.b2s-get-settings-sched-time-user', function () {
411
  if (jQuery('.b2s-post-item[data-network-auth-id="' + network_auth_id + '"]').is(":visible")) {
412
  if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').is(':not(:disabled)')) {
413
  //is not set special dates
414
- if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').val() != '1') {
415
  jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').val('1').trigger("change");
416
  }
417
  jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').val(time);
265
  if (jQuery(this).is(':not(:disabled)')) {
266
  var networkAuthId = jQuery(this).attr('data-network-auth-id');
267
  //is not set special dates
268
+ if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val() == '0') {
269
  jQuery('.b2s-post-item-details-release-input-date-select[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"]').val('1').trigger("change");
270
  }
271
  jQuery('.b2s-post-item-details-release-input-time[data-network-id="' + network_id + '"][data-network-auth-id="' + networkAuthId + '"][data-network-type="' + count + '"][data-network-count="0"]').val(network_type_time);
411
  if (jQuery('.b2s-post-item[data-network-auth-id="' + network_auth_id + '"]').is(":visible")) {
412
  if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').is(':not(:disabled)')) {
413
  //is not set special dates
414
+ if (jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').val() == '0') {
415
  jQuery('.b2s-post-item-details-release-input-date-select[data-network-auth-id="' + network_auth_id + '"]').val('1').trigger("change");
416
  }
417
  jQuery('.b2s-post-item-details-release-input-time[data-network-auth-id="' + network_auth_id + '"][data-network-count="0"]').val(time);
assets/js/b2s/support.js CHANGED
@@ -4,9 +4,22 @@ jQuery.noConflict();
4
  jQuery(document).ready(function () {
5
  getWidgetFaq();
6
  initTroubleshootTool();
7
- if(window.location.href.match('b2s-support-system-check') != null){
8
  jQuery('.b2s-support-check-sytem').trigger('click');
9
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  });
11
 
12
  function getWidgetFaq() {
@@ -37,21 +50,23 @@ function getWidgetFaq() {
37
  });
38
  }
39
 
 
 
40
  function initTroubleshootTool() {
41
  firstClick = false;
42
  jQuery(document).on('click', '.b2s-support-check-sytem', function () {
43
- if(!firstClick){
44
  jQuery('#b2s-reload-debug-btn').trigger('click');
45
  firstClick = true;
46
  }
47
  });
48
-
49
  jQuery(document).on('click', '#b2s-reload-debug-btn', function () {
50
  jQuery('.b2s-server-connection-fail').hide();
51
  jQuery('.b2s-support-fail').hide();
52
  jQuery('#b2s-main-debug').hide();
53
  jQuery('.b2s-loading-area').show();
54
-
55
  jQuery.ajax({
56
  url: ajaxurl,
57
  type: "GET",
@@ -70,8 +85,8 @@ function initTroubleshootTool() {
70
  jQuery('.b2s-loading-area').hide();
71
  jQuery('#b2s-main-debug').show();
72
  return false;
73
- } else if(data.result != true) {
74
- if(data.error == 'admin'){
75
  jQuery('.b2s-loading-area').hide();
76
  jQuery('#b2s-support-no-admin').show();
77
  } else {
@@ -81,14 +96,14 @@ function initTroubleshootTool() {
81
  return false;
82
  }
83
  } else {
84
- if(typeof data.htmlData !== 'undefined'){
85
  jQuery('#b2s-debug-htmlData').html(data.htmlData);
86
- if(typeof data.blogData !== 'undefined'){
87
  jQuery('#b2s-debug-export').removeClass('b2s-support-link-not-active');
88
  jQuery('#b2s-debug-export').attr(
89
- "href", "data:application/octet-stream;charset=utf-8;base64,"+
90
- btoa(JSON.stringify(data.blogData, undefined, 2))
91
- );
92
  } else {
93
  jQuery('#b2s-debug-export').addClass('b2s-support-link-not-active');
94
  }
@@ -104,6 +119,6 @@ function initTroubleshootTool() {
104
  }
105
  }
106
  });
107
-
108
  });
109
  }
4
  jQuery(document).ready(function () {
5
  getWidgetFaq();
6
  initTroubleshootTool();
7
+ if (window.location.href.match('b2s-support-system-check') != null) {
8
  jQuery('.b2s-support-check-sytem').trigger('click');
9
  }
10
+ if (window.location.href.match('b2s-support-sharing-debugger') != null) {
11
+ jQuery('.b2s-support-sharing-debugger').trigger('click');
12
+ }
13
+ jQuery(document).on('click', '.b2s-btn-sharing-debugger', function () {
14
+ var networkId = jQuery(this).attr('data-network-id');
15
+ if (networkId != 2) {
16
+ var url = jQuery(this).attr('b2s-url-query') + encodeURIComponent(jQuery('#b2s-debug-url[data-network-id="' + networkId + '"').val());
17
+ } else {
18
+ var url = jQuery(this).attr('b2s-url-query');
19
+ }
20
+ window.open(url, '_blank');
21
+ return false;
22
+ });
23
  });
24
 
25
  function getWidgetFaq() {
50
  });
51
  }
52
 
53
+
54
+
55
  function initTroubleshootTool() {
56
  firstClick = false;
57
  jQuery(document).on('click', '.b2s-support-check-sytem', function () {
58
+ if (!firstClick) {
59
  jQuery('#b2s-reload-debug-btn').trigger('click');
60
  firstClick = true;
61
  }
62
  });
63
+
64
  jQuery(document).on('click', '#b2s-reload-debug-btn', function () {
65
  jQuery('.b2s-server-connection-fail').hide();
66
  jQuery('.b2s-support-fail').hide();
67
  jQuery('#b2s-main-debug').hide();
68
  jQuery('.b2s-loading-area').show();
69
+
70
  jQuery.ajax({
71
  url: ajaxurl,
72
  type: "GET",
85
  jQuery('.b2s-loading-area').hide();
86
  jQuery('#b2s-main-debug').show();
87
  return false;
88
+ } else if (data.result != true) {
89
+ if (data.error == 'admin') {
90
  jQuery('.b2s-loading-area').hide();
91
  jQuery('#b2s-support-no-admin').show();
92
  } else {
96
  return false;
97
  }
98
  } else {
99
+ if (typeof data.htmlData !== 'undefined') {
100
  jQuery('#b2s-debug-htmlData').html(data.htmlData);
101
+ if (typeof data.blogData !== 'undefined') {
102
  jQuery('#b2s-debug-export').removeClass('b2s-support-link-not-active');
103
  jQuery('#b2s-debug-export').attr(
104
+ "href", "data:application/octet-stream;charset=utf-8;base64," +
105
+ btoa(JSON.stringify(data.blogData, undefined, 2))
106
+ );
107
  } else {
108
  jQuery('#b2s-debug-export').addClass('b2s-support-link-not-active');
109
  }
119
  }
120
  }
121
  });
122
+
123
  });
124
  }
blog2social.php CHANGED
@@ -7,12 +7,12 @@
7
  * Author: Blog2Social, Adenion
8
  * Text Domain: blog2social
9
  * Domain Path: /languages
10
- * Version: 5.3.0
11
  * Author URI: https://www.blog2social.com
12
  * License: GPL2+
13
  */
14
  //B2SDefine
15
- define('B2S_PLUGIN_VERSION', '530');
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.4.0
11
  * Author URI: https://www.blog2social.com
12
  * License: GPL2+
13
  */
14
  //B2SDefine
15
+ define('B2S_PLUGIN_VERSION', '540');
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/Get.php CHANGED
@@ -91,7 +91,7 @@ class Ajax_Get {
91
  $b2sSelectSchedDate = isset($_POST['b2sSchedDate']) ? trim($_POST['b2sSchedDate']) : "";
92
  $b2sUserLang = isset($_POST['b2sUserLang']) ? trim($_POST['b2sUserLang']) : strtolower(substr(B2S_LANGUAGE, 0, 2));
93
  $b2sResultsPerPage = isset($_POST['b2sPostsPerPage']) && intval($_POST['b2sPostsPerPage']) > 0 ? intval($_POST['b2sPostsPerPage']) : B2S_PLUGIN_POSTPERPAGE;
94
- if (!empty($b2sType) && in_array($b2sType, array('all', 'sched', 'publish', 'notice', 'approve'))) {
95
  $postItem = new B2S_Post_Item($b2sType, $b2sSortPostTitle, $b2sSortPostAuthor, $b2sSortPostStatus, $b2sSortPostPublishDate, $b2sSortPostSchedDate, $b2sShowByDate, $b2sShowByNetwork, $b2sUserAuthId, $b2sPostBlogId, $b2sPagination, $b2sSortPostCat, $b2sSortPostType, $b2sUserLang, $b2sResultsPerPage);
96
  $result = array('result' => true, 'content' => $postItem->getItemHtml($b2sSelectSchedDate), 'schedDates' => json_encode($postItem->getCalendarSchedDate()));
97
  if ($b2sShowPagination) {
91
  $b2sSelectSchedDate = isset($_POST['b2sSchedDate']) ? trim($_POST['b2sSchedDate']) : "";
92
  $b2sUserLang = isset($_POST['b2sUserLang']) ? trim($_POST['b2sUserLang']) : strtolower(substr(B2S_LANGUAGE, 0, 2));
93
  $b2sResultsPerPage = isset($_POST['b2sPostsPerPage']) && intval($_POST['b2sPostsPerPage']) > 0 ? intval($_POST['b2sPostsPerPage']) : B2S_PLUGIN_POSTPERPAGE;
94
+ if (!empty($b2sType) && in_array($b2sType, array('all', 'sched', 'publish', 'notice', 'approve', 'draft'))) {
95
  $postItem = new B2S_Post_Item($b2sType, $b2sSortPostTitle, $b2sSortPostAuthor, $b2sSortPostStatus, $b2sSortPostPublishDate, $b2sSortPostSchedDate, $b2sShowByDate, $b2sShowByNetwork, $b2sUserAuthId, $b2sPostBlogId, $b2sPagination, $b2sSortPostCat, $b2sSortPostType, $b2sUserLang, $b2sResultsPerPage);
96
  $result = array('result' => true, 'content' => $postItem->getItemHtml($b2sSelectSchedDate), 'schedDates' => json_encode($postItem->getCalendarSchedDate()));
97
  if ($b2sShowPagination) {
includes/Ajax/Post.php CHANGED
@@ -47,15 +47,43 @@ class Ajax_Post {
47
  add_action("wp_ajax_b2s_plugin_deactivate_delete_sched_post", array($this, 'b2sPluginDeactivate'));
48
  add_action("wp_ajax_b2s_curation_share", array($this, 'curationShare'));
49
  add_action("wp_ajax_b2s_curation_customize", array($this, 'curationCustomize'));
 
50
  }
51
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  public function curationShare() {
53
  //save as blog post
54
  if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['comment']) && !empty($_POST['comment']) && isset($_POST['url']) && !empty($_POST['url'])) {
55
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Curation/Save.php');
56
  $data = array('title' => $_POST['title'], 'url' => $_POST['url'], 'content' => (isset($_POST['comment']) ? $_POST['comment'] : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
57
  $curation = new B2S_Curation_Save($data);
58
- $postId = $curation->insertContent();
59
  if ($postId !== false) {
60
  //check Data
61
  if (isset($_POST['profile_select'])) {
47
  add_action("wp_ajax_b2s_plugin_deactivate_delete_sched_post", array($this, 'b2sPluginDeactivate'));
48
  add_action("wp_ajax_b2s_curation_share", array($this, 'curationShare'));
49
  add_action("wp_ajax_b2s_curation_customize", array($this, 'curationCustomize'));
50
+ add_action("wp_ajax_b2s_curation_draft", array($this, 'curationDraft'));
51
  }
52
 
53
+ public function curationDraft() {
54
+ //save as blog post
55
+ if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['comment']) && !empty($_POST['comment']) && isset($_POST['url']) && !empty($_POST['url'])) {
56
+ require_once (B2S_PLUGIN_DIR . 'includes/B2S/Curation/Save.php');
57
+ if(isset($_POST['b2s-draft-id']) && !empty($_POST['b2s-draft-id']) && (int) $_POST['b2s-draft-id'] > 0){
58
+ $data = array('ID' => $_POST['b2s-draft-id'], 'title' => $_POST['title'], 'url' => $_POST['url'], 'content' => (isset($_POST['comment']) ? $_POST['comment'] : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
59
+ $curation = new B2S_Curation_Save($data);
60
+ $source = (get_post_meta((int)$_POST['b2s-draft-id'], "b2s_source", true));
61
+ $postId = $curation->updateContent($source);
62
+ if ($postId !== false) {
63
+ echo json_encode(array('result' => true, 'postId' => $postId));
64
+ wp_die();
65
+ }
66
+ } else {
67
+ $data = array('title' => $_POST['title'], 'url' => $_POST['url'], 'content' => (isset($_POST['comment']) ? $_POST['comment'] : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
68
+ $curation = new B2S_Curation_Save($data);
69
+ $postId = $curation->insertContent();
70
+ if ($postId !== false) {
71
+ echo json_encode(array('result' => true, 'postId' => $postId));
72
+ wp_die();
73
+ }
74
+ }
75
+ }
76
+ echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
77
+ wp_die();
78
+ }
79
+
80
  public function curationShare() {
81
  //save as blog post
82
  if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['comment']) && !empty($_POST['comment']) && isset($_POST['url']) && !empty($_POST['url'])) {
83
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Curation/Save.php');
84
  $data = array('title' => $_POST['title'], 'url' => $_POST['url'], 'content' => (isset($_POST['comment']) ? $_POST['comment'] : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
85
  $curation = new B2S_Curation_Save($data);
86
+ $postId = (isset($_POST['b2s-draft-id']) && (int) $_POST['b2s-draft-id'] > 0) ? (int) $_POST['b2s-draft-id'] : $curation->insertContent();
87
  if ($postId !== false) {
88
  //check Data
89
  if (isset($_POST['profile_select'])) {
includes/B2S/Api/Network/Pinterest.php ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class B2S_Api_Network_Pinterest {
4
+
5
+ public $cookie = array();
6
+ public $csrf = '';
7
+ public $appVersion = '';
8
+ public $route = 'https://www.pinterest.com/';
9
+ public $timeout = 20;
10
+
11
+ public function __construct() {
12
+
13
+ }
14
+
15
+ public function setHeader($referer = '', $org = '', $type = 'GET', $request = false) {
16
+ $header = array();
17
+ $header['Cache-Control'] = 'max-age=0';
18
+ $header['Connection'] = 'keep-alive';
19
+ $header['Upgrade-Insecure-Requests'] = '1';
20
+ $header['Referer'] = $referer;
21
+ $header['User-Agent'] = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0';
22
+ if ($type == 'JSON') {
23
+ $header['Content-Type'] = 'application/json;charset=UTF-8';
24
+ } elseif ($type == 'POST') {
25
+ $header['Content-Type'] = 'application/x-www-form-urlencoded';
26
+ }
27
+ if ($request === true) {
28
+ $header['X-Requested-With'] = 'XMLHttpRequest';
29
+ }
30
+ if ($org != '') {
31
+ $header['Origin'] = $org;
32
+ }
33
+ if ($type == 'GET') {
34
+ $header['Accept'] = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
35
+ } else {
36
+ $header['Accept'] = '*/*';
37
+ }if (function_exists('gzdeflate')) {
38
+ $header['Accept-Encoding'] = 'gzip, deflate';
39
+ }
40
+ $header['Accept-Language'] = 'en-US,en;q=0.8';
41
+ return $header;
42
+ }
43
+
44
+ public function setRoute() {
45
+ $cookie = $this->cookie;
46
+ $headerData = $this->setHeader('https://www.pinterest.com/');
47
+ $requestData = array('headers' => $headerData, 'cookies' => $cookie, 'timeout' => $this->timeout);
48
+ $result = wp_remote_get('https://www.pinterest.com/pinterest/', $requestData);
49
+ if (is_wp_error($result)) {
50
+ return array('error' => 1, 'error_pos' => 0, 'location' => 'setRoute', 'error_data' => serialize($result));
51
+ }
52
+ if ($result['response']['code'] == '302' && !empty($result['headers']['location'])) {
53
+ $this->route = 'https://' . $this->cutFromTo($result['headers']['location'] . '/', "//", '/') . '/';
54
+ return $this->route;
55
+ }
56
+ return $this->route;
57
+ }
58
+
59
+ public function authorize($username, $password) {
60
+ $this->setRoute();
61
+
62
+ $headerData = $this->setHeader($this->route . 'login/');
63
+ $requestData = array('headers' => $headerData, 'timeout' => $this->timeout);
64
+ $result = wp_remote_get($this->route . 'login/', $requestData);
65
+ if (is_wp_error($result)) {
66
+ return array('error' => 1, 'error_pos' => 1, 'location' => $this->route . 'login/', 'error_data' => serialize($result));
67
+ }
68
+ $cookie = $result['cookies'];
69
+ $content = $result['body'];
70
+ $appVersion = trim($this->cutFromTo($content, '"app_version": "', '"'));
71
+ $fields = array('data' => '{"options":{"username_or_email":"' . $username . '","password":"' . addslashes(stripslashes($password)) . '"},"context":{"app_version":"' . $appVersion . '"}}', 'source_url' => '/login/', 'module_path' => 'App()>LoginPage()>Login()>Button(class_name=primary, text=Log in, type=submit, tagName=button, size=large)');
72
+ foreach ($cookie as $c) {
73
+ if ($c->name == 'csrftoken') {
74
+ $csrfToken = $c->value;
75
+ }
76
+ }
77
+
78
+ $headerData = $this->setHeader($this->route . 'login/', $this->route, 'POST', true);
79
+ $headerData['X-NEW-APP'] = '1';
80
+ $headerData['X-APP-VERSION'] = $appVersion;
81
+ $headerData['X-CSRFToken'] = $csrfToken;
82
+ $requestData = array('headers' => $headerData, 'cookies' => $cookie, 'body' => $fields, 'timeout' => $this->timeout);
83
+ $result = wp_remote_post($this->route . 'resource/UserSessionResource/create/', $requestData);
84
+ if (is_wp_error($result)) {
85
+ return array('error' => 1, 'error_pos' => 2, 'error_data' => serialize($result));
86
+ }
87
+ if (!empty($result['headers']['location'])) {
88
+ $loc = $this->cutFromTo($result['headers']['location'], 'https://', '.pinterest');
89
+ $headerData = $this->setHeader('https://' . $loc . '.pinterest.com/login/', 'https://' . $loc . '.pinterest.com', 'POST', true);
90
+ $requestData = array('headers' => $headerData, 'cookies' => $cookie, 'body' => $fields, 'timeout' => $this->timeout);
91
+ $result = wp_remote_post('https://' . $loc . '.pinterest.com/resource/UserSessionResource/create/', $requestData);
92
+ if (is_wp_error($result)) {
93
+ return array('error' => 1, 'error_pos' => 3, 'error_data' => serialize($result));
94
+ }
95
+ } else {
96
+ $loc = 'www';
97
+ }
98
+ if (!empty($result['body'])) {
99
+ $content = $result['body'];
100
+ $response = json_decode($content, true);
101
+ } else {
102
+ return array('error' => 1, 'error_pos' => 4, 'error_data' => serialize($result));
103
+ }
104
+ if (is_array($response) && empty($response['resource_response']['error'])) {
105
+ $this->cookie = $result['cookies'];
106
+ return array('error' => 0, 'cookie_data' => serialize($this->cookie));
107
+ } elseif (is_array($response) && isset($response['resource_response']['error'])) {
108
+ return array('error' => 1, 'error_pos' => 6, 'error_data' => serialize($response['resource_response']['error']));
109
+ } elseif (stripos($content, 'CSRF') !== false) {
110
+ return array('error' => 1, 'error_pos' => 6, 'error_data' => 'CSRF verification failed');
111
+ } elseif (stripos($content, 'suspicious activity') !== false) {
112
+ return array('error' => 1, 'error_pos' => 6, 'error_data' => 'Pinterest blocked logins from this IP because of suspicious activity');
113
+ } elseif (stripos($content, 'bot!') !== false) {
114
+ return array('error' => 1, 'error_pos' => 6, 'error_data' => 'Pinterest has your ip in the list of potentially suspicious networks and blocked it');
115
+ } else {
116
+ return array('error' => 1, 'error_pos' => 6, 'error_data' => 'Pinterest login failed - unknown error');
117
+ }
118
+ return array('error' => 1, 'error_pos' => 7, 'error_data' => 'Pinterest login failed - unknown error');
119
+ }
120
+
121
+ public function cutFromTo($string, $from, $to) {
122
+ $fstart = stripos($string, $from);
123
+ $tmp = substr($string, $fstart + strlen($from));
124
+ $flen = stripos($tmp, $to);
125
+ return substr($tmp, 0, $flen);
126
+ }
127
+
128
+ }
includes/B2S/Api/Network/private_key.pem ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN PRIVATE KEY-----
2
+ MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCnSJ5S8/Ba41zg
3
+ nxgRZmqhKbVPTRIVbKeyd8WakSPGXyls7x/bJ/sY4xssIH+FZg+0otBP4bvic16s
4
+ 4N2EWLpR+3A1JnAxqwRB9kGlD0JhGV+sSD+H0SSNMMktvoyEw26U0sUy2y7bfya6
5
+ sTpoUq6T8hl2+sqOJh10j0ohD3qsAceC9acEwVwm/xmiIl+wELq8SwPOvWmAH+0O
6
+ Zbv/NyaLPO6t79+TU0IK/GuurhQawTFQ5tAQEqv6XQtZKCXMKX6fvZ/fZjKmNPAZ
7
+ zZSjeIRivGILpwuOi4bhjpD/Kkw6jgt+8p/fa2eBQEiiPze+gfMP1/YqjJqRIuV/
8
+ VYVebjbTAgMBAAECggEAZr2wF6yg84Fu2rp7srwfQ0p1g/YG5Eeum2r6X1tDCKQL
9
+ sk8PVq+whXF+j9SJ3al4fe39WQKAPa2z+SPGiXFhRdbS7KHmCGtLmyOe37yGfVJz
10
+ M0HQWx81fs320XSVozjQovDskraRidgHNmSBRe96L31i7HNNko6QSrVyxulV42va
11
+ C09XNSE5GkhelpFKrZTUj8gox5KjYKryAgYvOnHwYROAJZA2XZrp/aZ9G5+Md6sV
12
+ 2w8gh3+uH6QQEEtjUu2R0WfNF1+nKqXj+mKbiWU+XpkG72f8dITJx9X9jCQcYyRd
13
+ E8X47W2KUnuwGOkXRNFaIq4AYdqZaYuF1H+lhScgcQKBgQDU5vUzMlvcBQNnGTij
14
+ QO6irbM7Djf+1S6Zig5LHYPkXXHLXKq3NOik6vFz63GnfR6p8mtaNN7329tIGUD2
15
+ qc2wFTmOW1wZ17fLMlUVy9he1vAjpNPn79jEs+803xKyF8p9nlggbLumJgGjZk2G
16
+ 13gxsfXSyB3L5YqLpNgbn9z9SQKBgQDJJZzTHlOtlcjjMJ3db/txWupvtMPan1pA
17
+ Lrbl3xqv+rkF45AKtn7d6w3LEc+O22ttkLVAMtR4Uc5idACGb+oLpIMStdpxlC3e
18
+ NcQaz45XBBCKl8DhVPOUIjBCZeCVfcdCwEf9g+GZ1a0nmXfRXW8AfYyjnhjS1DEm
19
+ V8y6yTQfOwKBgCLZy7mdvLu/dlciIctXjbjDhltccH4el4o6tyxEoJp5UW9gs/FZ
20
+ j9uvOecn22r3aFWZgUk67mTUcIjU2XWHRkxUrR9IhUMVtNhmXNc8jya3OIgdKzME
21
+ aA+LBNU6zuyoSFVX3kUwh2cjQZFl5br0+o/n+b2PVJFT+eHyEg4zlRFBAoGAX3F6
22
+ dW6pc+9jz/GMprrxC3uBTBnw6Pa+A0BnRrHTXvdP/exZt8uabUCQXfAIlZel5OpK
23
+ Jrk3uhPPI0Y5zZCi9H1OOH2TtlsCXLMUZ0hfGQjztF+HhSQjJAII9iiTJTv2ZcUJ
24
+ I9EFJlKOhAC9Ktnzxr7MEgL9cmR/Idt9aI/6LGsCgYEAwB9tV9vd3LCdUy90dt4c
25
+ nRhFlEtWcWWzsUSAnE9Y4YRc7QylaTg+HOqZeWIOlZUy26loSdlTRQ/ePCI8Foyi
26
+ V4++LYHlzksTfCGoWOLeJOxPrqJ6TNT1w9glcjqwS3S9nZdgEB2rK3mWfUCpEGyy
27
+ Z0dEtX5Qvek6d89g/c0raaY=
28
+ -----END PRIVATE KEY-----
includes/B2S/Curation/Save.php CHANGED
@@ -22,4 +22,28 @@ class B2S_Curation_Save {
22
  return ($res > 0) ? (int) $res : false;
23
  }
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  }
22
  return ($res > 0) ? (int) $res : false;
23
  }
24
 
25
+ public function updateContent($source = '') {
26
+
27
+ if ($source == "b2s_browser_extension") {
28
+ $post = array(
29
+ 'ID' => $this->data['ID'],
30
+ 'post_title' => wp_strip_all_tags($this->data['title']),
31
+ 'post_content' => $this->data['content']
32
+ );
33
+ $res = wp_update_post($post, true);
34
+ update_post_meta($this->data['ID'], 'b2s_original_url', trim($this->data['url']));
35
+ }
36
+
37
+ if (empty($source)) {
38
+ $post = array(
39
+ 'ID' => $this->data['ID'],
40
+ 'post_title' => wp_strip_all_tags($this->data['title']),
41
+ 'post_content' => $this->data['content'],
42
+ 'guid' => $this->data['url']
43
+ );
44
+ $res = wp_update_post($post, true);
45
+ }
46
+ return ($res > 0) ? (int) $res : false;
47
+ }
48
+
49
  }
includes/B2S/Curation/View.php CHANGED
@@ -14,8 +14,8 @@ class B2S_Curation_View {
14
  $image = $data['og_image'];
15
  $externalImage = true;
16
  }
17
- $title = isset($data['og_title']) ? $data['og_title'] : (isset($data['default_title']) ? $data['default_title'] : '');
18
- $desc = isset($data['og_description']) ? $data['og_description'] : (isset($data['default_description']) ? $data['default_description'] : '');
19
 
20
  $html = '';
21
  $html .='<div class="row">';
@@ -104,6 +104,8 @@ class B2S_Curation_View {
104
  $content .='<div class="row">';
105
  $content .='<div class="col-xs-12 col-sm-6 col-lg-6">';
106
  $content .= '<button class="btn btn-primary pull-left" type="submit" id="b2s-btn-curation-customize">' . __('Customize & Schedule', 'blog2social') . '</button>';
 
 
107
  $content .='</div>';
108
  $content .='<div class="col-xs-12 col-sm-6 col-lg-6">';
109
  $content .= '<button class="btn btn-success pull-right" type="submit" id="b2s-btn-curation-share">' . __('Share', 'blog2social') . '</button>';
14
  $image = $data['og_image'];
15
  $externalImage = true;
16
  }
17
+ $title = (isset($data['og_title']) &&!empty(trim($data['og_title']))) ? $data['og_title'] : ((isset($data['default_title']) && !empty(trim($data['default_title']))) ? $data['default_title'] : '');
18
+ $desc = (isset($data['og_description']) &&!empty(trim($data['og_description']))) ? $data['og_description'] : ((isset($data['default_description']) && !empty(trim($data['default_description']))) ? $data['default_description'] : '');
19
 
20
  $html = '';
21
  $html .='<div class="row">';
104
  $content .='<div class="row">';
105
  $content .='<div class="col-xs-12 col-sm-6 col-lg-6">';
106
  $content .= '<button class="btn btn-primary pull-left" type="submit" id="b2s-btn-curation-customize">' . __('Customize & Schedule', 'blog2social') . '</button>';
107
+ $content .= '<button class="btn btn-primary pull-left" type="submit" id="b2s-btn-curation-draft">' . __('Save as Draft', 'blog2social') . '</button>';
108
+ $content .= '<input type="hidden" id="b2s-draft-id" value="" name="b2s-draft-id">';
109
  $content .='</div>';
110
  $content .='<div class="col-xs-12 col-sm-6 col-lg-6">';
111
  $content .= '<button class="btn btn-success pull-right" type="submit" id="b2s-btn-curation-share">' . __('Share', 'blog2social') . '</button>';
includes/B2S/Network/Item.php CHANGED
@@ -24,7 +24,7 @@ class B2S_Network_Item {
24
  if (!isset($this->userSchedData['time'])) {
25
  $this->userSchedDataOld = $this->getSchedDataByUser();
26
  }
27
- $this->authurl = B2S_PLUGIN_API_ENDPOINT_AUTH . '?b2s_token=' . B2S_PLUGIN_TOKEN . '&sprache=' . substr(B2S_LANGUAGE, 0, 2) . '&unset=true';
28
  $this->allowProfil = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PROFILE);
29
  $this->allowPage = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PAGE);
30
  $this->allowGroup = unserialize(B2S_PLUGIN_NETWORK_ALLOW_GROUP);
24
  if (!isset($this->userSchedData['time'])) {
25
  $this->userSchedDataOld = $this->getSchedDataByUser();
26
  }
27
+ $this->authurl = B2S_PLUGIN_API_ENDPOINT_AUTH . '?b2s_token=' . B2S_PLUGIN_TOKEN . '&sprache=' . substr(B2S_LANGUAGE, 0, 2) . '&unset=true&hostUrl='.get_site_url();
28
  $this->allowProfil = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PROFILE);
29
  $this->allowPage = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PAGE);
30
  $this->allowGroup = unserialize(B2S_PLUGIN_NETWORK_ALLOW_GROUP);
includes/B2S/Post/Filter.php CHANGED
@@ -135,17 +135,19 @@ class B2S_Post_Filter {
135
  if (B2S_PLUGIN_ADMIN) {
136
  $this->postFilter .= $this->getAutorHtml();
137
  }
138
- $this->postFilter .= $this->getPostCatHtml();
139
- $this->postFilter .= $this->getPostTypeHtml();
 
140
 
141
- if ($this->type == 'all') {
142
- $this->postFilter .= $this->getPostStatusHtml();
143
- }
144
- if ($this->type == 'publish' || $this->type == 'notice') {
145
- $this->postFilter .= $this->getPublishDateHtml();
146
- }
147
- if ($this->type == 'sched') {
148
- $this->postFilter .= $this->getSchedDateHtml();
 
149
  }
150
 
151
  $this->postFilter .= '<div class="form-group">';
135
  if (B2S_PLUGIN_ADMIN) {
136
  $this->postFilter .= $this->getAutorHtml();
137
  }
138
+ if($this->type != 'draft') {
139
+ $this->postFilter .= $this->getPostCatHtml();
140
+ $this->postFilter .= $this->getPostTypeHtml();
141
 
142
+ if ($this->type == 'all') {
143
+ $this->postFilter .= $this->getPostStatusHtml();
144
+ }
145
+ if ($this->type == 'publish' || $this->type == 'notice') {
146
+ $this->postFilter .= $this->getPublishDateHtml();
147
+ }
148
+ if ($this->type == 'sched') {
149
+ $this->postFilter .= $this->getSchedDateHtml();
150
+ }
151
  }
152
 
153
  $this->postFilter .= '<div class="form-group">';
includes/B2S/Post/Item.php CHANGED
@@ -205,6 +205,26 @@ class B2S_Post_Item {
205
  }
206
  }
207
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  }
209
 
210
  public function getItemHtml($selectSchedDate = "") {
@@ -291,7 +311,7 @@ class B2S_Post_Item {
291
  <div class="pull-left media-head">
292
  <strong><a target="_blank" href="' . get_permalink($var->ID) . '">' . $postTitle . '</a></strong>' . $curated . '
293
  <span class="pull-right">
294
- <button type="button" class="btn btn-primary btn-sm b2sDetailsSchedPostBtn" data-search-network="'.$this->searchShowByNetwork.'" data-search-date="' . $this->searchShowByDate . '" data-post-id="' . $var->ID . '"><i class="glyphicon glyphicon-chevron-down"></i> ' . __('Details', 'blog2social') . '</button>
295
  </span>
296
  <p class="info hidden-xs"><a class="b2sDetailsSchedPostTriggerLink" href="#"><span class="b2s-sched-count" data-post-id="' . $var->ID . '">' . $schedPublish . '</span> ' . __('scheduled social media posts', 'blog2social') . '</a> | ' . __('next share by', 'blog2social') . ' <a href="' . get_author_posts_url($var->blog_user_id) . '">' . (isset($userInfo['nickname'][0]) ? $userInfo['nickname'][0] : '-') . '</a> ' . B2S_Util::getCustomDateFormat($nextSched, substr(B2S_LANGUAGE, 0, 2)) . '</p>
297
  </div>
@@ -324,6 +344,27 @@ class B2S_Post_Item {
324
  </div>
325
  </li>';
326
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
327
  }
328
 
329
  return html_entity_decode($this->postItem, ENT_COMPAT, 'UTF-8');
@@ -554,14 +595,14 @@ class B2S_Post_Item {
554
  return false;
555
  }
556
 
557
- public function getSchedPostDataHtml($post_id = 0, $showByDate = '',$showByNetwork =0, $userAuthId = 0) {
558
  if ($post_id > 0) {
559
  global $wpdb;
560
  $addNotAdminPosts = (B2S_PLUGIN_ADMIN == false) ? $wpdb->prepare(' AND `b2s_posts`.`blog_user_id` = %d', B2S_PLUGIN_BLOG_USER_ID) : '';
561
  $addSearchShowByDate = (!empty($showByDate)) ? " AND DATE_FORMAT(`b2s_posts`.`sched_date`,'%%Y-%%m-%%d') = '" . $showByDate . "' " : '';
562
  $addSearchShowByNetwork = ((int) $showByNetwork > 0) ? " AND `b2s_posts_network_details`.`network_id` = '" . $showByNetwork . "' " : '';
563
  $addSearchUserAuthId = ($userAuthId != 0) ? " AND `b2s_posts_network_details`.`network_auth_id` =" . $userAuthId . " " : '';
564
-
565
  $sqlData = $wpdb->prepare("SELECT `b2s_posts`.`id`, `b2s_posts`.`post_id`,`blog_user_id`,`last_edit_blog_user_id`,`v2_id`, `sched_date`, `sched_date_utc`, `sched_type`, `relay_primary_post_id`, `b2s_posts_network_details`.`network_id`,`b2s_posts_network_details`.`network_auth_id`,`b2s_posts_network_details`.`network_type`,`b2s_posts_network_details`.`network_display_name` FROM `b2s_posts` LEFT JOIN `b2s_posts_network_details` ON `b2s_posts`.`network_details_id` = `b2s_posts_network_details`.`id` WHERE `b2s_posts`.`hide` = 0 AND ((`b2s_posts`.`sched_date_utc` != '0000-00-00 00:00:00' AND `b2s_posts`.`post_for_approve` = 0) OR (`b2s_posts`.`sched_date_utc` >= '" . gmdate('Y-m-d H:i:s') . "' AND `b2s_posts`.`post_for_approve` = 1)) AND `b2s_posts`.`sched_type` != 3 AND `b2s_posts`.`publish_date` = '0000-00-00 00:00:00' $addNotAdminPosts $addSearchShowByDate $addSearchShowByNetwork $addSearchUserAuthId AND `b2s_posts`.`post_id` = %d ORDER BY `b2s_posts`.`sched_date` ASC ", $post_id);
566
  $result = $wpdb->get_results($sqlData);
567
  $specialPostingData = array(4 => __('Retweet', 'blog2social'));
205
  }
206
  }
207
  }
208
+
209
+ if ($this->type == 'draft') {
210
+ $sqlPosts = "SELECT posts.`ID`, posts.`post_author`, posts.`post_date`, posts.`post_type`, posts.`post_status`, posts.`post_title`, posts.`post_content`, posts.`guid`
211
+ FROM `$wpdb->posts` posts $leftJoin $leftJoin2
212
+ LEFT JOIN b2s_posts ON posts.ID = b2s_posts.post_id
213
+ WHERE (posts.`post_type` LIKE '%b2s_ex_post%')
214
+ AND b2s_posts.post_id IS NULL
215
+ $addSearchAuthorId $addSearchPostTitle $addNotAdmin $leftJoinWhere
216
+ ORDER BY `" . $order . "` " . $sortType . "
217
+ LIMIT " . (($this->currentPage - 1) * $this->results_per_page) . "," . $this->results_per_page;
218
+ $this->postData = $wpdb->get_results($sqlPosts);
219
+
220
+ $sqlPostsTotal = "SELECT COUNT(*)
221
+ FROM `$wpdb->posts` posts $leftJoin $leftJoin2
222
+ LEFT JOIN b2s_posts ON posts.ID = b2s_posts.post_id
223
+ WHERE (posts.`post_type` LIKE '%b2s_ex_post%')
224
+ AND b2s_posts.post_id IS NULL
225
+ $addSearchAuthorId $addSearchPostTitle $addNotAdmin $leftJoinWhere";
226
+ $this->postTotal = $wpdb->get_var($sqlPostsTotal);
227
+ }
228
  }
229
 
230
  public function getItemHtml($selectSchedDate = "") {
311
  <div class="pull-left media-head">
312
  <strong><a target="_blank" href="' . get_permalink($var->ID) . '">' . $postTitle . '</a></strong>' . $curated . '
313
  <span class="pull-right">
314
+ <button type="button" class="btn btn-primary btn-sm b2sDetailsSchedPostBtn" data-search-network="' . $this->searchShowByNetwork . '" data-search-date="' . $this->searchShowByDate . '" data-post-id="' . $var->ID . '"><i class="glyphicon glyphicon-chevron-down"></i> ' . __('Details', 'blog2social') . '</button>
315
  </span>
316
  <p class="info hidden-xs"><a class="b2sDetailsSchedPostTriggerLink" href="#"><span class="b2s-sched-count" data-post-id="' . $var->ID . '">' . $schedPublish . '</span> ' . __('scheduled social media posts', 'blog2social') . '</a> | ' . __('next share by', 'blog2social') . ' <a href="' . get_author_posts_url($var->blog_user_id) . '">' . (isset($userInfo['nickname'][0]) ? $userInfo['nickname'][0] : '-') . '</a> ' . B2S_Util::getCustomDateFormat($nextSched, substr(B2S_LANGUAGE, 0, 2)) . '</p>
317
  </div>
344
  </div>
345
  </li>';
346
  }
347
+
348
+ if ($this->type == 'draft') {
349
+ $browser = (get_post_meta($var->ID, "b2s_source", true) == "b2s_browser_extension") ? ' - <strong>' . __('via Browser-Extension', 'blog2social') . '</strong>' : '';
350
+ $userInfo = get_user_meta($var->post_author);
351
+ $lastPublish = $this->getLastPublish($var->ID);
352
+ $lastPublish = ($lastPublish != false) ? ' | ' . __('last shared on social media', 'blog2social') . ' ' . B2S_Util::getCustomDateFormat($lastPublish, substr(B2S_LANGUAGE, 0, 2)) : '';
353
+ $url = (!empty($browser)) ? get_post_meta($var->ID, "b2s_original_url", true) : get_permalink($var->ID);
354
+
355
+ $this->postItem .= '<li class="list-group-item">
356
+ <div class="media">
357
+ <img class="post-img-10 pull-left hidden-xs" src="' . plugins_url('/assets/images/b2s/' . $postType . '-icon.png', B2S_PLUGIN_FILE) . '" alt="posttype">
358
+ <div class="media-body">
359
+ <strong><a target="_blank" href="' . $url . '">' . $postTitle . '</a></strong>' . $browser . '
360
+ <span class="pull-right b2s-publish-btn">
361
+ <a class="btn btn-primary btn-sm publishPostBtn" href="admin.php?page=blog2social-curation&postId=' . $var->ID . '&url=' . urlencode($url) . '&comment=' . urlencode($var->post_content) . '">' . __('Share on Social Media', 'blog2social') . '</a>
362
+ </span>
363
+ <p class="info hidden-xs">#' . $var->ID . ' | ' . __('Author', 'blog2social') . ' <a href="' . get_author_posts_url($var->post_author) . '">' . (isset($userInfo['nickname'][0]) ? $userInfo['nickname'][0] : '-') . '</a> | ' . __('saved', 'blog2social') . ': ' . B2S_Util::getCustomDateFormat($var->post_date, substr(B2S_LANGUAGE, 0, 2)) . $lastPublish . '</p>
364
+ </div>
365
+ </div>
366
+ </li>';
367
+ }
368
  }
369
 
370
  return html_entity_decode($this->postItem, ENT_COMPAT, 'UTF-8');
595
  return false;
596
  }
597
 
598
+ public function getSchedPostDataHtml($post_id = 0, $showByDate = '', $showByNetwork = 0, $userAuthId = 0) {
599
  if ($post_id > 0) {
600
  global $wpdb;
601
  $addNotAdminPosts = (B2S_PLUGIN_ADMIN == false) ? $wpdb->prepare(' AND `b2s_posts`.`blog_user_id` = %d', B2S_PLUGIN_BLOG_USER_ID) : '';
602
  $addSearchShowByDate = (!empty($showByDate)) ? " AND DATE_FORMAT(`b2s_posts`.`sched_date`,'%%Y-%%m-%%d') = '" . $showByDate . "' " : '';
603
  $addSearchShowByNetwork = ((int) $showByNetwork > 0) ? " AND `b2s_posts_network_details`.`network_id` = '" . $showByNetwork . "' " : '';
604
  $addSearchUserAuthId = ($userAuthId != 0) ? " AND `b2s_posts_network_details`.`network_auth_id` =" . $userAuthId . " " : '';
605
+
606
  $sqlData = $wpdb->prepare("SELECT `b2s_posts`.`id`, `b2s_posts`.`post_id`,`blog_user_id`,`last_edit_blog_user_id`,`v2_id`, `sched_date`, `sched_date_utc`, `sched_type`, `relay_primary_post_id`, `b2s_posts_network_details`.`network_id`,`b2s_posts_network_details`.`network_auth_id`,`b2s_posts_network_details`.`network_type`,`b2s_posts_network_details`.`network_display_name` FROM `b2s_posts` LEFT JOIN `b2s_posts_network_details` ON `b2s_posts`.`network_details_id` = `b2s_posts_network_details`.`id` WHERE `b2s_posts`.`hide` = 0 AND ((`b2s_posts`.`sched_date_utc` != '0000-00-00 00:00:00' AND `b2s_posts`.`post_for_approve` = 0) OR (`b2s_posts`.`sched_date_utc` >= '" . gmdate('Y-m-d H:i:s') . "' AND `b2s_posts`.`post_for_approve` = 1)) AND `b2s_posts`.`sched_type` != 3 AND `b2s_posts`.`publish_date` = '0000-00-00 00:00:00' $addNotAdminPosts $addSearchShowByDate $addSearchShowByNetwork $addSearchUserAuthId AND `b2s_posts`.`post_id` = %d ORDER BY `b2s_posts`.`sched_date` ASC ", $post_id);
607
  $result = $wpdb->get_results($sqlData);
608
  $specialPostingData = array(4 => __('Retweet', 'blog2social'));
includes/B2S/Settings/Item.php CHANGED
@@ -317,7 +317,9 @@ class B2S_Settings_Item {
317
 
318
  $content .='<strong>' . __('This is a global feature for your blog, which can only be edited by users with admin rights.', 'blog2social') . '</strong>';
319
  $content .='<div class="' . ( (B2S_PLUGIN_ADMIN) ? "" : "b2s-disabled-div") . '">';
320
- $content .='<h4>' . __('Frontpage Settings', 'blog2social') . '</h4>';
 
 
321
  $content .='<div><img alt="" class="b2s-post-item-network-image" src="' . plugins_url('/assets/images/portale/1_flat.png', B2S_PLUGIN_FILE) . '"> <b>Facebook</b></div>';
322
  $content .= '<p>' . __('Add the default Open Graph parameters for title, description and image you want Facebook to display, if you share the frontpage of your blog as link post (http://www.yourblog.com)', 'blog2social') . '</p>';
323
  $content .='<br>';
317
 
318
  $content .='<strong>' . __('This is a global feature for your blog, which can only be edited by users with admin rights.', 'blog2social') . '</strong>';
319
  $content .='<div class="' . ( (B2S_PLUGIN_ADMIN) ? "" : "b2s-disabled-div") . '">';
320
+ $content .='<h4>' . __('Frontpage Settings', 'blog2social');
321
+ $content .=' <a class="btn-link b2s-btn-link-txt" href="admin.php?page=blog2social-support#b2s-support-sharing-debugger">' . __("Check Settings with Sharing-Debugger", "blog2social") . '</a>';
322
+ $content .='</h4>';
323
  $content .='<div><img alt="" class="b2s-post-item-network-image" src="' . plugins_url('/assets/images/portale/1_flat.png', B2S_PLUGIN_FILE) . '"> <b>Facebook</b></div>';
324
  $content .= '<p>' . __('Add the default Open Graph parameters for title, description and image you want Facebook to display, if you share the frontpage of your blog as link post (http://www.yourblog.com)', 'blog2social') . '</p>';
325
  $content .='<br>';
includes/B2S/Ship/Navbar.php CHANGED
@@ -15,7 +15,7 @@ class B2S_Ship_Navbar {
15
  $this->neworkName = unserialize(B2S_PLUGIN_NETWORK);
16
  $this->networkTypeName = unserialize(B2S_PLUGIN_NETWORK_TYPE);
17
  $this->networkKindName = unserialize(B2S_PLUGIN_NETWORK_KIND);
18
- $this->authUrl = B2S_PLUGIN_API_ENDPOINT_AUTH . '?b2s_token=' . B2S_PLUGIN_TOKEN . '&sprache=' . substr(B2S_LANGUAGE, 0, 2) . '&unset=true';
19
  $this->allowProfil = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PROFILE);
20
  $this->allowPage = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PAGE);
21
  $this->allowGroup = unserialize(B2S_PLUGIN_NETWORK_ALLOW_GROUP);
15
  $this->neworkName = unserialize(B2S_PLUGIN_NETWORK);
16
  $this->networkTypeName = unserialize(B2S_PLUGIN_NETWORK_TYPE);
17
  $this->networkKindName = unserialize(B2S_PLUGIN_NETWORK_KIND);
18
+ $this->authUrl = B2S_PLUGIN_API_ENDPOINT_AUTH . '?b2s_token=' . B2S_PLUGIN_TOKEN . '&sprache=' . substr(B2S_LANGUAGE, 0, 2) . '&unset=true&hostUrl='.get_site_url();
19
  $this->allowProfil = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PROFILE);
20
  $this->allowPage = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PAGE);
21
  $this->allowGroup = unserialize(B2S_PLUGIN_NETWORK_ALLOW_GROUP);
includes/B2S/Ship/Portale.php CHANGED
@@ -9,7 +9,7 @@ class B2S_Ship_Portale {
9
  private $oAuthPortal;
10
 
11
  public function __construct() {
12
- $this->authurl = B2S_PLUGIN_API_ENDPOINT_AUTH . '?b2s_token=' . B2S_PLUGIN_TOKEN . '&sprache=' . substr(B2S_LANGUAGE, 0, 2);
13
  $this->allowProfil = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PROFILE);
14
  $this->allowPage = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PAGE);
15
  $this->allowGroup = unserialize(B2S_PLUGIN_NETWORK_ALLOW_GROUP);
9
  private $oAuthPortal;
10
 
11
  public function __construct() {
12
+ $this->authurl = B2S_PLUGIN_API_ENDPOINT_AUTH . '?b2s_token=' . B2S_PLUGIN_TOKEN . '&sprache=' . substr(B2S_LANGUAGE, 0, 2).'&hostUrl='.get_site_url();
13
  $this->allowProfil = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PROFILE);
14
  $this->allowPage = unserialize(B2S_PLUGIN_NETWORK_ALLOW_PAGE);
15
  $this->allowGroup = unserialize(B2S_PLUGIN_NETWORK_ALLOW_GROUP);
includes/B2S/Support/Check/System.php CHANGED
@@ -15,6 +15,8 @@ class B2S_Support_Check_System {
15
  $this->systemData['MYSQLVERSION'] = array("system" => $this->getMysqlVersion(), "req" => B2S_PLUGIN_SYSTEMREQUIREMENT_MYSQLVERSION, "type" => "version", "name" => "MySql Version", "link" => B2S_Tools::getSupportLink("system_requirements"));
16
  $this->systemData['DATABASERIGHTS'] = array("system" => $this->getDatabaseRights(), "req" => B2S_PLUGIN_SYSTEMREQUIREMENT_DATABASERIGHTS, "type" => "active", "name" => "Database Rights", "link" => B2S_Tools::getSupportLink("system_requirements"));
17
  $this->systemData['HOTLINKPROTECTION'] = array("system" => $this->getHotlinkProtection(), "req" => B2S_PLUGIN_SYSTEMREQUIREMENT_HOTLINKPROTECTION, "type" => "active", "name" => "Hotlink Protection (disabled)", "link" => B2S_Tools::getSupportLink("hotlink_protection"));
 
 
18
  $this->checkSystemData();
19
  $this->getPluginData();
20
  }
@@ -175,7 +177,7 @@ class B2S_Support_Check_System {
175
  }
176
 
177
  private function getBlogUrl() {
178
- return get_home_url();
179
  }
180
 
181
  private function getUserOptions() {
@@ -208,5 +210,20 @@ class B2S_Support_Check_System {
208
  }
209
  }
210
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
 
212
  }
15
  $this->systemData['MYSQLVERSION'] = array("system" => $this->getMysqlVersion(), "req" => B2S_PLUGIN_SYSTEMREQUIREMENT_MYSQLVERSION, "type" => "version", "name" => "MySql Version", "link" => B2S_Tools::getSupportLink("system_requirements"));
16
  $this->systemData['DATABASERIGHTS'] = array("system" => $this->getDatabaseRights(), "req" => B2S_PLUGIN_SYSTEMREQUIREMENT_DATABASERIGHTS, "type" => "active", "name" => "Database Rights", "link" => B2S_Tools::getSupportLink("system_requirements"));
17
  $this->systemData['HOTLINKPROTECTION'] = array("system" => $this->getHotlinkProtection(), "req" => B2S_PLUGIN_SYSTEMREQUIREMENT_HOTLINKPROTECTION, "type" => "active", "name" => "Hotlink Protection (disabled)", "link" => B2S_Tools::getSupportLink("hotlink_protection"));
18
+ $this->systemData['WPJSON'] = array("system" => $this->getWpJson(), "req" => B2S_PLUGIN_SYSTEMREQUIREMENT_WPJSON, "type" => "active", "name" => "WP-JSON", "link" => B2S_Tools::getSupportLink("system_requirements"));
19
+ $this->systemData['OPENSSL'] = array("system" => $this->getOpenssl(), "req" => B2S_PLUGIN_SYSTEMREQUIREMENT_OPENSSL, "type" => "active", "name" => "OpenSSL", "link" => B2S_Tools::getSupportLink("system_requirements"));
20
  $this->checkSystemData();
21
  $this->getPluginData();
22
  }
177
  }
178
 
179
  private function getBlogUrl() {
180
+ return get_site_url();
181
  }
182
 
183
  private function getUserOptions() {
210
  }
211
  }
212
  }
213
+
214
+ private function getWpJson() {
215
+ $base_url = get_site_url();
216
+ $url = (substr($base_url, -1) == "/") ? $base_url."wp-json" : $base_url."/wp-json";
217
+ $result = json_decode(B2S_Api_Get::get($url), true);
218
+ if(isset($result["url"]) && !empty($result["url"]) && $result["url"] == $base_url){
219
+ return true;
220
+ } else {
221
+ return false;
222
+ }
223
+ }
224
+
225
+ private function getOpenssl() {
226
+ return function_exists("openssl_private_decrypt");
227
+ }
228
 
229
  }
includes/Loader.php CHANGED
@@ -44,7 +44,7 @@ class B2S_Loader {
44
  define('B2S_PLUGIN_NETWORK_ALLOW_MODIFY_BOARD_AND_GROUP', serialize(array(6 => array('TYPE' => array(0), 'TITLE' => __('Modify pin board', 'blog2social')), 8 => array('TYPE' => array(2), 'TITLE' => __('Edit group settings', 'blog2social')), 15 => array('TYPE' => array(0), 'TITLE' => __('Modify subreddit', 'blog2social')), 19 => array('TYPE' => array(2), 'TITLE' => __('Modify forum', 'blog2social')), 20 => array('TYPE' => array(0), 'TITLE' => __('Modify pin board', 'blog2social')))));
45
  define('B2S_PLUGIN_AUTO_POST_LIMIT', serialize(array(0 => 0, 1 => 25, 2 => 50, 3 => 100, 4 => 100)));
46
  define('B2S_PLUGIN_NETWORK_OAUTH', serialize(array(1, 2, 3, 4, 7, 8, 11, 15, 17, 18, 20)));
47
- define('B2S_PLUGIN_SYSTEMREQUIREMENT_WORDPRESSVERSION', '4.4.2');
48
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_PHPVERSION', '5.5.3');
49
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_MYSQLVERSION', '5.5.3');
50
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_DATABASERIGHTS', true);
@@ -53,10 +53,13 @@ class B2S_Loader {
53
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_PHPDOM', true);
54
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_HOTLINKPROTECTION', true);
55
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_PLUGINWARNING_WORDS', serialize(array('hotlink', 'firewall', 'security')));
 
 
56
 
57
  add_filter('heartbeat_received', array(B2S_Heartbeat::getInstance(), 'init'), 10, 2);
58
  add_action('wp_logout', array($this, 'releaseLocks'));
59
  add_action('transition_post_status', array($this, 'b2s_auto_post_import'), 9999, 3); //for Auto-Posting imported + manuell
 
60
  }
61
 
62
  public function call_admin_hooks() {
@@ -107,7 +110,7 @@ class B2S_Loader {
107
  }
108
 
109
  public function call_public_hooks() {
110
- add_filter('wp_footer', array($this, 'b2s_get_full_content'), 99); //for shortcodes
111
  add_action('wp_head', array($this, 'b2s_build_frontend_meta'), 1); // for MetaTags
112
  }
113
 
@@ -116,6 +119,46 @@ class B2S_Loader {
116
  B2S_Meta::getInstance()->_run();
117
  }
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  private function b2s_register_custom_post_type() {
120
  if (post_type_exists("b2s_ex_post")) {
121
  return;
@@ -623,7 +666,7 @@ class B2S_Loader {
623
  }
624
 
625
  public function defineText() {
626
- define('B2S_PLUGIN_PAGE_TITLE', serialize(array('blog2social-notice' => __('Notifications', 'blog2social'), 'blog2social-publish' => __('Shared Posts', 'blog2social'), 'blog2social-approve' => __('Instant Sharing', 'blog2social'), 'blog2social-sched' => __('Schedueld Posts', 'blog2social'))));
627
  define('B2S_PLUGIN_NETWORK_TYPE', serialize(array(__('Profile', 'blog2social'), __('Page', 'blog2social'), __('Group', 'blog2social'))));
628
  define('B2S_PLUGIN_NETWORK_KIND', serialize(array(__('Company', 'blog2social'), __('Business', 'blog2social'))));
629
  define('B2S_PLUGIN_NETWORK_ERROR', serialize(array('DEFAULT' => __('Your post could not be posted.', 'blog2social'),
@@ -711,6 +754,7 @@ class B2S_Loader {
711
  $subPages[] = add_submenu_page(null, 'B2S Post Publish', 'B2S Post Publish', 'read', 'blog2social-publish', array($this, 'b2sPostPublish'));
712
  $subPages[] = add_submenu_page(null, 'B2S Post Notice', 'B2S Post Notice', 'read', 'blog2social-notice', array($this, 'b2sPostNotice')); //Error post page since 4.8.0
713
  $subPages[] = add_submenu_page(null, 'B2S Ship', 'B2S Ship', 'read', 'blog2social-ship', array($this, 'b2sShip'));
 
714
  $subPages[] = add_submenu_page(null, 'PRG Login', 'PRG Login', 'read', 'prg-login', array($this, 'prgLogin'));
715
  $subPages[] = add_submenu_page(null, 'PRG Ship', 'PRG Ship', 'read', 'prg-ship', array($this, 'prgShip'));
716
  foreach ($subPages as $var) {
@@ -908,6 +952,17 @@ class B2S_Loader {
908
  }
909
  }
910
 
 
 
 
 
 
 
 
 
 
 
 
911
  //PageFunktion
912
  public function prgLogin() {
913
  if (B2S_Tools::showNotice() == false) {
@@ -1106,6 +1161,7 @@ class B2S_Loader {
1106
  wp_register_style('B2SBTNTOOGLECSS', plugins_url('assets/lib/btn-toogle/bootstrap-toggle.min.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1107
  wp_register_style('B2SCHOSENCSS', plugins_url('assets/lib/chosen/chosen.min.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1108
  wp_register_style('B2SPLUGINDEACTIVATECSS', plugins_url('assets/css/b2s/wp/plugin-deactivate.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
 
1109
 
1110
  wp_register_script('B2SNETWORKJS', plugins_url('assets/js/b2s/network.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1111
  wp_register_script('B2SSETTINGSJS', plugins_url('assets/js/b2s/settings.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
@@ -1145,6 +1201,7 @@ class B2S_Loader {
1145
  wp_register_script('B2SCHOSENJS', plugins_url('assets/lib/chosen/chosen.jquery.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1146
  wp_register_script('B2SLIB', plugins_url('assets/js/b2s/lib.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1147
  wp_register_script('B2SPLUGINDEACTIVATEJS', plugins_url('assets/js/b2s/wp/plugin-deactivate.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
 
1148
  }
1149
 
1150
  public function activatePlugin() {
@@ -1323,6 +1380,19 @@ class B2S_Loader {
1323
  INDEX `blog_user_id` (`blog_user_id`), INDEX `mandant_id` (`mandant_id`)
1324
  ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=1;';
1325
  $wpdb->query($sqlCreateNetworkSettings);
 
 
 
 
 
 
 
 
 
 
 
 
 
1326
 
1327
  $b2sCheckAfter = $b2sSystem->check('after');
1328
  if (is_array($b2sCheckAfter)) {
44
  define('B2S_PLUGIN_NETWORK_ALLOW_MODIFY_BOARD_AND_GROUP', serialize(array(6 => array('TYPE' => array(0), 'TITLE' => __('Modify pin board', 'blog2social')), 8 => array('TYPE' => array(2), 'TITLE' => __('Edit group settings', 'blog2social')), 15 => array('TYPE' => array(0), 'TITLE' => __('Modify subreddit', 'blog2social')), 19 => array('TYPE' => array(2), 'TITLE' => __('Modify forum', 'blog2social')), 20 => array('TYPE' => array(0), 'TITLE' => __('Modify pin board', 'blog2social')))));
45
  define('B2S_PLUGIN_AUTO_POST_LIMIT', serialize(array(0 => 0, 1 => 25, 2 => 50, 3 => 100, 4 => 100)));
46
  define('B2S_PLUGIN_NETWORK_OAUTH', serialize(array(1, 2, 3, 4, 7, 8, 11, 15, 17, 18, 20)));
47
+ define('B2S_PLUGIN_SYSTEMREQUIREMENT_WORDPRESSVERSION', '4.4.2');
48
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_PHPVERSION', '5.5.3');
49
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_MYSQLVERSION', '5.5.3');
50
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_DATABASERIGHTS', true);
53
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_PHPDOM', true);
54
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_HOTLINKPROTECTION', true);
55
  define('B2S_PLUGIN_SYSTEMREQUIREMENT_PLUGINWARNING_WORDS', serialize(array('hotlink', 'firewall', 'security')));
56
+ define('B2S_PLUGIN_SYSTEMREQUIREMENT_WPJSON', true);
57
+ define('B2S_PLUGIN_SYSTEMREQUIREMENT_OPENSSL', true);
58
 
59
  add_filter('heartbeat_received', array(B2S_Heartbeat::getInstance(), 'init'), 10, 2);
60
  add_action('wp_logout', array($this, 'releaseLocks'));
61
  add_action('transition_post_status', array($this, 'b2s_auto_post_import'), 9999, 3); //for Auto-Posting imported + manuell
62
+ add_action('rest_api_init', array($this, 'b2s_rest_api_init'));
63
  }
64
 
65
  public function call_admin_hooks() {
110
  }
111
 
112
  public function call_public_hooks() {
113
+ add_filter('wp_footer', array($this, 'b2s_get_full_content'), 99); //for shortcodes
114
  add_action('wp_head', array($this, 'b2s_build_frontend_meta'), 1); // for MetaTags
115
  }
116
 
119
  B2S_Meta::getInstance()->_run();
120
  }
121
 
122
+ public function b2s_rest_api_init() {
123
+ register_rest_route('blog2social/v1/post', '/authorize', array(
124
+ 'methods' => WP_REST_Server::CREATABLE,
125
+ 'callback' => array($this, 'b2s_rest_api_post_authorize')
126
+ ));
127
+ }
128
+
129
+ public function b2s_rest_api_post_authorize($post = array()) {
130
+ $contentType = 'application/json';
131
+ if (isset($post['token']) && !empty($post['token']) && isset($post['user']) && !empty($post['user']) && isset($post['network_id']) && (int) $post['network_id'] > 0) {
132
+ $privateKey = B2S_PLUGIN_DIR . '/includes/B2S/Api/Network/private_key.pem';
133
+ if (function_exists('openssl_public_decrypt') && file_exists($privateKey)) {
134
+ if ((int) $post['network_id'] == 6) {
135
+ try {
136
+ require_once(B2S_PLUGIN_DIR . 'includes/B2S/Api/Network/Pinterest.php');
137
+ $user = '';
138
+ $pass = '';
139
+ $getPrivateKey = file_get_contents($privateKey);
140
+ openssl_private_decrypt(base64_decode(trim($post['user']['pass'])), $pass, $getPrivateKey);
141
+ openssl_private_decrypt(base64_decode(trim($post['user']['name'])), $user, $getPrivateKey);
142
+ $pt = new B2S_Api_Network_Pinterest();
143
+ $result = $pt->authorize($user, $pass);
144
+ $status = isset($result['cookie_data']) && !empty($result['cookie_data']) ? 200 : 400;
145
+ $response = array('code' => $status, 'result' => array_merge($result, array('token' => $post['token'], 'network_id' => (int) $post['network_id'])));
146
+ return new WP_REST_Response($response, $status, array('Content-Type: ' . $contentType));
147
+ } catch (Exception $ex) {
148
+ $response = array('code' => 500, 'result' => array('token' => $post['token'], 'network_id' => (int) $post['network_id'], 'error' => 1, 'error_pos' => 8, 'error_data' => serialize($ex->getMessage())));
149
+ return new WP_REST_Response($response, 500, array('Content-Type: ' . $contentType));
150
+ }
151
+ }
152
+ $response = array('code' => 409, 'result' => array('token' => $post['token'], 'network_id' => (int) $post['network_id'], 'error' => 1, 'error_pos' => 9, 'error_data' => 'network_not_exists'));
153
+ return new WP_REST_Response($response, 409, array('Content-Type: ' . $contentType));
154
+ }
155
+ $response = array('code' => 501, 'result' => array('token' => $post['token'], 'network_id' => (int) $post['network_id'], 'error' => 1, 'error_pos' => 9, 'error_data' => 'openssl_not_exists'));
156
+ return new WP_REST_Response($response, 501, array('Content-Type: ' . $contentType));
157
+ }
158
+ $response = array('code' => 502, 'result' => array('error' => 1, 'error_pos' => 10, 'error_data' => 'bad_request'));
159
+ return new WP_REST_Response($response, 502, array('Content-Type: ' . $contentType));
160
+ }
161
+
162
  private function b2s_register_custom_post_type() {
163
  if (post_type_exists("b2s_ex_post")) {
164
  return;
666
  }
667
 
668
  public function defineText() {
669
+ define('B2S_PLUGIN_PAGE_TITLE', serialize(array('blog2social-notice' => __('Notifications', 'blog2social'), 'blog2social-publish' => __('Shared Posts', 'blog2social'), 'blog2social-approve' => __('Instant Sharing', 'blog2social'), 'blog2social-sched' => __('Schedueld Posts', 'blog2social'), 'blog2social-curation-draft' => __('Content Curation Drafts', 'blog2social'),)));
670
  define('B2S_PLUGIN_NETWORK_TYPE', serialize(array(__('Profile', 'blog2social'), __('Page', 'blog2social'), __('Group', 'blog2social'))));
671
  define('B2S_PLUGIN_NETWORK_KIND', serialize(array(__('Company', 'blog2social'), __('Business', 'blog2social'))));
672
  define('B2S_PLUGIN_NETWORK_ERROR', serialize(array('DEFAULT' => __('Your post could not be posted.', 'blog2social'),
754
  $subPages[] = add_submenu_page(null, 'B2S Post Publish', 'B2S Post Publish', 'read', 'blog2social-publish', array($this, 'b2sPostPublish'));
755
  $subPages[] = add_submenu_page(null, 'B2S Post Notice', 'B2S Post Notice', 'read', 'blog2social-notice', array($this, 'b2sPostNotice')); //Error post page since 4.8.0
756
  $subPages[] = add_submenu_page(null, 'B2S Ship', 'B2S Ship', 'read', 'blog2social-ship', array($this, 'b2sShip'));
757
+ $subPages[] = add_submenu_page(null, 'B2S Curation Drafts', 'B2S Curation Drafts', 'read', 'blog2social-curation-draft', array($this, 'b2sCurationDraft'));
758
  $subPages[] = add_submenu_page(null, 'PRG Login', 'PRG Login', 'read', 'prg-login', array($this, 'prgLogin'));
759
  $subPages[] = add_submenu_page(null, 'PRG Ship', 'PRG Ship', 'read', 'prg-ship', array($this, 'prgShip'));
760
  foreach ($subPages as $var) {
952
  }
953
  }
954
 
955
+ //PageFunktion
956
+ public function b2sCurationDraft() {
957
+ if (B2S_Tools::showNotice() == false) {
958
+ wp_enqueue_style('B2SCURATIONDRAFTCSS');
959
+ wp_enqueue_script('B2SCURATIONDRAFTJS');
960
+ require_once( B2S_PLUGIN_DIR . 'views/b2s/curation.draft.php');
961
+ } else {
962
+ require_once( B2S_PLUGIN_DIR . 'views/notice.php');
963
+ }
964
+ }
965
+
966
  //PageFunktion
967
  public function prgLogin() {
968
  if (B2S_Tools::showNotice() == false) {
1161
  wp_register_style('B2SBTNTOOGLECSS', plugins_url('assets/lib/btn-toogle/bootstrap-toggle.min.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1162
  wp_register_style('B2SCHOSENCSS', plugins_url('assets/lib/chosen/chosen.min.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1163
  wp_register_style('B2SPLUGINDEACTIVATECSS', plugins_url('assets/css/b2s/wp/plugin-deactivate.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1164
+ wp_register_style('B2SCURATIONDRAFTCSS', plugins_url('assets/css/b2s/curation.css', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1165
 
1166
  wp_register_script('B2SNETWORKJS', plugins_url('assets/js/b2s/network.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1167
  wp_register_script('B2SSETTINGSJS', plugins_url('assets/js/b2s/settings.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1201
  wp_register_script('B2SCHOSENJS', plugins_url('assets/lib/chosen/chosen.jquery.min.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1202
  wp_register_script('B2SLIB', plugins_url('assets/js/b2s/lib.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1203
  wp_register_script('B2SPLUGINDEACTIVATEJS', plugins_url('assets/js/b2s/wp/plugin-deactivate.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1204
+ wp_register_script('B2SCURATIONDRAFTJS', plugins_url('assets/js/b2s/curation.draft.js', B2S_PLUGIN_FILE), array(), B2S_PLUGIN_VERSION);
1205
  }
1206
 
1207
  public function activatePlugin() {
1380
  INDEX `blog_user_id` (`blog_user_id`), INDEX `mandant_id` (`mandant_id`)
1381
  ) DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci AUTO_INCREMENT=1;';
1382
  $wpdb->query($sqlCreateNetworkSettings);
1383
+
1384
+ /*
1385
+ * SET SAFETY AUTO-INCREMENT
1386
+ */
1387
+
1388
+ $wpdb->query("ALTER TABLE `b2s_posts` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
1389
+ $wpdb->query("ALTER TABLE `b2s_posts_sched_details` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
1390
+ $wpdb->query("ALTER TABLE `b2s_posts_network_details` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
1391
+ $wpdb->query("ALTER TABLE `b2s_user` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
1392
+ $wpdb->query("ALTER TABLE `b2s_user_contact` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
1393
+ $wpdb->query("ALTER TABLE `b2s_user_network_settings` CHANGE `id` `id` INT(11) NOT NULL AUTO_INCREMENT;");
1394
+
1395
+
1396
 
1397
  $b2sCheckAfter = $b2sSystem->check('after');
1398
  if (is_array($b2sCheckAfter)) {
includes/Tools.php CHANGED
@@ -182,6 +182,9 @@ class B2S_Tools {
182
  if ($type == 'faq_settings') {
183
  return ($lang == 'en') ? 'https://www.blog2social.com/en/faq/index.php?action=show&cat=11' : 'https://www.blog2social.com/de/faq/index.php?action=show&cat=11';
184
  }
 
 
 
185
  }
186
 
187
  public static function getAffiliateId() {
182
  if ($type == 'faq_settings') {
183
  return ($lang == 'en') ? 'https://www.blog2social.com/en/faq/index.php?action=show&cat=11' : 'https://www.blog2social.com/de/faq/index.php?action=show&cat=11';
184
  }
185
+ if ($type == 'browser_extension') {
186
+ return ($lang == 'en') ? 'https://www.blog2social.com/en/webapp/extension/' : 'https://www.blog2social.com/de/webapp/extension/';
187
+ }
188
  }
189
 
190
  public static function getAffiliateId() {
includes/Util.php CHANGED
@@ -71,7 +71,7 @@ class B2S_Util {
71
  $html = self::b2sFileGetContents($url, true);
72
  if (!empty($html) && $html !== false) {
73
  //Search rist Parameter
74
- $data = self::b2sGetAllTags($html, 'all');
75
  if (is_array($data) && !empty($data)) {
76
  return $data;
77
  }
@@ -157,11 +157,11 @@ class B2S_Util {
157
  return (isset($matches[1]) && !empty($matches[1])) ? trim(preg_replace('/\s+/', ' ', $matches[1])) : '';
158
  }
159
 
160
- private static function b2sGetAllTags($html, $type = 'og') {
161
  $search = 'property';
162
  $list = array();
163
  $doc = new DOMDocument();
164
- if (function_exists('mb_convert_encoding')) {
165
  @$doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
166
  } else {
167
  @$doc->loadHTML($html);
71
  $html = self::b2sFileGetContents($url, true);
72
  if (!empty($html) && $html !== false) {
73
  //Search rist Parameter
74
+ $data = self::b2sGetAllTags($html, 'all',true);
75
  if (is_array($data) && !empty($data)) {
76
  return $data;
77
  }
157
  return (isset($matches[1]) && !empty($matches[1])) ? trim(preg_replace('/\s+/', ' ', $matches[1])) : '';
158
  }
159
 
160
+ private static function b2sGetAllTags($html, $type = 'og', $ignoreEncoding=false) {
161
  $search = 'property';
162
  $list = array();
163
  $doc = new DOMDocument();
164
+ if (function_exists('mb_convert_encoding') && !$ignoreEncoding) {
165
  @$doc->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
166
  } else {
167
  @$doc->loadHTML($html);
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  ===Blog2Social: Social Media Auto Post & Scheduler===
2
  Contributors: Blog2Social, Adenion
3
- Tags: auto post, auto publish, social media scheduling, social media calendar, social media automation, social media share, auto-publish, scheduling, social media post, social url share, social network share, share tweet, share links, share this, sharethis, social tools, admin, api, auto share to, autopost, auto-Posting, auto-schedule, auto-schedule social media posts, automatic social sharing plugin, blog marketing, blog2social, blogger, buffer, crossposting, cross-promotion, cross-promoting, bloglovin, bloglovin auto post, facebook, facebook auto post, facebook pages, google auto post, instagram, instagram auto post, jetpack, jetpack sharing, linkedin, linkedin auto post, medium, medium auto post, multiposting, path, pinterest, re-post, scheduling, scheduling plugin, social media, social media auto publish, social media automation, social media button, social media manager, social media plugin, social media post, social media publishing, social media share, social media scheduling tool, social media sharing, social media tool, social network auto publish, social network icon, social network widget, socialmedia, timing, torial, torial auto post, tumblr, twitter, twitter auto post, xing, xing auto post, xing groups, xing gruppen, xing personal profiles, xing company profiles, xing business pages, xing pages, xing seiten, auto post scheduler, repost, social media management, facebook fan page auto post, facebook profile auto post, social auto post, social autoposting, flickr, flickr auto posting, linkedin, linkedin auto posting, linkedin profile, facebook group, facebook gruppen, reddit, reddit auto posting, reddit auto post, social media calendar, editorial calendar, calendar plugin, Social Media Automatisierung, Social Media Management, Kalender, Planungs Kalender, Social Media Kalender, Content Marketing
4
  Donate link: http://www.blog2social.com
5
  Requires at least: 4.2.2
6
- Tested up to: 5.1.1
7
- Stable tag: 5.3.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -44,7 +44,7 @@ Blog2Social Premium includes all features of the free version and awesome additi
44
  * **Best Time Scheduler:** ready-to-use time scheme for scheduling, or custom time settings to schedule your posts once, multiple times or recurrently for up to one year.
45
  * **Schedule your posts on network level** to automatically share them on your profiles, pages and groups at the best times to post on each network.
46
  * **Select any image you want** to share with your post for any social media post and network. Select images from your WordPress media gallery or upload any other image from your computer or device.
47
- * **Select link post or image post/photo post format** for Facebook, Google+ and Twitter.
48
  * **Add/Edit Meta Tags for Facebook Open Graph and Twitter Cards** to define the look of your link posts. Change the shared image, title and description.
49
  * **Schedule multiple individually tailored posts** in one easy step in your one-page preview editor
50
  * **Post & Schedule Retweets for Twitter:** Reshare your Tweets across your Twitter accounts by using scheduled Retweets
@@ -323,6 +323,8 @@ We use the official authentication oAUTH methods to third-party applications pro
323
  9. Adjust the best times to schedule in the best time scheduler.
324
 
325
  == Changelog ==
 
 
326
  = 5.3.0 =
327
  Usability Optimization
328
  = 5.2.0 =
@@ -393,6 +395,8 @@ Usabilitiy and Performance Optimization. Select link format or image format indi
393
  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.
394
 
395
  == Upgrade Notice ==
 
 
396
  = 5.3.0 =
397
  Usability Optimization
398
  = 5.2.0 =
1
  ===Blog2Social: Social Media Auto Post & Scheduler===
2
  Contributors: Blog2Social, Adenion
3
+ Tags: auto post, auto publish, social media scheduling, social media calendar, social media automation, social media share, auto-publish, scheduling, social media post, social url share, social network share, share tweet, share links, share this, sharethis, social tools, admin, api, auto share to, autopost, auto-Posting, auto-schedule, auto-schedule social media posts, automatic social sharing plugin, blog marketing, blog2social, blogger, buffer, crossposting, cross-promotion, cross-promoting, bloglovin, bloglovin auto post, facebook, facebook auto post, facebook pages, instagram, instagram auto post, jetpack, jetpack sharing, linkedin, linkedin auto post, medium, medium auto post, multiposting, path, pinterest, re-post, scheduling, scheduling plugin, social media, social media auto publish, social media automation, social media button, social media manager, social media plugin, social media post, social media publishing, social media share, social media scheduling tool, social media sharing, social media tool, social network auto publish, social network icon, social network widget, socialmedia, timing, torial, torial auto post, tumblr, twitter, twitter auto post, xing, xing auto post, xing groups, xing gruppen, xing personal profiles, xing company profiles, xing business pages, xing pages, xing seiten, auto post scheduler, repost, social media management, facebook fan page auto post, facebook profile auto post, social auto post, social autoposting, flickr, flickr auto posting, linkedin, linkedin auto posting, linkedin profile, facebook group, facebook gruppen, reddit, reddit auto posting, reddit auto post, social media calendar, editorial calendar, calendar plugin, Social Media Automatisierung, Social Media Management, Kalender, Planungs Kalender, Social Media Kalender, Content Marketing
4
  Donate link: http://www.blog2social.com
5
  Requires at least: 4.2.2
6
+ Tested up to: 5.2.0
7
+ Stable tag: 5.4.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
44
  * **Best Time Scheduler:** ready-to-use time scheme for scheduling, or custom time settings to schedule your posts once, multiple times or recurrently for up to one year.
45
  * **Schedule your posts on network level** to automatically share them on your profiles, pages and groups at the best times to post on each network.
46
  * **Select any image you want** to share with your post for any social media post and network. Select images from your WordPress media gallery or upload any other image from your computer or device.
47
+ * **Select link post or image post/photo post format** for Facebook and Twitter.
48
  * **Add/Edit Meta Tags for Facebook Open Graph and Twitter Cards** to define the look of your link posts. Change the shared image, title and description.
49
  * **Schedule multiple individually tailored posts** in one easy step in your one-page preview editor
50
  * **Post & Schedule Retweets for Twitter:** Reshare your Tweets across your Twitter accounts by using scheduled Retweets
323
  9. Adjust the best times to schedule in the best time scheduler.
324
 
325
  == Changelog ==
326
+ = 5.4.0 =
327
+ Usability Optimization
328
  = 5.3.0 =
329
  Usability Optimization
330
  = 5.2.0 =
395
  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.
396
 
397
  == Upgrade Notice ==
398
+ = 5.4.0 =
399
+ Usability Optimization
400
  = 5.3.0 =
401
  Usability Optimization
402
  = 5.2.0 =
views/b2s/curation.draft.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* Data */
3
+ require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
4
+ require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
5
+ ?>
6
+ <div class="b2s-container">
7
+ <div class="b2s-inbox">
8
+ <div class="col-md-12 del-padding-left">
9
+ <div class="col-md-9 del-padding-left del-padding-right">
10
+ <!--Header|Start - Include-->
11
+ <?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/header.phtml'); ?>
12
+ <!--Header|End-->
13
+ <div class="clearfix"></div>
14
+ <div class="panel panel-default">
15
+ <div class="panel-body">
16
+ <span class="glyphicon glyphicon-info-sign glyphicon-primary"></span> <?php _e('Save links as drafts while browsing and share or schedule them whenever you want.', 'blog2social'); ?> <a target="_blank" href="<?php echo B2S_Tools::getSupportLink("browser_extension") ?>"><?php _e('Get the Blog2Social Browser Extension', 'blog2social') ?></a>
17
+ </div>
18
+ </div>
19
+ <div class="clearfix"></div>
20
+ <div class="panel panel-default">
21
+ <div class="panel-body">
22
+ <!--Filter Start-->
23
+ <div class="b2s-post">
24
+ <div class="grid-body">
25
+ <!-- Filter Post Start-->
26
+ <form class="b2sSortForm form-inline pull-left" action="#">
27
+ <input id="b2sType" type="hidden" value="draft" name="b2sType">
28
+ <input id="b2sShowByDate" type="hidden" value="" name="b2sShowByDate">
29
+ <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
30
+ <?php
31
+ $postFilter = new B2S_Post_Filter('draft');
32
+ echo $postFilter->getItemHtml();
33
+ ?>
34
+ </form>
35
+ <!-- Filter Post Ende-->
36
+ <br>
37
+ </div>
38
+ </div>
39
+ <div class="clearfix"></div>
40
+ <div class="b2s-sort-area">
41
+ <div class="b2s-loading-area" style="display:none">
42
+ <br>
43
+ <div class="b2s-loader-impulse b2s-loader-impulse-md"></div>
44
+ <div class="clearfix"></div>
45
+ <div class="text-center b2s-loader-text"><?php _e("Loading...", "blog2social"); ?></div>
46
+ </div>
47
+ <div class="row b2s-sort-result-area">
48
+ <div class="col-md-12">
49
+ <ul class="list-group b2s-sort-result-item-area"></ul>
50
+ <br>
51
+ <nav class="b2s-sort-pagination-area text-center"></nav>
52
+ <?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/footer.phtml'); ?>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ <?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/sidebar.phtml'); ?>
60
+ </div>
61
+ </div>
62
+ </div>
63
+
64
+ <input type="hidden" id="b2sLang" value="<?php echo substr(B2S_LANGUAGE, 0, 2); ?>">
65
+ <input type="hidden" id="b2sUserLang" value="<?php echo strtolower(substr(get_locale(), 0, 2)); ?>">
views/b2s/curation.php CHANGED
@@ -34,6 +34,9 @@ $selSchedDate = (isset($_GET['schedDate']) && !empty($_GET['schedDate'])) ? date
34
  <div id="b2s-curation-no-data-info" class="alert alert-danger">
35
  <span class="glyphicon glyphicon-remove glyphicon-danger"></span> <?php _e('Invalid data. Please check your data.', 'blog2social'); ?>
36
  </div>
 
 
 
37
  <div class="b2s-curation-area">
38
  <div class="row b2s-curation-input-area">
39
  <div class="col-md-12">
34
  <div id="b2s-curation-no-data-info" class="alert alert-danger">
35
  <span class="glyphicon glyphicon-remove glyphicon-danger"></span> <?php _e('Invalid data. Please check your data.', 'blog2social'); ?>
36
  </div>
37
+ <div id="b2s-curation-saved-draft-info" class="alert alert-success">
38
+ <span class="glyphicon glyphicon-success glyphicon-ok"></span> <?php _e('Saved as draft.', 'blog2social'); ?>
39
+ </div>
40
  <div class="b2s-curation-area">
41
  <div class="row b2s-curation-input-area">
42
  <div class="col-md-12">
views/b2s/html/sidebar.phtml CHANGED
@@ -63,6 +63,9 @@ $b2sLastVersion = get_option('b2s_plugin_version');
63
  <li class="b2s-list-margin-left-10">
64
  <i class="glyphicon glyphicon-plus glyphicon-success"></i> <a href="admin.php?page=blog2social-curation" class="b2s-sidebar-menu-item"><?php _e("Create Post", "blog2social") ?></a>
65
  </li>
 
 
 
66
  </ul>
67
  </div>
68
  </div>
63
  <li class="b2s-list-margin-left-10">
64
  <i class="glyphicon glyphicon-plus glyphicon-success"></i> <a href="admin.php?page=blog2social-curation" class="b2s-sidebar-menu-item"><?php _e("Create Post", "blog2social") ?></a>
65
  </li>
66
+ <li class="b2s-list-margin-left-10">
67
+ <i class="glyphicon glyphicon-th-list glyphicon-success"></i> <a href="admin.php?page=blog2social-curation-draft" class="b2s-sidebar-menu-item"><?php _e('Drafts', 'blog2social') ?></a>
68
+ </li>
69
  </ul>
70
  </div>
71
  </div>
views/b2s/support.php CHANGED
@@ -17,6 +17,9 @@
17
  <li>
18
  <a href="#b2s-support-check-system" class="b2s-support-check-sytem" data-toggle="tab"><?php _e('Troubleshooting-Tool', 'blog2social') ?> <span class="label label-success"><?php _e("NEW", "blog2social") ?></span></a>
19
  </li>
 
 
 
20
  <li>
21
  <a target="_blank" href="<?php echo B2S_Tools::getSupportLink('howto'); ?>"><?php _e('Step-by-Step-Guide', 'blog2social') ?></a>
22
  </li>
@@ -224,6 +227,51 @@
224
  </div>
225
  </div>
226
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
227
  </div>
228
  </div>
229
  </div>
17
  <li>
18
  <a href="#b2s-support-check-system" class="b2s-support-check-sytem" data-toggle="tab"><?php _e('Troubleshooting-Tool', 'blog2social') ?> <span class="label label-success"><?php _e("NEW", "blog2social") ?></span></a>
19
  </li>
20
+ <li>
21
+ <a href="#b2s-support-sharing-debugger" class="b2s-support-sharing-debugger" data-toggle="tab"><?php _e('Sharing-Debugger', 'blog2social') ?> <span class="label label-success"><?php _e("NEW", "blog2social") ?></span></a>
22
+ </li>
23
  <li>
24
  <a target="_blank" href="<?php echo B2S_Tools::getSupportLink('howto'); ?>"><?php _e('Step-by-Step-Guide', 'blog2social') ?></a>
25
  </li>
227
  </div>
228
  </div>
229
  </div>
230
+ <div class="tab-pane" id="b2s-support-sharing-debugger">
231
+ <div class="row">
232
+ <div class="col-md-12">
233
+ <h3><?php _e("Enter a URL to see how your link preview will look on social media.", "blog2social"); ?></h3>
234
+ <div class="b2s-sharing-debugger-result-area">
235
+ <div class="clearfix"></div>
236
+ <br>
237
+ <div>
238
+ <img class="b2s-feature-img-with-24" src="<?php echo plugins_url('/assets/images/portale/1_flat.png', B2S_PLUGIN_FILE); ?>" alt="Facebook"> <span class="b2s-text-bold"><?php _e("Facebook Open Graph Meta Tags", "blog2social") ?>
239
+ | <a class="btn-link" href="admin.php?page=blog2social-settings"><?php _e("Edit your Open Graph Meta Tags", "blog2social"); ?></a>
240
+ </span>
241
+ </div>
242
+ <div class="input-group col-md-7 b2s-padding-top-8">
243
+ <input type="text" name="b2s-debug-url" class="input-sm form-control" id="b2s-debug-url" value="<?php echo get_site_url(); ?>" data-network-id="1" placeholder="<?php _e("For example your Wordpress Home Page", "blog2social"); ?>">
244
+ <span class="input-group-btn">
245
+ <button class="btn btn-primary btn-sm b2s-btn-sharing-debugger" data-network-id="1" b2s-url-query="https://developers.facebook.com/tools/debug/sharing/?q="><?php _e("Debug & Preview", "blog2social") ?></button>
246
+ </span>
247
+ </div>
248
+ <div class="clearfix"></div>
249
+ <br>
250
+ <div>
251
+ <img class="b2s-feature-img-with-24" src="<?php echo plugins_url('/assets/images/portale/3_flat.png', B2S_PLUGIN_FILE); ?>" alt="Linkedin"> <span class="b2s-text-bold"><?php _e("LinkedIn Post Inspector", "blog2social") ?></span>
252
+ </div>
253
+ <div class="input-group col-md-7 b2s-padding-top-8">
254
+ <input type="text" name="b2s-debug-url" class="input-sm form-control" id="b2s-debug-url" value="<?php echo get_site_url(); ?>" data-network-id="3" placeholder="<?php _e("For example your Wordpress Home Page", "blog2social"); ?>">
255
+ <span class="input-group-btn">
256
+ <button class="btn btn-primary btn-sm b2s-btn-sharing-debugger" data-network-id="3" b2s-url-query="https://www.linkedin.com/post-inspector/inspect/"><?php _e("Inspect Post", "blog2social") ?></button>
257
+ </span>
258
+ </div>
259
+ <div class="clearfix"></div>
260
+ <br>
261
+ <div>
262
+ <img class="b2s-feature-img-with-24" src="<?php echo plugins_url('/assets/images/portale/2_flat.png', B2S_PLUGIN_FILE); ?>" alt="Twitter"> <span class="b2s-text-bold"><?php _e("Twitter Card Validator", "blog2social") ?>
263
+ | <a class="btn-link" href="admin.php?page=blog2social-settings"><?php _e("Edit your Twitter Card", "blog2social"); ?></a>
264
+ </span>
265
+ </div>
266
+ <div class="b2s-padding-top-8">
267
+ <button class="btn btn-primary btn-sm b2s-btn-sharing-debugger" data-network-id="2" b2s-url-query="https://cards-dev.twitter.com/validator?url="><?php _e("Validate directly on Twitter", "blog2social") ?></button>
268
+ </div>
269
+ </div>
270
+ </div>
271
+ </div>
272
+
273
+ </div>
274
+
275
  </div>
276
  </div>
277
  </div>