Version Description
Additional Security Update & Bugfix Instagram carousel post
Download this release
Release Info
Developer | PR-Gateway |
Plugin | Blog2Social: Social Media Auto Post & Scheduler |
Version | 6.9.11 |
Comparing to | |
See all releases |
Code changes from version 6.9.10 to 6.9.11
- blog2social.php +1 -1
- includes/Ajax/Post.php +5 -5
- includes/B2S/Settings/Item.php +126 -124
- readme.txt +5 -1
- views/b2s/settings.php +80 -67
blog2social.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
* Author: Blog2Social, Adenion
|
7 |
* Text Domain: blog2social
|
8 |
* Domain Path: /languages
|
9 |
-
* Version: 6.9.
|
10 |
* Author URI: https://www.blog2social.com
|
11 |
* License: GPL2+
|
12 |
*/
|
6 |
* Author: Blog2Social, Adenion
|
7 |
* Text Domain: blog2social
|
8 |
* Domain Path: /languages
|
9 |
+
* Version: 6.9.11
|
10 |
* Author URI: https://www.blog2social.com
|
11 |
* License: GPL2+
|
12 |
*/
|
includes/Ajax/Post.php
CHANGED
@@ -646,8 +646,8 @@ class Ajax_Post {
|
|
646 |
'frame_color' => ((isset($data['frame_color']) && !empty($data['frame_color'])) ? sanitize_text_field($data['frame_color']) : '#ffffff')
|
647 |
);
|
648 |
|
649 |
-
|
650 |
-
|
651 |
if (isset($data['multi_image_1']) && !empty($data['multi_image_1'])) {
|
652 |
array_push($multi_images, $data['multi_image_1']);
|
653 |
}
|
@@ -760,7 +760,7 @@ class Ajax_Post {
|
|
760 |
}
|
761 |
|
762 |
public function saveSocialMetaTags() {
|
763 |
-
if (current_user_can('
|
764 |
$result = array('result' => true);
|
765 |
if (isset($_POST['is_admin']) && (int) $_POST['is_admin'] == 1) {
|
766 |
|
@@ -802,7 +802,7 @@ class Ajax_Post {
|
|
802 |
}
|
803 |
|
804 |
public function resetSocialMetaTags() {
|
805 |
-
if (current_user_can('
|
806 |
global $wpdb;
|
807 |
$sql = "DELETE FROM " . $wpdb->postmeta . " WHERE meta_key = %s";
|
808 |
$sql = $wpdb->prepare($sql, "_b2s_post_meta");
|
@@ -898,7 +898,7 @@ class Ajax_Post {
|
|
898 |
wp_die();
|
899 |
}
|
900 |
|
901 |
-
if (isset($_POST['legacy_mode'])) {
|
902 |
$options = new B2S_Options(0, 'B2S_PLUGIN_GENERAL_OPTIONS');
|
903 |
$options->_setOption('legacy_mode', (int) $_POST['legacy_mode']);
|
904 |
|
646 |
'frame_color' => ((isset($data['frame_color']) && !empty($data['frame_color'])) ? sanitize_text_field($data['frame_color']) : '#ffffff')
|
647 |
);
|
648 |
|
649 |
+
if ((isset($data['post_format']) && (int) $data['post_format'] == 1) || (int) $data['network_id'] == 12) { //Case IG
|
650 |
+
$multi_images = array();
|
651 |
if (isset($data['multi_image_1']) && !empty($data['multi_image_1'])) {
|
652 |
array_push($multi_images, $data['multi_image_1']);
|
653 |
}
|
760 |
}
|
761 |
|
762 |
public function saveSocialMetaTags() {
|
763 |
+
if (current_user_can('administrator') && isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['b2s_security_nonce'])), 'b2s_security_nonce') > 0) {
|
764 |
$result = array('result' => true);
|
765 |
if (isset($_POST['is_admin']) && (int) $_POST['is_admin'] == 1) {
|
766 |
|
802 |
}
|
803 |
|
804 |
public function resetSocialMetaTags() {
|
805 |
+
if (current_user_can('administrator') && isset($_POST['b2s_security_nonce']) && (int) wp_verify_nonce(sanitize_text_field(wp_unslash($_POST['b2s_security_nonce'])), 'b2s_security_nonce') > 0) {
|
806 |
global $wpdb;
|
807 |
$sql = "DELETE FROM " . $wpdb->postmeta . " WHERE meta_key = %s";
|
808 |
$sql = $wpdb->prepare($sql, "_b2s_post_meta");
|
898 |
wp_die();
|
899 |
}
|
900 |
|
901 |
+
if (isset($_POST['legacy_mode']) && current_user_can('administrator')) {
|
902 |
$options = new B2S_Options(0, 'B2S_PLUGIN_GENERAL_OPTIONS');
|
903 |
$options->_setOption('legacy_mode', (int) $_POST['legacy_mode']);
|
904 |
|
includes/B2S/Settings/Item.php
CHANGED
@@ -40,7 +40,7 @@ class B2S_Settings_Item {
|
|
40 |
|
41 |
$optionUserTimeZone = $this->options->_getOption('user_time_zone');
|
42 |
$optionUserTimeFormat = $this->options->_getOption('user_time_format');
|
43 |
-
if($optionUserTimeFormat === false) {
|
44 |
$optionUserTimeFormat = (strtolower(substr(get_locale(), 0, 2)) == 'de') ? 0 : 1;
|
45 |
}
|
46 |
$legacyMode = $this->generalOptions->_getOption('legacy_mode');
|
@@ -49,71 +49,74 @@ class B2S_Settings_Item {
|
|
49 |
$userTimeZoneOffset = (empty($userTimeZone)) ? get_option('gmt_offset') : B2S_Util::getOffsetToUtcByTimeZone($userTimeZone);
|
50 |
$userInfoName = get_the_author_meta('display_name', B2S_PLUGIN_BLOG_USER_ID);
|
51 |
$isCheckedShortener = (isset($this->settings->shortener_state) && (int) $this->settings->shortener_state > 0) ? ((int) $this->settings->shortener_state - 1) : -1;
|
52 |
-
|
53 |
$content = '';
|
54 |
-
$content .='<h4>' . esc_html__('Account', 'blog2social') . '</h4>';
|
55 |
-
$content .='<div class="form-inline">';
|
56 |
-
$content .='<div class="col-xs-12 del-padding-left">';
|
57 |
-
$content .='<label class="b2s-user-time-zone-label" for="b2s-user-time-zone">' . esc_html__('Personal Time Zone', 'blog2social') . '</label>';
|
58 |
-
$content .=' <select id="b2s-user-time-zone" class="form-control b2s-select" name="b2s-user-time-zone">';
|
59 |
$content .= B2S_Util::createTimezoneList($userTimeZone);
|
60 |
$content .= '</select>';
|
61 |
$content .= ' <a href="#" class="b2s-info-btn hidden-xs b2sInfoTimeZoneModalBtn">' . esc_html__('Info', 'Blog2Social') . '</a>';
|
62 |
-
$content .='</div>';
|
63 |
-
$content .='<br><div class="b2s-settings-time-zone-info">' . esc_html__('Timezone for Scheduling', 'blog2social') . ' (' . esc_html__('User', 'blog2social') . ': ' . esc_html((!empty($userInfoName) ? $userInfoName : '-')) . ') <code id="b2s-user-time">' . esc_html(B2S_Util::getLocalDate($userTimeZoneOffset, substr(B2S_LANGUAGE, 0, 2))) . '</code></span></div>';
|
64 |
-
$content .='</div>';
|
65 |
-
|
66 |
-
$content .='<h4 style="display: inline-block;">' . esc_html__('Set time format', 'blog2social') . '</h4> <a style="display: inline-block;" href="#" class="b2s-info-btn hidden-xs b2sInfoTimeZoneModalBtn">' . esc_html__('Info', 'Blog2Social') . '</a>';
|
67 |
-
$content .='<div class="form-inline">';
|
68 |
-
$content .='<div class="col-xs-12 del-padding-left">';
|
69 |
-
$content .='<p>' . esc_html__('Set the time format you like to use for your posts.', 'blog2social') . '</p>';
|
70 |
-
$content .='<input data-size="mini" data-toggle="toggle" data-width="90" data-height="22" data-onstyle="primary" data-on="12h (am/pm)" data-off="24h" ' . (($optionUserTimeFormat == 1) ? 'checked' : '') . ' name="b2s-time-format" class="b2s-time-format-toggle" data-area-type="manuell" value="1" type="checkbox">';
|
71 |
-
$content .='</div>';
|
72 |
-
$content .='</div>';
|
73 |
-
|
74 |
-
$content .='<div class="clearfix"></div>';
|
75 |
-
$content .='<br>';
|
76 |
-
$content .='<hr>';
|
77 |
-
$content .='<h4>' . esc_html__('Content', 'blog2social') . '</h4>';
|
78 |
-
$content .='<strong>' . esc_html__('Url Shortener', 'blog2social') . '</strong><br>';
|
79 |
-
$content .='<div class="alert alert-warning">' . sprintf(__('You can use Bit.ly, Rebrandly or Sniply links to shorten the URL of your links and to track the performance of your links in your social networks. Activate one of the URL shorteners you like to use and link it to your account. Your social media posts will then be shared with your links of Bit.ly, Rebrandly or Sniply. You can then monitor the success of your posts in these accounts. Please note: Some networks do not allow shortlinks. Blog2Social will apply the regular URL for these social platforms. You find more information on the support of URL shortener by the different social platforms in the <a href="%s" target="_blank">link shortener guide</a>.', 'blog2social'), esc_url(B2S_Tools::getSupportLink('url_shortener_faq'))) . '</div>';
|
80 |
-
$content .='<input type="radio" value="0" class="b2s-user-network-settings-short-url" id="b2s-user-network-settings-short-url-0" name="b2s-user-network-settings-short-url" ' . (($isCheckedShortener == -1) ? 'checked="checked"' : '') . ' data-provider-id="-1"/><label for="b2s-user-network-settings-short-url-0"> '.esc_html__('no URL Shortener', 'blog2social').'</label>';
|
81 |
$content .= '<br>';
|
82 |
-
$content .= '<
|
83 |
-
$content .= '<
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
foreach (unserialize(B2S_PLUGIN_SHORTENER) as $id => $name) {
|
85 |
$display_name = '';
|
86 |
-
if(isset($this->settings->shortener_data) && is_array($this->settings->shortener_data) && !empty($this->settings->shortener_data)) {
|
87 |
foreach ($this->settings->shortener_data as $shortenerObject) {
|
88 |
-
if(isset($shortenerObject->provider_id) && $shortenerObject->provider_id == $id && isset($shortenerObject->display_name)) {
|
89 |
$display_name = esc_html__('Account', 'blog2social') . ': ' . $shortenerObject->display_name;
|
90 |
-
if($shortenerObject->provider_id == 2) { //Sniply
|
91 |
$display_name_parts = explode('#SNIP#', $shortenerObject->display_name);
|
92 |
-
if(isset($display_name_parts[0]) && isset($display_name_parts[1])) {
|
93 |
$display_name = esc_html__('Brand', 'blog2social') . ': ' . esc_html($display_name_parts[0]) . ' | ' . esc_html__('Call-to-Action', 'blog2social') . ': ' . esc_html($display_name_parts[1]);
|
94 |
}
|
95 |
}
|
96 |
}
|
97 |
}
|
98 |
}
|
99 |
-
$content .='<input type="radio" value="' . esc_attr(($id+1)) . '" class="b2s-user-network-settings-short-url" id="b2s-user-network-settings-short-url-'.esc_attr(($id+1)).'" name="b2s-user-network-settings-short-url" ' . (($isCheckedShortener == $id) ? 'checked="checked"' : '') . ' data-provider-id="'.esc_attr($id).'" /><label for="b2s-user-network-settings-short-url-'.esc_attr(($id+1)).'"> <img class="b2s-shortener-image" alt="'.esc_attr($name).'" src="' . esc_url(plugins_url('/assets/images/settings/'. strtolower($name) .'.png', B2S_PLUGIN_FILE)) . '"> ' . esc_html($name) . '</label>';
|
100 |
-
$content .='<span class="b2s-user-network-shortener-account-area" data-provider-id="'.esc_attr($id).'">';
|
101 |
-
$content .='<input type="hidden" class="b2s-user-network-shortener-state" data-provider-id="'.esc_attr($id).'" value="' . ((!empty($display_name)) ? 1 : 0) . '"/>';
|
102 |
-
$content .='<span class="b2s-user-network-shortener-connect" data-provider-id="'.esc_attr($id).'" style="display:' . ((empty($display_name)) ? 'inline-block' : 'none') . ';" ><a href="#" class="b2s-shortener-account-connect-btn" data-provider-id="'.esc_attr($id).'" onclick="wopShortener(\'' . esc_url($this->authUrl) . '&provider_id='.esc_attr($id).'\', \'Blog2Social Network\'); return false;"> ' . esc_html__('authorize', 'blog2social') . '</a> </span>';
|
103 |
-
$content .=' <span class="b2s-user-network-shortener-account-detail" data-provider-id="'.esc_attr($id).'" style="display:' . ((!empty($display_name)) ? 'inline-block' : 'none') . ';">(<span class="b2s-shortener-account-display-name" data-provider-id="'.esc_attr($id).'">' . (!empty($display_name) ? esc_html($display_name) : '') . '</span> <a href="#" class="b2s-shortener-account-change-btn" data-provider-id="'
|
104 |
-
$content .='</span>';
|
105 |
$content .= '<br>';
|
106 |
}
|
107 |
-
|
108 |
$content .= '<br>';
|
109 |
$content .= '<strong>' . esc_html__('Shortcodes', 'blog2social') . '</strong> <a href="#" class="b2s-info-btn del-padding-left b2sInfoAllowShortcodeModalBtn">' . esc_html__('Info', 'Blog2Social') . '</a> <br>';
|
110 |
$content .= '<input type="checkbox" value="' . esc_attr($isCheckedAllowShortcode) . '" id="b2s-user-network-settings-allow-shortcode" ' . (($isCheckedAllowShortcode == 1) ? 'checked="checked"' : '') . ' /> ' . esc_html__('allow shortcodes in my post', 'blog2social');
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
|
|
|
|
|
|
117 |
return $content;
|
118 |
}
|
119 |
|
@@ -133,99 +136,98 @@ class B2S_Settings_Item {
|
|
133 |
if (B2S_PLUGIN_ADMIN) {
|
134 |
$content .= '<a href="#" class="pull-right btn btn-primary btn-xs b2sClearSocialMetaTags">' . esc_html__('Reset all page and post meta data', 'blog2social') . '</a>';
|
135 |
}
|
136 |
-
$content .='<strong>' . esc_html__('This is a global feature for your blog, which can only be edited by users with admin rights.', 'blog2social') . '</strong>';
|
137 |
$content .= '<br>';
|
138 |
-
$content .='<div class="' . ( (B2S_PLUGIN_ADMIN) ? "" : "b2s-disabled-div") . '">';
|
139 |
-
$content .='<h4>' . esc_html__('Meta Tags Settings for Posts and Pages', 'blog2social') . '</h4>';
|
140 |
$content .= '<input type="checkbox" value="' . esc_attr($og_isChecked) . '" name="b2s_og_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_og_active" ' . (($og_isChecked == 0) ? 'checked="checked"' : '') . ' /><label for="b2s_og_active"> ' . esc_html__('Add Open Graph meta tags to your shared posts or pages, required by Facebook and other social networks to display your post or page image, title and description correctly.', 'blog2social', 'blog2social') . ' <a href="#" class="b2s-load-info-meta-tag-modal b2s-info-btn del-padding-left" data-meta-type="og" data-meta-origin="settings">' . esc_html__('Info', 'Blog2Social') . '</a></label>';
|
141 |
-
$content .='<br>';
|
142 |
$content .= '<input type="checkbox" value="' . esc_attr($card_isChecked) . '" name="b2s_card_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_card_active" ' . (($card_isChecked == 0) ? 'checked="checked"' : '') . ' /><label for="b2s_card_active"> ' . esc_html__('Add Twitter Card meta tags to your shared posts or pages, required by Twitter to display your post or page image, title and description correctly.', 'blog2social', 'blog2social') . ' <a href="#" class="b2s-load-info-meta-tag-modal b2s-info-btn del-padding-left" data-meta-type="card" data-meta-origin="settings">' . esc_html__('Info', 'Blog2Social') . '</a></label>';
|
143 |
-
$content .='<br>';
|
144 |
$content .= '<input type="checkbox" value="' . esc_attr($oembed_isChecked) . '" name="b2s_oembed_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_oembed_active" ' . (($oembed_isChecked == 0) ? 'checked="checked"' : '') . ' /><label for="b2s_oEmbed_active"> ' . esc_html__('Add oEmbed tags', 'blog2social', 'blog2social') . ' <a href="#" class="b2s-load-info-meta-tag-modal b2s-info-btn del-padding-left" data-meta-type="oEmbed" data-meta-origin="settings">' . esc_html__('Info', 'Blog2Social') . '</a></label>';
|
145 |
-
$content .='</div>';
|
146 |
-
$content .='<button class="btn btn-primary pull-right" type="submit" '.(B2S_PLUGIN_ADMIN ? '' : 'disabled="true"').'>'.esc_html__('save', 'blog2social').'</button>';
|
147 |
-
$content .='<div class="clearfix"></div><hr>';
|
148 |
|
149 |
-
|
150 |
-
$content .='<
|
151 |
-
$content .='<
|
152 |
-
$content .='<h4>' . esc_html__('Frontpage Settings', 'blog2social');
|
153 |
if (B2S_PLUGIN_USER_VERSION >= 1) {
|
154 |
-
$content .=' <a class="btn-link b2s-btn-link-txt" href="admin.php?page=blog2social-support#b2s-support-sharing-debugger">' . esc_html__("Check Settings with Sharing-Debugger", "blog2social") . '</a>';
|
155 |
} else {
|
156 |
if (B2S_PLUGIN_ADMIN) {
|
157 |
-
$content .=' <span class="label label-success label-sm">' . esc_html__("SMART", "blog2social") . '</span>';
|
158 |
}
|
159 |
}
|
160 |
$readonly = (B2S_PLUGIN_USER_VERSION >= 1) ? false : true;
|
161 |
-
$content .='</h4>';
|
162 |
-
$content .='<div class="' . ( (B2S_PLUGIN_USER_VERSION >= 1) ? "" : "b2s-disabled-div") . '">';
|
163 |
-
$content .='<div><b>Open Graph</b></div>';
|
164 |
$content .= '<p>' . esc_html__('Add the default Open Graph parameters for title, description and image you want Facebook to display, if you share the frontpage of your blog as link post (http://www.yourblog.com)', 'blog2social') . '</p>';
|
165 |
-
$content .='<br>';
|
166 |
-
$content .='<div class="col-md-8">';
|
167 |
-
$content .='<div class="form-group"><label for="b2s_og_default_title"><strong>' . esc_html__("Title", "blog2social") . ':</strong></label><input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr(( ($this->generalOptions->_getOption('og_default_title') !== false && !empty($this->generalOptions->_getOption('og_default_title'))) ? esc_attr(stripslashes($this->generalOptions->_getOption('og_default_title'))) : get_bloginfo('name'))) . '" name="b2s_og_default_title" class="form-control" id="b2s_og_default_title"></div>';
|
168 |
-
$content .='<div class="form-group"><label for="b2s_og_default_desc"><strong>' . esc_html__("Description", "blog2social") . ':</strong></label><input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr(( ($this->generalOptions->_getOption('og_default_desc') !== false && !empty($this->generalOptions->_getOption('og_default_desc'))) ? esc_attr(stripslashes($this->generalOptions->_getOption('og_default_desc'))) : get_bloginfo('description'))) . '" name="b2s_og_default_desc" class="form-control" id="b2s_og_default_desc"></div>';
|
169 |
-
$content .='<div class="form-group"><label for="b2s_og_default_image"><strong>' . esc_html__("Image URL", "blog2social") . ':</strong></label>';
|
170 |
if (!$readonly) {
|
171 |
-
$content .='<button class="btn btn-link btn-xs b2s-upload-image pull-right" data-id="b2s_og_default_image">' . esc_html__("Image upload / Media Gallery", "blog2social") . '</button>';
|
172 |
}
|
173 |
-
$content .='<input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr((($this->generalOptions->_getOption('og_default_image') !== false && !empty($this->generalOptions->_getOption('og_default_image'))) ? esc_url($this->generalOptions->_getOption('og_default_image')) : '')) . '" name="b2s_og_default_image" class="form-control" id="b2s_og_default_image">';
|
174 |
-
$content .='<span>' . esc_html__('Please note: Facebook supports images with a minimum dimension of 200x200 pixels and an aspect ratio of 1:1.', 'blog2social') . '</span>';
|
175 |
-
|
176 |
-
$content .='<br><br>';
|
177 |
$content .= '<input type="checkbox" value="1" name="b2s_og_imagedata_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_og_imagedata_active" ' . (($this->generalOptions->_getOption('og_imagedata_active') == 1) ? 'checked="checked"' : '') . ' /><label for="b2s_og_imagedata_active"> ' . esc_html__('Add Open Graph Image Data.', 'blog2social', 'blog2social') . '</label>';
|
178 |
-
|
179 |
-
$content .='<br><br>';
|
180 |
$content .= '<input type="checkbox" value="1" name="b2s_og_objecttype_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_og_objecttype_active" ' . (($this->generalOptions->_getOption('og_objecttype_active') == 1) ? 'checked="checked"' : '') . ' /><label for="b2s_og_objecttype_active"> ' . esc_html__('Add Open Graph Object Type.', 'blog2social', 'blog2social') . '</label>';
|
181 |
-
|
182 |
-
$content .='<br><br>';
|
183 |
$content .= '<input type="checkbox" value="1" name="b2s_og_locale_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_og_locale_active" ' . (($this->generalOptions->_getOption('og_locale_active') == 1) ? 'checked="checked"' : '') . ' /><label for="b2s_og_locale_active"> ' . esc_html__('Add Open Graph Locale.', 'blog2social', 'blog2social') . '</label> ';
|
184 |
-
$content .=
|
185 |
require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
|
186 |
$languages = wp_get_available_translations();
|
187 |
$b2sOgLocale = $this->generalOptions->_getOption('og_locale');
|
188 |
-
if($b2sOgLocale == false || empty($b2sOgLocale)) {
|
189 |
$b2sOgLocale = get_locale();
|
190 |
}
|
191 |
$addBlogLocale = true;
|
192 |
foreach ($languages as $key => $value) {
|
193 |
-
if(get_locale() == $key) {
|
194 |
$addBlogLocale = false;
|
195 |
}
|
196 |
-
$content .= '<option value="'.esc_attr($key).'" ' . (($b2sOgLocale == $key) ? 'selected="selected"' : '') . '>'.esc_html($key).'</option>';
|
197 |
}
|
198 |
-
if($addBlogLocale) {
|
199 |
-
$content .= '<option value="'.esc_attr(get_locale()).'" ' . (($b2sOgLocale == get_locale()) ? 'selected="selected"' : '') . '>'.esc_html(get_locale()).'</option>';
|
200 |
}
|
201 |
$content .= '</select>';
|
202 |
-
|
203 |
-
$content .='</div>';
|
204 |
-
$content .='</div>';
|
205 |
-
$content .='<div class="clearfix"></div>';
|
206 |
-
$content .='<br>';
|
207 |
-
$content .='<div><b>Twitter Card</b></div>';
|
208 |
-
$content .='<p>' . esc_html__('Add the default Twitter Card parameters for title, description and image you want Twitter to display, if you share the frontpage of your blog as link post (http://www.yourblog.com)', 'blog2social') . '</p>';
|
209 |
-
$content .='<br>';
|
210 |
-
$content .='<div class="col-md-8">';
|
211 |
-
$content .='<div class="form-group"><label for="b2s_card_default_card_type"><strong>' . esc_html__("The default card type to use", "blog2social") . ':</strong></label>';
|
212 |
-
$content .='<select class="form-control" name="b2s_card_default_type" ' . (($readonly) ? 'disabled="true"' : "") . '>';
|
213 |
-
$content .='<option ' . (($selectCardType === false || $selectCardType == 0 || B2S_PLUGIN_USER_VERSION < 1) ? 'selected"' : '') . ' value="0">' . esc_html__('Summary', 'blog2social') . '</option>';
|
214 |
-
$content .='<option ' . (($selectCardType !== false && $selectCardType == 1 && B2S_PLUGIN_USER_VERSION >= 1) ? 'selected' : '') . ' value="1">' . esc_html__('Summary with large image', 'blog2social') . ' ' . ((B2S_PLUGIN_USER_VERSION < 1) ? esc_html__('(SMART)', 'blog2social') : '') . '</option>';
|
215 |
-
$content .='</select></div>';
|
216 |
-
$content .='<div class="form-group"><label for="b2s_card_default_title"><strong>' . esc_html__("Title", "blog2social") . ':</strong></label><input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr(( ($this->generalOptions->_getOption('card_default_title') !== false && !empty($this->generalOptions->_getOption('card_default_title'))) ? stripslashes($this->generalOptions->_getOption('card_default_title')) : get_bloginfo('name'))) . '" name="b2s_card_default_title" class="form-control" id="b2s_card_default_title"></div>';
|
217 |
-
$content .='<div class="form-group"><label for="b2s_card_default_desc"><strong>' . esc_html__("Description", "blog2social") . ':</strong></label><input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr(( ($this->generalOptions->_getOption('card_default_desc') !== false && !empty($this->generalOptions->_getOption('card_default_desc'))) ? stripslashes($this->generalOptions->_getOption('card_default_desc')) : get_bloginfo('description'))) . '" name="b2s_card_default_desc" class="form-control" id="b2s_card_default_desc"></div>';
|
218 |
-
$content .='<div class="form-group"><label for="b2s_card_default_image"><strong>' . esc_html__("Image URL", "blog2social") . ':</strong></label> ';
|
219 |
if (!$readonly) {
|
220 |
-
$content .='<button class="btn btn-link btn-xs pull-right b2s-upload-image" data-id="b2s_card_default_image">' . esc_html__("Image upload / Media Gallery", "blog2social") . '</button>';
|
221 |
}
|
222 |
-
$content .='<input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr((($this->generalOptions->_getOption('card_default_image') !== false && !empty($this->generalOptions->_getOption('card_default_image'))) ? $this->generalOptions->_getOption('card_default_image') : '')) . '" name="b2s_card_default_image" class="form-control" id="b2s_card_default_image">';
|
223 |
-
$content .='<span>' . esc_html__('Please note: Twitter supports images with a minimum dimension of 144x144 pixels and a maximum dimension of 4096x4096 pixels and less than 5 BM. The image will be cropped to a square. Twitter supports JPG, PNG, WEBP and GIF formats.', 'blog2social') . '</span>';
|
224 |
-
$content .='</div>';
|
225 |
-
$content .='</div>';
|
226 |
-
$content .='</div>';
|
227 |
-
$content .='</div>';
|
228 |
-
$content .='</div>';
|
229 |
|
230 |
return $content;
|
231 |
}
|
@@ -237,16 +239,16 @@ class B2S_Settings_Item {
|
|
237 |
$networkName = unserialize(B2S_PLUGIN_NETWORK);
|
238 |
|
239 |
if (B2S_PLUGIN_USER_VERSION < 2) {
|
240 |
-
$content .='<div class="alert alert-default">';
|
241 |
$content .= '<b>' . esc_html__('Did you know?', 'blog2social') . '</b><br>';
|
242 |
$content .= esc_html__('With Premium Pro, you can change the custom post format photo post or link post for each individual social media post and channel (profile, page, group).', 'blog2social') . ' <a target="_blank" href="' . esc_url(B2S_Tools::getSupportLink('affiliate')) . '">' . esc_html__('Upgrade to Premium Pro now.', 'blog2social') . '</a>';
|
243 |
-
$content .='<hr></div>';
|
244 |
}
|
245 |
|
246 |
foreach (array(1, 2, 3, 12, 19, 17, 24) as $n => $networkId) { //FB,TW,LI,IN
|
247 |
$type = ($networkId == 1 || $networkId == 19 || $networkId == 17) ? array(0, 1, 2) : (($networkId == 3) ? array(0, 1) : (($networkId == 12) ? array(1) : array(0)));
|
248 |
foreach ($type as $t => $typeId) { //Profile,Page,Group
|
249 |
-
if($networkId == 17) {
|
250 |
$postFormat = 1;
|
251 |
} else {
|
252 |
if (!isset($optionPostFormat[$networkId][$typeId]['format'])) {
|
@@ -260,33 +262,33 @@ class B2S_Settings_Item {
|
|
260 |
$post_format_1 = empty($post_format_0) ? 'b2s-settings-checked' : ''; //PhotoPost
|
261 |
$postFormatType = ($networkId == 12) ? 'image' : 'post';
|
262 |
|
263 |
-
$content .='<div class="b2s-user-network-settings-post-format-area col-md-12" data-post-format-type="' . esc_attr($postFormatType) . '" data-network-type="' . esc_attr($typeId) . '" data-network-id="' . esc_attr($networkId) . '" data-network-title="' . esc_attr($networkName[$networkId]) . '" style="display:none;" >';
|
264 |
-
$content .='<div class="col-md-6 col-xs-12">';
|
265 |
$content .= '<b>1) ' . (($networkId == 12) ? esc_html__('Image with frame', 'blog2social') : esc_html__('Link Post', 'blog2social') . ' <span class="glyphicon glyphicon-link b2s-color-green"></span>' ) . '</b><br><br>';
|
266 |
$content .= '<label><input type="radio" name="b2s-user-network-settings-post-format-' . esc_attr($networkId) . '" class="b2s-user-network-settings-post-format ' . esc_attr($post_format_0) . '" data-post-wp-type="" data-post-format-type="' . esc_attr($postFormatType) . '" data-network-type="' . esc_attr($typeId) . '" data-network-id="' . esc_attr($networkId) . '" data-post-format="0" value="0"/><img class="img-responsive b2s-display-inline" src="' . esc_url(plugins_url('/assets/images/settings/b2s-post-format-' . $networkId . '-1-' . (($this->lang == 'de') ? $this->lang : 'en') . '.png', B2S_PLUGIN_FILE)) . '">';
|
267 |
-
$content .='</label>';
|
268 |
-
$content .='<br><br>';
|
269 |
-
if($networkId != 12) {
|
270 |
-
$content .= '<div class="alert alert-warning b2s-select-link-chang-image">'.esc_html__('The image will be changed', 'blog2social').'</div>';
|
271 |
}
|
272 |
if ($networkId == 12) {
|
273 |
$content .= esc_html__('Insert white frames to show the whole image in your timeline. All image information will be shown in your timeline.', 'blog2social');
|
274 |
} else {
|
275 |
$content .= esc_html__('The link post format displays posts title, link address and the first one or two sentences of the post. The networks scan this information from your META or OpenGraph. PLEASE NOTE: If you want your link posts to display the selected image from the Blog2Social preview editor, please make sure you have activated the Social Meta Tags for Facebook and Twitter in your Blog2Social settings. You find these settings in the tab "Social Meta Data". If you don\'t select a specific post image, some networks display the first image detected on your page. The image links to your blog post.', 'blog2social');
|
276 |
}
|
277 |
-
$content .='</div>';
|
278 |
-
$content .='<div class="col-md-6 col-xs-12">';
|
279 |
$content .= '<b>2) ' . (($networkId == 12) ? esc_html__('Image cut out', 'blog2social') : esc_html__('Image Post', 'blog2social') . ' <span class="glyphicon glyphicon-picture b2s-color-green"></span>' ) . '</b><br><br>';
|
280 |
$content .= '<label><input type="radio" name="b2s-user-network-settings-post-format-' . esc_attr($networkId) . '" class="b2s-user-network-settings-post-format ' . esc_attr($post_format_1) . '" data-post-wp-type="" data-post-format-type="' . esc_attr($postFormatType) . '" data-network-type="' . esc_attr($typeId) . '" data-network-id="' . esc_attr($networkId) . '" data-post-format="1" value="1" /><img class="img-responsive b2s-display-inline" src="' . esc_url(plugins_url('/assets/images/settings/b2s-post-format-' . $networkId . '-2-' . (($this->lang == 'de') ? $this->lang : 'en') . '.png', B2S_PLUGIN_FILE)) . '">';
|
281 |
-
$content .='</label>';
|
282 |
-
$content .='<br><br>';
|
283 |
if ($networkId == 12) {
|
284 |
$content .= esc_html__('The image preview will be cropped automatically to fit the default Instagram layout for your Instagram timeline. The image will be shown uncropped when opening the preview page for your Instagram post.', 'blog2social');
|
285 |
} else {
|
286 |
$content .= esc_html__('A photo or image post displays the selected image in the one-page preview of Blog2Social and your comment above the image. The image links to the image view on your image gallery in the respective network. Blog2Social adds the link to your post in your comment. The main benefit of photo posts is that your image is uploaded to your personal image albums or gallery. In Facebook, you can edit the albums name with a description of your choice.', 'blog2social');
|
287 |
}
|
288 |
-
$content .='</div>';
|
289 |
-
$content .='</div>';
|
290 |
}
|
291 |
}
|
292 |
return $content;
|
@@ -295,7 +297,7 @@ class B2S_Settings_Item {
|
|
295 |
//view=ship
|
296 |
public function setNetworkSettingsHtml() {
|
297 |
$defaultTemplate = false;
|
298 |
-
if(defined('B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT')) {
|
299 |
$defaultTemplate = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT);
|
300 |
}
|
301 |
$optionPostFormat = $this->options->_getOption('post_template');
|
@@ -305,7 +307,7 @@ class B2S_Settings_Item {
|
|
305 |
$type = ($networkId == 1 || $networkId == 19 || $networkId == 17) ? array(0, 1, 2) : (($networkId == 3 || $networkId == 12) ? array(0, 1) : array(0));
|
306 |
foreach ($type as $t => $typeId) { //Profile,Page,Group
|
307 |
if (!isset($optionPostFormat[$networkId][$typeId]['format']) || (int) $optionPostFormat[$networkId][$typeId]['format'] < 0 || (int) $optionPostFormat[$networkId][$typeId]['format'] > 1) { //DEFAULT
|
308 |
-
if(is_array($defaultTemplate) && isset($defaultTemplate[$networkId][$typeId]['format']) && $defaultTemplate[$networkId][$typeId]['format'] >= 0 && $defaultTemplate[$networkId][$typeId]['format'] <= 1) {
|
309 |
$value = $defaultTemplate[$networkId][$typeId]['format'];
|
310 |
} else {
|
311 |
$value = ($networkId == 2) ? 1 : 0; //default see B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT
|
40 |
|
41 |
$optionUserTimeZone = $this->options->_getOption('user_time_zone');
|
42 |
$optionUserTimeFormat = $this->options->_getOption('user_time_format');
|
43 |
+
if ($optionUserTimeFormat === false) {
|
44 |
$optionUserTimeFormat = (strtolower(substr(get_locale(), 0, 2)) == 'de') ? 0 : 1;
|
45 |
}
|
46 |
$legacyMode = $this->generalOptions->_getOption('legacy_mode');
|
49 |
$userTimeZoneOffset = (empty($userTimeZone)) ? get_option('gmt_offset') : B2S_Util::getOffsetToUtcByTimeZone($userTimeZone);
|
50 |
$userInfoName = get_the_author_meta('display_name', B2S_PLUGIN_BLOG_USER_ID);
|
51 |
$isCheckedShortener = (isset($this->settings->shortener_state) && (int) $this->settings->shortener_state > 0) ? ((int) $this->settings->shortener_state - 1) : -1;
|
52 |
+
|
53 |
$content = '';
|
54 |
+
$content .= '<h4>' . esc_html__('Account', 'blog2social') . '</h4>';
|
55 |
+
$content .= '<div class="form-inline">';
|
56 |
+
$content .= '<div class="col-xs-12 del-padding-left">';
|
57 |
+
$content .= '<label class="b2s-user-time-zone-label" for="b2s-user-time-zone">' . esc_html__('Personal Time Zone', 'blog2social') . '</label>';
|
58 |
+
$content .= ' <select id="b2s-user-time-zone" class="form-control b2s-select" name="b2s-user-time-zone">';
|
59 |
$content .= B2S_Util::createTimezoneList($userTimeZone);
|
60 |
$content .= '</select>';
|
61 |
$content .= ' <a href="#" class="b2s-info-btn hidden-xs b2sInfoTimeZoneModalBtn">' . esc_html__('Info', 'Blog2Social') . '</a>';
|
62 |
+
$content .= '</div>';
|
63 |
+
$content .= '<br><div class="b2s-settings-time-zone-info">' . esc_html__('Timezone for Scheduling', 'blog2social') . ' (' . esc_html__('User', 'blog2social') . ': ' . esc_html((!empty($userInfoName) ? $userInfoName : '-')) . ') <code id="b2s-user-time">' . esc_html(B2S_Util::getLocalDate($userTimeZoneOffset, substr(B2S_LANGUAGE, 0, 2))) . '</code></span></div>';
|
64 |
+
$content .= '</div>';
|
65 |
+
|
66 |
+
$content .= '<h4 style="display: inline-block;">' . esc_html__('Set time format', 'blog2social') . '</h4> <a style="display: inline-block;" href="#" class="b2s-info-btn hidden-xs b2sInfoTimeZoneModalBtn">' . esc_html__('Info', 'Blog2Social') . '</a>';
|
67 |
+
$content .= '<div class="form-inline">';
|
68 |
+
$content .= '<div class="col-xs-12 del-padding-left">';
|
69 |
+
$content .= '<p>' . esc_html__('Set the time format you like to use for your posts.', 'blog2social') . '</p>';
|
70 |
+
$content .= '<input data-size="mini" data-toggle="toggle" data-width="90" data-height="22" data-onstyle="primary" data-on="12h (am/pm)" data-off="24h" ' . (($optionUserTimeFormat == 1) ? 'checked' : '') . ' name="b2s-time-format" class="b2s-time-format-toggle" data-area-type="manuell" value="1" type="checkbox">';
|
71 |
+
$content .= '</div>';
|
72 |
+
$content .= '</div>';
|
73 |
+
|
74 |
+
$content .= '<div class="clearfix"></div>';
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
$content .= '<br>';
|
76 |
+
$content .= '<hr>';
|
77 |
+
$content .= '<h4>' . esc_html__('Content', 'blog2social') . '</h4>';
|
78 |
+
$content .= '<strong>' . esc_html__('Url Shortener', 'blog2social') . '</strong><br>';
|
79 |
+
$content .= '<div class="alert alert-warning">' . sprintf(__('You can use Bit.ly, Rebrandly or Sniply links to shorten the URL of your links and to track the performance of your links in your social networks. Activate one of the URL shorteners you like to use and link it to your account. Your social media posts will then be shared with your links of Bit.ly, Rebrandly or Sniply. You can then monitor the success of your posts in these accounts. Please note: Some networks do not allow shortlinks. Blog2Social will apply the regular URL for these social platforms. You find more information on the support of URL shortener by the different social platforms in the <a href="%s" target="_blank">link shortener guide</a>.', 'blog2social'), esc_url(B2S_Tools::getSupportLink('url_shortener_faq'))) . '</div>';
|
80 |
+
$content .= '<input type="radio" value="0" class="b2s-user-network-settings-short-url" id="b2s-user-network-settings-short-url-0" name="b2s-user-network-settings-short-url" ' . (($isCheckedShortener == -1) ? 'checked="checked"' : '') . ' data-provider-id="-1"/><label for="b2s-user-network-settings-short-url-0"> ' . esc_html__('no URL Shortener', 'blog2social') . '</label>';
|
81 |
+
$content .= '<br>';
|
82 |
+
$content .= '<input type="hidden" id="brandName" value="' . esc_html__('Brand', 'blog2social') . '">';
|
83 |
+
$content .= '<input type="hidden" id="campaignName" value="' . esc_html__('Call-to-Action', 'blog2social') . '">';
|
84 |
foreach (unserialize(B2S_PLUGIN_SHORTENER) as $id => $name) {
|
85 |
$display_name = '';
|
86 |
+
if (isset($this->settings->shortener_data) && is_array($this->settings->shortener_data) && !empty($this->settings->shortener_data)) {
|
87 |
foreach ($this->settings->shortener_data as $shortenerObject) {
|
88 |
+
if (isset($shortenerObject->provider_id) && $shortenerObject->provider_id == $id && isset($shortenerObject->display_name)) {
|
89 |
$display_name = esc_html__('Account', 'blog2social') . ': ' . $shortenerObject->display_name;
|
90 |
+
if ($shortenerObject->provider_id == 2) { //Sniply
|
91 |
$display_name_parts = explode('#SNIP#', $shortenerObject->display_name);
|
92 |
+
if (isset($display_name_parts[0]) && isset($display_name_parts[1])) {
|
93 |
$display_name = esc_html__('Brand', 'blog2social') . ': ' . esc_html($display_name_parts[0]) . ' | ' . esc_html__('Call-to-Action', 'blog2social') . ': ' . esc_html($display_name_parts[1]);
|
94 |
}
|
95 |
}
|
96 |
}
|
97 |
}
|
98 |
}
|
99 |
+
$content .= '<input type="radio" value="' . esc_attr(($id + 1)) . '" class="b2s-user-network-settings-short-url" id="b2s-user-network-settings-short-url-' . esc_attr(($id + 1)) . '" name="b2s-user-network-settings-short-url" ' . (($isCheckedShortener == $id) ? 'checked="checked"' : '') . ' data-provider-id="' . esc_attr($id) . '" /><label for="b2s-user-network-settings-short-url-' . esc_attr(($id + 1)) . '"> <img class="b2s-shortener-image" alt="' . esc_attr($name) . '" src="' . esc_url(plugins_url('/assets/images/settings/' . strtolower($name) . '.png', B2S_PLUGIN_FILE)) . '"> ' . esc_html($name) . '</label>';
|
100 |
+
$content .= '<span class="b2s-user-network-shortener-account-area" data-provider-id="' . esc_attr($id) . '">';
|
101 |
+
$content .= '<input type="hidden" class="b2s-user-network-shortener-state" data-provider-id="' . esc_attr($id) . '" value="' . ((!empty($display_name)) ? 1 : 0) . '"/>';
|
102 |
+
$content .= '<span class="b2s-user-network-shortener-connect" data-provider-id="' . esc_attr($id) . '" style="display:' . ((empty($display_name)) ? 'inline-block' : 'none') . ';" ><a href="#" class="b2s-shortener-account-connect-btn" data-provider-id="' . esc_attr($id) . '" onclick="wopShortener(\'' . esc_url($this->authUrl) . '&provider_id=' . esc_attr($id) . '\', \'Blog2Social Network\'); return false;"> ' . esc_html__('authorize', 'blog2social') . '</a> </span>';
|
103 |
+
$content .= ' <span class="b2s-user-network-shortener-account-detail" data-provider-id="' . esc_attr($id) . '" style="display:' . ((!empty($display_name)) ? 'inline-block' : 'none') . ';">(<span class="b2s-shortener-account-display-name" data-provider-id="' . esc_attr($id) . '">' . (!empty($display_name) ? esc_html($display_name) : '') . '</span> <a href="#" class="b2s-shortener-account-change-btn" data-provider-id="' . $id . '" onclick="wopShortener(\'' . esc_url($this->authUrl) . '&provider_id=' . esc_attr($id) . '\', \'Blog2Social Network\'); return false;">' . esc_html__('change', 'blog2social') . '</a> | <a href="#" class="b2s-shortener-account-delete-btn" data-provider-id="' . esc_attr($id) . '">' . esc_html__('delete', 'blog2social') . '</a>)</span>';
|
104 |
+
$content .= '</span>';
|
105 |
$content .= '<br>';
|
106 |
}
|
107 |
+
|
108 |
$content .= '<br>';
|
109 |
$content .= '<strong>' . esc_html__('Shortcodes', 'blog2social') . '</strong> <a href="#" class="b2s-info-btn del-padding-left b2sInfoAllowShortcodeModalBtn">' . esc_html__('Info', 'Blog2Social') . '</a> <br>';
|
110 |
$content .= '<input type="checkbox" value="' . esc_attr($isCheckedAllowShortcode) . '" id="b2s-user-network-settings-allow-shortcode" ' . (($isCheckedAllowShortcode == 1) ? 'checked="checked"' : '') . ' /> ' . esc_html__('allow shortcodes in my post', 'blog2social');
|
111 |
+
|
112 |
+
if (current_user_can('administrator')) {
|
113 |
+
$content .= '<br>';
|
114 |
+
$content .= '<br>';
|
115 |
+
$content .= '<hr>';
|
116 |
+
$content .= '<h4>' . esc_html__('System', 'blog2social') . '</h4>';
|
117 |
+
$content .= '<strong>' . esc_html__('This is a global system setting for your website / blog, which can be edited by users with admin rights only.', 'blog2social') . '</strong><br>';
|
118 |
+
$content .= '<input type="checkbox" value="' . (($isCheckedLegacyMode == 1) ? 0 : 1) . '" id="b2s-general-settings-legacy-mode" ' . (($isCheckedLegacyMode == 1) ? 'checked="checked"' : '') . ' /><label for="b2s-general-settings-legacy-mode"> ' . esc_html__('activate Legacy mode', 'blog2social') . ' <a href="#" class="b2s-info-btn del-padding-left b2sInfoLegacyModeBtn">' . esc_html__('Info', 'Blog2Social') . '</a></label>';
|
119 |
+
}
|
120 |
return $content;
|
121 |
}
|
122 |
|
136 |
if (B2S_PLUGIN_ADMIN) {
|
137 |
$content .= '<a href="#" class="pull-right btn btn-primary btn-xs b2sClearSocialMetaTags">' . esc_html__('Reset all page and post meta data', 'blog2social') . '</a>';
|
138 |
}
|
139 |
+
$content .= '<strong>' . esc_html__('This is a global feature for your blog, which can only be edited by users with admin rights.', 'blog2social') . '</strong>';
|
140 |
$content .= '<br>';
|
141 |
+
$content .= '<div class="' . ( (B2S_PLUGIN_ADMIN) ? "" : "b2s-disabled-div") . '">';
|
142 |
+
$content .= '<h4>' . esc_html__('Meta Tags Settings for Posts and Pages', 'blog2social') . '</h4>';
|
143 |
$content .= '<input type="checkbox" value="' . esc_attr($og_isChecked) . '" name="b2s_og_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_og_active" ' . (($og_isChecked == 0) ? 'checked="checked"' : '') . ' /><label for="b2s_og_active"> ' . esc_html__('Add Open Graph meta tags to your shared posts or pages, required by Facebook and other social networks to display your post or page image, title and description correctly.', 'blog2social', 'blog2social') . ' <a href="#" class="b2s-load-info-meta-tag-modal b2s-info-btn del-padding-left" data-meta-type="og" data-meta-origin="settings">' . esc_html__('Info', 'Blog2Social') . '</a></label>';
|
144 |
+
$content .= '<br>';
|
145 |
$content .= '<input type="checkbox" value="' . esc_attr($card_isChecked) . '" name="b2s_card_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_card_active" ' . (($card_isChecked == 0) ? 'checked="checked"' : '') . ' /><label for="b2s_card_active"> ' . esc_html__('Add Twitter Card meta tags to your shared posts or pages, required by Twitter to display your post or page image, title and description correctly.', 'blog2social', 'blog2social') . ' <a href="#" class="b2s-load-info-meta-tag-modal b2s-info-btn del-padding-left" data-meta-type="card" data-meta-origin="settings">' . esc_html__('Info', 'Blog2Social') . '</a></label>';
|
146 |
+
$content .= '<br>';
|
147 |
$content .= '<input type="checkbox" value="' . esc_attr($oembed_isChecked) . '" name="b2s_oembed_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_oembed_active" ' . (($oembed_isChecked == 0) ? 'checked="checked"' : '') . ' /><label for="b2s_oEmbed_active"> ' . esc_html__('Add oEmbed tags', 'blog2social', 'blog2social') . ' <a href="#" class="b2s-load-info-meta-tag-modal b2s-info-btn del-padding-left" data-meta-type="oEmbed" data-meta-origin="settings">' . esc_html__('Info', 'Blog2Social') . '</a></label>';
|
148 |
+
$content .= '</div>';
|
149 |
+
$content .= '<button class="btn btn-primary pull-right" type="submit" ' . (B2S_PLUGIN_ADMIN ? '' : 'disabled="true"') . '>' . esc_html__('save', 'blog2social') . '</button>';
|
150 |
+
$content .= '<div class="clearfix"></div><hr>';
|
151 |
|
152 |
+
$content .= '<strong>' . esc_html__('This is a global feature for your blog, which can only be edited by users with admin rights.', 'blog2social') . '</strong>';
|
153 |
+
$content .= '<div class="' . ( (B2S_PLUGIN_ADMIN) ? "" : "b2s-disabled-div") . '">';
|
154 |
+
$content .= '<h4>' . esc_html__('Frontpage Settings', 'blog2social');
|
|
|
155 |
if (B2S_PLUGIN_USER_VERSION >= 1) {
|
156 |
+
$content .= ' <a class="btn-link b2s-btn-link-txt" href="admin.php?page=blog2social-support#b2s-support-sharing-debugger">' . esc_html__("Check Settings with Sharing-Debugger", "blog2social") . '</a>';
|
157 |
} else {
|
158 |
if (B2S_PLUGIN_ADMIN) {
|
159 |
+
$content .= ' <span class="label label-success label-sm">' . esc_html__("SMART", "blog2social") . '</span>';
|
160 |
}
|
161 |
}
|
162 |
$readonly = (B2S_PLUGIN_USER_VERSION >= 1) ? false : true;
|
163 |
+
$content .= '</h4>';
|
164 |
+
$content .= '<div class="' . ( (B2S_PLUGIN_USER_VERSION >= 1) ? "" : "b2s-disabled-div") . '">';
|
165 |
+
$content .= '<div><b>Open Graph</b></div>';
|
166 |
$content .= '<p>' . esc_html__('Add the default Open Graph parameters for title, description and image you want Facebook to display, if you share the frontpage of your blog as link post (http://www.yourblog.com)', 'blog2social') . '</p>';
|
167 |
+
$content .= '<br>';
|
168 |
+
$content .= '<div class="col-md-8">';
|
169 |
+
$content .= '<div class="form-group"><label for="b2s_og_default_title"><strong>' . esc_html__("Title", "blog2social") . ':</strong></label><input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr(( ($this->generalOptions->_getOption('og_default_title') !== false && !empty($this->generalOptions->_getOption('og_default_title'))) ? esc_attr(stripslashes($this->generalOptions->_getOption('og_default_title'))) : get_bloginfo('name'))) . '" name="b2s_og_default_title" class="form-control" id="b2s_og_default_title"></div>';
|
170 |
+
$content .= '<div class="form-group"><label for="b2s_og_default_desc"><strong>' . esc_html__("Description", "blog2social") . ':</strong></label><input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr(( ($this->generalOptions->_getOption('og_default_desc') !== false && !empty($this->generalOptions->_getOption('og_default_desc'))) ? esc_attr(stripslashes($this->generalOptions->_getOption('og_default_desc'))) : get_bloginfo('description'))) . '" name="b2s_og_default_desc" class="form-control" id="b2s_og_default_desc"></div>';
|
171 |
+
$content .= '<div class="form-group"><label for="b2s_og_default_image"><strong>' . esc_html__("Image URL", "blog2social") . ':</strong></label>';
|
172 |
if (!$readonly) {
|
173 |
+
$content .= '<button class="btn btn-link btn-xs b2s-upload-image pull-right" data-id="b2s_og_default_image">' . esc_html__("Image upload / Media Gallery", "blog2social") . '</button>';
|
174 |
}
|
175 |
+
$content .= '<input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr((($this->generalOptions->_getOption('og_default_image') !== false && !empty($this->generalOptions->_getOption('og_default_image'))) ? esc_url($this->generalOptions->_getOption('og_default_image')) : '')) . '" name="b2s_og_default_image" class="form-control" id="b2s_og_default_image">';
|
176 |
+
$content .= '<span>' . esc_html__('Please note: Facebook supports images with a minimum dimension of 200x200 pixels and an aspect ratio of 1:1.', 'blog2social') . '</span>';
|
177 |
+
|
178 |
+
$content .= '<br><br>';
|
179 |
$content .= '<input type="checkbox" value="1" name="b2s_og_imagedata_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_og_imagedata_active" ' . (($this->generalOptions->_getOption('og_imagedata_active') == 1) ? 'checked="checked"' : '') . ' /><label for="b2s_og_imagedata_active"> ' . esc_html__('Add Open Graph Image Data.', 'blog2social', 'blog2social') . '</label>';
|
180 |
+
|
181 |
+
$content .= '<br><br>';
|
182 |
$content .= '<input type="checkbox" value="1" name="b2s_og_objecttype_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_og_objecttype_active" ' . (($this->generalOptions->_getOption('og_objecttype_active') == 1) ? 'checked="checked"' : '') . ' /><label for="b2s_og_objecttype_active"> ' . esc_html__('Add Open Graph Object Type.', 'blog2social', 'blog2social') . '</label>';
|
183 |
+
|
184 |
+
$content .= '<br><br>';
|
185 |
$content .= '<input type="checkbox" value="1" name="b2s_og_locale_active" ' . (($readonly) ? 'disabled="true"' : "") . ' id="b2s_og_locale_active" ' . (($this->generalOptions->_getOption('og_locale_active') == 1) ? 'checked="checked"' : '') . ' /><label for="b2s_og_locale_active"> ' . esc_html__('Add Open Graph Locale.', 'blog2social', 'blog2social') . '</label> ';
|
186 |
+
$content .= '<select class="b2s_og_locale" name="b2s_og_locale">';
|
187 |
require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
|
188 |
$languages = wp_get_available_translations();
|
189 |
$b2sOgLocale = $this->generalOptions->_getOption('og_locale');
|
190 |
+
if ($b2sOgLocale == false || empty($b2sOgLocale)) {
|
191 |
$b2sOgLocale = get_locale();
|
192 |
}
|
193 |
$addBlogLocale = true;
|
194 |
foreach ($languages as $key => $value) {
|
195 |
+
if (get_locale() == $key) {
|
196 |
$addBlogLocale = false;
|
197 |
}
|
198 |
+
$content .= '<option value="' . esc_attr($key) . '" ' . (($b2sOgLocale == $key) ? 'selected="selected"' : '') . '>' . esc_html($key) . '</option>';
|
199 |
}
|
200 |
+
if ($addBlogLocale) {
|
201 |
+
$content .= '<option value="' . esc_attr(get_locale()) . '" ' . (($b2sOgLocale == get_locale()) ? 'selected="selected"' : '') . '>' . esc_html(get_locale()) . '</option>';
|
202 |
}
|
203 |
$content .= '</select>';
|
204 |
+
|
205 |
+
$content .= '</div>';
|
206 |
+
$content .= '</div>';
|
207 |
+
$content .= '<div class="clearfix"></div>';
|
208 |
+
$content .= '<br>';
|
209 |
+
$content .= '<div><b>Twitter Card</b></div>';
|
210 |
+
$content .= '<p>' . esc_html__('Add the default Twitter Card parameters for title, description and image you want Twitter to display, if you share the frontpage of your blog as link post (http://www.yourblog.com)', 'blog2social') . '</p>';
|
211 |
+
$content .= '<br>';
|
212 |
+
$content .= '<div class="col-md-8">';
|
213 |
+
$content .= '<div class="form-group"><label for="b2s_card_default_card_type"><strong>' . esc_html__("The default card type to use", "blog2social") . ':</strong></label>';
|
214 |
+
$content .= '<select class="form-control" name="b2s_card_default_type" ' . (($readonly) ? 'disabled="true"' : "") . '>';
|
215 |
+
$content .= '<option ' . (($selectCardType === false || $selectCardType == 0 || B2S_PLUGIN_USER_VERSION < 1) ? 'selected"' : '') . ' value="0">' . esc_html__('Summary', 'blog2social') . '</option>';
|
216 |
+
$content .= '<option ' . (($selectCardType !== false && $selectCardType == 1 && B2S_PLUGIN_USER_VERSION >= 1) ? 'selected' : '') . ' value="1">' . esc_html__('Summary with large image', 'blog2social') . ' ' . ((B2S_PLUGIN_USER_VERSION < 1) ? esc_html__('(SMART)', 'blog2social') : '') . '</option>';
|
217 |
+
$content .= '</select></div>';
|
218 |
+
$content .= '<div class="form-group"><label for="b2s_card_default_title"><strong>' . esc_html__("Title", "blog2social") . ':</strong></label><input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr(( ($this->generalOptions->_getOption('card_default_title') !== false && !empty($this->generalOptions->_getOption('card_default_title'))) ? stripslashes($this->generalOptions->_getOption('card_default_title')) : get_bloginfo('name'))) . '" name="b2s_card_default_title" class="form-control" id="b2s_card_default_title"></div>';
|
219 |
+
$content .= '<div class="form-group"><label for="b2s_card_default_desc"><strong>' . esc_html__("Description", "blog2social") . ':</strong></label><input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr(( ($this->generalOptions->_getOption('card_default_desc') !== false && !empty($this->generalOptions->_getOption('card_default_desc'))) ? stripslashes($this->generalOptions->_getOption('card_default_desc')) : get_bloginfo('description'))) . '" name="b2s_card_default_desc" class="form-control" id="b2s_card_default_desc"></div>';
|
220 |
+
$content .= '<div class="form-group"><label for="b2s_card_default_image"><strong>' . esc_html__("Image URL", "blog2social") . ':</strong></label> ';
|
221 |
if (!$readonly) {
|
222 |
+
$content .= '<button class="btn btn-link btn-xs pull-right b2s-upload-image" data-id="b2s_card_default_image">' . esc_html__("Image upload / Media Gallery", "blog2social") . '</button>';
|
223 |
}
|
224 |
+
$content .= '<input type="text" ' . (($readonly) ? "readonly" : "") . ' value="' . esc_attr((($this->generalOptions->_getOption('card_default_image') !== false && !empty($this->generalOptions->_getOption('card_default_image'))) ? $this->generalOptions->_getOption('card_default_image') : '')) . '" name="b2s_card_default_image" class="form-control" id="b2s_card_default_image">';
|
225 |
+
$content .= '<span>' . esc_html__('Please note: Twitter supports images with a minimum dimension of 144x144 pixels and a maximum dimension of 4096x4096 pixels and less than 5 BM. The image will be cropped to a square. Twitter supports JPG, PNG, WEBP and GIF formats.', 'blog2social') . '</span>';
|
226 |
+
$content .= '</div>';
|
227 |
+
$content .= '</div>';
|
228 |
+
$content .= '</div>';
|
229 |
+
$content .= '</div>';
|
230 |
+
$content .= '</div>';
|
231 |
|
232 |
return $content;
|
233 |
}
|
239 |
$networkName = unserialize(B2S_PLUGIN_NETWORK);
|
240 |
|
241 |
if (B2S_PLUGIN_USER_VERSION < 2) {
|
242 |
+
$content .= '<div class="alert alert-default">';
|
243 |
$content .= '<b>' . esc_html__('Did you know?', 'blog2social') . '</b><br>';
|
244 |
$content .= esc_html__('With Premium Pro, you can change the custom post format photo post or link post for each individual social media post and channel (profile, page, group).', 'blog2social') . ' <a target="_blank" href="' . esc_url(B2S_Tools::getSupportLink('affiliate')) . '">' . esc_html__('Upgrade to Premium Pro now.', 'blog2social') . '</a>';
|
245 |
+
$content .= '<hr></div>';
|
246 |
}
|
247 |
|
248 |
foreach (array(1, 2, 3, 12, 19, 17, 24) as $n => $networkId) { //FB,TW,LI,IN
|
249 |
$type = ($networkId == 1 || $networkId == 19 || $networkId == 17) ? array(0, 1, 2) : (($networkId == 3) ? array(0, 1) : (($networkId == 12) ? array(1) : array(0)));
|
250 |
foreach ($type as $t => $typeId) { //Profile,Page,Group
|
251 |
+
if ($networkId == 17) {
|
252 |
$postFormat = 1;
|
253 |
} else {
|
254 |
if (!isset($optionPostFormat[$networkId][$typeId]['format'])) {
|
262 |
$post_format_1 = empty($post_format_0) ? 'b2s-settings-checked' : ''; //PhotoPost
|
263 |
$postFormatType = ($networkId == 12) ? 'image' : 'post';
|
264 |
|
265 |
+
$content .= '<div class="b2s-user-network-settings-post-format-area col-md-12" data-post-format-type="' . esc_attr($postFormatType) . '" data-network-type="' . esc_attr($typeId) . '" data-network-id="' . esc_attr($networkId) . '" data-network-title="' . esc_attr($networkName[$networkId]) . '" style="display:none;" >';
|
266 |
+
$content .= '<div class="col-md-6 col-xs-12">';
|
267 |
$content .= '<b>1) ' . (($networkId == 12) ? esc_html__('Image with frame', 'blog2social') : esc_html__('Link Post', 'blog2social') . ' <span class="glyphicon glyphicon-link b2s-color-green"></span>' ) . '</b><br><br>';
|
268 |
$content .= '<label><input type="radio" name="b2s-user-network-settings-post-format-' . esc_attr($networkId) . '" class="b2s-user-network-settings-post-format ' . esc_attr($post_format_0) . '" data-post-wp-type="" data-post-format-type="' . esc_attr($postFormatType) . '" data-network-type="' . esc_attr($typeId) . '" data-network-id="' . esc_attr($networkId) . '" data-post-format="0" value="0"/><img class="img-responsive b2s-display-inline" src="' . esc_url(plugins_url('/assets/images/settings/b2s-post-format-' . $networkId . '-1-' . (($this->lang == 'de') ? $this->lang : 'en') . '.png', B2S_PLUGIN_FILE)) . '">';
|
269 |
+
$content .= '</label>';
|
270 |
+
$content .= '<br><br>';
|
271 |
+
if ($networkId != 12) {
|
272 |
+
$content .= '<div class="alert alert-warning b2s-select-link-chang-image">' . esc_html__('The image will be changed', 'blog2social') . '</div>';
|
273 |
}
|
274 |
if ($networkId == 12) {
|
275 |
$content .= esc_html__('Insert white frames to show the whole image in your timeline. All image information will be shown in your timeline.', 'blog2social');
|
276 |
} else {
|
277 |
$content .= esc_html__('The link post format displays posts title, link address and the first one or two sentences of the post. The networks scan this information from your META or OpenGraph. PLEASE NOTE: If you want your link posts to display the selected image from the Blog2Social preview editor, please make sure you have activated the Social Meta Tags for Facebook and Twitter in your Blog2Social settings. You find these settings in the tab "Social Meta Data". If you don\'t select a specific post image, some networks display the first image detected on your page. The image links to your blog post.', 'blog2social');
|
278 |
}
|
279 |
+
$content .= '</div>';
|
280 |
+
$content .= '<div class="col-md-6 col-xs-12">';
|
281 |
$content .= '<b>2) ' . (($networkId == 12) ? esc_html__('Image cut out', 'blog2social') : esc_html__('Image Post', 'blog2social') . ' <span class="glyphicon glyphicon-picture b2s-color-green"></span>' ) . '</b><br><br>';
|
282 |
$content .= '<label><input type="radio" name="b2s-user-network-settings-post-format-' . esc_attr($networkId) . '" class="b2s-user-network-settings-post-format ' . esc_attr($post_format_1) . '" data-post-wp-type="" data-post-format-type="' . esc_attr($postFormatType) . '" data-network-type="' . esc_attr($typeId) . '" data-network-id="' . esc_attr($networkId) . '" data-post-format="1" value="1" /><img class="img-responsive b2s-display-inline" src="' . esc_url(plugins_url('/assets/images/settings/b2s-post-format-' . $networkId . '-2-' . (($this->lang == 'de') ? $this->lang : 'en') . '.png', B2S_PLUGIN_FILE)) . '">';
|
283 |
+
$content .= '</label>';
|
284 |
+
$content .= '<br><br>';
|
285 |
if ($networkId == 12) {
|
286 |
$content .= esc_html__('The image preview will be cropped automatically to fit the default Instagram layout for your Instagram timeline. The image will be shown uncropped when opening the preview page for your Instagram post.', 'blog2social');
|
287 |
} else {
|
288 |
$content .= esc_html__('A photo or image post displays the selected image in the one-page preview of Blog2Social and your comment above the image. The image links to the image view on your image gallery in the respective network. Blog2Social adds the link to your post in your comment. The main benefit of photo posts is that your image is uploaded to your personal image albums or gallery. In Facebook, you can edit the albums name with a description of your choice.', 'blog2social');
|
289 |
}
|
290 |
+
$content .= '</div>';
|
291 |
+
$content .= '</div>';
|
292 |
}
|
293 |
}
|
294 |
return $content;
|
297 |
//view=ship
|
298 |
public function setNetworkSettingsHtml() {
|
299 |
$defaultTemplate = false;
|
300 |
+
if (defined('B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT')) {
|
301 |
$defaultTemplate = unserialize(B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT);
|
302 |
}
|
303 |
$optionPostFormat = $this->options->_getOption('post_template');
|
307 |
$type = ($networkId == 1 || $networkId == 19 || $networkId == 17) ? array(0, 1, 2) : (($networkId == 3 || $networkId == 12) ? array(0, 1) : array(0));
|
308 |
foreach ($type as $t => $typeId) { //Profile,Page,Group
|
309 |
if (!isset($optionPostFormat[$networkId][$typeId]['format']) || (int) $optionPostFormat[$networkId][$typeId]['format'] < 0 || (int) $optionPostFormat[$networkId][$typeId]['format'] > 1) { //DEFAULT
|
310 |
+
if (is_array($defaultTemplate) && isset($defaultTemplate[$networkId][$typeId]['format']) && $defaultTemplate[$networkId][$typeId]['format'] >= 0 && $defaultTemplate[$networkId][$typeId]['format'] <= 1) {
|
311 |
$value = $defaultTemplate[$networkId][$typeId]['format'];
|
312 |
} else {
|
313 |
$value = ($networkId == 2) ? 1 : 0; //default see B2S_PLUGIN_NETWORK_SETTINGS_TEMPLATE_DEFAULT
|
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: 6.0
|
8 |
-
Stable tag: 6.9.
|
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.10 =
|
238 |
Additional Security Update
|
239 |
= 6.9.9 =
|
@@ -328,6 +330,8 @@ Usability Optimization, Rebrandly integration, url parameter settings
|
|
328 |
New Image Posts, Imgur, Animated Gifs and Emojis
|
329 |
|
330 |
== Upgrade Notice ==
|
|
|
|
|
331 |
= 6.9.10 =
|
332 |
Additional Security Update
|
333 |
= 6.9.9 =
|
5 |
Donate link: https://paypal.me/adenion
|
6 |
Requires at least: 4.7.0
|
7 |
Tested up to: 6.0
|
8 |
+
Stable tag: 6.9.11
|
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.11 =
|
238 |
+
Additional Security Update & Bugfix Instagram carousel post
|
239 |
= 6.9.10 =
|
240 |
Additional Security Update
|
241 |
= 6.9.9 =
|
330 |
New Image Posts, Imgur, Animated Gifs and Emojis
|
331 |
|
332 |
== Upgrade Notice ==
|
333 |
+
= 6.9.11 =
|
334 |
+
Additional Security Update & Bugfix Instagram carousel post
|
335 |
= 6.9.10 =
|
336 |
Additional Security Update
|
337 |
= 6.9.9 =
|
views/b2s/settings.php
CHANGED
@@ -5,7 +5,7 @@ require_once B2S_PLUGIN_DIR . 'includes/Options.php';
|
|
5 |
$settingsItem = new B2S_Settings_Item();
|
6 |
$options = new B2S_Options(B2S_PLUGIN_BLOG_USER_ID);
|
7 |
$optionUserTimeFormat = $options->_getOption('user_time_format');
|
8 |
-
if($optionUserTimeFormat == false) {
|
9 |
$optionUserTimeFormat = (substr(B2S_LANGUAGE, 0, 2) == 'de') ? 0 : 1;
|
10 |
}
|
11 |
?>
|
@@ -59,7 +59,8 @@ 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
|
|
|
63 |
'h4' => array(
|
64 |
'style' => array()
|
65 |
),
|
@@ -120,66 +121,78 @@ if($optionUserTimeFormat == false) {
|
|
120 |
'alt' => array(),
|
121 |
'src' => array(),
|
122 |
)
|
123 |
-
));
|
|
|
124 |
</div>
|
125 |
<div class="tab-pane" id="b2s-social-meta-data">
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
'
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
'
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
'
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
'
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
'
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
'
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
</div>
|
|
|
183 |
<div class="tab-pane" id="b2s-network">
|
184 |
<p><strong><?php esc_html_e("Connect Blog2Social with 16 different social media networks you like to share your WordPress blog posts and pages as well as imported posts and social media posts on. The following networks are available:", "blog2social") ?></strong></p>
|
185 |
<br>
|
@@ -235,10 +248,10 @@ if($optionUserTimeFormat == false) {
|
|
235 |
</div>
|
236 |
</div>
|
237 |
<input type="hidden" id="b2s_user_version" value="<?php echo esc_attr(B2S_PLUGIN_USER_VERSION); ?>" />
|
238 |
-
<?php
|
239 |
-
$noLegend = 1;
|
240 |
-
require_once (B2S_PLUGIN_DIR . 'views/b2s/html/footer.php');
|
241 |
-
?>
|
242 |
</div>
|
243 |
</div>
|
244 |
</div>
|
@@ -264,7 +277,7 @@ require_once (B2S_PLUGIN_DIR . 'views/b2s/html/footer.php');
|
|
264 |
<h4 class="modal-title"><?php esc_html_e('Allow shortcodes in my social media posts (e.g. Page Builder)', 'blog2social') ?></h4>
|
265 |
</div>
|
266 |
<div class="modal-body">
|
267 |
-
<?php echo sprintf(__('Some WordPress plugins use short codes, e.g. Page Builder plugins. When a shortcode is inserted in a WordPress post or WordPress page, WordPress calls the function that is included in the shortcode and performs the corresponding actions as soon as you publish your post on your Wordpress website. If you like Blog2Social to consider shortcodes when posting to social media and automatically insert the defined content in your social media post, activate this feature. You will find more information about the function of shortcodes and which plugins are supported by Blog2Social in the following <a href="%s" target="_blank">shortcode guide</a>.', 'blog2social'), esc_url(B2S_Tools::getSupportLink('allow_shortcodes'))); ?>
|
268 |
</div>
|
269 |
</div>
|
270 |
</div>
|
@@ -278,7 +291,7 @@ require_once (B2S_PLUGIN_DIR . 'views/b2s/html/footer.php');
|
|
278 |
<h4 class="modal-title"><?php esc_html_e('Activate Legacy mode ', 'blog2social') ?></h4>
|
279 |
</div>
|
280 |
<div class="modal-body">
|
281 |
-
<?php esc_html_e('Plugin contents are loaded one at a time to minimize server load.', 'blog2social') ?>
|
282 |
</div>
|
283 |
</div>
|
284 |
</div>
|
@@ -292,7 +305,7 @@ require_once (B2S_PLUGIN_DIR . 'views/b2s/html/footer.php');
|
|
292 |
<h4 class="modal-title"><?php esc_html_e('Instant Caching for Facebook Link Posts', 'blog2social') ?></h4>
|
293 |
</div>
|
294 |
<div class="modal-body">
|
295 |
-
<?php esc_html_e('Please enable this feature, if you are using varnish caching (HTTP accelerator to relieve your website). Blog2Social will add a "no-cache=1" parameter to the post URL of your Facebook link posts to ensure that Facebook always pulls the current meta data of your blog post.', 'blog2social') ?>
|
296 |
</div>
|
297 |
</div>
|
298 |
</div>
|
@@ -306,7 +319,7 @@ require_once (B2S_PLUGIN_DIR . 'views/b2s/html/footer.php');
|
|
306 |
<h4 class="modal-title"><?php esc_html_e('Personal Time Zone', 'blog2social') ?></h4>
|
307 |
</div>
|
308 |
<div class="modal-body">
|
309 |
-
<?php esc_html_e('Blog2Social applies the scheduled time settings based on the time zone defined in the general settings of your WordPress. You can select a user-specific time zone that deviates from the Wordpress system time zone for your social media scheduling. To do this, select the desired time zone 24h or 12h (am/pm), by simply clicking on the button.', 'blog2social') ?>
|
310 |
</div>
|
311 |
</div>
|
312 |
</div>
|
5 |
$settingsItem = new B2S_Settings_Item();
|
6 |
$options = new B2S_Options(B2S_PLUGIN_BLOG_USER_ID);
|
7 |
$optionUserTimeFormat = $options->_getOption('user_time_format');
|
8 |
+
if ($optionUserTimeFormat == false) {
|
9 |
$optionUserTimeFormat = (substr(B2S_LANGUAGE, 0, 2) == 'de') ? 0 : 1;
|
10 |
}
|
11 |
?>
|
59 |
<hr class="b2s-settings-line">
|
60 |
<div class="tab-content clearfix">
|
61 |
<div class="tab-pane active" id="b2s-general">
|
62 |
+
<?php
|
63 |
+
echo wp_kses($settingsItem->getGeneralSettingsHtml(), array(
|
64 |
'h4' => array(
|
65 |
'style' => array()
|
66 |
),
|
121 |
'alt' => array(),
|
122 |
'src' => array(),
|
123 |
)
|
124 |
+
));
|
125 |
+
?>
|
126 |
</div>
|
127 |
<div class="tab-pane" id="b2s-social-meta-data">
|
128 |
+
<?php if (current_user_can('administrator')) { ?>
|
129 |
+
<form class="b2sSaveSocialMetaTagsSettings" method="post" novalidate="novalidate">
|
130 |
+
<?php
|
131 |
+
echo wp_kses($settingsItem->getSocialMetaDataHtml(), array(
|
132 |
+
'strong' => array(),
|
133 |
+
'br' => array(),
|
134 |
+
'h4' => array(),
|
135 |
+
'b' => array(),
|
136 |
+
'p' => array(),
|
137 |
+
'div' => array(
|
138 |
+
'class' => array()
|
139 |
+
),
|
140 |
+
'span' => array(
|
141 |
+
'class' => array()
|
142 |
+
),
|
143 |
+
'a' => array(
|
144 |
+
'href' => array(),
|
145 |
+
'class' => array(),
|
146 |
+
'target' => array(),
|
147 |
+
'data-meta-type' => array(),
|
148 |
+
'data-meta-origin' => array(),
|
149 |
+
),
|
150 |
+
'input' => array(
|
151 |
+
'type' => array(),
|
152 |
+
'name' => array(),
|
153 |
+
'value' => array(),
|
154 |
+
'id' => array(),
|
155 |
+
'class' => array(),
|
156 |
+
'checked' => array(),
|
157 |
+
'readonly' => array(),
|
158 |
+
),
|
159 |
+
'label' => array(
|
160 |
+
'for' => array()
|
161 |
+
),
|
162 |
+
'button' => array(
|
163 |
+
'class' => array(),
|
164 |
+
'type' => array(),
|
165 |
+
'disabled' => array(),
|
166 |
+
'data-id' => array(),
|
167 |
+
),
|
168 |
+
'select' => array(
|
169 |
+
'class' => array(),
|
170 |
+
'name' => array(),
|
171 |
+
),
|
172 |
+
'option' => array(
|
173 |
+
'value' => array(),
|
174 |
+
'selected' => array(),
|
175 |
+
)
|
176 |
+
));
|
177 |
+
?>
|
178 |
+
<button class="btn btn-primary pull-right" type="submit" <?php
|
179 |
+
if (B2S_PLUGIN_ADMIN) {
|
180 |
+
echo '';
|
181 |
+
} else {
|
182 |
+
echo 'disabled="true"';
|
183 |
+
}
|
184 |
+
?>><?php esc_html_e('save', 'blog2social') ?></button>
|
185 |
+
<input type="hidden" name="is_admin" value="<?php echo ((B2S_PLUGIN_ADMIN) ? 1 : 0) ?>">
|
186 |
+
<input type="hidden" name="version" value="<?php echo esc_attr(B2S_PLUGIN_USER_VERSION) ?>">
|
187 |
+
<input type="hidden" name="action" value="b2s_save_social_meta_tags">
|
188 |
+
</form>
|
189 |
+
<?php } else { ?>
|
190 |
+
<div class="row width-100" id="b2s-settings-no-admin">
|
191 |
+
<div class="text-center b2s-text-bold"><?php esc_html_e("You need admin rights to use the Social Meta Data. Please contact your administrator.", "blog2social"); ?></div>
|
192 |
+
</div>
|
193 |
+
<?php } ?>
|
194 |
</div>
|
195 |
+
|
196 |
<div class="tab-pane" id="b2s-network">
|
197 |
<p><strong><?php esc_html_e("Connect Blog2Social with 16 different social media networks you like to share your WordPress blog posts and pages as well as imported posts and social media posts on. The following networks are available:", "blog2social") ?></strong></p>
|
198 |
<br>
|
248 |
</div>
|
249 |
</div>
|
250 |
<input type="hidden" id="b2s_user_version" value="<?php echo esc_attr(B2S_PLUGIN_USER_VERSION); ?>" />
|
251 |
+
<?php
|
252 |
+
$noLegend = 1;
|
253 |
+
require_once (B2S_PLUGIN_DIR . 'views/b2s/html/footer.php');
|
254 |
+
?>
|
255 |
</div>
|
256 |
</div>
|
257 |
</div>
|
277 |
<h4 class="modal-title"><?php esc_html_e('Allow shortcodes in my social media posts (e.g. Page Builder)', 'blog2social') ?></h4>
|
278 |
</div>
|
279 |
<div class="modal-body">
|
280 |
+
<?php echo sprintf(__('Some WordPress plugins use short codes, e.g. Page Builder plugins. When a shortcode is inserted in a WordPress post or WordPress page, WordPress calls the function that is included in the shortcode and performs the corresponding actions as soon as you publish your post on your Wordpress website. If you like Blog2Social to consider shortcodes when posting to social media and automatically insert the defined content in your social media post, activate this feature. You will find more information about the function of shortcodes and which plugins are supported by Blog2Social in the following <a href="%s" target="_blank">shortcode guide</a>.', 'blog2social'), esc_url(B2S_Tools::getSupportLink('allow_shortcodes'))); ?>
|
281 |
</div>
|
282 |
</div>
|
283 |
</div>
|
291 |
<h4 class="modal-title"><?php esc_html_e('Activate Legacy mode ', 'blog2social') ?></h4>
|
292 |
</div>
|
293 |
<div class="modal-body">
|
294 |
+
<?php esc_html_e('Plugin contents are loaded one at a time to minimize server load.', 'blog2social') ?>
|
295 |
</div>
|
296 |
</div>
|
297 |
</div>
|
305 |
<h4 class="modal-title"><?php esc_html_e('Instant Caching for Facebook Link Posts', 'blog2social') ?></h4>
|
306 |
</div>
|
307 |
<div class="modal-body">
|
308 |
+
<?php esc_html_e('Please enable this feature, if you are using varnish caching (HTTP accelerator to relieve your website). Blog2Social will add a "no-cache=1" parameter to the post URL of your Facebook link posts to ensure that Facebook always pulls the current meta data of your blog post.', 'blog2social') ?>
|
309 |
</div>
|
310 |
</div>
|
311 |
</div>
|
319 |
<h4 class="modal-title"><?php esc_html_e('Personal Time Zone', 'blog2social') ?></h4>
|
320 |
</div>
|
321 |
<div class="modal-body">
|
322 |
+
<?php esc_html_e('Blog2Social applies the scheduled time settings based on the time zone defined in the general settings of your WordPress. You can select a user-specific time zone that deviates from the Wordpress system time zone for your social media scheduling. To do this, select the desired time zone 24h or 12h (am/pm), by simply clicking on the button.', 'blog2social') ?>
|
323 |
</div>
|
324 |
</div>
|
325 |
</div>
|