Blog2Social: Social Media Auto Post & Scheduler - Version 6.9.7

Version Description

Additional Security Update

Download this release

Release Info

Developer PR-Gateway
Plugin Icon 128x128 Blog2Social: Social Media Auto Post & Scheduler
Version 6.9.7
Comparing to
See all releases

Code changes from version 6.9.6 to 6.9.7

assets/js/b2s/repost.js CHANGED
@@ -56,6 +56,8 @@ jQuery(window).on("load", function () {
56
  }
57
  jQuery('.b2s-re-post-settings-option').trigger('change');
58
  jQuery('#b2s-re-post-profil-dropdown').trigger('change');
 
 
59
 
60
  });
61
 
56
  }
57
  jQuery('.b2s-re-post-settings-option').trigger('change');
58
  jQuery('#b2s-re-post-profil-dropdown').trigger('change');
59
+
60
+ jQuery('.b2s-re-post-delete-checked').hide();
61
 
62
  });
63
 
blog2social.php CHANGED
@@ -6,12 +6,12 @@
6
  * Author: Blog2Social, Adenion
7
  * Text Domain: blog2social
8
  * Domain Path: /languages
9
- * Version: 6.9.6
10
  * Author URI: https://www.blog2social.com
11
  * License: GPL2+
12
  */
13
 
14
- define('B2S_PLUGIN_VERSION', '696');
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__));
@@ -41,6 +41,10 @@ register_deactivation_hook(B2S_PLUGIN_FILE, array($b2sLoad, 'deactivatePlugin'))
41
  $b2sCheck = new B2S_System();
42
  if ($b2sCheck->check() === true) {
43
  add_action('init', array($b2sLoad, 'load'));
 
 
 
 
44
  } else {
45
  require_once(B2S_PLUGIN_DIR . 'includes/Notice.php');
46
  add_action('admin_notices', array('B2S_Notice', 'sytemNotice'));
6
  * Author: Blog2Social, Adenion
7
  * Text Domain: blog2social
8
  * Domain Path: /languages
9
+ * Version: 6.9.7
10
  * Author URI: https://www.blog2social.com
11
  * License: GPL2+
12
  */
13
 
14
+ define('B2S_PLUGIN_VERSION', '697');
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__));
41
  $b2sCheck = new B2S_System();
42
  if ($b2sCheck->check() === true) {
43
  add_action('init', array($b2sLoad, 'load'));
44
+ add_filter('safe_style_css', function( $styles ) {
45
+ $styles[] = 'display';
46
+ return $styles;
47
+ } );
48
  } else {
49
  require_once(B2S_PLUGIN_DIR . 'includes/Notice.php');
50
  add_action('admin_notices', array('B2S_Notice', 'sytemNotice'));
includes/Ajax/Get.php CHANGED
@@ -158,7 +158,7 @@ class Ajax_Get {
158
  $result = json_decode(B2S_Api_Post::post(B2S_PLUGIN_API_ENDPOINT, array('action' => 'getNetworkBoardAndGroup', 'token' => B2S_PLUGIN_TOKEN, 'networkAuthId' => (int) $_POST['networkAuthId'], 'networkId' => (int) $_POST['networkId'], 'lang' => substr(B2S_LANGUAGE, 0, 2))));
159
  if (is_object($result) && !empty($result) && isset($result->data) && !empty($result->data) && isset($result->result) && (int) $result->result == 1) {
160
  require_once B2S_PLUGIN_DIR . 'includes/Form.php';
161
- echo json_encode(array('result' => true, 'content' => B2S_Form::getNetworkBoardAndGroupHtml($result->data, $_POST['networkId'])));
162
  wp_die();
163
  }
164
  }
@@ -228,7 +228,7 @@ class Ajax_Get {
228
  'instantSharing' => (isset($_POST['instantSharing']) ? (int) $_POST['instantSharing'] : 0),
229
  'network_display_name' => sanitize_text_field($_POST['networkDisplayName']),
230
  'networkType' => (int) $_POST['networkType']);
231
- $selSchedDate = (isset($_POST['selSchedDate']) && !empty($_POST['selSchedDate'])) ? (preg_match("#^[0-9\-.\]:\s]+$#", trim($_POST['selSchedDate'])) ? trim($_POST['selSchedDate']) : "") : ""; //routing from calendar
232
  $b2sPostType = (isset($_POST['b2sPostType']) && $_POST['b2sPostType'] == 'ex') ? 'ex' : ""; //Content Curation
233
 
234
  $b2sDraftData = array();
@@ -238,8 +238,8 @@ class Ajax_Get {
238
  $sql = $wpdb->prepare("SELECT data FROM `{$wpdb->prefix}b2s_posts_drafts` WHERE `blog_user_id` = %d AND `post_id` = %d AND `save_origin` = %d", (int) B2S_PLUGIN_BLOG_USER_ID, (int) $_POST['postId'], 0);
239
  $sqlResult = $wpdb->get_row($sql);
240
  $drafts = (isset($sqlResult->data) && !empty($sqlResult->data)) ? unserialize($sqlResult->data) : false;
241
- if ($drafts !== false && isset($drafts['b2s']) && !empty($drafts['b2s']) && array_key_exists($_POST['networkAuthId'], $drafts['b2s'])) {
242
- $b2sDraftData = $drafts['b2s'][$_POST['networkAuthId']];
243
  if (!empty($b2sDraftData) && is_array($b2sDraftData)) {
244
  foreach ($b2sDraftData as $key => $value) {
245
  if (!is_array($value)) {
@@ -269,8 +269,8 @@ class Ajax_Get {
269
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Item.php');
270
  require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
271
  $postData = new B2S_Post_Item();
272
- $showByDate = isset($_POST['showByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim($_POST['showByDate'])) ? trim($_POST['showByDate']) : "") : "";
273
- $type = (isset($_POST['type']) && in_array($_POST['type'], array('publish', 'notice', 'metrics'))) ? $_POST['type'] : 'publish';
274
  $sharedByUser = (isset($_POST['sharedByUser']) && (int) $_POST['sharedByUser'] > 0) ? (int) $_POST['sharedByUser'] : 0;
275
  $sharedOnNetwork = (isset($_POST['sharedOnNetwork']) && (int) $_POST['sharedOnNetwork'] > 0) ? (int) $_POST['sharedOnNetwork'] : 0;
276
  $result = $postData->getPublishPostDataHtml((int) $_POST['postId'], $type, $showByDate, $sharedByUser, $sharedOnNetwork);
@@ -464,7 +464,7 @@ class Ajax_Get {
464
  public function getShipItemReloadUrl() {
465
  if (isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['b2s_security_nonce'])), 'b2s_security_nonce') > 0) {
466
  if (isset($_POST['networkId']) && (int) $_POST['networkId'] > 0 && isset($_POST['networkAuthId']) && (int) $_POST['networkAuthId'] > 0 && isset($_POST['url']) && !empty($_POST['url'])) {
467
- if (isset($_POST['postId']) && (int) $_POST['postId'] > 0 && isset($_POST['defaultUrl']) && esc_url(wp_unslash($_POST['defaultUrl'])) == esc_url(wp_unslash($_POST['url'])) && (!isset($_POST['postType']) || sanitize_text_field(wp_unslash($_POST['postType'])) != 'ex')) {
468
  $postData = get_post((int) $_POST['postId']);
469
  if ($postData->post_status != 'publish') {
470
  $postUrl = (get_permalink($postData->ID) !== false ? get_permalink($postData->ID) : $postData->guid);
@@ -593,7 +593,26 @@ class Ajax_Get {
593
  }
594
  $content = B2S_Api_Post::post(B2S_PLUGIN_API_ENDPOINT, array('action' => 'getNews', 'version' => B2S_PLUGIN_VERSION, 'lang' => strtolower(substr(get_locale(), 0, 2)), 'token' => B2S_PLUGIN_TOKEN));
595
  update_option("B2S_MULTI_WIDGET", array("timestamp" => date("Y-m-d H:i:s"), "content" => $content), false);
596
- echo $content;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
597
  wp_die();
598
  } else {
599
  echo json_encode(array('result' => false, 'error' => 'nonce'));
@@ -813,7 +832,7 @@ class Ajax_Get {
813
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Metrics/Item.php');
814
  $metrics = new B2S_Metrics_Item();
815
  $filterNetwork = ((isset($_GET['filter_network']) && sanitize_text_field(wp_unslash($_GET['filter_network'])) !== 'all' && (int) $_GET['filter_network'] > 0) ? (int) $_GET['filter_network'] : 0);
816
- $filterDates = ((isset($_GET['filter_dates']) && is_array($_GET['filter_dates']) && !empty($_GET['filter_dates'])) ? $_GET['filter_dates'] : array());
817
  $data = $metrics->getInsightsData($filterNetwork, $filterDates);
818
  echo json_encode(array('result' => true, 'data' => $data));
819
  wp_die();
158
  $result = json_decode(B2S_Api_Post::post(B2S_PLUGIN_API_ENDPOINT, array('action' => 'getNetworkBoardAndGroup', 'token' => B2S_PLUGIN_TOKEN, 'networkAuthId' => (int) $_POST['networkAuthId'], 'networkId' => (int) $_POST['networkId'], 'lang' => substr(B2S_LANGUAGE, 0, 2))));
159
  if (is_object($result) && !empty($result) && isset($result->data) && !empty($result->data) && isset($result->result) && (int) $result->result == 1) {
160
  require_once B2S_PLUGIN_DIR . 'includes/Form.php';
161
+ echo json_encode(array('result' => true, 'content' => B2S_Form::getNetworkBoardAndGroupHtml($result->data, (int) $_POST['networkId'])));
162
  wp_die();
163
  }
164
  }
228
  'instantSharing' => (isset($_POST['instantSharing']) ? (int) $_POST['instantSharing'] : 0),
229
  'network_display_name' => sanitize_text_field($_POST['networkDisplayName']),
230
  'networkType' => (int) $_POST['networkType']);
231
+ $selSchedDate = (isset($_POST['selSchedDate']) && !empty($_POST['selSchedDate'])) ? (preg_match("#^[0-9\-.\]:\s]+$#", trim(sanitize_text_field($_POST['selSchedDate']))) ? trim(sanitize_text_field($_POST['selSchedDate'])) : "") : ""; //routing from calendar
232
  $b2sPostType = (isset($_POST['b2sPostType']) && $_POST['b2sPostType'] == 'ex') ? 'ex' : ""; //Content Curation
233
 
234
  $b2sDraftData = array();
238
  $sql = $wpdb->prepare("SELECT data FROM `{$wpdb->prefix}b2s_posts_drafts` WHERE `blog_user_id` = %d AND `post_id` = %d AND `save_origin` = %d", (int) B2S_PLUGIN_BLOG_USER_ID, (int) $_POST['postId'], 0);
239
  $sqlResult = $wpdb->get_row($sql);
240
  $drafts = (isset($sqlResult->data) && !empty($sqlResult->data)) ? unserialize($sqlResult->data) : false;
241
+ if ($drafts !== false && isset($drafts['b2s']) && !empty($drafts['b2s']) && array_key_exists(sanitize_text_field($_POST['networkAuthId']), $drafts['b2s'])) {
242
+ $b2sDraftData = $drafts['b2s'][sanitize_text_field($_POST['networkAuthId'])];
243
  if (!empty($b2sDraftData) && is_array($b2sDraftData)) {
244
  foreach ($b2sDraftData as $key => $value) {
245
  if (!is_array($value)) {
269
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Item.php');
270
  require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
271
  $postData = new B2S_Post_Item();
272
+ $showByDate = isset($_POST['showByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim(sanitize_text_field($_POST['showByDate']))) ? trim(sanitize_text_field($_POST['showByDate'])) : "") : "";
273
+ $type = (isset($_POST['type']) && in_array($_POST['type'], array('publish', 'notice', 'metrics'))) ? sanitize_text_field($_POST['type']) : 'publish';
274
  $sharedByUser = (isset($_POST['sharedByUser']) && (int) $_POST['sharedByUser'] > 0) ? (int) $_POST['sharedByUser'] : 0;
275
  $sharedOnNetwork = (isset($_POST['sharedOnNetwork']) && (int) $_POST['sharedOnNetwork'] > 0) ? (int) $_POST['sharedOnNetwork'] : 0;
276
  $result = $postData->getPublishPostDataHtml((int) $_POST['postId'], $type, $showByDate, $sharedByUser, $sharedOnNetwork);
464
  public function getShipItemReloadUrl() {
465
  if (isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['b2s_security_nonce'])), 'b2s_security_nonce') > 0) {
466
  if (isset($_POST['networkId']) && (int) $_POST['networkId'] > 0 && isset($_POST['networkAuthId']) && (int) $_POST['networkAuthId'] > 0 && isset($_POST['url']) && !empty($_POST['url'])) {
467
+ if (isset($_POST['postId']) && (int) $_POST['postId'] > 0 && isset($_POST['defaultUrl']) && esc_url_raw(wp_unslash($_POST['defaultUrl'])) == esc_url_raw(wp_unslash($_POST['url'])) && (!isset($_POST['postType']) || sanitize_text_field(wp_unslash($_POST['postType'])) != 'ex')) {
468
  $postData = get_post((int) $_POST['postId']);
469
  if ($postData->post_status != 'publish') {
470
  $postUrl = (get_permalink($postData->ID) !== false ? get_permalink($postData->ID) : $postData->guid);
593
  }
594
  $content = B2S_Api_Post::post(B2S_PLUGIN_API_ENDPOINT, array('action' => 'getNews', 'version' => B2S_PLUGIN_VERSION, 'lang' => strtolower(substr(get_locale(), 0, 2)), 'token' => B2S_PLUGIN_TOKEN));
595
  update_option("B2S_MULTI_WIDGET", array("timestamp" => date("Y-m-d H:i:s"), "content" => $content), false);
596
+ echo B2S_Tools::esc_html_array($content, array(
597
+ 'div' => array(
598
+ 'class' => array(),
599
+ 'style' => array()
600
+ ),
601
+ 'img' => array(
602
+ 'src' => array(),
603
+ 'alt' => array(),
604
+ 'style' => array()
605
+ ),
606
+ 'p' => array(
607
+ 'style' => array()
608
+ ),
609
+ 'a' => array(
610
+ 'href' => array(),
611
+ 'target' => array(),
612
+ 'class' => array(),
613
+ 'title' => array()
614
+ )
615
+ ));
616
  wp_die();
617
  } else {
618
  echo json_encode(array('result' => false, 'error' => 'nonce'));
832
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Metrics/Item.php');
833
  $metrics = new B2S_Metrics_Item();
834
  $filterNetwork = ((isset($_GET['filter_network']) && sanitize_text_field(wp_unslash($_GET['filter_network'])) !== 'all' && (int) $_GET['filter_network'] > 0) ? (int) $_GET['filter_network'] : 0);
835
+ $filterDates = ((isset($_GET['filter_dates']) && is_array($_GET['filter_dates']) && !empty($_GET['filter_dates'])) ? B2S_Tools::sanitize_array($_GET['filter_dates']) : array());
836
  $data = $metrics->getInsightsData($filterNetwork, $filterDates);
837
  echo json_encode(array('result' => true, 'data' => $data));
838
  wp_die();
includes/Ajax/Post.php CHANGED
@@ -76,21 +76,21 @@ class Ajax_Post {
76
  if (isset($_POST['postFormat'])) {
77
  if ((int) $_POST['postFormat'] == 1) { //Imagepost
78
  if (isset($_POST['image_id']) && !empty($_POST['image_id']) && isset($_POST['comment_image']) && !empty($_POST['comment_image'])) {
79
- $data = array('title' => sanitize_text_field($_POST['comment_image']), 'content' => sanitize_text_field(wp_unslash($_POST['comment_image'])), 'image_id' => (int) $_POST['image_id'], 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
80
  } else {
81
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
82
  wp_die();
83
  }
84
  } else if ((int) $_POST['postFormat'] == 0) { //Linkpost
85
  if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['comment']) && !empty($_POST['comment']) && isset($_POST['url']) && !empty($_POST['url'])) {
86
- $data = array('title' => sanitize_text_field($_POST['title']), 'url' => esc_url_raw($_POST['url']), 'content' => (isset($_POST['comment']) ? sanitize_textarea_field($_POST['comment']) : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
87
  } else {
88
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
89
  wp_die();
90
  }
91
  } else {
92
  if (isset($_POST['comment_text']) && !empty($_POST['comment_text'])) {
93
- $data = array('title' => sanitize_text_field($_POST['comment_text']), 'content' => sanitize_textarea_field($_POST['comment_text']), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
94
  } else {
95
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
96
  wp_die();
@@ -153,21 +153,21 @@ class Ajax_Post {
153
  if (isset($_POST['postFormat'])) {
154
  if ((int) $_POST['postFormat'] == 1) { //Imagepost
155
  if (isset($_POST['image_id']) && !empty($_POST['image_id']) && isset($_POST['comment_image']) && !empty($_POST['comment_image'])) {
156
- $data = array('title' => sanitize_text_field($_POST['comment_image']), 'content' => sanitize_text_field(wp_unslash($_POST['comment_image'])), 'image_id' => (int) $_POST['image_id'], 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
157
  } else {
158
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
159
  wp_die();
160
  }
161
  } else if ((int) $_POST['postFormat'] == 0) { //Linkpost
162
  if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['comment']) && !empty($_POST['comment']) && isset($_POST['url']) && !empty($_POST['url'])) {
163
- $data = array('title' => sanitize_text_field($_POST['title']), 'url' => esc_url_raw($_POST['url']), 'content' => (isset($_POST['comment']) ? sanitize_textarea_field($_POST['comment']) : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
164
  } else {
165
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
166
  wp_die();
167
  }
168
  } else {
169
  if (isset($_POST['comment_text']) && !empty($_POST['comment_text'])) {
170
- $data = array('title' => sanitize_text_field($_POST['comment_text']), 'content' => sanitize_text_field(wp_unslash($_POST['comment_text'])), 'image_id' => (int) $_POST['image_id'], 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
171
  } else {
172
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
173
  wp_die();
@@ -183,7 +183,6 @@ class Ajax_Post {
183
  if (isset($_POST['profile_data_' . $profilId]) && !empty($_POST['profile_data_' . $profilId])) {
184
  $networkData = json_decode(base64_decode(sanitize_text_field(wp_unslash($_POST['profile_data_' . $profilId]))));
185
  if ($networkData !== false && is_array($networkData) && !empty($networkData)) {
186
- $networkData = B2S_Tools::sanitize_array($networkData);
187
  $notAllowNetwork = array(11);
188
  $tosCrossPosting = unserialize(B2S_PLUGIN_NETWORK_CROSSPOSTING_LIMIT);
189
  $allowNetworkOnlyImage = array(6, 7, 12, 21);
@@ -336,7 +335,7 @@ class Ajax_Post {
336
  if (isset($_POST['postFormat'])) {
337
  if ((int) $_POST['postFormat'] == 1) { //Imagepost
338
  if (isset($_POST['image_id']) && !empty($_POST['image_id']) && isset($_POST['comment_image']) && !empty($_POST['comment_image'])) {
339
- $data = array('title' => sanitize_text_field($_POST['comment_image']), 'content' => sanitize_text_field(wp_unslash($_POST['comment_image'])), 'image_id' => (int) $_POST['image_id'], 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
340
  $imgUrl = (isset($_POST['image_url']) && !empty($_POST['image_url'])) ? esc_url_raw(wp_unslash($_POST['image_url'])) : '';
341
  } else {
342
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
@@ -344,7 +343,7 @@ class Ajax_Post {
344
  }
345
  } else if ((int) $_POST['postFormat'] == 0) { //Linkpost
346
  if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['comment']) && !empty($_POST['comment']) && isset($_POST['url']) && !empty($_POST['url'])) {
347
- $data = array('title' => sanitize_text_field($_POST['title']), 'url' => esc_url_raw($_POST['url']), 'content' => (isset($_POST['comment']) ? sanitize_textarea_field($_POST['comment']) : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
348
  $imgUrl = (isset($_POST['link_image_url']) && !empty($_POST['link_image_url'])) ? esc_url_raw(wp_unslash($_POST['link_image_url'])) : '';
349
  } else {
350
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
@@ -352,7 +351,7 @@ class Ajax_Post {
352
  }
353
  } else if ((int) $_POST['postFormat'] == 2) {//Textpost
354
  if (isset($_POST['comment_text']) && !empty($_POST['comment_text'])) {
355
- $data = array('title' => sanitize_text_field($_POST['comment_text']), 'content' => sanitize_text_field(wp_unslash($_POST['comment_text'])), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
356
  } else {
357
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
358
  wp_die();
@@ -402,7 +401,7 @@ class Ajax_Post {
402
  }
403
 
404
  public function b2sPluginDeactivate() {
405
- if (isset($_POST['b2s_deactivate_nonce']) && (int) wp_verify_nonce($_POST['b2s_deactivate_nonce'], 'b2s_deactivate_nonce') > 0) {
406
  if (isset($_POST['delete_sched_post']) && (int) $_POST['delete_sched_post'] == 1) {
407
  update_option("B2S_PLUGIN_DEACTIVATE_SCHED_POST", 1, false);
408
  } else {
@@ -775,7 +774,7 @@ class Ajax_Post {
775
  $options->_setOption('og_imagedata_active', ((B2S_PLUGIN_USER_VERSION >= 1) ? (int) $_POST['b2s_og_imagedata_active'] : 1));
776
  $options->_setOption('og_objecttype_active', ((B2S_PLUGIN_USER_VERSION >= 1) ? (int) $_POST['b2s_og_objecttype_active'] : 1));
777
  $options->_setOption('og_locale_active', ((B2S_PLUGIN_USER_VERSION >= 1) ? (int) $_POST['b2s_og_locale_active'] : 1));
778
- $options->_setOption('og_locale', ((B2S_PLUGIN_USER_VERSION >= 1) ? esc_html($_POST['b2s_og_locale']) : ''));
779
 
780
  $card_active = (!isset($_POST['b2s_card_active'])) ? 0 : 1;
781
  $options->_setOption('card_active', $card_active);
@@ -1358,7 +1357,7 @@ class Ajax_Post {
1358
  if (isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['b2s_security_nonce'])), 'b2s_security_nonce') > 0) {
1359
  require_once (B2S_PLUGIN_DIR . '/includes/B2S/Post/Tools.php');
1360
  if (isset($_POST['postId']) && !empty($_POST['postId'])) {
1361
- $postIds = explode(',', sanitize_text_field(wp_unslash(['postId'])));
1362
  if (is_array($postIds) && !empty($postIds)) {
1363
  echo json_encode(B2S_Post_Tools::deleteUserApprovePost($postIds));
1364
  wp_die();
@@ -1414,11 +1413,11 @@ class Ajax_Post {
1414
  public function saveUserTimeSettings() {
1415
  if (isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['b2s_security_nonce'])), 'b2s_security_nonce') > 0) {
1416
  if (isset($_POST['b2s-user-sched-data']) && !empty($_POST['b2s-user-sched-data']) && isset($_POST['b2s-user-sched-data']['time']) && isset($_POST['b2s-user-sched-data']['delay_day'])) {
1417
- foreach ($_POST['b2s-user-sched-data']['time'] as $k => $v) {
1418
  $_POST['b2s-user-sched-data']['time'][$k] = date('H:i', strtotime(date('Y-m-d') . ' ' . $v));
1419
  }
1420
  $options = new B2S_Options(B2S_PLUGIN_BLOG_USER_ID);
1421
- $options->_setOption('auth_sched_time', array('delay_day' => sanitize_text_field(wp_unslash($_POST['b2s-user-sched-data']['delay_day'])), 'time' => sanitize_text_field(wp_unslash($_POST['b2s-user-sched-data']['time']))));
1422
  echo json_encode(array('result' => true));
1423
  wp_die();
1424
  }
@@ -2006,7 +2005,7 @@ class Ajax_Post {
2006
  $displayName = stripslashes(get_user_by('id', (int) $_POST['assignBlogUserId'])->display_name);
2007
  $newListEntry = '<li class="b2s-network-item-auth-list-li">';
2008
  $newListEntry .= '<div class="pull-left" style="padding-top: 5px;"><span>' . esc_html(((empty($displayName) || $displayName == false) ? __("Unknown username", "blog2social") : $displayName)) . '</span></div>';
2009
- $newListEntry .= '<div class="pull-right"><span style="margin-right: 10px;">' . esc_html($current_user_date) . '</span> <button class="b2s-network-item-auth-list-btn-delete btn btn-danger btn-sm" data-network-auth-id="' . esc_attr($_POST['networkAuthId']) . '" data-assign-network-auth-id="' . esc_attr($assignUserAuth['assign_network_auth_id']) . '" data-network-id="' . esc_attr($assignUserAuth['assign_network_id']) . '" data-network-type="' . esc_attr($assignUserAuth['assign_network_type']) . '" data-blog-user-id="' . esc_attr($_POST['assignBlogUserId']) . '">' . esc_html__('delete', 'blog2social') . '</button></div>';
2010
  $newListEntry .= '<div class="clearfix"></div></li>';
2011
  echo json_encode(array('result' => true, 'newListEntry' => $newListEntry));
2012
  wp_die();
@@ -2243,7 +2242,7 @@ class Ajax_Post {
2243
  } else {
2244
  $password = "extension_login";
2245
  }
2246
- $data = array('username' => base64_encode($username), 'password' => base64_encode($password), 'boardId' => base64_encode($boardId), 'identData' => sanitize_text_field(base64_decode(sanitize_text_field(wp_unslash(['identData'])))));
2247
  $postData = array('action' => 'authorizeNetwork', 'token' => B2S_PLUGIN_TOKEN, 'networkId' => 6, 'networkType' => 'profile', 'mandantId' => sanitize_text_field($mandantId), 'version' => B2S_PLUGIN_VERSION, 'data' => $data);
2248
  if (isset($_POST['networkAuthId']) && (int) $_POST['networkAuthId'] > 0) {
2249
  $postData = array_merge($postData, array('networkAuthId' => sanitize_text_field($_POST['networkAuthId'])));
@@ -2361,7 +2360,7 @@ class Ajax_Post {
2361
  public function rePostSubmit() {
2362
  if (isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['b2s_security_nonce'])), 'b2s_security_nonce') > 0) {
2363
  if (isset($_POST['b2s-re-post-profil-dropdown']) && (int) $_POST['b2s-re-post-profil-dropdown'] >= 0 && isset($_POST['b2s-re-post-profil-data-' . sanitize_text_field(wp_unslash($_POST['b2s-re-post-profil-dropdown']))]) && !empty($_POST['b2s-re-post-profil-data-' . sanitize_text_field(wp_unslash($_POST['b2s-re-post-profil-dropdown']))])) {
2364
- $networkData = json_decode(base64_decode($_POST['b2s-re-post-profil-data-' . $_POST['b2s-re-post-profil-dropdown']]));
2365
  if ($networkData !== false && is_array($networkData) && !empty($networkData)) {
2366
 
2367
  //Select Posts for Queue
76
  if (isset($_POST['postFormat'])) {
77
  if ((int) $_POST['postFormat'] == 1) { //Imagepost
78
  if (isset($_POST['image_id']) && !empty($_POST['image_id']) && isset($_POST['comment_image']) && !empty($_POST['comment_image'])) {
79
+ $data = array('title' => sanitize_textarea_field($_POST['comment_image']), 'content' => sanitize_textarea_field(wp_unslash($_POST['comment_image'])), 'image_id' => (int) $_POST['image_id'], 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
80
  } else {
81
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
82
  wp_die();
83
  }
84
  } else if ((int) $_POST['postFormat'] == 0) { //Linkpost
85
  if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['comment']) && !empty($_POST['comment']) && isset($_POST['url']) && !empty($_POST['url'])) {
86
+ $data = array('title' => sanitize_textarea_field($_POST['title']), 'url' => esc_url_raw($_POST['url']), 'content' => (isset($_POST['comment']) ? sanitize_textarea_field($_POST['comment']) : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
87
  } else {
88
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
89
  wp_die();
90
  }
91
  } else {
92
  if (isset($_POST['comment_text']) && !empty($_POST['comment_text'])) {
93
+ $data = array('title' => sanitize_textarea_field($_POST['comment_text']), 'content' => sanitize_textarea_field($_POST['comment_text']), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
94
  } else {
95
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
96
  wp_die();
153
  if (isset($_POST['postFormat'])) {
154
  if ((int) $_POST['postFormat'] == 1) { //Imagepost
155
  if (isset($_POST['image_id']) && !empty($_POST['image_id']) && isset($_POST['comment_image']) && !empty($_POST['comment_image'])) {
156
+ $data = array('title' => sanitize_textarea_field($_POST['comment_image']), 'content' => sanitize_textarea_field(wp_unslash($_POST['comment_image'])), 'image_id' => (int) $_POST['image_id'], 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
157
  } else {
158
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
159
  wp_die();
160
  }
161
  } else if ((int) $_POST['postFormat'] == 0) { //Linkpost
162
  if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['comment']) && !empty($_POST['comment']) && isset($_POST['url']) && !empty($_POST['url'])) {
163
+ $data = array('title' => sanitize_textarea_field($_POST['title']), 'url' => esc_url_raw($_POST['url']), 'content' => (isset($_POST['comment']) ? sanitize_textarea_field($_POST['comment']) : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
164
  } else {
165
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
166
  wp_die();
167
  }
168
  } else {
169
  if (isset($_POST['comment_text']) && !empty($_POST['comment_text'])) {
170
+ $data = array('title' => sanitize_textarea_field($_POST['comment_text']), 'content' => sanitize_textarea_field(wp_unslash($_POST['comment_text'])), 'image_id' => (int) $_POST['image_id'], 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
171
  } else {
172
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
173
  wp_die();
183
  if (isset($_POST['profile_data_' . $profilId]) && !empty($_POST['profile_data_' . $profilId])) {
184
  $networkData = json_decode(base64_decode(sanitize_text_field(wp_unslash($_POST['profile_data_' . $profilId]))));
185
  if ($networkData !== false && is_array($networkData) && !empty($networkData)) {
 
186
  $notAllowNetwork = array(11);
187
  $tosCrossPosting = unserialize(B2S_PLUGIN_NETWORK_CROSSPOSTING_LIMIT);
188
  $allowNetworkOnlyImage = array(6, 7, 12, 21);
335
  if (isset($_POST['postFormat'])) {
336
  if ((int) $_POST['postFormat'] == 1) { //Imagepost
337
  if (isset($_POST['image_id']) && !empty($_POST['image_id']) && isset($_POST['comment_image']) && !empty($_POST['comment_image'])) {
338
+ $data = array('title' => sanitize_textarea_field($_POST['comment_image']), 'content' => sanitize_textarea_field(wp_unslash($_POST['comment_image'])), 'image_id' => (int) $_POST['image_id'], 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
339
  $imgUrl = (isset($_POST['image_url']) && !empty($_POST['image_url'])) ? esc_url_raw(wp_unslash($_POST['image_url'])) : '';
340
  } else {
341
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
343
  }
344
  } else if ((int) $_POST['postFormat'] == 0) { //Linkpost
345
  if (isset($_POST['title']) && !empty($_POST['title']) && isset($_POST['comment']) && !empty($_POST['comment']) && isset($_POST['url']) && !empty($_POST['url'])) {
346
+ $data = array('title' => sanitize_textarea_field($_POST['title']), 'url' => esc_url_raw($_POST['url']), 'content' => (isset($_POST['comment']) ? sanitize_textarea_field($_POST['comment']) : ''), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
347
  $imgUrl = (isset($_POST['link_image_url']) && !empty($_POST['link_image_url'])) ? esc_url_raw(wp_unslash($_POST['link_image_url'])) : '';
348
  } else {
349
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
351
  }
352
  } else if ((int) $_POST['postFormat'] == 2) {//Textpost
353
  if (isset($_POST['comment_text']) && !empty($_POST['comment_text'])) {
354
+ $data = array('title' => sanitize_textarea_field($_POST['comment_text']), 'content' => sanitize_textarea_field(wp_unslash($_POST['comment_text'])), 'author_id' => B2S_PLUGIN_BLOG_USER_ID);
355
  } else {
356
  echo json_encode(array('result' => false, 'error' => 'NO_DATA'));
357
  wp_die();
401
  }
402
 
403
  public function b2sPluginDeactivate() {
404
+ if (isset($_POST['b2s_deactivate_nonce']) && (int) wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['b2s_deactivate_nonce'])), 'b2s_deactivate_nonce') > 0) {
405
  if (isset($_POST['delete_sched_post']) && (int) $_POST['delete_sched_post'] == 1) {
406
  update_option("B2S_PLUGIN_DEACTIVATE_SCHED_POST", 1, false);
407
  } else {
774
  $options->_setOption('og_imagedata_active', ((B2S_PLUGIN_USER_VERSION >= 1) ? (int) $_POST['b2s_og_imagedata_active'] : 1));
775
  $options->_setOption('og_objecttype_active', ((B2S_PLUGIN_USER_VERSION >= 1) ? (int) $_POST['b2s_og_objecttype_active'] : 1));
776
  $options->_setOption('og_locale_active', ((B2S_PLUGIN_USER_VERSION >= 1) ? (int) $_POST['b2s_og_locale_active'] : 1));
777
+ $options->_setOption('og_locale', ((B2S_PLUGIN_USER_VERSION >= 1) ? sanitize_text_field($_POST['b2s_og_locale']) : ''));
778
 
779
  $card_active = (!isset($_POST['b2s_card_active'])) ? 0 : 1;
780
  $options->_setOption('card_active', $card_active);
1357
  if (isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['b2s_security_nonce'])), 'b2s_security_nonce') > 0) {
1358
  require_once (B2S_PLUGIN_DIR . '/includes/B2S/Post/Tools.php');
1359
  if (isset($_POST['postId']) && !empty($_POST['postId'])) {
1360
+ $postIds = explode(',', sanitize_text_field(wp_unslash($_POST['postId'])));
1361
  if (is_array($postIds) && !empty($postIds)) {
1362
  echo json_encode(B2S_Post_Tools::deleteUserApprovePost($postIds));
1363
  wp_die();
1413
  public function saveUserTimeSettings() {
1414
  if (isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['b2s_security_nonce'])), 'b2s_security_nonce') > 0) {
1415
  if (isset($_POST['b2s-user-sched-data']) && !empty($_POST['b2s-user-sched-data']) && isset($_POST['b2s-user-sched-data']['time']) && isset($_POST['b2s-user-sched-data']['delay_day'])) {
1416
+ foreach (B2S_Tools::sanitize_array($_POST['b2s-user-sched-data']['time']) as $k => $v) {
1417
  $_POST['b2s-user-sched-data']['time'][$k] = date('H:i', strtotime(date('Y-m-d') . ' ' . $v));
1418
  }
1419
  $options = new B2S_Options(B2S_PLUGIN_BLOG_USER_ID);
1420
+ $options->_setOption('auth_sched_time', array('delay_day' => B2S_Tools::sanitize_array($_POST['b2s-user-sched-data']['delay_day']), 'time' => B2S_Tools::sanitize_array($_POST['b2s-user-sched-data']['time'])));
1421
  echo json_encode(array('result' => true));
1422
  wp_die();
1423
  }
2005
  $displayName = stripslashes(get_user_by('id', (int) $_POST['assignBlogUserId'])->display_name);
2006
  $newListEntry = '<li class="b2s-network-item-auth-list-li">';
2007
  $newListEntry .= '<div class="pull-left" style="padding-top: 5px;"><span>' . esc_html(((empty($displayName) || $displayName == false) ? __("Unknown username", "blog2social") : $displayName)) . '</span></div>';
2008
+ $newListEntry .= '<div class="pull-right"><span style="margin-right: 10px;">' . esc_html($current_user_date) . '</span> <button class="b2s-network-item-auth-list-btn-delete btn btn-danger btn-sm" data-network-auth-id="' . esc_attr($_POST['networkAuthId']) . '" data-assign-network-auth-id="' . esc_attr($assignUserAuth['assign_network_auth_id']) . '" data-network-id="' . esc_attr($assignUserAuth['assign_network_id']) . '" data-network-type="' . esc_attr($assignUserAuth['assign_network_type']) . '" data-blog-user-id="' . esc_attr((int) $_POST['assignBlogUserId']) . '">' . esc_html__('delete', 'blog2social') . '</button></div>';
2009
  $newListEntry .= '<div class="clearfix"></div></li>';
2010
  echo json_encode(array('result' => true, 'newListEntry' => $newListEntry));
2011
  wp_die();
2242
  } else {
2243
  $password = "extension_login";
2244
  }
2245
+ $data = array('username' => base64_encode($username), 'password' => base64_encode($password), 'boardId' => base64_encode($boardId), 'identData' => base64_decode(sanitize_text_field(wp_unslash($_POST['identData']))));
2246
  $postData = array('action' => 'authorizeNetwork', 'token' => B2S_PLUGIN_TOKEN, 'networkId' => 6, 'networkType' => 'profile', 'mandantId' => sanitize_text_field($mandantId), 'version' => B2S_PLUGIN_VERSION, 'data' => $data);
2247
  if (isset($_POST['networkAuthId']) && (int) $_POST['networkAuthId'] > 0) {
2248
  $postData = array_merge($postData, array('networkAuthId' => sanitize_text_field($_POST['networkAuthId'])));
2360
  public function rePostSubmit() {
2361
  if (isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['b2s_security_nonce'])), 'b2s_security_nonce') > 0) {
2362
  if (isset($_POST['b2s-re-post-profil-dropdown']) && (int) $_POST['b2s-re-post-profil-dropdown'] >= 0 && isset($_POST['b2s-re-post-profil-data-' . sanitize_text_field(wp_unslash($_POST['b2s-re-post-profil-dropdown']))]) && !empty($_POST['b2s-re-post-profil-data-' . sanitize_text_field(wp_unslash($_POST['b2s-re-post-profil-dropdown']))])) {
2363
+ $networkData = json_decode(base64_decode(sanitize_text_field($_POST['b2s-re-post-profil-data-' . sanitize_text_field($_POST['b2s-re-post-profil-dropdown'])])));
2364
  if ($networkData !== false && is_array($networkData) && !empty($networkData)) {
2365
 
2366
  //Select Posts for Queue
includes/B2S/AutoPost/Item.php CHANGED
@@ -198,16 +198,22 @@ class B2S_AutoPost_Item {
198
 
199
  //TOS Twitter 032018 - none multiple Accounts - User select once
200
  $content .='<div class="col-md-3 b2s-auto-post-twitter-profile"><label for="b2s-auto-post-profil-dropdown-twitter">' . esc_html__('Select Twitter profile:', 'blog2social') . '</label> <select class="b2s-w-100" id="b2s-auto-post-profil-dropdown-twitter" name="b2s-auto-post-profil-dropdown-twitter">';
 
201
  foreach ($mandant as $k => $m) {
202
  if ((isset($auth->{$m->id}) && isset($auth->{$m->id}[0]) && !empty($auth->{$m->id}[0]))) {
203
  foreach ($auth->{$m->id} as $key => $value) {
204
  if ($value->networkId == 2) {
205
  $content .= '<option data-mandant-id="' . esc_attr($m->id) . '" value="' . esc_attr($value->networkAuthId) . '" '.(((int) $value->networkAuthId == (int) $twitterId) ? 'selected' : '').'>' . esc_html($value->networkUserName) . '</option>';
 
 
 
206
  }
207
  }
208
  }
209
  }
210
- $content .= '</select><div class="pull-right"><a href="#" class="b2sTwitterInfoModalBtn">'.esc_html__('Info', 'blog2social').'</a></div></div></div>';
 
 
211
  return $content;
212
  }
213
  }
@@ -352,5 +358,14 @@ class B2S_AutoPost_Item {
352
  return $html;
353
  }
354
 
 
 
 
 
 
 
 
 
 
355
  }
356
 
198
 
199
  //TOS Twitter 032018 - none multiple Accounts - User select once
200
  $content .='<div class="col-md-3 b2s-auto-post-twitter-profile"><label for="b2s-auto-post-profil-dropdown-twitter">' . esc_html__('Select Twitter profile:', 'blog2social') . '</label> <select class="b2s-w-100" id="b2s-auto-post-profil-dropdown-twitter" name="b2s-auto-post-profil-dropdown-twitter">';
201
+ $selectedTwitterAuthId = 0;
202
  foreach ($mandant as $k => $m) {
203
  if ((isset($auth->{$m->id}) && isset($auth->{$m->id}[0]) && !empty($auth->{$m->id}[0]))) {
204
  foreach ($auth->{$m->id} as $key => $value) {
205
  if ($value->networkId == 2) {
206
  $content .= '<option data-mandant-id="' . esc_attr($m->id) . '" value="' . esc_attr($value->networkAuthId) . '" '.(((int) $value->networkAuthId == (int) $twitterId) ? 'selected' : '').'>' . esc_html($value->networkUserName) . '</option>';
207
+ if((int) $value->networkAuthId == (int) $twitterId) {
208
+ $selectedTwitterAuthId = (int) $value->networkAuthId;
209
+ }
210
  }
211
  }
212
  }
213
  }
214
+ $content .= '</select><div class="pull-right"><a href="#" class="b2sTwitterInfoModalBtn">'.esc_html__('Info', 'blog2social').'</a></div>'
215
+ // . $this->getRelayBtnHtml($selectedTwitterAuthId, 2)
216
+ . '</div></div>';
217
  return $content;
218
  }
219
  }
358
  return $html;
359
  }
360
 
361
+ private function getRelayBtnHtml($networkAuthId, $networkId) {
362
+ $relay = '<div class="form-group b2s-post-relay-area-select pull-left"><div class="checkbox checbox-switch switch-success"><label>';
363
+ $relay .= '<input type="checkbox" class="b2s-post-item-details-relay form-control" data-user-version="' . esc_attr(B2S_PLUGIN_USER_VERSION) . '" data-network-id="' . esc_attr($networkId) . '" data-network-auth-id="' . esc_attr($networkAuthId) . '" name="b2s[' . esc_attr($networkAuthId) . '][post_relay]" value="1"/>';
364
+ $relay .= '<span></span>';
365
+ $relay .= esc_html__('Enable Retweets for all Tweets with the selected profile', 'blog2social') . ' <a href="#" class="btn-xs hidden-sm b2sInfoPostRelayModalBtn">' . esc_html__('Info', 'blog2social') . '</a>';
366
+ $relay .= ' </label></div></div>';
367
+ return $relay;
368
+ }
369
+
370
  }
371
 
includes/B2S/Heartbeat.php CHANGED
@@ -457,7 +457,7 @@ class B2S_Heartbeat {
457
  $entryData = json_decode($entry['insight'], true);
458
  if($entryData !== false && is_array($entryData) && !empty($entryData)) {
459
  end($entryData['insights']['data']['likes']);
460
- $entryKey = key(['insights']['data']['likes']);
461
  $totalData['likes'] += $entryData['insights']['data']['likes'][$entryKey];
462
  $totalData['comments'] += $entryData['insights']['data']['comments'][$entryKey];
463
  $totalData['reshares'] += $entryData['insights']['data']['reshares'][$entryKey];
457
  $entryData = json_decode($entry['insight'], true);
458
  if($entryData !== false && is_array($entryData) && !empty($entryData)) {
459
  end($entryData['insights']['data']['likes']);
460
+ $entryKey = key($entryData['insights']['data']['likes']);
461
  $totalData['likes'] += $entryData['insights']['data']['likes'][$entryKey];
462
  $totalData['comments'] += $entryData['insights']['data']['comments'][$entryKey];
463
  $totalData['reshares'] += $entryData['insights']['data']['reshares'][$entryKey];
includes/B2S/Network/Item.php CHANGED
@@ -94,7 +94,8 @@ class B2S_Network_Item {
94
  }
95
  $html .= '</form>';
96
  $html .= '</div>';
97
- return $html;
 
98
  }
99
 
100
  public function getItemHtml($mandant, $mandantenData, $convertAuthData, $portale, $auth_count) {
94
  }
95
  $html .= '</form>';
96
  $html .= '</div>';
97
+ echo $html;
98
+ // return $html;
99
  }
100
 
101
  public function getItemHtml($mandant, $mandantenData, $convertAuthData, $portale, $auth_count) {
includes/B2S/Ship/Item.php CHANGED
@@ -460,7 +460,11 @@ class B2S_Ship_Item {
460
  $content .= '<input type="hidden" data-network-auth-id="' . esc_attr($data->networkAuthId) . '" class="b2s-network-default-image" value="' . esc_url($this->defaultImage) . '">';
461
 
462
  $content .= '</div>';
463
- return $content;
 
 
 
 
464
  }
465
 
466
  public function getCustomEditArea($networkId, $networkAuthId, $networkType, $message, $isRequiredTextarea, $textareaOnKeyUp, $limit, $limitValue, $imageUrl = null, $multi_images = array(), $postFormat = 0) {
460
  $content .= '<input type="hidden" data-network-auth-id="' . esc_attr($data->networkAuthId) . '" class="b2s-network-default-image" value="' . esc_url($this->defaultImage) . '">';
461
 
462
  $content .= '</div>';
463
+ if($this->viewMode == 'modal') {
464
+ echo $content;
465
+ } else {
466
+ return $content;
467
+ }
468
  }
469
 
470
  public function getCustomEditArea($networkId, $networkAuthId, $networkType, $message, $isRequiredTextarea, $textareaOnKeyUp, $limit, $limitValue, $imageUrl = null, $multi_images = array(), $postFormat = 0) {
includes/Loader.php CHANGED
@@ -466,7 +466,70 @@ class B2S_Loader {
466
  $postType = (isset($_GET['post_type']) && !empty($_GET['post_type'])) ? sanitize_text_field($_GET['post_type']) : get_post_type($postId);
467
  $postStatus = ($postId != 0) ? get_post_status($postId) : '';
468
  $postBox = new B2S_PostBox();
469
- echo $postBox->getPostBox($postId, $postType, $postStatus);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
470
  }
471
 
472
  public function b2s_view_post_box_calendar() {
@@ -526,7 +589,7 @@ class B2S_Loader {
526
  } else {
527
  $desc = str_replace("\r\n", ' ', substr(sanitize_textarea_field(strip_shortcodes($_POST['content'])), 0, 160));
528
  }
529
- $images_urls = $hook_filter->get_wp_post_image((int) $_POST['post_ID'], true, ((isset($_POST['content']) && !empty($_POST['content'])) ? trim(sanitize_text_field(wp_unslash(['content']))) : ''));
530
  $image_url = ((!empty($images_urls) && isset(array_values($images_urls)[0][0])) ? array_values($images_urls)[0][0] : false);
531
  $meta->setMeta('card_title', $title);
532
  $meta->setMeta('card_desc', $desc);
466
  $postType = (isset($_GET['post_type']) && !empty($_GET['post_type'])) ? sanitize_text_field($_GET['post_type']) : get_post_type($postId);
467
  $postStatus = ($postId != 0) ? get_post_status($postId) : '';
468
  $postBox = new B2S_PostBox();
469
+ echo wp_kses($postBox->getPostBox($postId, $postType, $postStatus), array(
470
+ 'div' => array(
471
+ 'class' => array(),
472
+ 'id' => array(),
473
+ 'style' => array(),
474
+ 'aria-hidden' => array(),
475
+ ),
476
+ 'button' => array(
477
+ 'data-area-id' => array(),
478
+ 'class' => array(),
479
+ 'title' => array(),
480
+ ),
481
+ 'a' => array(
482
+ 'target' => array(),
483
+ 'class' => array(),
484
+ 'href' => array(),
485
+ 'id' => array(),
486
+ 'data-modal-target' => array(),
487
+ 'aria-hidden' => array(),
488
+ ),
489
+ 'input' => array(
490
+ 'type' => array(),
491
+ 'value' => array(),
492
+ 'id' => array(),
493
+ 'name' => array(),
494
+ 'class' => array(),
495
+ 'checked' => array()
496
+ ),
497
+ 'h3' => array(
498
+ 'class' => array()
499
+ ),
500
+ 'h4' => array(
501
+ 'class' => array()
502
+ ),
503
+ 'span' => array(
504
+ 'class' => array(),
505
+ 'style' => array()
506
+ ),
507
+ 'i' => array(
508
+ 'class' => array()
509
+ ),
510
+ 'p' => array(
511
+ 'class' => array()
512
+ ),
513
+ 'img' => array(
514
+ 'class' => array(),
515
+ 'alt' => array(),
516
+ 'src' => array()
517
+ ),
518
+ 'select' => array(
519
+ 'class' => array(),
520
+ 'id' => array(),
521
+ 'name' => array(),
522
+ ),
523
+ 'option' => array(
524
+ 'value' => array(),
525
+ 'selected' => array(),
526
+ 'data-mandant-id' => array(),
527
+ 'disabled' => array()
528
+ ),
529
+ 'label' => array(
530
+ 'for' => array(),
531
+ )
532
+ ));
533
  }
534
 
535
  public function b2s_view_post_box_calendar() {
589
  } else {
590
  $desc = str_replace("\r\n", ' ', substr(sanitize_textarea_field(strip_shortcodes($_POST['content'])), 0, 160));
591
  }
592
+ $images_urls = $hook_filter->get_wp_post_image((int) $_POST['post_ID'], true, ((isset($_POST['content']) && !empty($_POST['content'])) ? trim(sanitize_text_field(wp_unslash($_POST['content']))) : ''));
593
  $image_url = ((!empty($images_urls) && isset(array_values($images_urls)[0][0])) ? array_values($images_urls)[0][0] : false);
594
  $meta->setMeta('card_title', $title);
595
  $meta->setMeta('card_desc', $desc);
includes/Meta.php CHANGED
@@ -262,19 +262,6 @@ class B2S_Meta {
262
  }
263
  }
264
 
265
- /* private function getSocialAuthor($type = 'og') {
266
- if (!is_home()) {
267
- if ($this->author !== false) {
268
- if ($type == 'og' && isset($this->author['og_article_author']) && !empty($this->author['og_article_author'])) {
269
- echo '<meta property="article:author" content="' . esc_url($this->author['og_article_author']) . '" />';
270
- }
271
- if ($type == 'card' && isset($this->author['card_twitter_creator']) && !empty($this->author['card_twitter_creator'])) {
272
- echo '<meta name="twitter:creator" value="' . $this->author['card_twitter_creator'] . '" />';
273
- }
274
- }
275
- }
276
- } */
277
-
278
  public function getAuthor() {
279
  if (isset($this->post->post_author)) {
280
  if ($this->post->post_author > 0 && is_singular()) {
262
  }
263
  }
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  public function getAuthor() {
266
  if (isset($this->post->post_author)) {
267
  if ($this->post->post_author > 0 && is_singular()) {
includes/Notice.php CHANGED
@@ -58,7 +58,19 @@ class B2S_Notice {
58
  $output = '<div id="message" class="notice inline notice-warning notice-alt"><p>';
59
  $output .= $b2sSytem->getErrorMessage($b2sCheck, true);
60
  $output .= '</p></div>';
61
- echo $output;
 
 
 
 
 
 
 
 
 
 
 
 
62
  }
63
  }
64
 
58
  $output = '<div id="message" class="notice inline notice-warning notice-alt"><p>';
59
  $output .= $b2sSytem->getErrorMessage($b2sCheck, true);
60
  $output .= '</p></div>';
61
+ echo wp_kses($output, array(
62
+ 'div' => array(
63
+ 'id' => array(),
64
+ 'class' => array(),
65
+ ),
66
+ 'p' => array(),
67
+ 'br' => array(),
68
+ 'a' => array(
69
+ 'href' => array(),
70
+ 'target' => array(),
71
+ 'class' => array(),
72
+ ),
73
+ ));
74
  }
75
  }
76
 
includes/Tools.php CHANGED
@@ -633,4 +633,17 @@ class B2S_Tools {
633
  return $array;
634
  }
635
 
 
 
 
 
 
 
 
 
 
 
 
 
 
636
  }
633
  return $array;
634
  }
635
 
636
+ public static function esc_html_array($array = array(), $kses = array()) {
637
+ if(is_array($array) && !empty($array)) {
638
+ foreach ($array as $key => &$value) {
639
+ if (is_array($value)) {
640
+ $value = self::esc_html_array($value);
641
+ } else {
642
+ $value = wp_kses($value, $kses);
643
+ }
644
+ }
645
+ }
646
+ return $array;
647
+ }
648
+
649
  }
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.9
8
- Stable tag: 6.9.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -234,6 +234,8 @@ To get started with the basics of Blog2Social and maybe find some useful tips an
234
  7. Keep track of your shared posts and scheduling plan with the Social Media Calendar.
235
 
236
  == Changelog ==
 
 
237
  = 6.9.6 =
238
  Additional Security Update
239
  = 6.9.5 =
@@ -320,6 +322,8 @@ Usability Optimization, Rebrandly integration, url parameter settings
320
  New Image Posts, Imgur, Animated Gifs and Emojis
321
 
322
  == Upgrade Notice ==
 
 
323
  = 6.9.6 =
324
  Additional Security Update
325
  = 6.9.5 =
5
  Donate link: https://paypal.me/adenion
6
  Requires at least: 4.7.0
7
  Tested up to: 5.9
8
+ Stable tag: 6.9.7
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
234
  7. Keep track of your shared posts and scheduling plan with the Social Media Calendar.
235
 
236
  == Changelog ==
237
+ = 6.9.7 =
238
+ Additional Security Update
239
  = 6.9.6 =
240
  Additional Security Update
241
  = 6.9.5 =
322
  New Image Posts, Imgur, Animated Gifs and Emojis
323
 
324
  == Upgrade Notice ==
325
+ = 6.9.7 =
326
+ Additional Security Update
327
  = 6.9.6 =
328
  Additional Security Update
329
  = 6.9.5 =
views/b2s/autopost.php CHANGED
@@ -36,7 +36,100 @@ $autoPostItem = new B2S_AutoPost_Item();
36
  <div class="text-center b2s-loader-text"><?php esc_html_e("save...", "blog2social"); ?></div>
37
  </div>
38
  <div class="row b2s-autopost-area">
39
- <?php echo $autoPostItem->getAutoPostingSettingsHtml(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  </div>
41
  <input type="hidden" id="b2s_user_version" value="<?php echo B2S_PLUGIN_USER_VERSION; ?>" />
42
  <?php
@@ -52,7 +145,7 @@ $autoPostItem = new B2S_AutoPost_Item();
52
 
53
  <input type="hidden" id="b2sLang" value="<?php echo esc_attr(substr(B2S_LANGUAGE, 0, 2)); ?>">
54
  <input type="hidden" id="b2sUserLang" value="<?php echo esc_attr(strtolower(substr(get_locale(), 0, 2))); ?>">
55
- <input type="hidden" id="b2sShowSection" value="<?php echo (isset($_GET['show']) ? esc_attr($_GET['show']) : ''); ?>">
56
  <input type="hidden" id="b2s_wp_media_headline" value="<?php esc_html_e('Select or upload an image from media gallery', 'blog2social') ?>">
57
  <input type="hidden" id="b2s_wp_media_btn" value="<?php esc_html_e('Use image', 'blog2social') ?>">
58
  <input type="hidden" id="b2s_user_version" value="<?php echo esc_attr(B2S_PLUGIN_USER_VERSION) ?>">
36
  <div class="text-center b2s-loader-text"><?php esc_html_e("save...", "blog2social"); ?></div>
37
  </div>
38
  <div class="row b2s-autopost-area">
39
+ <?php echo wp_kses($autoPostItem->getAutoPostingSettingsHtml(), array(
40
+ 'span' => array(
41
+ 'class' => array(),
42
+ 'data-network-count-trigger' => array(),
43
+ 'data-network-id' => array()
44
+ ),
45
+ 'input' => array(
46
+ 'id' => array(),
47
+ 'class' => array(),
48
+ 'type' => array(),
49
+ 'value' => array(),
50
+ 'name' => array(),
51
+ 'data-size' => array(),
52
+ 'data-toggle' => array(),
53
+ 'data-width' => array(),
54
+ 'data-height' => array(),
55
+ 'data-onstyle' => array(),
56
+ 'data-on' => array(),
57
+ 'data-off' => array(),
58
+ 'data-area-type' => array(),
59
+ 'maxlength' => array(),
60
+ 'max' => array(),
61
+ 'min' => array(),
62
+ 'placeholder' => array(),
63
+ 'data-network-id' => array(),
64
+ 'checked' => array()
65
+ ),
66
+ 'div' => array(
67
+ 'class' => array(),
68
+ 'data-error-reason' => array(),
69
+ 'style' => array(),
70
+ 'data-area-type' => array()
71
+ ),
72
+ 'h4' => array(
73
+ 'class' => array()
74
+ ),
75
+ 'a' => array(
76
+ 'class' => array(),
77
+ 'target' => array(),
78
+ 'href' => array(),
79
+ 'id' => array()
80
+ ),
81
+ 'p' => array(
82
+ 'class' => array()
83
+ ),
84
+ 'label' => array(
85
+ 'class' => array(),
86
+ 'for' => array()
87
+ ),
88
+ 'small' => array(),
89
+ 'b' => array(),
90
+ 'form' => array(
91
+ 'id' => array(),
92
+ 'method' => array()
93
+ ),
94
+ 'button' => array(
95
+ 'class' => array(),
96
+ 'data-post-type' => array(),
97
+ 'data-select-toogle-state' => array(),
98
+ 'data-select-toogle-name' => array(),
99
+ 'id' => array(),
100
+ 'type' => array()
101
+ ),
102
+ 'br' => array(),
103
+ 'hr' => array(),
104
+ 'select' => array(
105
+ 'class' => array(),
106
+ 'name' => array(),
107
+ 'id' => array(),
108
+ 'multiple' => array(),
109
+ 'data-placeholder' => array()
110
+ ),
111
+ 'option' => array(
112
+ 'value' => array(),
113
+ 'selected' => array(),
114
+ 'data-mandant-id' => array()
115
+ ),
116
+ 'li' => array(
117
+ 'class' => array(),
118
+ 'data-network-auth-id' => array(),
119
+ 'data-network-id' => array(),
120
+ 'data-network-type' => array()
121
+ ),
122
+ 'ul' => array(
123
+ 'class' => array(),
124
+ 'data-network-id' => array(),
125
+ 'data-network-count' => array()
126
+ ),
127
+ 'img' => array(
128
+ 'class' => array(),
129
+ 'alt' => array(),
130
+ 'src' => array(),
131
+ )
132
+ )); ?>
133
  </div>
134
  <input type="hidden" id="b2s_user_version" value="<?php echo B2S_PLUGIN_USER_VERSION; ?>" />
135
  <?php
145
 
146
  <input type="hidden" id="b2sLang" value="<?php echo esc_attr(substr(B2S_LANGUAGE, 0, 2)); ?>">
147
  <input type="hidden" id="b2sUserLang" value="<?php echo esc_attr(strtolower(substr(get_locale(), 0, 2))); ?>">
148
+ <input type="hidden" id="b2sShowSection" value="<?php echo (isset($_GET['show']) ? esc_attr(sanitize_text_field($_GET['show'])) : ''); ?>">
149
  <input type="hidden" id="b2s_wp_media_headline" value="<?php esc_html_e('Select or upload an image from media gallery', 'blog2social') ?>">
150
  <input type="hidden" id="b2s_wp_media_btn" value="<?php esc_html_e('Use image', 'blog2social') ?>">
151
  <input type="hidden" id="b2s_user_version" value="<?php echo esc_attr(B2S_PLUGIN_USER_VERSION) ?>">
views/b2s/curation.draft.php CHANGED
@@ -32,7 +32,26 @@ require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
32
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
33
  <?php
34
  $postFilter = new B2S_Post_Filter('draft');
35
- echo $postFilter->getItemHtml();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  ?>
37
  </form>
38
  <!-- Filter Post Ende-->
32
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
33
  <?php
34
  $postFilter = new B2S_Post_Filter('draft');
35
+ echo wp_kses($postFilter->getItemHtml(), array(
36
+ 'div' => array(
37
+ 'class' => array()
38
+ ),
39
+ 'input' => array(
40
+ 'id' => array(),
41
+ 'name' => array(),
42
+ 'class' => array(),
43
+ 'value' => array(),
44
+ ),
45
+ 'a' => array(
46
+ 'href' => array(),
47
+ 'id' => array(),
48
+ 'class' => array()
49
+ ),
50
+ 'span' => array(
51
+ 'class' => array()
52
+ ),
53
+ 'small' => array()
54
+ ));
55
  ?>
56
  </form>
57
  <!-- Filter Post Ende-->
views/b2s/curation.php CHANGED
@@ -313,7 +313,48 @@ $selSchedDate = (isset($_GET['schedDate']) && !empty($_GET['schedDate'])) ? date
313
  <?php
314
  require_once B2S_PLUGIN_DIR . 'includes/B2S/Ship/Image.php';
315
  $image = new B2S_Ship_Image('curation');
316
- echo $image->getItemHtml(0, '', '', $userLang);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317
  ?>
318
  </div>
319
  </div>
313
  <?php
314
  require_once B2S_PLUGIN_DIR . 'includes/B2S/Ship/Image.php';
315
  $image = new B2S_Ship_Image('curation');
316
+ echo wp_kses($image->getItemHtml(0, '', '', $userLang), array(
317
+ 'div' => array(
318
+ 'class' => array(),
319
+ 'style' => array(),
320
+ ),
321
+ 'span' => array(
322
+ 'id' => array(),
323
+ ),
324
+ 'a' => array(
325
+ 'target' => array(),
326
+ 'href' => array(),
327
+ ),
328
+ 'i' => array(
329
+ 'class' => array(),
330
+ ),
331
+ 'label' => array(
332
+ 'for' => array(),
333
+ ),
334
+ 'img' => array(
335
+ 'class' => array(),
336
+ 'alt' => array(),
337
+ 'src' => array(),
338
+ ),
339
+ 'input' => array(
340
+ 'class' => array(),
341
+ 'type' => array(),
342
+ 'value' => array(),
343
+ 'id' => array(),
344
+ 'name' => array(),
345
+ 'checked' => array(),
346
+ ),
347
+ 'br' => array(),
348
+ 'button' => array(
349
+ 'class' => array(),
350
+ 'data-network-id' => array(),
351
+ 'data-post-id' => array(),
352
+ 'data-network-auth-id' => array(),
353
+ 'data-meta-type' => array(),
354
+ 'data-image-count' => array(),
355
+ 'style' => array()
356
+ )
357
+ ));
358
  ?>
359
  </div>
360
  </div>
views/b2s/dashboard.php CHANGED
@@ -101,8 +101,52 @@ $b2sGeneralOptions = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
101
  <div class="col-xs-12">
102
  <?php
103
  $settingsItem = new B2S_Settings_Item();
104
- echo $settingsItem->setNetworkSettingsHtml();
105
- echo $settingsItem->getNetworkSettingsHtml();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  ?>
107
  </div>
108
  </div>
@@ -213,7 +257,36 @@ $b2sGeneralOptions = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
213
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
214
  <?php
215
  $postFilter = new B2S_Post_Filter('all');
216
- echo $postFilter->getItemHtml();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
  ?>
218
  </form>
219
  </div>
101
  <div class="col-xs-12">
102
  <?php
103
  $settingsItem = new B2S_Settings_Item();
104
+ echo wp_kses($settingsItem->setNetworkSettingsHtml(), array(
105
+ 'input' => array(
106
+ 'type' => array(),
107
+ 'class' => array(),
108
+ 'value' => array(),
109
+ 'data-post-format-type' => array(),
110
+ 'data-network-id' => array(),
111
+ 'data-network-type' => array()
112
+ )
113
+ ));
114
+ echo wp_kses($settingsItem->getNetworkSettingsHtml(), array(
115
+ 'div' => array(
116
+ 'class' => array(),
117
+ 'data-post-format-type' => array(),
118
+ 'data-network-type' => array(),
119
+ 'data-network-id' => array(),
120
+ 'data-network-title' => array(),
121
+ 'style' => array()
122
+ ),
123
+ 'b' => array(),
124
+ 'br' => array(),
125
+ 'a' => array(
126
+ 'target' => array(),
127
+ 'href' => array()
128
+ ),
129
+ 'hr' => array(),
130
+ 'span' => array(
131
+ 'class' => array()
132
+ ),
133
+ 'label' => array(),
134
+ 'input' => array(
135
+ 'type' => array(),
136
+ 'name' => array(),
137
+ 'value' => array(),
138
+ 'class' => array(),
139
+ 'data-post-wp-type' => array(),
140
+ 'data-post-format-type' => array(),
141
+ 'data-network-type' => array(),
142
+ 'data-network-id' => array(),
143
+ 'data-post-format' => array()
144
+ ),
145
+ 'img' => array(
146
+ 'class' => array(),
147
+ 'src' => array()
148
+ )
149
+ ));
150
  ?>
151
  </div>
152
  </div>
257
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
258
  <?php
259
  $postFilter = new B2S_Post_Filter('all');
260
+ echo wp_kses($postFilter->getItemHtml(), array(
261
+ 'div' => array(
262
+ 'class' => array()
263
+ ),
264
+ 'input' => array(
265
+ 'id' => array(),
266
+ 'name' => array(),
267
+ 'class' => array(),
268
+ 'value' => array(),
269
+ 'type' => array(),
270
+ 'placeholder' => array(),
271
+ ),
272
+ 'a' => array(
273
+ 'href' => array(),
274
+ 'id' => array(),
275
+ 'class' => array()
276
+ ),
277
+ 'span' => array(
278
+ 'class' => array()
279
+ ),
280
+ 'small' => array(),
281
+ 'select' => array(
282
+ 'id' => array(),
283
+ 'name' => array(),
284
+ 'class' => array()
285
+ ),
286
+ 'option' => array(
287
+ 'value' => array()
288
+ )
289
+ ));
290
  ?>
291
  </form>
292
  </div>
views/b2s/html/header.php CHANGED
@@ -46,7 +46,7 @@ $hide7DayTrail = $options->_getOption('hide_7_day_trail');
46
  $hideFinalTrailModal = $options->_getOption('hide_final_trail');
47
 
48
  ?>
49
- <h1><?php echo (!empty($curPageTitle) ? esc_html($curPageTitle) : ((isset($getPages[$_GET['page']]) && !empty($getPages[$_GET['page']])) ? $getPages[sanitize_text_field(wp_unslash($_GET['page']))] : '' )); ?></h1>
50
 
51
  <div class="b2s-support-area hidden-md hidden-lg">
52
  <a href="admin.php?page=blog2social-support" class="btn btn-primary btn-block"> <?php esc_html_e('Help & Support', 'blog2social'); ?></a>
@@ -566,7 +566,7 @@ $trial_days = round($datediff / (60 * 60 * 24)); ?>
566
  <img src="<?php echo plugins_url('/assets/images/b2s/trial_popup.png', B2S_PLUGIN_FILE); ?>" style="width: 80px; float: right; margin-left: -65px;" alt="blog2social">
567
  <br>
568
  <div class="col-md-8 col-md-push-2">
569
- <h3 class="b2s-bold"><?php echo sprintf(__('Your free trial of Blog2Social Premium expires in %d days. Don’t miss to upgrade before your trial expires to keep all your benefits and individual settings.', 'blog2social'), $trial_days); ?></h3>
570
  </div>
571
  <div class="clearfix"></div>
572
  <br>
46
  $hideFinalTrailModal = $options->_getOption('hide_final_trail');
47
 
48
  ?>
49
+ <h1><?php echo (!empty($curPageTitle) ? esc_html($curPageTitle) : ((isset($getPages[$_GET['page']]) && !empty($getPages[$_GET['page']])) ? wp_kses($getPages[sanitize_text_field(wp_unslash($_GET['page']))], array('span' => array('class' => array()), 'a' => array('href' => array(),'target' => array(),'class' => array()), 'button' => array('class' => array()))) : '' )); ?></h1>
50
 
51
  <div class="b2s-support-area hidden-md hidden-lg">
52
  <a href="admin.php?page=blog2social-support" class="btn btn-primary btn-block"> <?php esc_html_e('Help & Support', 'blog2social'); ?></a>
566
  <img src="<?php echo plugins_url('/assets/images/b2s/trial_popup.png', B2S_PLUGIN_FILE); ?>" style="width: 80px; float: right; margin-left: -65px;" alt="blog2social">
567
  <br>
568
  <div class="col-md-8 col-md-push-2">
569
+ <h3 class="b2s-bold"><?php echo sprintf(__('Your free trial of Blog2Social Premium expires in %d days. Don’t miss to upgrade before your trial expires to keep all your benefits and individual settings.', 'blog2social'), esc_html($trial_days)); ?></h3>
570
  </div>
571
  <div class="clearfix"></div>
572
  <br>
views/b2s/html/sidebar.php CHANGED
@@ -154,7 +154,25 @@ $getPage = (isset($_GET['page']) && !empty($_GET['page'])) ? sanitize_text_field
154
  <div class="b2s-sidebar-head-text">
155
  <span class="glyphicon glyphicon-bullhorn glyphicon-success"></span> <?php esc_html_e("Blog2Social Blog News", "blog2social"); ?>
156
  </div>
157
- <p> <ul><?php echo B2S_Notice::getBlogEntries(substr(B2S_LANGUAGE, 0, 2)); ?></ul></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  </div>
159
  </div>
160
  </div>
154
  <div class="b2s-sidebar-head-text">
155
  <span class="glyphicon glyphicon-bullhorn glyphicon-success"></span> <?php esc_html_e("Blog2Social Blog News", "blog2social"); ?>
156
  </div>
157
+ <p> <ul><?php echo wp_kses(B2S_Notice::getBlogEntries(substr(B2S_LANGUAGE, 0, 2)), array(
158
+ 'li' => array(),
159
+ 'div' => array(
160
+ 'class' => array()
161
+ ),
162
+ 'a' => array(
163
+ 'target' => array(),
164
+ 'href' => array(),
165
+ 'class' => array()
166
+ ),
167
+ 'img' => array(
168
+ 'src' => array(),
169
+ 'alt' => array(),
170
+ 'class' => array()
171
+ ),
172
+ 'span' => array(
173
+ 'class' => array()
174
+ )
175
+ )); ?></ul></p>
176
  </div>
177
  </div>
178
  </div>
views/b2s/network.php CHANGED
@@ -32,7 +32,19 @@ $networkData = $networkItem->getData();
32
  <div class="hidden-lg hidden-md hidden-sm filterShow"><a href="#" onclick="showFilter('show');return false;"><i class="glyphicon glyphicon-chevron-down"></i> <?php esc_html_e('filter', 'blog2social') ?></a></div>
33
  <div class="hidden-lg hidden-md hidden-sm filterHide"><a href="#" onclick="showFilter('hide');return false;"><i class="glyphicon glyphicon-chevron-up"></i> <?php esc_html_e('filter', 'blog2social') ?></a></div>
34
  <div class="form-inline" role="form">
35
- <?php echo $networkItem->getSelectMandantHtml($networkData['mandanten']); ?>
 
 
 
 
 
 
 
 
 
 
 
 
36
  <div class="form-group b2s-network-mandant-area">
37
  <?php if (B2S_PLUGIN_USER_VERSION > 1) { ?>
38
  <button href="#" class="btn btn-default btn-sm b2s-network-add-mandant-btn">
@@ -60,7 +72,7 @@ $networkData = $networkItem->getData();
60
  </div>
61
  </div>
62
  <div class="row b2s-network-auth-area">
63
- <?php echo $networkItem->getPortale($networkData['mandanten'], $networkData['auth'], $networkData['portale'], $networkData['auth_count'], $networkData['addon_count']); ?>
64
  </div>
65
  <div class="row b2s-loading-area width-100" style="display: none">
66
  <div class="b2s-loader-impulse b2s-loader-impulse-md"></div>
32
  <div class="hidden-lg hidden-md hidden-sm filterShow"><a href="#" onclick="showFilter('show');return false;"><i class="glyphicon glyphicon-chevron-down"></i> <?php esc_html_e('filter', 'blog2social') ?></a></div>
33
  <div class="hidden-lg hidden-md hidden-sm filterHide"><a href="#" onclick="showFilter('hide');return false;"><i class="glyphicon glyphicon-chevron-up"></i> <?php esc_html_e('filter', 'blog2social') ?></a></div>
34
  <div class="form-inline" role="form">
35
+ <?php echo wp_kses($networkItem->getSelectMandantHtml($networkData['mandanten']), array(
36
+ 'select' => array(
37
+ 'class' => array()
38
+ ),
39
+ 'optgroup' => array(
40
+ 'label' => array(),
41
+ 'id' => array(),
42
+ ),
43
+ 'option' => array(
44
+ 'value' => array(),
45
+ 'selected' => array()
46
+ )
47
+ )); ?>
48
  <div class="form-group b2s-network-mandant-area">
49
  <?php if (B2S_PLUGIN_USER_VERSION > 1) { ?>
50
  <button href="#" class="btn btn-default btn-sm b2s-network-add-mandant-btn">
72
  </div>
73
  </div>
74
  <div class="row b2s-network-auth-area">
75
+ <?php $networkItem->getPortale($networkData['mandanten'], $networkData['auth'], $networkData['portale'], $networkData['auth_count'], $networkData['addon_count']); ?>
76
  </div>
77
  <div class="row b2s-loading-area width-100" style="display: none">
78
  <div class="b2s-loader-impulse b2s-loader-impulse-md"></div>
views/b2s/partials/calendar-image-modal.php CHANGED
@@ -1,6 +1,47 @@
1
  <?php
2
  $image = new B2S_Ship_Image($view = 'modal');
3
  if (!empty($_POST['image_url'])) {
4
- $image->setImageData(array(array($_POST['image_url'])));
5
  }
6
- echo $image->getItemHtml($postData->ID, $postData->post_content, $postUrl, substr(B2S_LANGUAGE, 0, 2));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  $image = new B2S_Ship_Image($view = 'modal');
3
  if (!empty($_POST['image_url'])) {
4
+ $image->setImageData(array(array(sanitize_text_field($_POST['image_url']))));
5
  }
6
+ echo wp_kses($image->getItemHtml($postData->ID, $postData->post_content, $postUrl, substr(B2S_LANGUAGE, 0, 2)), array(
7
+ 'div' => array(
8
+ 'class' => array(),
9
+ 'style' => array(),
10
+ ),
11
+ 'span' => array(
12
+ 'id' => array(),
13
+ ),
14
+ 'a' => array(
15
+ 'target' => array(),
16
+ 'href' => array(),
17
+ ),
18
+ 'i' => array(
19
+ 'class' => array(),
20
+ ),
21
+ 'label' => array(
22
+ 'for' => array(),
23
+ ),
24
+ 'img' => array(
25
+ 'class' => array(),
26
+ 'alt' => array(),
27
+ 'src' => array(),
28
+ ),
29
+ 'input' => array(
30
+ 'class' => array(),
31
+ 'type' => array(),
32
+ 'value' => array(),
33
+ 'id' => array(),
34
+ 'name' => array(),
35
+ 'checked' => array(),
36
+ ),
37
+ 'br' => array(),
38
+ 'button' => array(
39
+ 'class' => array(),
40
+ 'data-network-id' => array(),
41
+ 'data-post-id' => array(),
42
+ 'data-network-auth-id' => array(),
43
+ 'data-meta-type' => array(),
44
+ 'data-image-count' => array(),
45
+ 'style' => array()
46
+ )
47
+ ));
views/b2s/partials/post-edit-modal.php CHANGED
@@ -36,7 +36,7 @@
36
  </div>
37
  <?php } ?>
38
 
39
- <?php echo $item->getEditHtml(); ?>
40
  <div class="pull-right">
41
  <a href="#" class="btn btn-primary btn-xs b2s-get-settings-sched-time-user"><?php esc_html_e('Load My Times Settings', 'blog2social') ?></a>
42
  <a href="#" class="btn btn-primary btn-xs b2s-get-settings-sched-time-default"><?php esc_html_e('Load Best Times', 'blog2social') ?></a>
@@ -65,7 +65,7 @@
65
  <?php if ((int) $item->getRelayPrimaryPostId() == 0) { ?>
66
  <div class="clearfix"></div>
67
  <label class="col-xs-3 del-padding-left b2s-post-item-details-release-area-label-date" data-network-auth-id="<?php echo esc_attr($item->getNetworkAuthId()); ?>" data-network-count="1"><?php echo esc_html__('Date', 'blog2social'); ?></label>
68
- <label class="col-xs-3 del-padding-left b2s-post-item-details-release-area-label-time" data-network-auth-id="<?php echo $item->getNetworkAuthId(); ?>" data-network-count="1"><?php echo esc_html__('Time', 'blog2social'); ?></label>
69
  <div class="clearfix"></div>
70
  <div class="col-xs-3 del-padding-left b2s-post-item-details-release-area-label-date" data-network-auth-id="<?php echo esc_attr($item->getNetworkAuthId()); ?>" data-network-count="1"><input type="text" placeholder="<?php echo esc_attr__('Date', 'blog2social'); ?>" name="b2s[<?php echo esc_attr($item->getNetworkAuthId()); ?>][date][0]" data-network-id="<?php echo esc_attr($item->getNetworkId()); ?>" data-network-type="<?php echo esc_attr($item->getNetworkType()); ?>" data-network-count="0" data-network-auth-id="<?php echo esc_attr($item->getNetworkAuthId()); ?>" class="b2s-post-item-details-release-input-date form-control" value="<?php echo esc_attr((substr(B2S_LANGUAGE, 0, 2) == 'de') ? date('d.m.Y', $item->getSchedDate()) : date('Y-m-d', $item->getSchedDate())); ?>" style="min-width: 93px;"></div>
71
  <div class="col-xs-3 del-padding-left b2s-post-item-details-release-area-label-time" data-network-auth-id="<?php echo esc_attr($item->getNetworkAuthId()); ?>" data-network-count="1"><input type="text" placeholder="<?php echo esc_attr__('Time', 'blog2social'); ?>" name="b2s[<?php echo esc_attr($item->getNetworkAuthId()); ?>][time][0]" data-network-id="<?php echo esc_attr($item->getNetworkId()); ?>" data-network-type="<?php echo esc_attr($item->getNetworkType()); ?>" data-network-count="0" data-network-auth-id="<?php echo esc_attr($item->getNetworkAuthId()); ?>" class="b2s-post-item-details-release-input-time form-control" value="<?php echo esc_attr(date('H:i', $item->getSchedDate())); ?>"></div>
36
  </div>
37
  <?php } ?>
38
 
39
+ <?php $item->getEditHtml(); ?>
40
  <div class="pull-right">
41
  <a href="#" class="btn btn-primary btn-xs b2s-get-settings-sched-time-user"><?php esc_html_e('Load My Times Settings', 'blog2social') ?></a>
42
  <a href="#" class="btn btn-primary btn-xs b2s-get-settings-sched-time-default"><?php esc_html_e('Load Best Times', 'blog2social') ?></a>
65
  <?php if ((int) $item->getRelayPrimaryPostId() == 0) { ?>
66
  <div class="clearfix"></div>
67
  <label class="col-xs-3 del-padding-left b2s-post-item-details-release-area-label-date" data-network-auth-id="<?php echo esc_attr($item->getNetworkAuthId()); ?>" data-network-count="1"><?php echo esc_html__('Date', 'blog2social'); ?></label>
68
+ <label class="col-xs-3 del-padding-left b2s-post-item-details-release-area-label-time" data-network-auth-id="<?php echo esc_attr($item->getNetworkAuthId()); ?>" data-network-count="1"><?php echo esc_html__('Time', 'blog2social'); ?></label>
69
  <div class="clearfix"></div>
70
  <div class="col-xs-3 del-padding-left b2s-post-item-details-release-area-label-date" data-network-auth-id="<?php echo esc_attr($item->getNetworkAuthId()); ?>" data-network-count="1"><input type="text" placeholder="<?php echo esc_attr__('Date', 'blog2social'); ?>" name="b2s[<?php echo esc_attr($item->getNetworkAuthId()); ?>][date][0]" data-network-id="<?php echo esc_attr($item->getNetworkId()); ?>" data-network-type="<?php echo esc_attr($item->getNetworkType()); ?>" data-network-count="0" data-network-auth-id="<?php echo esc_attr($item->getNetworkAuthId()); ?>" class="b2s-post-item-details-release-input-date form-control" value="<?php echo esc_attr((substr(B2S_LANGUAGE, 0, 2) == 'de') ? date('d.m.Y', $item->getSchedDate()) : date('Y-m-d', $item->getSchedDate())); ?>" style="min-width: 93px;"></div>
71
  <div class="col-xs-3 del-padding-left b2s-post-item-details-release-area-label-time" data-network-auth-id="<?php echo esc_attr($item->getNetworkAuthId()); ?>" data-network-count="1"><input type="text" placeholder="<?php echo esc_attr__('Time', 'blog2social'); ?>" name="b2s[<?php echo esc_attr($item->getNetworkAuthId()); ?>][time][0]" data-network-id="<?php echo esc_attr($item->getNetworkId()); ?>" data-network-type="<?php echo esc_attr($item->getNetworkType()); ?>" data-network-count="0" data-network-auth-id="<?php echo esc_attr($item->getNetworkAuthId()); ?>" class="b2s-post-item-details-release-input-time form-control" value="<?php echo esc_attr(date('H:i', $item->getSchedDate())); ?>"></div>
views/b2s/post.approve.php CHANGED
@@ -4,7 +4,7 @@ wp_nonce_field('b2s_security_nonce', 'b2s_security_nonce');
4
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
5
  require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
6
  require_once B2S_PLUGIN_DIR . 'includes/B2S/Settings/Item.php';
7
- $b2sShowByDate = isset($_GET['b2sShowByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim($_GET['b2sShowByDate'])) ? trim(sanitize_text_field(wp_unslash($_GET['b2sShowByDate']))) : "") : ""; //YYYY-mm-dd
8
  $b2sUserAuthId = isset($_GET['b2sUserAuthId']) ? (int) $_GET['b2sUserAuthId'] : 0;
9
  $b2sPostBlogId = isset($_GET['b2sPostBlogId']) ? (int) $_GET['b2sPostBlogId'] : 0;
10
  ?>
@@ -42,7 +42,36 @@ $b2sPostBlogId = isset($_GET['b2sPostBlogId']) ? (int) $_GET['b2sPostBlogId'] :
42
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
43
  <?php
44
  $postFilter = new B2S_Post_Filter('approve');
45
- echo $postFilter->getItemHtml('blog2social-approve');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  ?>
47
  </form>
48
  <!-- Filter Post Ende-->
4
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
5
  require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
6
  require_once B2S_PLUGIN_DIR . 'includes/B2S/Settings/Item.php';
7
+ $b2sShowByDate = isset($_GET['b2sShowByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim(sanitize_text_field(wp_unslash($_GET['b2sShowByDate'])))) ? trim(sanitize_text_field(wp_unslash($_GET['b2sShowByDate']))) : "") : ""; //YYYY-mm-dd
8
  $b2sUserAuthId = isset($_GET['b2sUserAuthId']) ? (int) $_GET['b2sUserAuthId'] : 0;
9
  $b2sPostBlogId = isset($_GET['b2sPostBlogId']) ? (int) $_GET['b2sPostBlogId'] : 0;
10
  ?>
42
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
43
  <?php
44
  $postFilter = new B2S_Post_Filter('approve');
45
+ echo wp_kses($postFilter->getItemHtml('blog2social-approve'), array(
46
+ 'div' => array(
47
+ 'class' => array()
48
+ ),
49
+ 'input' => array(
50
+ 'id' => array(),
51
+ 'name' => array(),
52
+ 'class' => array(),
53
+ 'value' => array(),
54
+ 'type' => array(),
55
+ 'placeholder' => array(),
56
+ ),
57
+ 'a' => array(
58
+ 'href' => array(),
59
+ 'id' => array(),
60
+ 'class' => array()
61
+ ),
62
+ 'span' => array(
63
+ 'class' => array()
64
+ ),
65
+ 'small' => array(),
66
+ 'select' => array(
67
+ 'id' => array(),
68
+ 'name' => array(),
69
+ 'class' => array()
70
+ ),
71
+ 'option' => array(
72
+ 'value' => array()
73
+ )
74
+ ));
75
  ?>
76
  </form>
77
  <!-- Filter Post Ende-->
views/b2s/post.calendar.php CHANGED
@@ -1,3 +1,801 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
  wp_nonce_field('b2s_security_nonce', 'b2s_security_nonce');
3
  /* Data */
@@ -385,4 +1183,5 @@ $metaSettings = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
385
  </div>
386
  </div>
387
  </div>
 
388
  </div>
1
+ <<<<<<< .mine
2
+ <?php
3
+ wp_nonce_field('b2s_security_nonce', 'b2s_security_nonce');
4
+ /* Data */
5
+ require_once (B2S_PLUGIN_DIR . 'includes/B2S/Calendar/Filter.php');
6
+ require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
7
+ require_once (B2S_PLUGIN_DIR . 'includes/B2S/Ship/Image.php');
8
+ require_once (B2S_PLUGIN_DIR . 'includes/B2S/Settings/Item.php');
9
+ require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
10
+
11
+ $options = new B2S_Options(B2S_PLUGIN_BLOG_USER_ID);
12
+ $optionUserTimeZone = $options->_getOption('user_time_zone');
13
+ $userTimeZone = ($optionUserTimeZone !== false) ? $optionUserTimeZone : get_option('timezone_string');
14
+ $userTimeZoneOffset = (empty($userTimeZone)) ? get_option('gmt_offset') : B2S_Util::getOffsetToUtcByTimeZone($userTimeZone);
15
+ $optionUserTimeFormat = $options->_getOption('user_time_format');
16
+ if($optionUserTimeFormat == false) {
17
+ $optionUserTimeFormat = (substr(B2S_LANGUAGE, 0, 2) == 'de') ? 0 : 1;
18
+ }
19
+ $metaSettings = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
20
+ ?>
21
+
22
+
23
+ <div class="b2s-container">
24
+ <div class="b2s-inbox">
25
+ <div class="col-md-12 del-padding-left">
26
+ <?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/sidebar.php'); ?>
27
+ <div class="col-md-9 del-padding-left del-padding-right">
28
+ <!--Header|Start - Include-->
29
+ <?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/header.php'); ?>
30
+ <!--Header|End-->
31
+ <div class="clearfix"></div>
32
+ <!--Navbar|Start-->
33
+ <div class="panel panel-default">
34
+ <div class="panel-body">
35
+ <?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/post.navbar.php'); ?>
36
+ </div>
37
+ </div>
38
+ <!--Navbar|End-->
39
+ <div class="clearfix"></div>
40
+ <!--Content|Start-->
41
+ <div class="panel panel-default">
42
+ <div class="panel-body">
43
+ <div>
44
+ <div class="grid-body">
45
+ <div class="clearfix"></div>
46
+ <div class="col-md-12 b2s-calendar-filter form-inline del-padding-left del-padding-right">
47
+ <div class="b2s-calendar-filter-network-legend-text">
48
+ <?php esc_html_e('Sort by network', 'blog2social'); ?>
49
+ <select id="b2s-calendar-filter-status" class="form-control pull-right">
50
+ <option selected value="0"><?php esc_html_e('show all', 'blog2social'); ?></option>
51
+ <option value="1"><?php esc_html_e('published', 'blog2social'); ?></option>
52
+ <option value="2"><?php esc_html_e('scheduled', 'blog2social'); ?></option>
53
+ </select>
54
+ </div>
55
+ <div class="clearfix"></div>
56
+ <?php
57
+ $filter = new B2S_Calendar_Filter();
58
+ $filterNetwork = $filter->getNetworkHtml();
59
+ if (!empty($filterNetwork)) {
60
+ ?>
61
+ <div class="b2s-calendar-filter-network-list">
62
+ <?php echo wp_kses($filterNetwork, array(
63
+ 'div' => array(
64
+ 'class' => array()
65
+ ),
66
+ 'input' => array(
67
+ 'id' => array(),
68
+ 'name' => array(),
69
+ 'class' => array(),
70
+ 'value' => array(),
71
+ 'type' => array(),
72
+ 'placeholder' => array(),
73
+ 'checked' => array(),
74
+ ),
75
+ 'a' => array(
76
+ 'href' => array(),
77
+ 'id' => array(),
78
+ 'class' => array()
79
+ ),
80
+ 'span' => array(
81
+ 'class' => array()
82
+ ),
83
+ 'small' => array(),
84
+ 'label' => array(),
85
+ 'select' => array(
86
+ 'id' => array(),
87
+ 'name' => array(),
88
+ 'class' => array()
89
+ ),
90
+ 'option' => array(
91
+ 'value' => array()
92
+ ),
93
+ 'img' => array(
94
+ 'class' => array(),
95
+ 'alt' => array(),
96
+ 'src' => array()
97
+ )
98
+ )); ?>
99
+ </div>
100
+ <div class="b2s-calendar-filter-network-account-list"></div>
101
+ <?php }
102
+ ?>
103
+ </div>
104
+ <div class="clearfix"></div><hr>
105
+ <div class="b2s-loading-area">
106
+ <br>
107
+ <div class="b2s-loader-impulse b2s-loader-impulse-md"></div>
108
+ <div class="clearfix"></div>
109
+ <div class="text-center b2s-loader-text"><?php esc_html_e("Loading...", "blog2social"); ?></div>
110
+ </div>
111
+ <div id='b2s_calendar'></div>
112
+ <br>
113
+ <script>
114
+ var b2s_calendar_locale = '<?php echo esc_js(strtolower(substr(get_locale(), 0, 2))); ?>';
115
+ var b2s_calendar_date = '<?php echo esc_js(B2S_Util::getbyIdentLocalDate($userTimeZoneOffset, "Y-m-d")); ?>';
116
+ var b2s_calendar_datetime = '<?php echo esc_js(B2S_Util::getbyIdentLocalDate($userTimeZoneOffset)); ?>';
117
+ var b2s_has_premium = <?php echo esc_js(((B2S_PLUGIN_USER_VERSION > 0) ? "true" : "false")); ?>;
118
+ var b2s_plugin_url = '<?php echo esc_url(B2S_PLUGIN_URL); ?>';
119
+ var b2s_calendar_formats = <?php echo json_encode(array('post' => array(esc_html__('Link Post', 'blog2social'), esc_html__('Image Post', 'blog2social')), 'image' => array(esc_html__('Image with frame', 'blog2social'), esc_html__('Image cut out', 'blog2social')))); ?>;
120
+ var b2s_is_calendar = true;
121
+ </script>
122
+ </div>
123
+ </div>
124
+ <?php
125
+ $noLegendCalender=1;
126
+ require_once (B2S_PLUGIN_DIR . 'views/b2s/html/footer.php');
127
+ ?>
128
+ </div>
129
+ </div>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </div>
134
+
135
+ <input type="hidden" id="b2sLang" value="<?php echo esc_attr(substr(B2S_LANGUAGE, 0, 2)); ?>">
136
+ <input type="hidden" id="b2sUserTimeFormat" value="<?php echo esc_attr($optionUserTimeFormat); ?>">
137
+ <input type="hidden" id="b2sJSTextAddPost" value="<?php esc_html_e("add post", "blog2social"); ?>">
138
+ <input type="hidden" id="b2sUserLang" value="<?php echo esc_attr(strtolower(substr(get_locale(), 0, 2))); ?>">
139
+ <input type='hidden' id="user_timezone" name="user_timezone" value="<?php echo esc_attr($userTimeZoneOffset); ?>">
140
+ <input type="hidden" id="user_version" name="user_version" value="<?php echo esc_attr(B2S_PLUGIN_USER_VERSION); ?>">
141
+ <input type="hidden" id="b2sDefaultNoImage" value="<?php echo plugins_url('/assets/images/no-image.png', B2S_PLUGIN_FILE); ?>">
142
+ <input type="hidden" id="b2sPostId" value="">
143
+ <input type="hidden" id="b2sInsertImageType" value="0">
144
+ <input type="hidden" id="isOgMetaChecked" value="<?php echo (isset($metaSettings['og_active']) ? (int) $metaSettings['og_active'] : 0); ?>">
145
+ <input type="hidden" id="isCardMetaChecked" value="<?php echo (isset($metaSettings['card_active']) ? (int) $metaSettings['card_active'] : 0); ?>">
146
+ <input type="hidden" id="b2sRedirectUrlContentCuration" value="<?php echo esc_url(get_option('siteurl') . ((substr(get_option('siteurl'), -1, 1) == '/') ? '' : '/') . 'wp-admin/admin.php?page=blog2social-curation'); ?>">
147
+ <input type="hidden" id="b2sNotAllowGif" value="<?php echo esc_attr(implode(";", json_decode(B2S_PLUGIN_NETWORK_NOT_ALLOW_GIF, true))); ?>">
148
+ <input type="hidden" id="b2sAnimateGif" value='<?php echo esc_attr(B2S_PLUGIN_NETWORK_ANIMATE_GIF); ?>'>
149
+ <input type="hidden" id="ogMetaNetworks" value="<?php echo esc_attr(implode(';', json_decode(B2S_PLUGIN_NETWORK_META_TAGS, true)['og'])); ?>">
150
+ <input type="hidden" id="b2sEmojiTranslation" value='<?php echo esc_attr(json_encode(B2S_Tools::getEmojiTranslationList())); ?>'>
151
+ <!--Routing from dashboard-->
152
+ <input type="hidden" id="b2s_rfd" value="<?php echo (isset($_GET['rfd'])) ? 1 : 0; ?>">
153
+ <input type="hidden" id="b2s_rfd_b2s_id" value="<?php echo (isset($_GET['b2s_id'])) ? esc_attr(sanitize_text_field(wp_unslash($_GET['b2s_id']))) : ""; ?>">
154
+
155
+ <div id="b2s-post-ship-item-post-format-modal" class="modal fade" role="dialog" aria-labelledby="b2s-post-ship-item-post-format-modal" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
156
+ <div class="modal-dialog modal-lg">
157
+ <div class="modal-content">
158
+ <div class="modal-header">
159
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-post-ship-item-post-format-modal">&times;</button>
160
+ <h4 class="modal-title"><?php esc_html_e('Choose your', 'blog2social') ?> <span id="b2s-post-ship-item-post-format-network-title"></span> <?php esc_html_e('Post Format', 'blog2social') ?>
161
+ <?php if (B2S_PLUGIN_USER_VERSION >= 2) { ?>
162
+ <?php esc_html_e('for:', 'blog2social') ?> <span id="b2s-post-ship-item-post-format-network-display-name"></span>
163
+ <?php } ?>
164
+ </h4>
165
+ </div>
166
+ <div class="modal-body">
167
+ <div class="row">
168
+ <div class="col-xs-12">
169
+ <?php
170
+ $settingsItem = new B2S_Settings_Item();
171
+ echo wp_kses($settingsItem->setNetworkSettingsHtml(), array(
172
+ 'input' => array(
173
+ 'type' => array(),
174
+ 'class' => array(),
175
+ 'value' => array(),
176
+ 'data-post-format-type' => array(),
177
+ 'data-network-id' => array(),
178
+ 'data-network-type' => array()
179
+ )
180
+ ));
181
+ echo wp_kses($settingsItem->getNetworkSettingsHtml(), array(
182
+ 'div' => array(
183
+ 'class' => array(),
184
+ 'data-post-format-type' => array(),
185
+ 'data-network-type' => array(),
186
+ 'data-network-id' => array(),
187
+ 'data-network-title' => array(),
188
+ 'style' => array()
189
+ ),
190
+ 'b' => array(),
191
+ 'br' => array(),
192
+ 'a' => array(
193
+ 'target' => array(),
194
+ 'href' => array()
195
+ ),
196
+ 'hr' => array(),
197
+ 'span' => array(
198
+ 'class' => array()
199
+ ),
200
+ 'label' => array(),
201
+ 'input' => array(
202
+ 'type' => array(),
203
+ 'name' => array(),
204
+ 'value' => array(),
205
+ 'class' => array(),
206
+ 'data-post-wp-type' => array(),
207
+ 'data-post-format-type' => array(),
208
+ 'data-network-type' => array(),
209
+ 'data-network-id' => array(),
210
+ 'data-post-format' => array()
211
+ ),
212
+ 'img' => array(
213
+ 'class' => array(),
214
+ 'src' => array()
215
+ )
216
+ ));
217
+ ?>
218
+ </div>
219
+ </div>
220
+ <div class="row">
221
+ <div class="col-xs-12">
222
+ <div class="text-center">
223
+ <br>
224
+ <div class="b2s-post-format-settings-info" data-network-id="1" style="display:none;">
225
+ <b><?php esc_html_e('Define the default settings for the custom post format for all of your Facebook accounts in the Blog2Social settings.', 'blog2social'); ?></b>
226
+ </div>
227
+ <div class="b2s-post-format-settings-info" data-network-id="2" style="display:none;">
228
+ <b><?php esc_html_e('Define the default settings for the custom post format for all of your Twitter accounts in the Blog2Social settings.', 'blog2social'); ?></b>
229
+ </div>
230
+ <div class="b2s-post-format-settings-info" data-network-id="3" style="display:none;">
231
+ <b><?php esc_html_e('Define the default settings for the custom post format for all of your LinkedIn accounts in the Blog2Social settings.', 'blog2social'); ?></b>
232
+ </div>
233
+ <div class="b2s-post-format-settings-info" data-network-id="12" style="display:none;">
234
+ <b><?php esc_html_e('Define the default settings for the custom post format for all of your Instagram accounts in the Blog2Social settings.', 'blog2social'); ?></b>
235
+ </div>
236
+ </div>
237
+ </div>
238
+ </div>
239
+ </div>
240
+ </div>
241
+ </div>
242
+ </div>
243
+
244
+ <div id="b2s-network-select-image" class="modal fade" role="dialog" aria-labelledby="b2s-network-select-image" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
245
+ <div class="modal-dialog modal-lg">
246
+ <div class="modal-content">
247
+ <div class="modal-header">
248
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-network-select-image">&times;</button>
249
+ <h4 class="modal-title"><?php esc_html_e('Select image for', 'blog2social') ?> <span class="b2s-selected-network-for-image-info"></span></h4>
250
+ </div>
251
+ <div class="modal-body">
252
+ <div class="row">
253
+ <div class="col-xs-12">
254
+ <div class="b2s-network-select-image-content"></div>
255
+ </div>
256
+ </div>
257
+ </div>
258
+ </div>
259
+ </div>
260
+ </div>
261
+
262
+ <div id="b2s-show-post-type-modal" class="modal fade" role="dialog" aria-labelledby="b2s-show-post-type-modal" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
263
+ <div class="modal-dialog modal-lg">
264
+ <div class="modal-content">
265
+ <div class="modal-header">
266
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-show-post-type-modal">&times;</button>
267
+ <h4 class="modal-title"><?php esc_html_e('What would you like to share?', 'blog2social') ?></h4>
268
+ </div>
269
+ <div class="modal-body">
270
+ <div class="row">
271
+ <div class="col-md-6 col-xs-12">
272
+ <div class="b2s-post-type-area text-center">
273
+ <div class="image">
274
+ <img class="img-width-150" src="<?php echo plugins_url('/assets/images/b2s/blog-post-icon.png', B2S_PLUGIN_FILE); ?>" alt="blog post">
275
+ </div>
276
+ <div class="text">
277
+ <?php esc_html_e("Share your WordPress posts, pages or products", "blog2social") ?>
278
+ </div>
279
+ <div class="action">
280
+ <button class="btn btn-primary" id="b2s-btn-select-blog-post"><?php esc_html_e("select", "blog2social"); ?></button>
281
+ </div>
282
+ </div>
283
+ </div>
284
+ <div class="col-md-6 col-xs-12">
285
+ <div class="b2s-post-type-area text-center">
286
+ <div class="image">
287
+ <img class="img-width-150" src="<?php echo plugins_url('/assets/images/b2s/content-curation-icon.png', B2S_PLUGIN_FILE); ?>" alt="content curation">
288
+ </div>
289
+ <div class="text">
290
+ <?php esc_html_e("Create or share content from other sources", "blog2social") ?>
291
+ </div>
292
+ <div class="action">
293
+ <button class="btn btn-primary" id="b2s-btn-select-content-curation"><?php esc_html_e("select", "blog2social"); ?></button>
294
+ </div>
295
+ </div>
296
+ </div>
297
+ <input type="hidden" id="b2sSelSchedDate" value="">
298
+
299
+ </div>
300
+ </div>
301
+ </div>
302
+ </div>
303
+ </div>
304
+
305
+
306
+ <div id="b2s-show-post-all-modal" class="modal fade" role="dialog" aria-labelledby="b2s-post-all-modal" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
307
+ <div class="modal-dialog modal-lg">
308
+ <div class="modal-content">
309
+ <div class="modal-header">
310
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-show-post-all-modal">&times;</button>
311
+ <h4 class="modal-title"><?php esc_html_e('Select a post', 'blog2social') ?></h4>
312
+ </div>
313
+ <div class="modal-body">
314
+ <div class="row">
315
+ <div class="col-xs-12">
316
+ <div class="b2s-all-post-content">
317
+ <div class="b2s-post">
318
+ <div class="grid-body">
319
+ <div class="hidden-lg hidden-md hidden-sm filterShow"><a href="#" onclick="showFilter('show');return false;"><i class="glyphicon glyphicon-chevron-down"></i><?php esc_html_e('filter', 'blog2social') ?></a></div>
320
+ <div class="hidden-lg hidden-md hidden-sm filterHide"><a href="#" onclick="showFilter('hide');return false;"><i class="glyphicon glyphicon-chevron-up"></i><?php esc_html_e('filter', 'blog2social') ?></a></div>
321
+ <form class="b2sSortForm form-inline pull-left" action="#">
322
+ <input id="b2sType" type="hidden" value="all" name="b2sType">
323
+ <input id="b2sShowByDate" type="hidden" value="" name="b2sShowByDate">
324
+ <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
325
+ <?php
326
+ $postFilter = new B2S_Post_Filter('all');
327
+ echo wp_kses($postFilter->getItemHtml(), array(
328
+ 'div' => array(
329
+ 'class' => array()
330
+ ),
331
+ 'input' => array(
332
+ 'id' => array(),
333
+ 'name' => array(),
334
+ 'class' => array(),
335
+ 'value' => array(),
336
+ 'type' => array(),
337
+ 'placeholder' => array(),
338
+ ),
339
+ 'a' => array(
340
+ 'href' => array(),
341
+ 'id' => array(),
342
+ 'class' => array()
343
+ ),
344
+ 'span' => array(
345
+ 'class' => array()
346
+ ),
347
+ 'small' => array(),
348
+ 'select' => array(
349
+ 'id' => array(),
350
+ 'name' => array(),
351
+ 'class' => array()
352
+ ),
353
+ 'option' => array(
354
+ 'value' => array()
355
+ )
356
+ ));
357
+ ?>
358
+ </form>
359
+ </div>
360
+ </div>
361
+ <div class="clearfix"></div>
362
+ <div class="b2s-loading-area" style="display:none">
363
+ <br>
364
+ <div class="b2s-loader-impulse b2s-loader-impulse-md"></div>
365
+ <div class="clearfix"></div>
366
+ <div class="text-center b2s-loader-text"><?php esc_html_e("Loading...", "blog2social"); ?></div>
367
+ </div>
368
+ <div class="clearfix"></div>
369
+ <br>
370
+ <ul class="list-group b2s-sort-result-item-area"></ul>
371
+ <br>
372
+ <nav class="b2s-sort-pagination-area text-center"></nav>
373
+ </div>
374
+ </div>
375
+ </div>
376
+ </div>
377
+ </div>
378
+ </div>
379
+ </div>
380
+
381
+
382
+ <div id="b2s-sched-post-modal" class="modal fade" role="dialog" aria-labelledby="b2s-sched-post-modal" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
383
+ <div class="modal-dialog">
384
+ <div class="modal-content">
385
+ <div class="modal-header">
386
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-sched-post-modal">&times;</button>
387
+ <h4 class="modal-title"><?php esc_html_e('Need to schedule your posts?', 'blog2social') ?></h4>
388
+ </div>
389
+ <div class="modal-body">
390
+ <p><?php esc_html_e('Blog2Social Premium covers everything you need.', 'blog2social') ?></p>
391
+ <br>
392
+ <div class="clearfix"></div>
393
+ <b><?php esc_html_e('Schedule for specific dates', 'blog2social') ?></b>
394
+ <p><?php esc_html_e('You want to publish a post on a specific date? No problem! Just enter your desired date and you are ready to go!', 'blog2social') ?></p>
395
+ <br>
396
+ <b><?php esc_html_e('Schedule post recurrently', 'blog2social') ?></b>
397
+ <p><?php esc_html_e('You have evergreen content you want to re-share from time to time in your timeline? Schedule your evergreen content to be shared once, multiple times or recurringly at specific times.', 'blog2social') ?></p>
398
+ <br>
399
+ <b><?php esc_html_e('Best Time Scheduler', 'blog2social') ?></b>
400
+ <p><?php esc_html_e('Whenever you publish a post, only a fraction of your followers will actually see your post. Use the Blog2Social Best Times Scheduler to share your post at the best times for each social network. Get more outreach and extend the lifespan of your posts.', 'blog2social') ?></p>
401
+ <br>
402
+ <?php if (B2S_PLUGIN_USER_VERSION == 0) { ?>
403
+ <hr>
404
+ <?php esc_html_e('With Blog2Social Premium you can:', 'blog2social') ?>
405
+ <br>
406
+ <br>
407
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Post on pages and groups', 'blog2social') ?><br>
408
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Share on multiple profiles, pages and groups', 'blog2social') ?><br>
409
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Auto-post and auto-schedule new and updated blog posts', 'blog2social') ?><br>
410
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Schedule your posts at the best times on each network', 'blog2social') ?><br>
411
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Best Time Manager: use predefined best time scheduler to auto-schedule your social media posts', 'blog2social') ?><br>
412
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Schedule your post for one time, multiple times or recurrently', 'blog2social') ?><br>
413
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Schedule and re-share old posts', 'blog2social') ?><br>
414
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Select link format or image format for your posts', 'blog2social') ?><br>
415
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Select individual images per post', 'blog2social') ?><br>
416
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Reporting & calendar: keep track of your published and scheduled social media posts', 'blog2social') ?><br>
417
+ <br>
418
+ <a target="_blank" href="<?php echo esc_url(B2S_Tools::getSupportLink('affiliate')); ?>" class="btn btn-success center-block"><?php esc_html_e('Upgrade to SMART and above', 'blog2social') ?></a>
419
+ <br>
420
+ <center> <?php echo sprintf(__('or <a target="_blank" href="%s">start with free 30-days-trial of Blog2Social Premium</a> (no payment information needed)', 'blog2social'), esc_url('https://service.blog2social.com/trial')); ?> </center>
421
+ <?php } ?>
422
+ </div>
423
+ </div>
424
+ </div>
425
+ </div>
426
+
427
+ <div id="b2s-show-error-modal" class="modal fade" role="dialog" aria-labelledby="b2s-show-error-modal" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
428
+ <div class="modal-dialog modal-lg">
429
+ <div class="modal-content">
430
+ <div class="modal-header">
431
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-show-error-modal">&times;</button>
432
+ <h4 class="modal-title"><?php esc_html_e('Notification', 'blog2social') ?></h4>
433
+ </div>
434
+ <div class="modal-body">
435
+ <div class="row">
436
+ <div class="col-xs-12">
437
+ <div class="alert alert-danger b2s-error-text"></div>
438
+ </div>
439
+ </div>
440
+ </div>
441
+ </div>
442
+ </div>
443
+ </div>
444
+
445
+ <div id="b2sImageZoomModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="b2sImageZoomModal" aria-hidden="true" data-backdrop="false" style="display:none;">
446
+ <div class="modal-dialog">
447
+ <div class="modal-content">
448
+ <div class="modal-body">
449
+ <button type="button" class="btn btn-primary btn-circle b2sImageZoomModalClose b2s-modal-close close" data-modal-name="#b2sImageZoomModal" aria-label="Close"><i class="glyphicon glyphicon-remove"></i></button>
450
+ <img id="b2sImageZoom">
451
+ </div>
452
+ </div>
453
+ </div>
454
+ ||||||| .r2712118
455
+ <?php
456
+ wp_nonce_field('b2s_security_nonce', 'b2s_security_nonce');
457
+ /* Data */
458
+ require_once (B2S_PLUGIN_DIR . 'includes/B2S/Calendar/Filter.php');
459
+ require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
460
+ require_once (B2S_PLUGIN_DIR . 'includes/B2S/Ship/Image.php');
461
+ require_once (B2S_PLUGIN_DIR . 'includes/B2S/Settings/Item.php');
462
+ require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
463
+
464
+ $options = new B2S_Options(B2S_PLUGIN_BLOG_USER_ID);
465
+ $optionUserTimeZone = $options->_getOption('user_time_zone');
466
+ $userTimeZone = ($optionUserTimeZone !== false) ? $optionUserTimeZone : get_option('timezone_string');
467
+ $userTimeZoneOffset = (empty($userTimeZone)) ? get_option('gmt_offset') : B2S_Util::getOffsetToUtcByTimeZone($userTimeZone);
468
+ $optionUserTimeFormat = $options->_getOption('user_time_format');
469
+ if($optionUserTimeFormat == false) {
470
+ $optionUserTimeFormat = (substr(B2S_LANGUAGE, 0, 2) == 'de') ? 0 : 1;
471
+ }
472
+ $metaSettings = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
473
+ ?>
474
+
475
+
476
+ <div class="b2s-container">
477
+ <div class="b2s-inbox">
478
+ <div class="col-md-12 del-padding-left">
479
+ <?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/sidebar.php'); ?>
480
+ <div class="col-md-9 del-padding-left del-padding-right">
481
+ <!--Header|Start - Include-->
482
+ <?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/header.php'); ?>
483
+ <!--Header|End-->
484
+ <div class="clearfix"></div>
485
+ <!--Navbar|Start-->
486
+ <div class="panel panel-default">
487
+ <div class="panel-body">
488
+ <?php require_once (B2S_PLUGIN_DIR . 'views/b2s/html/post.navbar.php'); ?>
489
+ </div>
490
+ </div>
491
+ <!--Navbar|End-->
492
+ <div class="clearfix"></div>
493
+ <!--Content|Start-->
494
+ <div class="panel panel-default">
495
+ <div class="panel-body">
496
+ <div>
497
+ <div class="grid-body">
498
+ <div class="clearfix"></div>
499
+ <div class="col-md-12 b2s-calendar-filter form-inline del-padding-left del-padding-right">
500
+ <div class="b2s-calendar-filter-network-legend-text">
501
+ <?php esc_html_e('Sort by network', 'blog2social'); ?>
502
+ <select id="b2s-calendar-filter-status" class="form-control pull-right">
503
+ <option selected value="0"><?php esc_html_e('show all', 'blog2social'); ?></option>
504
+ <option value="1"><?php esc_html_e('published', 'blog2social'); ?></option>
505
+ <option value="2"><?php esc_html_e('scheduled', 'blog2social'); ?></option>
506
+ </select>
507
+ </div>
508
+ <div class="clearfix"></div>
509
+ <?php
510
+ $filter = new B2S_Calendar_Filter();
511
+ $filterNetwork = $filter->getNetworkHtml();
512
+ if (!empty($filterNetwork)) {
513
+ ?>
514
+ <div class="b2s-calendar-filter-network-list">
515
+ <?php echo $filterNetwork ?>
516
+ </div>
517
+ <div class="b2s-calendar-filter-network-account-list"></div>
518
+ <?php }
519
+ ?>
520
+ </div>
521
+ <div class="clearfix"></div><hr>
522
+ <div class="b2s-loading-area">
523
+ <br>
524
+ <div class="b2s-loader-impulse b2s-loader-impulse-md"></div>
525
+ <div class="clearfix"></div>
526
+ <div class="text-center b2s-loader-text"><?php esc_html_e("Loading...", "blog2social"); ?></div>
527
+ </div>
528
+ <div id='b2s_calendar'></div>
529
+ <br>
530
+ <script>
531
+ var b2s_calendar_locale = '<?php echo esc_js(strtolower(substr(get_locale(), 0, 2))); ?>';
532
+ var b2s_calendar_date = '<?php echo esc_js(B2S_Util::getbyIdentLocalDate($userTimeZoneOffset, "Y-m-d")); ?>';
533
+ var b2s_calendar_datetime = '<?php echo esc_js(B2S_Util::getbyIdentLocalDate($userTimeZoneOffset)); ?>';
534
+ var b2s_has_premium = <?php echo esc_js(((B2S_PLUGIN_USER_VERSION > 0) ? "true" : "false")); ?>;
535
+ var b2s_plugin_url = '<?php echo esc_url(B2S_PLUGIN_URL); ?>';
536
+ var b2s_calendar_formats = <?php echo json_encode(array('post' => array(esc_html__('Link Post', 'blog2social'), esc_html__('Image Post', 'blog2social')), 'image' => array(esc_html__('Image with frame', 'blog2social'), esc_html__('Image cut out', 'blog2social')))); ?>;
537
+ var b2s_is_calendar = true;
538
+ </script>
539
+ </div>
540
+ </div>
541
+ <?php
542
+ $noLegendCalender=1;
543
+ require_once (B2S_PLUGIN_DIR . 'views/b2s/html/footer.php');
544
+ ?>
545
+ </div>
546
+ </div>
547
+ </div>
548
+ </div>
549
+ </div>
550
+ </div>
551
+
552
+ <input type="hidden" id="b2sLang" value="<?php echo esc_attr(substr(B2S_LANGUAGE, 0, 2)); ?>">
553
+ <input type="hidden" id="b2sUserTimeFormat" value="<?php echo esc_attr($optionUserTimeFormat); ?>">
554
+ <input type="hidden" id="b2sJSTextAddPost" value="<?php esc_html_e("add post", "blog2social"); ?>">
555
+ <input type="hidden" id="b2sUserLang" value="<?php echo esc_attr(strtolower(substr(get_locale(), 0, 2))); ?>">
556
+ <input type='hidden' id="user_timezone" name="user_timezone" value="<?php echo esc_attr($userTimeZoneOffset); ?>">
557
+ <input type="hidden" id="user_version" name="user_version" value="<?php echo esc_attr(B2S_PLUGIN_USER_VERSION); ?>">
558
+ <input type="hidden" id="b2sDefaultNoImage" value="<?php echo plugins_url('/assets/images/no-image.png', B2S_PLUGIN_FILE); ?>">
559
+ <input type="hidden" id="b2sPostId" value="">
560
+ <input type="hidden" id="b2sInsertImageType" value="0">
561
+ <input type="hidden" id="isOgMetaChecked" value="<?php echo (isset($metaSettings['og_active']) ? (int) $metaSettings['og_active'] : 0); ?>">
562
+ <input type="hidden" id="isCardMetaChecked" value="<?php echo (isset($metaSettings['card_active']) ? (int) $metaSettings['card_active'] : 0); ?>">
563
+ <input type="hidden" id="b2sRedirectUrlContentCuration" value="<?php echo esc_url(get_option('siteurl') . ((substr(get_option('siteurl'), -1, 1) == '/') ? '' : '/') . 'wp-admin/admin.php?page=blog2social-curation'); ?>">
564
+ <input type="hidden" id="b2sNotAllowGif" value="<?php echo esc_attr(implode(";", json_decode(B2S_PLUGIN_NETWORK_NOT_ALLOW_GIF, true))); ?>">
565
+ <input type="hidden" id="b2sAnimateGif" value='<?php echo esc_attr(B2S_PLUGIN_NETWORK_ANIMATE_GIF); ?>'>
566
+ <input type="hidden" id="ogMetaNetworks" value="<?php echo esc_attr(implode(';', json_decode(B2S_PLUGIN_NETWORK_META_TAGS, true)['og'])); ?>">
567
+ <input type="hidden" id="b2sEmojiTranslation" value='<?php echo esc_attr(json_encode(B2S_Tools::getEmojiTranslationList())); ?>'>
568
+ <!--Routing from dashboard-->
569
+ <input type="hidden" id="b2s_rfd" value="<?php echo (isset($_GET['rfd'])) ? 1 : 0; ?>">
570
+ <input type="hidden" id="b2s_rfd_b2s_id" value="<?php echo (isset($_GET['b2s_id'])) ? esc_attr($_GET['b2s_id']) : ""; ?>">
571
+
572
+ <div id="b2s-post-ship-item-post-format-modal" class="modal fade" role="dialog" aria-labelledby="b2s-post-ship-item-post-format-modal" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
573
+ <div class="modal-dialog modal-lg">
574
+ <div class="modal-content">
575
+ <div class="modal-header">
576
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-post-ship-item-post-format-modal">&times;</button>
577
+ <h4 class="modal-title"><?php esc_html_e('Choose your', 'blog2social') ?> <span id="b2s-post-ship-item-post-format-network-title"></span> <?php esc_html_e('Post Format', 'blog2social') ?>
578
+ <?php if (B2S_PLUGIN_USER_VERSION >= 2) { ?>
579
+ <?php esc_html_e('for:', 'blog2social') ?> <span id="b2s-post-ship-item-post-format-network-display-name"></span>
580
+ <?php } ?>
581
+ </h4>
582
+ </div>
583
+ <div class="modal-body">
584
+ <div class="row">
585
+ <div class="col-xs-12">
586
+ <?php
587
+ $settingsItem = new B2S_Settings_Item();
588
+ echo $settingsItem->setNetworkSettingsHtml();
589
+ echo $settingsItem->getNetworkSettingsHtml();
590
+ ?>
591
+ </div>
592
+ </div>
593
+ <div class="row">
594
+ <div class="col-xs-12">
595
+ <div class="text-center">
596
+ <br>
597
+ <div class="b2s-post-format-settings-info" data-network-id="1" style="display:none;">
598
+ <b><?php esc_html_e('Define the default settings for the custom post format for all of your Facebook accounts in the Blog2Social settings.', 'blog2social'); ?></b>
599
+ </div>
600
+ <div class="b2s-post-format-settings-info" data-network-id="2" style="display:none;">
601
+ <b><?php esc_html_e('Define the default settings for the custom post format for all of your Twitter accounts in the Blog2Social settings.', 'blog2social'); ?></b>
602
+ </div>
603
+ <div class="b2s-post-format-settings-info" data-network-id="3" style="display:none;">
604
+ <b><?php esc_html_e('Define the default settings for the custom post format for all of your LinkedIn accounts in the Blog2Social settings.', 'blog2social'); ?></b>
605
+ </div>
606
+ <div class="b2s-post-format-settings-info" data-network-id="12" style="display:none;">
607
+ <b><?php esc_html_e('Define the default settings for the custom post format for all of your Instagram accounts in the Blog2Social settings.', 'blog2social'); ?></b>
608
+ </div>
609
+ </div>
610
+ </div>
611
+ </div>
612
+ </div>
613
+ </div>
614
+ </div>
615
+ </div>
616
+
617
+ <div id="b2s-network-select-image" class="modal fade" role="dialog" aria-labelledby="b2s-network-select-image" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
618
+ <div class="modal-dialog modal-lg">
619
+ <div class="modal-content">
620
+ <div class="modal-header">
621
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-network-select-image">&times;</button>
622
+ <h4 class="modal-title"><?php esc_html_e('Select image for', 'blog2social') ?> <span class="b2s-selected-network-for-image-info"></span></h4>
623
+ </div>
624
+ <div class="modal-body">
625
+ <div class="row">
626
+ <div class="col-xs-12">
627
+ <div class="b2s-network-select-image-content"></div>
628
+ </div>
629
+ </div>
630
+ </div>
631
+ </div>
632
+ </div>
633
+ </div>
634
+
635
+ <div id="b2s-show-post-type-modal" class="modal fade" role="dialog" aria-labelledby="b2s-show-post-type-modal" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
636
+ <div class="modal-dialog modal-lg">
637
+ <div class="modal-content">
638
+ <div class="modal-header">
639
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-show-post-type-modal">&times;</button>
640
+ <h4 class="modal-title"><?php esc_html_e('What would you like to share?', 'blog2social') ?></h4>
641
+ </div>
642
+ <div class="modal-body">
643
+ <div class="row">
644
+ <div class="col-md-6 col-xs-12">
645
+ <div class="b2s-post-type-area text-center">
646
+ <div class="image">
647
+ <img class="img-width-150" src="<?php echo plugins_url('/assets/images/b2s/blog-post-icon.png', B2S_PLUGIN_FILE); ?>" alt="blog post">
648
+ </div>
649
+ <div class="text">
650
+ <?php esc_html_e("Share your WordPress posts, pages or products", "blog2social") ?>
651
+ </div>
652
+ <div class="action">
653
+ <button class="btn btn-primary" id="b2s-btn-select-blog-post"><?php esc_html_e("select", "blog2social"); ?></button>
654
+ </div>
655
+ </div>
656
+ </div>
657
+ <div class="col-md-6 col-xs-12">
658
+ <div class="b2s-post-type-area text-center">
659
+ <div class="image">
660
+ <img class="img-width-150" src="<?php echo plugins_url('/assets/images/b2s/content-curation-icon.png', B2S_PLUGIN_FILE); ?>" alt="content curation">
661
+ </div>
662
+ <div class="text">
663
+ <?php esc_html_e("Create or share content from other sources", "blog2social") ?>
664
+ </div>
665
+ <div class="action">
666
+ <button class="btn btn-primary" id="b2s-btn-select-content-curation"><?php esc_html_e("select", "blog2social"); ?></button>
667
+ </div>
668
+ </div>
669
+ </div>
670
+ <input type="hidden" id="b2sSelSchedDate" value="">
671
+
672
+ </div>
673
+ </div>
674
+ </div>
675
+ </div>
676
+ </div>
677
+
678
+
679
+ <div id="b2s-show-post-all-modal" class="modal fade" role="dialog" aria-labelledby="b2s-post-all-modal" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
680
+ <div class="modal-dialog modal-lg">
681
+ <div class="modal-content">
682
+ <div class="modal-header">
683
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-show-post-all-modal">&times;</button>
684
+ <h4 class="modal-title"><?php esc_html_e('Select a post', 'blog2social') ?></h4>
685
+ </div>
686
+ <div class="modal-body">
687
+ <div class="row">
688
+ <div class="col-xs-12">
689
+ <div class="b2s-all-post-content">
690
+ <div class="b2s-post">
691
+ <div class="grid-body">
692
+ <div class="hidden-lg hidden-md hidden-sm filterShow"><a href="#" onclick="showFilter('show');return false;"><i class="glyphicon glyphicon-chevron-down"></i><?php esc_html_e('filter', 'blog2social') ?></a></div>
693
+ <div class="hidden-lg hidden-md hidden-sm filterHide"><a href="#" onclick="showFilter('hide');return false;"><i class="glyphicon glyphicon-chevron-up"></i><?php esc_html_e('filter', 'blog2social') ?></a></div>
694
+ <form class="b2sSortForm form-inline pull-left" action="#">
695
+ <input id="b2sType" type="hidden" value="all" name="b2sType">
696
+ <input id="b2sShowByDate" type="hidden" value="" name="b2sShowByDate">
697
+ <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
698
+ <?php
699
+ $postFilter = new B2S_Post_Filter('all');
700
+ echo $postFilter->getItemHtml();
701
+ ?>
702
+ </form>
703
+ </div>
704
+ </div>
705
+ <div class="clearfix"></div>
706
+ <div class="b2s-loading-area" style="display:none">
707
+ <br>
708
+ <div class="b2s-loader-impulse b2s-loader-impulse-md"></div>
709
+ <div class="clearfix"></div>
710
+ <div class="text-center b2s-loader-text"><?php esc_html_e("Loading...", "blog2social"); ?></div>
711
+ </div>
712
+ <div class="clearfix"></div>
713
+ <br>
714
+ <ul class="list-group b2s-sort-result-item-area"></ul>
715
+ <br>
716
+ <nav class="b2s-sort-pagination-area text-center"></nav>
717
+ </div>
718
+ </div>
719
+ </div>
720
+ </div>
721
+ </div>
722
+ </div>
723
+ </div>
724
+
725
+
726
+ <div id="b2s-sched-post-modal" class="modal fade" role="dialog" aria-labelledby="b2s-sched-post-modal" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
727
+ <div class="modal-dialog">
728
+ <div class="modal-content">
729
+ <div class="modal-header">
730
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-sched-post-modal">&times;</button>
731
+ <h4 class="modal-title"><?php esc_html_e('Need to schedule your posts?', 'blog2social') ?></h4>
732
+ </div>
733
+ <div class="modal-body">
734
+ <p><?php esc_html_e('Blog2Social Premium covers everything you need.', 'blog2social') ?></p>
735
+ <br>
736
+ <div class="clearfix"></div>
737
+ <b><?php esc_html_e('Schedule for specific dates', 'blog2social') ?></b>
738
+ <p><?php esc_html_e('You want to publish a post on a specific date? No problem! Just enter your desired date and you are ready to go!', 'blog2social') ?></p>
739
+ <br>
740
+ <b><?php esc_html_e('Schedule post recurrently', 'blog2social') ?></b>
741
+ <p><?php esc_html_e('You have evergreen content you want to re-share from time to time in your timeline? Schedule your evergreen content to be shared once, multiple times or recurringly at specific times.', 'blog2social') ?></p>
742
+ <br>
743
+ <b><?php esc_html_e('Best Time Scheduler', 'blog2social') ?></b>
744
+ <p><?php esc_html_e('Whenever you publish a post, only a fraction of your followers will actually see your post. Use the Blog2Social Best Times Scheduler to share your post at the best times for each social network. Get more outreach and extend the lifespan of your posts.', 'blog2social') ?></p>
745
+ <br>
746
+ <?php if (B2S_PLUGIN_USER_VERSION == 0) { ?>
747
+ <hr>
748
+ <?php esc_html_e('With Blog2Social Premium you can:', 'blog2social') ?>
749
+ <br>
750
+ <br>
751
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Post on pages and groups', 'blog2social') ?><br>
752
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Share on multiple profiles, pages and groups', 'blog2social') ?><br>
753
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Auto-post and auto-schedule new and updated blog posts', 'blog2social') ?><br>
754
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Schedule your posts at the best times on each network', 'blog2social') ?><br>
755
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Best Time Manager: use predefined best time scheduler to auto-schedule your social media posts', 'blog2social') ?><br>
756
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Schedule your post for one time, multiple times or recurrently', 'blog2social') ?><br>
757
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Schedule and re-share old posts', 'blog2social') ?><br>
758
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Select link format or image format for your posts', 'blog2social') ?><br>
759
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Select individual images per post', 'blog2social') ?><br>
760
+ <span class="glyphicon glyphicon-ok glyphicon-success"></span> <?php esc_html_e('Reporting & calendar: keep track of your published and scheduled social media posts', 'blog2social') ?><br>
761
+ <br>
762
+ <a target="_blank" href="<?php echo esc_url(B2S_Tools::getSupportLink('affiliate')); ?>" class="btn btn-success center-block"><?php esc_html_e('Upgrade to SMART and above', 'blog2social') ?></a>
763
+ <br>
764
+ <center> <?php echo sprintf(__('or <a target="_blank" href="%s">start with free 30-days-trial of Blog2Social Premium</a> (no payment information needed)', 'blog2social'), esc_url('https://service.blog2social.com/trial')); ?> </center>
765
+ <?php } ?>
766
+ </div>
767
+ </div>
768
+ </div>
769
+ </div>
770
+
771
+ <div id="b2s-show-error-modal" class="modal fade" role="dialog" aria-labelledby="b2s-show-error-modal" aria-hidden="true" data-backdrop="false" style="display:none;z-index: 1070;">
772
+ <div class="modal-dialog modal-lg">
773
+ <div class="modal-content">
774
+ <div class="modal-header">
775
+ <button type="button" class="b2s-modal-close close" data-modal-name="#b2s-show-error-modal">&times;</button>
776
+ <h4 class="modal-title"><?php esc_html_e('Notification', 'blog2social') ?></h4>
777
+ </div>
778
+ <div class="modal-body">
779
+ <div class="row">
780
+ <div class="col-xs-12">
781
+ <div class="alert alert-danger b2s-error-text"></div>
782
+ </div>
783
+ </div>
784
+ </div>
785
+ </div>
786
+ </div>
787
+ </div>
788
+
789
+ <div id="b2sImageZoomModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="b2sImageZoomModal" aria-hidden="true" data-backdrop="false" style="display:none;">
790
+ <div class="modal-dialog">
791
+ <div class="modal-content">
792
+ <div class="modal-body">
793
+ <button type="button" class="btn btn-primary btn-circle b2sImageZoomModalClose b2s-modal-close close" data-modal-name="#b2sImageZoomModal" aria-label="Close"><i class="glyphicon glyphicon-remove"></i></button>
794
+ <img id="b2sImageZoom">
795
+ </div>
796
+ </div>
797
+ </div>
798
+ =======
799
  <?php
800
  wp_nonce_field('b2s_security_nonce', 'b2s_security_nonce');
801
  /* Data */
1183
  </div>
1184
  </div>
1185
  </div>
1186
+ >>>>>>> .r2714722
1187
  </div>
views/b2s/post.draft.php CHANGED
@@ -33,7 +33,36 @@ require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
33
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
34
  <?php
35
  $postFilter = new B2S_Post_Filter('draft-post');
36
- echo $postFilter->getItemHtml();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  ?>
38
  </form>
39
  <!-- Filter Post Ende-->
33
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
34
  <?php
35
  $postFilter = new B2S_Post_Filter('draft-post');
36
+ echo wp_kses($postFilter->getItemHtml(), array(
37
+ 'div' => array(
38
+ 'class' => array()
39
+ ),
40
+ 'input' => array(
41
+ 'id' => array(),
42
+ 'name' => array(),
43
+ 'class' => array(),
44
+ 'value' => array(),
45
+ 'type' => array(),
46
+ 'placeholder' => array(),
47
+ ),
48
+ 'a' => array(
49
+ 'href' => array(),
50
+ 'id' => array(),
51
+ 'class' => array()
52
+ ),
53
+ 'span' => array(
54
+ 'class' => array()
55
+ ),
56
+ 'small' => array(),
57
+ 'select' => array(
58
+ 'id' => array(),
59
+ 'name' => array(),
60
+ 'class' => array()
61
+ ),
62
+ 'option' => array(
63
+ 'value' => array()
64
+ )
65
+ ));
66
  ?>
67
  </form>
68
  <!-- Filter Post Ende-->
views/b2s/post.favorites.php CHANGED
@@ -33,7 +33,36 @@ require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
33
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
34
  <?php
35
  $postFilter = new B2S_Post_Filter('favorites');
36
- echo $postFilter->getItemHtml();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  ?>
38
  </form>
39
  <!-- Filter Post Ende-->
33
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
34
  <?php
35
  $postFilter = new B2S_Post_Filter('favorites');
36
+ echo wp_kses($postFilter->getItemHtml(), array(
37
+ 'div' => array(
38
+ 'class' => array()
39
+ ),
40
+ 'input' => array(
41
+ 'id' => array(),
42
+ 'name' => array(),
43
+ 'class' => array(),
44
+ 'value' => array(),
45
+ 'type' => array(),
46
+ 'placeholder' => array(),
47
+ ),
48
+ 'a' => array(
49
+ 'href' => array(),
50
+ 'id' => array(),
51
+ 'class' => array()
52
+ ),
53
+ 'span' => array(
54
+ 'class' => array()
55
+ ),
56
+ 'small' => array(),
57
+ 'select' => array(
58
+ 'id' => array(),
59
+ 'name' => array(),
60
+ 'class' => array()
61
+ ),
62
+ 'option' => array(
63
+ 'value' => array()
64
+ )
65
+ ));
66
  ?>
67
  </form>
68
  <!-- Filter Post Ende-->
views/b2s/post.notice.php CHANGED
@@ -4,7 +4,7 @@ wp_nonce_field('b2s_security_nonce', 'b2s_security_nonce');
4
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
5
  require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
6
  require_once(B2S_PLUGIN_DIR . 'includes/Options.php');
7
- $b2sShowByDate = isset($_GET['b2sShowByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim($_GET['b2sShowByDate'])) ? trim(sanitize_text_field(wp_unslash($_GET['b2sShowByDate']))) : "") : ""; //YYYY-mm-dd
8
  $options = new B2S_Options(B2S_PLUGIN_BLOG_USER_ID);
9
  $options->_setOption('lastNotificationUpdate', date('Y-m-d H:i:s'));
10
  ?>
@@ -39,7 +39,36 @@ $options->_setOption('lastNotificationUpdate', date('Y-m-d H:i:s'));
39
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
40
  <?php
41
  $postFilter = new B2S_Post_Filter('notice');
42
- echo $postFilter->getItemHtml('blog2social-notice');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  ?>
44
  </form>
45
  <!-- Filter Post Ende-->
4
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
5
  require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
6
  require_once(B2S_PLUGIN_DIR . 'includes/Options.php');
7
+ $b2sShowByDate = isset($_GET['b2sShowByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim(sanitize_text_field($_GET['b2sShowByDate']))) ? trim(sanitize_text_field(wp_unslash($_GET['b2sShowByDate']))) : "") : ""; //YYYY-mm-dd
8
  $options = new B2S_Options(B2S_PLUGIN_BLOG_USER_ID);
9
  $options->_setOption('lastNotificationUpdate', date('Y-m-d H:i:s'));
10
  ?>
39
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
40
  <?php
41
  $postFilter = new B2S_Post_Filter('notice');
42
+ echo wp_kses($postFilter->getItemHtml('blog2social-notice'), array(
43
+ 'div' => array(
44
+ 'class' => array()
45
+ ),
46
+ 'input' => array(
47
+ 'id' => array(),
48
+ 'name' => array(),
49
+ 'class' => array(),
50
+ 'value' => array(),
51
+ 'type' => array(),
52
+ 'placeholder' => array(),
53
+ ),
54
+ 'a' => array(
55
+ 'href' => array(),
56
+ 'id' => array(),
57
+ 'class' => array()
58
+ ),
59
+ 'span' => array(
60
+ 'class' => array()
61
+ ),
62
+ 'small' => array(),
63
+ 'select' => array(
64
+ 'id' => array(),
65
+ 'name' => array(),
66
+ 'class' => array()
67
+ ),
68
+ 'option' => array(
69
+ 'value' => array()
70
+ )
71
+ ));
72
  ?>
73
  </form>
74
  <!-- Filter Post Ende-->
views/b2s/post.php CHANGED
@@ -42,7 +42,36 @@ $postsPerPage = (isset($optionPostFilters['postsPerPage']) && (int) $optionPostF
42
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
43
  <?php
44
  $postFilter = new B2S_Post_Filter('all');
45
- echo $postFilter->getItemHtml();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  ?>
47
  </form>
48
  <!-- Filter Post Ende-->
42
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
43
  <?php
44
  $postFilter = new B2S_Post_Filter('all');
45
+ echo wp_kses($postFilter->getItemHtml(), array(
46
+ 'div' => array(
47
+ 'class' => array()
48
+ ),
49
+ 'input' => array(
50
+ 'id' => array(),
51
+ 'name' => array(),
52
+ 'class' => array(),
53
+ 'value' => array(),
54
+ 'type' => array(),
55
+ 'placeholder' => array(),
56
+ ),
57
+ 'a' => array(
58
+ 'href' => array(),
59
+ 'id' => array(),
60
+ 'class' => array()
61
+ ),
62
+ 'span' => array(
63
+ 'class' => array()
64
+ ),
65
+ 'small' => array(),
66
+ 'select' => array(
67
+ 'id' => array(),
68
+ 'name' => array(),
69
+ 'class' => array()
70
+ ),
71
+ 'option' => array(
72
+ 'value' => array()
73
+ )
74
+ ));
75
  ?>
76
  </form>
77
  <!-- Filter Post Ende-->
views/b2s/post.publish.php CHANGED
@@ -3,7 +3,7 @@ wp_nonce_field('b2s_security_nonce', 'b2s_security_nonce');
3
  /* Data */
4
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
5
  require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
6
- $b2sShowByDate = isset($_GET['b2sShowByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim($_GET['b2sShowByDate'])) ? trim(sanitize_text_field(wp_unslash($_GET['b2sShowByDate']))) : "") : ""; //YYYY-mm-dd
7
  ?>
8
 
9
  <div class="b2s-container">
@@ -36,7 +36,36 @@ $b2sShowByDate = isset($_GET['b2sShowByDate']) ? (preg_match("#^[0-9\-.\]]+$#",
36
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
37
  <?php
38
  $postFilter = new B2S_Post_Filter('publish');
39
- echo $postFilter->getItemHtml('blog2social-publish');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  ?>
41
  </form>
42
  <!-- Filter Post Ende-->
3
  /* Data */
4
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
5
  require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
6
+ $b2sShowByDate = isset($_GET['b2sShowByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim(sanitize_text_field($_GET['b2sShowByDate']))) ? trim(sanitize_text_field(wp_unslash($_GET['b2sShowByDate']))) : "") : ""; //YYYY-mm-dd
7
  ?>
8
 
9
  <div class="b2s-container">
36
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
37
  <?php
38
  $postFilter = new B2S_Post_Filter('publish');
39
+ echo wp_kses($postFilter->getItemHtml('blog2social-publish'), array(
40
+ 'div' => array(
41
+ 'class' => array()
42
+ ),
43
+ 'input' => array(
44
+ 'id' => array(),
45
+ 'name' => array(),
46
+ 'class' => array(),
47
+ 'value' => array(),
48
+ 'type' => array(),
49
+ 'placeholder' => array(),
50
+ ),
51
+ 'a' => array(
52
+ 'href' => array(),
53
+ 'id' => array(),
54
+ 'class' => array()
55
+ ),
56
+ 'span' => array(
57
+ 'class' => array()
58
+ ),
59
+ 'small' => array(),
60
+ 'select' => array(
61
+ 'id' => array(),
62
+ 'name' => array(),
63
+ 'class' => array()
64
+ ),
65
+ 'option' => array(
66
+ 'value' => array()
67
+ )
68
+ ));
69
  ?>
70
  </form>
71
  <!-- Filter Post Ende-->
views/b2s/post.sched.php CHANGED
@@ -4,7 +4,7 @@ wp_nonce_field('b2s_security_nonce', 'b2s_security_nonce');
4
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
5
  require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
6
  require_once B2S_PLUGIN_DIR . 'includes/B2S/Settings/Item.php';
7
- $b2sShowByDate = isset($_GET['b2sShowByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim($_GET['b2sShowByDate'])) ? trim($_GET['b2sShowByDate']) : "") : ""; //YYYY-mm-dd
8
  $b2sUserAuthId = isset($_GET['b2sUserAuthId']) ? (int) $_GET['b2sUserAuthId'] : 0;
9
  $b2sPostBlogId = isset($_GET['b2sPostBlogId']) ? (int) $_GET['b2sPostBlogId'] : 0;
10
  $b2sShowByNetwork = isset($_GET['b2sShowByNetwork']) ? (int) $_GET['b2sShowByNetwork'] : 0;
@@ -54,7 +54,36 @@ $metaSettings = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
54
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
55
  <?php
56
  $postFilter = new B2S_Post_Filter('sched');
57
- echo $postFilter->getItemHtml('blog2social-sched');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  ?>
59
  </form>
60
  <!-- Filter Post Ende-->
@@ -149,8 +178,52 @@ $metaSettings = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
149
  <div class="col-xs-12">
150
  <?php
151
  $settingsItem = new B2S_Settings_Item();
152
- echo $settingsItem->setNetworkSettingsHtml();
153
- echo $settingsItem->getNetworkSettingsHtml();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  ?>
155
  </div>
156
  </div>
4
  require_once (B2S_PLUGIN_DIR . 'includes/B2S/Post/Filter.php');
5
  require_once (B2S_PLUGIN_DIR . 'includes/Util.php');
6
  require_once B2S_PLUGIN_DIR . 'includes/B2S/Settings/Item.php';
7
+ $b2sShowByDate = isset($_GET['b2sShowByDate']) ? (preg_match("#^[0-9\-.\]]+$#", trim(sanitize_text_field($_GET['b2sShowByDate']))) ? trim(sanitize_text_field($_GET['b2sShowByDate'])) : "") : ""; //YYYY-mm-dd
8
  $b2sUserAuthId = isset($_GET['b2sUserAuthId']) ? (int) $_GET['b2sUserAuthId'] : 0;
9
  $b2sPostBlogId = isset($_GET['b2sPostBlogId']) ? (int) $_GET['b2sPostBlogId'] : 0;
10
  $b2sShowByNetwork = isset($_GET['b2sShowByNetwork']) ? (int) $_GET['b2sShowByNetwork'] : 0;
54
  <input id="b2sPagination" type="hidden" value="1" name="b2sPagination">
55
  <?php
56
  $postFilter = new B2S_Post_Filter('sched');
57
+ echo wp_kses($postFilter->getItemHtml('blog2social-sched'), array(
58
+ 'div' => array(
59
+ 'class' => array()
60
+ ),
61
+ 'input' => array(
62
+ 'id' => array(),
63
+ 'name' => array(),
64
+ 'class' => array(),
65
+ 'value' => array(),
66
+ 'type' => array(),
67
+ 'placeholder' => array(),
68
+ ),
69
+ 'a' => array(
70
+ 'href' => array(),
71
+ 'id' => array(),
72
+ 'class' => array()
73
+ ),
74
+ 'span' => array(
75
+ 'class' => array()
76
+ ),
77
+ 'small' => array(),
78
+ 'select' => array(
79
+ 'id' => array(),
80
+ 'name' => array(),
81
+ 'class' => array()
82
+ ),
83
+ 'option' => array(
84
+ 'value' => array()
85
+ )
86
+ ));
87
  ?>
88
  </form>
89
  <!-- Filter Post Ende-->
178
  <div class="col-xs-12">
179
  <?php
180
  $settingsItem = new B2S_Settings_Item();
181
+ echo wp_kses($settingsItem->setNetworkSettingsHtml(), array(
182
+ 'input' => array(
183
+ 'type' => array(),
184
+ 'class' => array(),
185
+ 'value' => array(),
186
+ 'data-post-format-type' => array(),
187
+ 'data-network-id' => array(),
188
+ 'data-network-type' => array()
189
+ )
190
+ ));
191
+ echo wp_kses($settingsItem->getNetworkSettingsHtml(), array(
192
+ 'div' => array(
193
+ 'class' => array(),
194
+ 'data-post-format-type' => array(),
195
+ 'data-network-type' => array(),
196
+ 'data-network-id' => array(),
197
+ 'data-network-title' => array(),
198
+ 'style' => array()
199
+ ),
200
+ 'b' => array(),
201
+ 'br' => array(),
202
+ 'a' => array(
203
+ 'target' => array(),
204
+ 'href' => array()
205
+ ),
206
+ 'hr' => array(),
207
+ 'span' => array(
208
+ 'class' => array()
209
+ ),
210
+ 'label' => array(),
211
+ 'input' => array(
212
+ 'type' => array(),
213
+ 'name' => array(),
214
+ 'value' => array(),
215
+ 'class' => array(),
216
+ 'data-post-wp-type' => array(),
217
+ 'data-post-format-type' => array(),
218
+ 'data-network-type' => array(),
219
+ 'data-network-id' => array(),
220
+ 'data-post-format' => array()
221
+ ),
222
+ 'img' => array(
223
+ 'class' => array(),
224
+ 'src' => array()
225
+ )
226
+ ));
227
  ?>
228
  </div>
229
  </div>
views/b2s/repost.php CHANGED
@@ -43,12 +43,118 @@ $metaSettings = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
43
  </div>
44
  <div class="col-md-12">
45
  <div class="row b2s-repost-options-area">
46
- <?php echo $rePostItem->getRePostOptionsHtml(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  </div>
48
  </div>
49
  <div class="col-md-12">
50
  <div class="row b2s-repost-queue-area">
51
- <?php echo $rePostItem->getRePostQueueHtml(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  </div>
53
  <script>
54
  var b2s_calendar_locale = '<?php echo esc_js(strtolower(substr(get_locale(), 0, 2))); ?>';
@@ -134,8 +240,52 @@ $metaSettings = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
134
  <div class="col-xs-12">
135
  <?php
136
  $settingsItem = new B2S_Settings_Item();
137
- echo $settingsItem->setNetworkSettingsHtml();
138
- echo $settingsItem->getNetworkSettingsHtml();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  ?>
140
  </div>
141
  </div>
43
  </div>
44
  <div class="col-md-12">
45
  <div class="row b2s-repost-options-area">
46
+ <?php echo wp_kses($rePostItem->getRePostOptionsHtml(), array(
47
+ 'br' => array(),
48
+ 'h4' => array(),
49
+ 'h3' => array(
50
+ 'class' => array()
51
+ ),
52
+ 'span' => array(
53
+ 'class' => array(),
54
+ 'style' => array()
55
+ ),
56
+ 'div' => array(
57
+ 'class' => array(),
58
+ 'style' => array()
59
+ ),
60
+ 'i' => array(
61
+ 'class' => array()
62
+ ),
63
+ 'form' => array(
64
+ 'id' => array(),
65
+ 'class' => array()
66
+ ),
67
+ 'select' => array(
68
+ 'name' => array(),
69
+ 'class' => array(),
70
+ 'id' => array(),
71
+ 'data-placeholder' => array(),
72
+ 'multiple' => array(),
73
+ ),
74
+ 'option' => array(
75
+ 'data-limit' => array(),
76
+ 'value' => array(),
77
+ 'data-mandant-id' => array(),
78
+ 'selected' => array()
79
+ ),
80
+ 'input' => array(
81
+ 'type' => array(),
82
+ 'id' => array(),
83
+ 'class' => array(),
84
+ 'name' => array(),
85
+ 'value' => array(),
86
+ 'checked' => array(),
87
+ 'style' => array(),
88
+ 'placeholder' => array(),
89
+ 'min' => array(),
90
+ 'max' => array(),
91
+ ),
92
+ 'label' => array(
93
+ 'for' => array(),
94
+ 'class' => array(),
95
+ ),
96
+ 'a' => array(
97
+ 'class' => array(),
98
+ 'href' => array(),
99
+ 'target' => array()
100
+ )
101
+ )); ?>
102
  </div>
103
  </div>
104
  <div class="col-md-12">
105
  <div class="row b2s-repost-queue-area">
106
+ <?php echo wp_kses($rePostItem->getRePostQueueHtml(), array(
107
+ 'a' => array(
108
+ 'class' => array(),
109
+ 'href' => array(),
110
+ 'target' => array(),
111
+ 'data-post-id' => array()
112
+ ),
113
+ 'div' => array(
114
+ 'class' => array(),
115
+ 'style' => array(),
116
+ 'id' => array(),
117
+ 'data-post-id' => array()
118
+ ),
119
+ 'i' => array(
120
+ 'class' => array()
121
+ ),
122
+ 'span' => array(
123
+ 'class' => array(),
124
+ 'data-post-id' => array()
125
+ ),
126
+ 'button' => array(
127
+ 'type' => array(),
128
+ 'class' => array(),
129
+ 'style' => array(),
130
+ ),
131
+ 'ul' => array(),
132
+ 'li' => array(
133
+ 'class' => array(),
134
+ 'data-type' => array(),
135
+ ),
136
+ 'input' => array(
137
+ 'data-blog-post-id' => array(),
138
+ 'class' => array(),
139
+ 'name' => array(),
140
+ 'value' => array(),
141
+ 'type' => array(),
142
+ ),
143
+ 'img' => array(
144
+ 'class' => array(),
145
+ 'alt' => array(),
146
+ 'src' => array(),
147
+ ),
148
+ 'button' => array(
149
+ 'type' => array(),
150
+ 'class' => array(),
151
+ 'data-post-id' => array(),
152
+ ),
153
+ 'strong' => array(),
154
+ 'p' => array(
155
+ 'class' => array()
156
+ )
157
+ )); ?>
158
  </div>
159
  <script>
160
  var b2s_calendar_locale = '<?php echo esc_js(strtolower(substr(get_locale(), 0, 2))); ?>';
240
  <div class="col-xs-12">
241
  <?php
242
  $settingsItem = new B2S_Settings_Item();
243
+ echo wp_kses($settingsItem->setNetworkSettingsHtml(), array(
244
+ 'input' => array(
245
+ 'type' => array(),
246
+ 'class' => array(),
247
+ 'value' => array(),
248
+ 'data-post-format-type' => array(),
249
+ 'data-network-id' => array(),
250
+ 'data-network-type' => array()
251
+ )
252
+ ));
253
+ echo wp_kses($settingsItem->getNetworkSettingsHtml(), array(
254
+ 'div' => array(
255
+ 'class' => array(),
256
+ 'data-post-format-type' => array(),
257
+ 'data-network-type' => array(),
258
+ 'data-network-id' => array(),
259
+ 'data-network-title' => array(),
260
+ 'style' => array()
261
+ ),
262
+ 'b' => array(),
263
+ 'br' => array(),
264
+ 'a' => array(
265
+ 'target' => array(),
266
+ 'href' => array()
267
+ ),
268
+ 'hr' => array(),
269
+ 'span' => array(
270
+ 'class' => array()
271
+ ),
272
+ 'label' => array(),
273
+ 'input' => array(
274
+ 'type' => array(),
275
+ 'name' => array(),
276
+ 'value' => array(),
277
+ 'class' => array(),
278
+ 'data-post-wp-type' => array(),
279
+ 'data-post-format-type' => array(),
280
+ 'data-network-type' => array(),
281
+ 'data-network-id' => array(),
282
+ 'data-post-format' => array()
283
+ ),
284
+ 'img' => array(
285
+ 'class' => array(),
286
+ 'src' => array()
287
+ )
288
+ ));
289
  ?>
290
  </div>
291
  </div>
views/b2s/settings.php CHANGED
@@ -59,11 +59,116 @@ if($optionUserTimeFormat == false) {
59
  <hr class="b2s-settings-line">
60
  <div class="tab-content clearfix">
61
  <div class="tab-pane active" id="b2s-general">
62
- <?php echo $settingsItem->getGeneralSettingsHtml(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  </div>
64
  <div class="tab-pane" id="b2s-social-meta-data">
65
  <form class="b2sSaveSocialMetaTagsSettings" method="post" novalidate="novalidate">
66
- <?php echo $settingsItem->getSocialMetaDataHtml(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  <button class="btn btn-primary pull-right" type="submit" <?php if (B2S_PLUGIN_ADMIN) {
68
  echo '';
69
  } else {
@@ -143,7 +248,7 @@ require_once (B2S_PLUGIN_DIR . 'views/b2s/html/footer.php');
143
  <input type="hidden" id="b2sLang" value="<?php echo esc_attr(substr(B2S_LANGUAGE, 0, 2)); ?>">
144
  <input type="hidden" id="b2sUserTimeFormat" value="<?php echo esc_attr($optionUserTimeFormat); ?>">
145
  <input type="hidden" id="b2sUserLang" value="<?php echo esc_attr(strtolower(substr(get_locale(), 0, 2))); ?>">
146
- <input type="hidden" id="b2sShowSection" value="<?php echo (isset($_GET['show']) ? esc_attr($_GET['show']) : ''); ?>">
147
  <input type="hidden" id="b2s_wp_media_headline" value="<?php esc_html_e('Select or upload an image from media gallery', 'blog2social') ?>">
148
  <input type="hidden" id="b2s_wp_media_btn" value="<?php esc_html_e('Use image', 'blog2social') ?>">
149
  <input type="hidden" id="b2s_user_version" value="<?php echo esc_attr(B2S_PLUGIN_USER_VERSION) ?>">
59
  <hr class="b2s-settings-line">
60
  <div class="tab-content clearfix">
61
  <div class="tab-pane active" id="b2s-general">
62
+ <?php echo wp_kses($settingsItem->getGeneralSettingsHtml(), array(
63
+ 'h4' => array(
64
+ 'style' => array()
65
+ ),
66
+ 'br' => array(),
67
+ 'p' => array(),
68
+ 'strong' => array(),
69
+ 'div' => array(
70
+ 'class' => array()
71
+ ),
72
+ 'label' => array(
73
+ 'class' => array(),
74
+ 'for' => array()
75
+ ),
76
+ 'select' => array(
77
+ 'class' => array(),
78
+ 'id' => array(),
79
+ 'name' => array()
80
+ ),
81
+ 'option' => array(
82
+ 'value' => array(),
83
+ 'data-offset' => array(),
84
+ 'selected' => array()
85
+ ),
86
+ 'a' => array(
87
+ 'href' => array(),
88
+ 'class' => array(),
89
+ 'target' => array(),
90
+ 'data-provider-id' => array()
91
+ ),
92
+ 'code' => array(
93
+ 'id' => array()
94
+ ),
95
+ 'input' => array(
96
+ 'data-size' => array(),
97
+ 'data-toggle' => array(),
98
+ 'data-width' => array(),
99
+ 'data-height' => array(),
100
+ 'data-onstyle' => array(),
101
+ 'data-on' => array(),
102
+ 'data-off' => array(),
103
+ 'checked' => array(),
104
+ 'name' => array(),
105
+ 'class' => array(),
106
+ 'id' => array(),
107
+ 'data-area-type' => array(),
108
+ 'value' => array(),
109
+ 'type' => array(),
110
+ 'data-provider-id' => array(),
111
+ ),
112
+ 'span' => array(
113
+ 'data-provider-id' => array(),
114
+ 'class' => array(),
115
+ 'style' => array(),
116
+ ),
117
+ 'img' => array(
118
+ 'class' => array(),
119
+ 'alt' => array(),
120
+ 'src' => array(),
121
+ )
122
+ )); ?>
123
  </div>
124
  <div class="tab-pane" id="b2s-social-meta-data">
125
  <form class="b2sSaveSocialMetaTagsSettings" method="post" novalidate="novalidate">
126
+ <?php echo wp_kses($settingsItem->getSocialMetaDataHtml(), array(
127
+ 'strong' => array(),
128
+ 'br' => array(),
129
+ 'h4' => array(),
130
+ 'b' => array(),
131
+ 'p' => array(),
132
+ 'div' => array(
133
+ 'class' => array()
134
+ ),
135
+ 'span' => array(
136
+ 'class' => array()
137
+ ),
138
+ 'a' => array(
139
+ 'href' => array(),
140
+ 'class' => array(),
141
+ 'target' => array(),
142
+ 'data-meta-type' => array(),
143
+ 'data-meta-origin' => array(),
144
+ ),
145
+ 'input' => array(
146
+ 'type' => array(),
147
+ 'name' => array(),
148
+ 'value' => array(),
149
+ 'id' => array(),
150
+ 'class' => array(),
151
+ 'checked' => array(),
152
+ 'readonly' => array(),
153
+ ),
154
+ 'label' => array(
155
+ 'for' => array()
156
+ ),
157
+ 'button' => array(
158
+ 'class' => array(),
159
+ 'type' => array(),
160
+ 'disabled' => array(),
161
+ 'data-id' => array(),
162
+ ),
163
+ 'select' => array(
164
+ 'class' => array(),
165
+ 'name' => array(),
166
+ ),
167
+ 'option' => array(
168
+ 'value' => array(),
169
+ 'selected' => array(),
170
+ )
171
+ )); ?>
172
  <button class="btn btn-primary pull-right" type="submit" <?php if (B2S_PLUGIN_ADMIN) {
173
  echo '';
174
  } else {
248
  <input type="hidden" id="b2sLang" value="<?php echo esc_attr(substr(B2S_LANGUAGE, 0, 2)); ?>">
249
  <input type="hidden" id="b2sUserTimeFormat" value="<?php echo esc_attr($optionUserTimeFormat); ?>">
250
  <input type="hidden" id="b2sUserLang" value="<?php echo esc_attr(strtolower(substr(get_locale(), 0, 2))); ?>">
251
+ <input type="hidden" id="b2sShowSection" value="<?php echo (isset($_GET['show']) ? esc_attr(sanitize_text_field($_GET['show'])) : ''); ?>">
252
  <input type="hidden" id="b2s_wp_media_headline" value="<?php esc_html_e('Select or upload an image from media gallery', 'blog2social') ?>">
253
  <input type="hidden" id="b2s_wp_media_btn" value="<?php esc_html_e('Use image', 'blog2social') ?>">
254
  <input type="hidden" id="b2s_user_version" value="<?php echo esc_attr(B2S_PLUGIN_USER_VERSION) ?>">
views/b2s/ship.php CHANGED
@@ -12,7 +12,7 @@ $userLang = strtolower(substr(get_locale(), 0, 2));
12
  $tosCrossPosting = unserialize(B2S_PLUGIN_NETWORK_CROSSPOSTING_LIMIT);
13
  $postData = get_post((int) $_GET['postId']);
14
  $selProfile = isset($_GET['profile']) ? (int) $_GET['profile'] : 0;
15
- $selImg = (isset($_GET['img']) && !empty($_GET['img'])) ? base64_decode($_GET['img']) : '';
16
  $exPostFormat = (isset($_GET['postFormat']) && $_GET['postFormat'] == '1') ? 1 : ((isset($_GET['postFormat']) && $_GET['postFormat'] == '2') ? 2 : 0);
17
  $postUrl = (isset($_GET['b2sPostType']) && $_GET['b2sPostType'] == 'ex') ? (($exPostFormat == 0) ? $postData->guid : '') : (get_permalink($postData->ID) !== false ? get_permalink($postData->ID) : $postData->guid);
18
  $postStatus = array('publish' => esc_html__('published', 'blog2social'), 'pending' => esc_html__('draft', 'blog2social'), 'future' => esc_html__('scheduled', 'blog2social'));
@@ -25,7 +25,7 @@ if($optionUserTimeFormat == false) {
25
  $optionUserTimeFormat = (substr(B2S_LANGUAGE, 0, 2) == 'de') ? 0 : 1;
26
  }
27
  $isPremium = (B2S_PLUGIN_USER_VERSION == 0) ? '<span class="label label-success">' . esc_html__("SMART", "blog2social") . '</span>' : '';
28
- $selSchedDate = (isset($_GET['schedDate']) && !empty($_GET['schedDate'])) ? date("Y-m-d", (strtotime($_GET['schedDate'] . ' ' . B2S_Util::getCustomLocaleDateTime($userTimeZoneOffset, 'H:i:s')) + 3600)) : ( (isset($_GET['schedDateTime']) && !empty($_GET['schedDateTime'])) ? date("Y-m-d H:i:s", strtotime(B2S_Util::getUTCForDate($_GET['schedDateTime'], $userTimeZoneOffset * (-1)))) : '' ); //routing from calendar or curated content
29
  $b2sGeneralOptions = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
30
  $isDraft = false;
31
  if (isset($_GET['type']) && $_GET['type'] == 'draft' && isset($_GET['postId']) && (int) $_GET['postId'] > 0) {
@@ -55,9 +55,9 @@ $draftIncompleteModal = false;
55
  <div class="panel panel-group">
56
  <div class="panel-body b2s-post-details">
57
  <h3><?php esc_html_e('Social Media Scheduling & Sharing', 'blog2social') ?></h3>
58
- <div class="info"><?php esc_html_e('Title', 'blog2social') ?>: <?php echo B2S_Util::getTitleByLanguage($postData->post_title, $userLang); ?></div>
59
  <?php if (!isset($_GET['b2sPostType'])) { ?>
60
- <p class="info hidden-xs"># <?php echo $postData->ID; ?> | <?php echo (isset($postStatus[trim(strtolower($postData->post_status))]) ? $postStatus[trim(strtolower($postData->post_status))] : '' ) . ' ' . esc_html__('on blog', 'blog2social') . ': ' . B2S_Util::getCustomDateFormat($postData->post_date, substr(B2S_LANGUAGE, 0, 2)); ?></p>
61
  <?php } ?>
62
  </div>
63
  </div>
@@ -107,7 +107,7 @@ $draftIncompleteModal = false;
107
  $navbar = new B2S_Ship_Navbar();
108
  $mandantData = $navbar->getData();
109
  ?>
110
- <h3> <?php echo count($mandantData['auth']); ?> <?php esc_html_e('Social Accounts', 'blog2social') ?></h3>
111
  </div>
112
  </div>
113
  </li>
@@ -115,7 +115,15 @@ $draftIncompleteModal = false;
115
  <li class="sidebar-brand">
116
  <div class="form-group">
117
  <?php
118
- echo $navbar->getSelectMandantHtml($mandantData['mandanten']);
 
 
 
 
 
 
 
 
119
  ?>
120
  </div>
121
  </li>
@@ -148,7 +156,37 @@ $draftIncompleteModal = false;
148
  unset($tempDraftData[$channelData->networkAuthId]);
149
  }
150
 
151
- echo $navbar->getItemHtml($channelData, ($isDraft) ? $draftData : array());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  $orderArray[] = $channelData->networkAuthId;
153
  //Relay HTML Data - since V4.8.0
154
  if ($channelData->networkId == 2 && !in_array($channelData->networkTypeId, $relayAccountData) && isset($channelData->networkUserName)) {
@@ -214,7 +252,7 @@ $draftIncompleteModal = false;
214
  <div class="panel-body panel-no-padding">
215
  <h4><br><p><?php esc_html_e('Notice: Please make sure, that your website address is reachable. The Social Networks do not allow postings from local installations.', 'blog2social') ?></p></h4>
216
  <?php $settingsBlogUrl = get_option('siteurl') . ((substr(get_option('siteurl'), -1, 1) == '/') ? '' : '/') . 'wp-admin/options-general.php'; ?>
217
- <a href="<?php echo $settingsBlogUrl; ?>" class="btn btn-primary"><?php esc_html_e('change website address', 'blog2social') ?></a>
218
  </div>
219
  </div>
220
  </div>
@@ -255,7 +293,7 @@ $draftIncompleteModal = false;
255
  <input type="hidden" id="publish_date" name="publish_date" value="">
256
  <input type="hidden" id="user_version" name="user_version" value="<?php echo B2S_PLUGIN_USER_VERSION; ?>">
257
  <input type="hidden" id="action" name="action" value="b2s_save_ship_data">
258
- <input type='hidden' id='post_id' name="post_id" value='<?php echo (int) esc_attr($_GET['postId']); ?>'>
259
  <input type='hidden' id='user_timezone' name="user_timezone" value="<?php echo esc_attr($userTimeZoneOffset); ?>">
260
  <input type='hidden' id='user_timezone_text' name="user_timezone_text" value="<?php echo esc_html_e('Time zone', 'blog2social') . ': (UTC ' . B2S_Util::humanReadableOffset($userTimeZoneOffset) . ') ' . $userTimeZone ?>">
261
  <input type='hidden' id="default_titel" name="default_titel" value="<?php echo addslashes(B2S_Util::getTitleByLanguage($postData->post_title, $userLang)); ?>">
@@ -276,7 +314,7 @@ $draftIncompleteModal = false;
276
  <?php if (B2S_PLUGIN_USER_VERSION > 0) { ?>
277
  <button class="btn btn-primary b2s-re-share-btn"><?php esc_html_e('Re-share this post', 'blog2social') ?></button>
278
  <?php } else { ?>
279
- <a href="#" class="btn btn-primary b2s-btn-disabled b2sPreFeatureModalBtn" data-title="You want to re-share your blog post?"><?php esc_html_e('Re-share this post', 'blog2social') ?> <?php echo $isPremium; ?></a>
280
  <?php } ?>
281
  <a class="btn btn-primary" href="<?php echo esc_url($allPosts); ?>"><?php esc_html_e('Share new post on Social Media', 'blog2social') ?></a>
282
  </div>
@@ -305,7 +343,36 @@ $draftIncompleteModal = false;
305
  <div class="modal-body">
306
  <?php
307
  $portale = new B2S_Ship_Portale();
308
- echo $portale->getItemHtml($mandantData['portale']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  ?>
310
  </div>
311
  </div>
@@ -474,7 +541,49 @@ $draftIncompleteModal = false;
474
  if (!empty($selImg)) {
475
  $image->setImageData(array(array($selImg)));
476
  }
477
- echo $image->getItemHtml($postData->ID, $postData->post_content, $postUrl, $userLang);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
478
  ?>
479
  </div>
480
  </div>
@@ -549,7 +658,42 @@ $draftIncompleteModal = false;
549
  <div class="col-xs-12">
550
  <?php
551
  $settingsItem = new B2S_Settings_Item();
552
- echo $settingsItem->getNetworkSettingsHtml();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
553
  ?>
554
  </div>
555
  </div>
@@ -847,8 +991,8 @@ $draftIncompleteModal = false;
847
  <input type="hidden" id="b2sJsTextConnectionFail" value="<?php esc_html_e('The connection to the server failed. Please try again! You can find more information and solutions in the guide for server connection', 'blog2social') ?>">
848
  <input type="hidden" id="b2sJsTextConnectionFailLink" value="<?php echo ($userLang == 'de') ? 'https://www.blog2social.com/de/faq/content/9/108/de/die-verbindung-zum-server-ist-fehlgeschlagen-bitte-versuche-es-erneut.html' : 'https://www.blog2social.com/en/faq/content/9/106/en/the-connection-to-the-server-failed-please-try-again.html'; ?>">
849
  <input type="hidden" id="b2sJsTextConnectionFailLinkText" value="<?php esc_html_e('Give me more information', 'blog2social') ?>">
850
- <input type="hidden" id="b2sSelectedNetworkAuthId" value="<?php echo (isset($_GET['network_auth_id']) && (int) $_GET['network_auth_id'] > 0) ? (int) esc_attr($_GET['network_auth_id']) : ''; ?>">
851
- <input type="hidden" id="b2sMultiSelectedNetworkAuthId" value="<?php echo (isset($_GET['multi_network_auth_id']) && !empty($_GET['multi_network_auth_id'])) ? esc_attr($_GET['multi_network_auth_id']) : ''; ?>">
852
  <input type="hidden" id="b2sDefaultNoImage" value="<?php echo plugins_url('/assets/images/no-image.png', B2S_PLUGIN_FILE); ?>">
853
  <input type="hidden" id="isMetaChecked" value="<?php echo esc_attr($postData->ID); ?>">
854
  <input type="hidden" id="isOgMetaChecked" value="<?php echo (isset($b2sGeneralOptions['og_active']) ? (int) $b2sGeneralOptions['og_active'] : 0); ?>">
@@ -858,7 +1002,16 @@ $draftIncompleteModal = false;
858
  <input type="hidden" id="b2sIsDraft" value="<?php echo ($isDraft) ? '1' : '0' ?>">
859
  <input type="hidden" id="b2sExPostFormat" value="<?php echo esc_attr($exPostFormat); ?>">
860
 
861
- <?php echo $settingsItem->setNetworkSettingsHtml(); ?>
 
 
 
 
 
 
 
 
 
862
  <?php
863
  if (trim(strtolower($postData->post_status)) == 'future' || !empty($selSchedDate)) {
864
  $schedDate = (($postData->post_status) == 'future') ? $postData->post_date_gmt : $selSchedDate; // prio wp sched
12
  $tosCrossPosting = unserialize(B2S_PLUGIN_NETWORK_CROSSPOSTING_LIMIT);
13
  $postData = get_post((int) $_GET['postId']);
14
  $selProfile = isset($_GET['profile']) ? (int) $_GET['profile'] : 0;
15
+ $selImg = (isset($_GET['img']) && !empty($_GET['img'])) ? base64_decode(sanitize_text_field($_GET['img'])) : '';
16
  $exPostFormat = (isset($_GET['postFormat']) && $_GET['postFormat'] == '1') ? 1 : ((isset($_GET['postFormat']) && $_GET['postFormat'] == '2') ? 2 : 0);
17
  $postUrl = (isset($_GET['b2sPostType']) && $_GET['b2sPostType'] == 'ex') ? (($exPostFormat == 0) ? $postData->guid : '') : (get_permalink($postData->ID) !== false ? get_permalink($postData->ID) : $postData->guid);
18
  $postStatus = array('publish' => esc_html__('published', 'blog2social'), 'pending' => esc_html__('draft', 'blog2social'), 'future' => esc_html__('scheduled', 'blog2social'));
25
  $optionUserTimeFormat = (substr(B2S_LANGUAGE, 0, 2) == 'de') ? 0 : 1;
26
  }
27
  $isPremium = (B2S_PLUGIN_USER_VERSION == 0) ? '<span class="label label-success">' . esc_html__("SMART", "blog2social") . '</span>' : '';
28
+ $selSchedDate = (isset($_GET['schedDate']) && !empty($_GET['schedDate'])) ? date("Y-m-d", (strtotime(sanitize_text_field($_GET['schedDate']) . ' ' . B2S_Util::getCustomLocaleDateTime($userTimeZoneOffset, 'H:i:s')) + 3600)) : ( (isset($_GET['schedDateTime']) && !empty($_GET['schedDateTime'])) ? date("Y-m-d H:i:s", strtotime(B2S_Util::getUTCForDate(sanitize_text_field($_GET['schedDateTime']), $userTimeZoneOffset * (-1)))) : '' ); //routing from calendar or curated content
29
  $b2sGeneralOptions = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
30
  $isDraft = false;
31
  if (isset($_GET['type']) && $_GET['type'] == 'draft' && isset($_GET['postId']) && (int) $_GET['postId'] > 0) {
55
  <div class="panel panel-group">
56
  <div class="panel-body b2s-post-details">
57
  <h3><?php esc_html_e('Social Media Scheduling & Sharing', 'blog2social') ?></h3>
58
+ <div class="info"><?php esc_html_e('Title', 'blog2social') ?>: <?php echo esc_html(B2S_Util::getTitleByLanguage($postData->post_title, $userLang)); ?></div>
59
  <?php if (!isset($_GET['b2sPostType'])) { ?>
60
+ <p class="info hidden-xs"># <?php echo esc_html($postData->ID); ?> | <?php echo (isset($postStatus[trim(strtolower($postData->post_status))]) ? $postStatus[trim(strtolower($postData->post_status))] : '' ) . ' ' . esc_html__('on blog', 'blog2social') . ': ' . B2S_Util::getCustomDateFormat($postData->post_date, substr(B2S_LANGUAGE, 0, 2)); ?></p>
61
  <?php } ?>
62
  </div>
63
  </div>
107
  $navbar = new B2S_Ship_Navbar();
108
  $mandantData = $navbar->getData();
109
  ?>
110
+ <h3> <?php echo esc_html(count($mandantData['auth'])); ?> <?php esc_html_e('Social Accounts', 'blog2social') ?></h3>
111
  </div>
112
  </div>
113
  </li>
115
  <li class="sidebar-brand">
116
  <div class="form-group">
117
  <?php
118
+ echo wp_kses($navbar->getSelectMandantHtml($mandantData['mandanten']), array(
119
+ 'select' => array(
120
+ 'class' => array()
121
+ ),
122
+ 'option' => array(
123
+ 'value' => array(),
124
+ 'selected' => array()
125
+ )
126
+ ));
127
  ?>
128
  </div>
129
  </li>
156
  unset($tempDraftData[$channelData->networkAuthId]);
157
  }
158
 
159
+ echo wp_kses($navbar->getItemHtml($channelData, ($isDraft) ? $draftData : array()), array(
160
+ 'li' => array(
161
+ 'class' => array(),
162
+ 'data-mandant-id' => array(),
163
+ 'data-mandant-default-id' => array(),
164
+ ),
165
+ 'div' => array(
166
+ 'class' => array(),
167
+ 'onclick' => array(),
168
+ 'data-instant-sharing' => array(),
169
+ 'data-network-auth-id' => array(),
170
+ 'data-network-type' => array(),
171
+ 'data-network-kind' => array(),
172
+ 'data-network-id' => array(),
173
+ 'data-network-tos-group-id' => array(),
174
+ 'data-network-display-name' => array(),
175
+ 'data-meta-type' => array(),
176
+ ),
177
+ 'img' => array(
178
+ 'alt' => array(),
179
+ 'src' => array(),
180
+ ),
181
+ 'h4' => array(),
182
+ 'p' => array(),
183
+ 'span' => array(
184
+ 'class' => array(),
185
+ 'data-network-auth-id' => array(),
186
+ 'data-network-id' => array(),
187
+ 'style' => array(),
188
+ )
189
+ ));
190
  $orderArray[] = $channelData->networkAuthId;
191
  //Relay HTML Data - since V4.8.0
192
  if ($channelData->networkId == 2 && !in_array($channelData->networkTypeId, $relayAccountData) && isset($channelData->networkUserName)) {
252
  <div class="panel-body panel-no-padding">
253
  <h4><br><p><?php esc_html_e('Notice: Please make sure, that your website address is reachable. The Social Networks do not allow postings from local installations.', 'blog2social') ?></p></h4>
254
  <?php $settingsBlogUrl = get_option('siteurl') . ((substr(get_option('siteurl'), -1, 1) == '/') ? '' : '/') . 'wp-admin/options-general.php'; ?>
255
+ <a href="<?php echo esc_url($settingsBlogUrl); ?>" class="btn btn-primary"><?php esc_html_e('change website address', 'blog2social') ?></a>
256
  </div>
257
  </div>
258
  </div>
293
  <input type="hidden" id="publish_date" name="publish_date" value="">
294
  <input type="hidden" id="user_version" name="user_version" value="<?php echo B2S_PLUGIN_USER_VERSION; ?>">
295
  <input type="hidden" id="action" name="action" value="b2s_save_ship_data">
296
+ <input type='hidden' id='post_id' name="post_id" value='<?php echo (int) esc_attr(sanitize_text_field($_GET['postId'])); ?>'>
297
  <input type='hidden' id='user_timezone' name="user_timezone" value="<?php echo esc_attr($userTimeZoneOffset); ?>">
298
  <input type='hidden' id='user_timezone_text' name="user_timezone_text" value="<?php echo esc_html_e('Time zone', 'blog2social') . ': (UTC ' . B2S_Util::humanReadableOffset($userTimeZoneOffset) . ') ' . $userTimeZone ?>">
299
  <input type='hidden' id="default_titel" name="default_titel" value="<?php echo addslashes(B2S_Util::getTitleByLanguage($postData->post_title, $userLang)); ?>">
314
  <?php if (B2S_PLUGIN_USER_VERSION > 0) { ?>
315
  <button class="btn btn-primary b2s-re-share-btn"><?php esc_html_e('Re-share this post', 'blog2social') ?></button>
316
  <?php } else { ?>
317
+ <a href="#" class="btn btn-primary b2s-btn-disabled b2sPreFeatureModalBtn" data-title="You want to re-share your blog post?"><?php esc_html_e('Re-share this post', 'blog2social') ?> <?php echo wp_kses($isPremium, array('span' => array('class' => array()))); ?></a>
318
  <?php } ?>
319
  <a class="btn btn-primary" href="<?php echo esc_url($allPosts); ?>"><?php esc_html_e('Share new post on Social Media', 'blog2social') ?></a>
320
  </div>
343
  <div class="modal-body">
344
  <?php
345
  $portale = new B2S_Ship_Portale();
346
+ echo wp_kses($portale->getItemHtml($mandantData['portale']), array(
347
+ 'ul' => array(),
348
+ 'li' => array(
349
+ 'data-mandant-default-id' => array(),
350
+ ),
351
+ 'img' => array(
352
+ 'class' => array(),
353
+ 'src' => array(),
354
+ 'alt' => array(),
355
+ ),
356
+ 'span' => array(
357
+ 'class' => array(),
358
+ ),
359
+ 'button' => array(
360
+ 'onclick' => array(),
361
+ 'class' => array(),
362
+ 'type' => array(),
363
+ 'data-type' => array(),
364
+ 'data-title' => array(),
365
+ 'data-b2s-auth-url' => array(),
366
+ ),
367
+ 'a' => array(
368
+ 'href' => array(),
369
+ 'data-auth-method' => array(),
370
+ 'class' => array(),
371
+ ),
372
+ 'div' => array(
373
+ 'data-instant-sharing' => array(),
374
+ )
375
+ ));
376
  ?>
377
  </div>
378
  </div>
541
  if (!empty($selImg)) {
542
  $image->setImageData(array(array($selImg)));
543
  }
544
+ echo wp_kses($image->getItemHtml($postData->ID, $postData->post_content, $postUrl, $userLang), array(
545
+ 'br' => array(),
546
+ 'div' => array(
547
+ 'class' => array(),
548
+ 'style' => array()
549
+ ),
550
+ 'span' => array(
551
+ 'id' => array(),
552
+ 'class' => array()
553
+ ),
554
+ 'a' => array(
555
+ 'target' => array(),
556
+ 'href' => array()
557
+ ),
558
+ 'i' => array(
559
+ 'class' => array()
560
+ ),
561
+ 'label' => array(
562
+ 'for' => array()
563
+ ),
564
+ 'img' => array(
565
+ 'class' => array(),
566
+ 'alt' => array(),
567
+ 'src' => array()
568
+ ),
569
+ 'input' => array(
570
+ 'type' => array(),
571
+ 'value' => array(),
572
+ 'class' => array(),
573
+ 'name' => array(),
574
+ 'id' => array(),
575
+ 'checked' => array(),
576
+ ),
577
+ 'button' => array(
578
+ 'class' => array(),
579
+ 'data-post-id' => array(),
580
+ 'data-network-id' => array(),
581
+ 'data-network-auth-id' => array(),
582
+ 'data-meta-type' => array(),
583
+ 'data-image-count' => array(),
584
+ 'style' => array(),
585
+ )
586
+ ));
587
  ?>
588
  </div>
589
  </div>
658
  <div class="col-xs-12">
659
  <?php
660
  $settingsItem = new B2S_Settings_Item();
661
+ echo wp_kses($settingsItem->getNetworkSettingsHtml(), array(
662
+ 'div' => array(
663
+ 'class' => array(),
664
+ 'data-post-format-type' => array(),
665
+ 'data-network-type' => array(),
666
+ 'data-network-id' => array(),
667
+ 'data-network-title' => array(),
668
+ 'style' => array()
669
+ ),
670
+ 'b' => array(),
671
+ 'br' => array(),
672
+ 'a' => array(
673
+ 'target' => array(),
674
+ 'href' => array()
675
+ ),
676
+ 'hr' => array(),
677
+ 'span' => array(
678
+ 'class' => array()
679
+ ),
680
+ 'label' => array(),
681
+ 'input' => array(
682
+ 'type' => array(),
683
+ 'name' => array(),
684
+ 'value' => array(),
685
+ 'class' => array(),
686
+ 'data-post-wp-type' => array(),
687
+ 'data-post-format-type' => array(),
688
+ 'data-network-type' => array(),
689
+ 'data-network-id' => array(),
690
+ 'data-post-format' => array()
691
+ ),
692
+ 'img' => array(
693
+ 'class' => array(),
694
+ 'src' => array()
695
+ )
696
+ ));
697
  ?>
698
  </div>
699
  </div>
991
  <input type="hidden" id="b2sJsTextConnectionFail" value="<?php esc_html_e('The connection to the server failed. Please try again! You can find more information and solutions in the guide for server connection', 'blog2social') ?>">
992
  <input type="hidden" id="b2sJsTextConnectionFailLink" value="<?php echo ($userLang == 'de') ? 'https://www.blog2social.com/de/faq/content/9/108/de/die-verbindung-zum-server-ist-fehlgeschlagen-bitte-versuche-es-erneut.html' : 'https://www.blog2social.com/en/faq/content/9/106/en/the-connection-to-the-server-failed-please-try-again.html'; ?>">
993
  <input type="hidden" id="b2sJsTextConnectionFailLinkText" value="<?php esc_html_e('Give me more information', 'blog2social') ?>">
994
+ <input type="hidden" id="b2sSelectedNetworkAuthId" value="<?php echo (isset($_GET['network_auth_id']) && (int) $_GET['network_auth_id'] > 0) ? (int) esc_attr(sanitize_text_field($_GET['network_auth_id'])) : ''; ?>">
995
+ <input type="hidden" id="b2sMultiSelectedNetworkAuthId" value="<?php echo (isset($_GET['multi_network_auth_id']) && !empty($_GET['multi_network_auth_id'])) ? esc_attr(sanitize_text_field($_GET['multi_network_auth_id'])) : ''; ?>">
996
  <input type="hidden" id="b2sDefaultNoImage" value="<?php echo plugins_url('/assets/images/no-image.png', B2S_PLUGIN_FILE); ?>">
997
  <input type="hidden" id="isMetaChecked" value="<?php echo esc_attr($postData->ID); ?>">
998
  <input type="hidden" id="isOgMetaChecked" value="<?php echo (isset($b2sGeneralOptions['og_active']) ? (int) $b2sGeneralOptions['og_active'] : 0); ?>">
1002
  <input type="hidden" id="b2sIsDraft" value="<?php echo ($isDraft) ? '1' : '0' ?>">
1003
  <input type="hidden" id="b2sExPostFormat" value="<?php echo esc_attr($exPostFormat); ?>">
1004
 
1005
+ <?php echo wp_kses($settingsItem->setNetworkSettingsHtml(), array(
1006
+ 'input' => array(
1007
+ 'type' => array(),
1008
+ 'class' => array(),
1009
+ 'value' => array(),
1010
+ 'data-post-format-type' => array(),
1011
+ 'data-network-id' => array(),
1012
+ 'data-network-type' => array()
1013
+ )
1014
+ )); ?>
1015
  <?php
1016
  if (trim(strtolower($postData->post_status)) == 'future' || !empty($selSchedDate)) {
1017
  $schedDate = (($postData->post_status) == 'future') ? $postData->post_date_gmt : $selSchedDate; // prio wp sched
views/b2s/widgets/calendar.php CHANGED
@@ -34,7 +34,7 @@ $metaSettings = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
34
  <input type="hidden" id="b2sEmojiTranslation" value='<?php echo json_encode(B2S_Tools::getEmojiTranslationList()); ?>'>
35
  <!--Routing from dashboard-->
36
  <input type="hidden" id="b2s_rfd" value="<?php echo (isset($_GET['rfd'])) ? 1 : 0; ?>">
37
- <input type="hidden" id="b2s_rfd_b2s_id" value="<?php echo (isset($_GET['b2s_id'])) ? esc_attr($_GET['b2s_id']) : ""; ?>">
38
 
39
  <div class="col-md-12 b2s-calendar-filter form-inline del-padding-left del-padding-right">
40
  <div class="b2s-calendar-filter-network-legend-text">
@@ -53,7 +53,22 @@ $metaSettings = get_option('B2S_PLUGIN_GENERAL_OPTIONS');
53
  if (!empty($filterNetwork)) {
54
  ?>
55
  <div class="b2s-calendar-filter-network-list">
56
- <?php echo $filterNetwork ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  </div>
58
  <div class="b2s-calendar-filter-network-account-list"></div>
59
  <?php }
34
  <input type="hidden" id="b2sEmojiTranslation" value='<?php echo json_encode(B2S_Tools::getEmojiTranslationList()); ?>'>
35
  <!--Routing from dashboard-->
36
  <input type="hidden" id="b2s_rfd" value="<?php echo (isset($_GET['rfd'])) ? 1 : 0; ?>">
37
+ <input type="hidden" id="b2s_rfd_b2s_id" value="<?php echo (isset($_GET['b2s_id'])) ? esc_attr(sanitize_text_field($_GET['b2s_id'])) : ""; ?>">
38
 
39
  <div class="col-md-12 b2s-calendar-filter form-inline del-padding-left del-padding-right">
40
  <div class="b2s-calendar-filter-network-legend-text">
53
  if (!empty($filterNetwork)) {
54
  ?>
55
  <div class="b2s-calendar-filter-network-list">
56
+ <?php echo wp_kses($filterNetwork, array(
57
+ 'label' => array(),
58
+ 'input' => array(
59
+ 'type' => array(),
60
+ 'class' => array(),
61
+ 'name' => array(),
62
+ 'value' => array(),
63
+ 'checked' => array()
64
+ ),
65
+ 'span' => array(),
66
+ 'img' => array(
67
+ 'class' => array(),
68
+ 'alt' => array(),
69
+ 'src' => array()
70
+ )
71
+ )) ?>
72
  </div>
73
  <div class="b2s-calendar-filter-network-account-list"></div>
74
  <?php }
views/prg/html/form.php CHANGED
@@ -12,7 +12,9 @@
12
  <label class="col-md-6 del-padding-left hidden-sm hidden-xs"><small> <?php esc_html_e('Language', 'blog2social') ?></small></label>
13
  <div class="col-md-6 del-padding-left">
14
  <select name="kategorie_id" id="prg_cat" class="form-control b2s-select">
15
- <?php echo $item->getCategoryHtml(); ?>
 
 
16
  </select>
17
  </div>
18
  <div class="col-md-6 del-padding-left">
@@ -127,7 +129,12 @@
127
  <label class="col-md-12 del-padding-left"><small><?php esc_html_e('Country', 'blog2social') ?></small></label>
128
  <div class="col-md-12 del-padding-left">
129
  <select name="land_mandant" id="prg_land_mandant" class="form-control b2s-select">
130
- <?php echo $item->getCountryHtml(); ?>
 
 
 
 
 
131
  </select>
132
  </div>
133
  </div>
@@ -204,7 +211,12 @@
204
  <label class="col-md-12 del-padding-left"><small><?php esc_html_e('Country', 'blog2social') ?></small></label>
205
  <div class="col-md-12 del-padding-left">
206
  <select name="land_presse" id="prg_land_presse" class="form-control b2s-select">
207
- <?php echo $item->getCountryHtml(); ?>
 
 
 
 
 
208
  </select>
209
  </div>
210
  </div>
12
  <label class="col-md-6 del-padding-left hidden-sm hidden-xs"><small> <?php esc_html_e('Language', 'blog2social') ?></small></label>
13
  <div class="col-md-6 del-padding-left">
14
  <select name="kategorie_id" id="prg_cat" class="form-control b2s-select">
15
+ <?php echo wp_kses($item->getCategoryHtml(), array(
16
+ 'option' => array('value' => array())
17
+ )); ?>
18
  </select>
19
  </div>
20
  <div class="col-md-6 del-padding-left">
129
  <label class="col-md-12 del-padding-left"><small><?php esc_html_e('Country', 'blog2social') ?></small></label>
130
  <div class="col-md-12 del-padding-left">
131
  <select name="land_mandant" id="prg_land_mandant" class="form-control b2s-select">
132
+ <?php echo wp_kses($item->getCountryHtml(), array(
133
+ 'option' => array(
134
+ 'value' => array(),
135
+ 'selected' => array()
136
+ )
137
+ )); ?>
138
  </select>
139
  </div>
140
  </div>
211
  <label class="col-md-12 del-padding-left"><small><?php esc_html_e('Country', 'blog2social') ?></small></label>
212
  <div class="col-md-12 del-padding-left">
213
  <select name="land_presse" id="prg_land_presse" class="form-control b2s-select">
214
+ <?php echo wp_kses($item->getCountryHtml(), array(
215
+ 'option' => array(
216
+ 'value' => array(),
217
+ 'selected' => array()
218
+ )
219
+ )); ?>
220
  </select>
221
  </div>
222
  </div>
views/prg/post.php CHANGED
@@ -31,7 +31,37 @@ $prgUserLang = strtolower(substr(get_locale(), 0, 2));
31
  <input id="page" type="hidden" value="prg-post" name="page">
32
  <?php
33
  $postFilter = new PRG_Post_Filter('all', $prgSortPostTitle, $prgSortPostAuthor, $prgSortPostType, $prgSortPostStatus);
34
- echo $postFilter->getItemHtml();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  ?>
36
  </form>
37
  <!-- Filter Post Ende-->
@@ -45,13 +75,48 @@ $prgUserLang = strtolower(substr(get_locale(), 0, 2));
45
  <ul class="list-group">
46
  <?php
47
  $postItem = new PRG_Post_Item('all', $prgSortPostTitle, $prgSortPostAuthor, $prgSortPostType, $prgSortPostStatus, $currentPage, $prgUserLang);
48
- echo $postItem->getItemHtml();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  ?>
50
  </ul>
51
  <br>
52
  <nav class="text-center">
53
  <?php
54
- echo $postItem->getPaginationHtml();
 
 
 
 
 
 
 
 
 
 
 
55
  ?>
56
  </nav>
57
  <?php require_once (B2S_PLUGIN_DIR . 'views/prg/html/footer.php'); ?>
31
  <input id="page" type="hidden" value="prg-post" name="page">
32
  <?php
33
  $postFilter = new PRG_Post_Filter('all', $prgSortPostTitle, $prgSortPostAuthor, $prgSortPostType, $prgSortPostStatus);
34
+ echo wp_kses($postFilter->getItemHtml(), array(
35
+ 'div' => array(
36
+ 'class' => array()
37
+ ),
38
+ 'input' => array(
39
+ 'id' => array(),
40
+ 'name' => array(),
41
+ 'class' => array(),
42
+ 'value' => array(),
43
+ 'maxlength' => array(),
44
+ 'placeholder' => array(),
45
+ 'type' => array(),
46
+ ),
47
+ 'select' => array(
48
+ 'name' => array(),
49
+ 'class' => array(),
50
+ 'id' => array(),
51
+ ),
52
+ 'option' => array(
53
+ 'value' => array(),
54
+ 'selected' => array(),
55
+ ),
56
+ 'button' => array(
57
+ 'type' => array(),
58
+ 'class' => array(),
59
+ ),
60
+ 'a' => array(
61
+ 'href' => array(),
62
+ 'class' => array(),
63
+ ),
64
+ ));
65
  ?>
66
  </form>
67
  <!-- Filter Post Ende-->
75
  <ul class="list-group">
76
  <?php
77
  $postItem = new PRG_Post_Item('all', $prgSortPostTitle, $prgSortPostAuthor, $prgSortPostType, $prgSortPostStatus, $currentPage, $prgUserLang);
78
+ echo wp_kses($postItem->getItemHtml(), array(
79
+ 'li' => array(
80
+ 'class' => array(),
81
+ ),
82
+ 'div' => array(
83
+ 'class' => array(),
84
+ ),
85
+ 'span' => array(
86
+ 'class' => array(),
87
+ ),
88
+ 'p' => array(
89
+ 'class' => array(),
90
+ ),
91
+ 'img' => array(
92
+ 'class' => array(),
93
+ 'src' => array(),
94
+ 'alt' => array(),
95
+ ),
96
+ 'strong' => array(),
97
+ 'a' => array(
98
+ 'target' => array(),
99
+ 'href' => array(),
100
+ 'class' => array(),
101
+ ),
102
+ ));
103
  ?>
104
  </ul>
105
  <br>
106
  <nav class="text-center">
107
  <?php
108
+ echo wp_kses($postItem->getPaginationHtml(), array(
109
+ 'ul' => array(
110
+ 'class' => array()
111
+ ),
112
+ 'li' => array(
113
+ 'class' => array()
114
+ ),
115
+ 'a' => array(
116
+ 'href' => array()
117
+ ),
118
+ 'span' => array(),
119
+ ));
120
  ?>
121
  </nav>
122
  <?php require_once (B2S_PLUGIN_DIR . 'views/prg/html/footer.php'); ?>
views/prg/ship.php CHANGED
@@ -36,7 +36,27 @@ $prgInfo = get_option('B2S_PLUGIN_PRG_' . B2S_PLUGIN_BLOG_USER_ID);
36
  <?php esc_html_e('Select Image', 'blog2social') ?>
37
  </h4>
38
  <div class="row">
39
- <?php echo $imageData; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  </div>
41
  <span class="clearfix"></span>
42
  <div class="form-group prgImageRights">
36
  <?php esc_html_e('Select Image', 'blog2social') ?>
37
  </h4>
38
  <div class="row">
39
+ <?php echo wp_kses($imageData, array(
40
+ 'div' => array(
41
+ 'class' => array()
42
+ ),
43
+ 'label' => array(
44
+ 'for' => array()
45
+ ),
46
+ 'img' => array(
47
+ 'class' => array(),
48
+ 'src' => array(),
49
+ 'alt' => array()
50
+ ),
51
+ 'input' => array(
52
+ 'checked' => array(),
53
+ 'type' => array(),
54
+ 'value' => array(),
55
+ 'name' => array(),
56
+ 'class' => array(),
57
+ 'id' => array(),
58
+ )
59
+ )); ?>
60
  </div>
61
  <span class="clearfix"></span>
62
  <div class="form-group prgImageRights">