PluginProbe
Social Media Auto Poster – Schedule & Publish to Buffer / 3.8.5
Social Media Auto Poster – Schedule & Publish to Buffer v3.8.5
6.2.3 6.2.2 6.2.1 6.2.0 6.1.2 6.1.1 6.1.0 6.0.9 6.0.8 6.0.7 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 6.0.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.8.6 3.8.7 3.8.8 All 124 releases
wp-to-buffer / lib / views / settings-auth.php

settings-auth.php in Social Media Auto Poster – Schedule & Publish to Buffer 3.8.5, at lib/views/settings-auth.php

448 lines 17.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Outputs the Settings screen when the Plugin is authenticated with
4 * the third party API service.
5 *
6 * @package WP_To_Social_Pro
7 * @author WP Zinc
8 */
9
10 ?>
11 <div class="postbox wpzinc-vertical-tabbed-ui">
12 <!-- Second level tabs -->
13 <ul class="wpzinc-nav-tabs wpzinc-js-tabs" data-panels-container="#settings-container" data-panel=".panel" data-active="wpzinc-nav-tab-vertical-active">
14 <li class="wpzinc-nav-tab lock">
15 <a href="#authentication" class="wpzinc-nav-tab-vertical-active" data-documentation="<?php echo esc_attr( $this->base->plugin->documentation_url ); ?>/authentication-settings/">
16 <?php esc_html_e( 'Authentication', 'wp-to-buffer' ); ?>
17 </a>
18 </li>
19 <li class="wpzinc-nav-tab default">
20 <a href="#general-settings" data-documentation="<?php echo esc_attr( $this->base->plugin->documentation_url ); ?>/general-settings/">
21 <?php esc_html_e( 'General Settings', 'wp-to-buffer' ); ?>
22 </a>
23 </li>
24 <li class="wpzinc-nav-tab image">
25 <a href="#image-settings" data-documentation="<?php echo esc_attr( $this->base->plugin->documentation_url ); ?>/text-to-image-settings/">
26 <?php esc_html_e( 'Text to Image', 'wp-to-buffer' ); ?>
27 </a>
28 </li>
29 <li class="wpzinc-nav-tab file-text">
30 <a href="#log-settings" data-documentation="<?php echo esc_attr( $this->base->plugin->documentation_url ); ?>/log-settings/">
31 <?php esc_html_e( 'Log Settings', 'wp-to-buffer' ); ?>
32 </a>
33 </li>
34 <li class="wpzinc-nav-tab arrow-right-circle">
35 <a href="#repost-settings" data-documentation="<?php echo esc_attr( $this->base->plugin->documentation_url ); ?>/repost-settings/">
36 <?php esc_html_e( 'Repost Settings', 'wp-to-buffer' ); ?>
37 </a>
38 </li>
39 <?php
40 // Only display if we've auth'd and have profiles.
41 if ( ! empty( $access_token ) ) {
42 ?>
43 <li class="wpzinc-nav-tab users">
44 <a href="#user-access" data-documentation="<?php echo esc_attr( $this->base->plugin->documentation_url ); ?>/user-access-settings/">
45 <?php esc_html_e( 'User Access', 'wp-to-buffer' ); ?>
46 </a>
47 </li>
48 <?php
49 }
50 ?>
51 <li class="wpzinc-nav-tab tag">
52 <a href="#custom-tags" data-documentation="<?php echo esc_attr( $this->base->plugin->documentation_url ); ?>/custom-tags-settings/">
53 <?php esc_html_e( 'Custom Tags', 'wp-to-buffer' ); ?>
54 </a>
55 </li>
56 </ul>
57
58 <!-- Content -->
59 <div id="settings-container" class="wpzinc-nav-tabs-content no-padding">
60 <!-- Authentication -->
61 <div id="authentication" class="panel">
62 <div class="postbox">
63 <header>
64 <h3><?php esc_html_e( 'Authentication', 'wp-to-buffer' ); ?></h3>
65
66 <p class="description">
67 <?php
68 echo esc_html(
69 sprintf(
70 /* translators: %1$s: Plugin Name, %2$s: Social Media Service Name (Buffer, Hootsuite, SocialPilot) */
71 __( 'Authentication allows %1$s to post to %2$s', 'wp-to-buffer' ),
72 $this->base->plugin->displayName,
73 $this->base->plugin->account
74 )
75 );
76 ?>
77 </p>
78 </header>
79
80 <div class="wpzinc-option">
81 <div class="full">
82 <?php
83 echo esc_html(
84 sprintf(
85 /* translators: Social Media Service Name (Buffer, Hootsuite, SocialPilot) */
86 __( 'Thanks - you\'ve authorized the plugin to post updates to your %s account.', 'wp-to-buffer' ),
87 $this->base->plugin->account
88 )
89 );
90 ?>
91 </div>
92 </div>
93 <div class="wpzinc-option">
94 <div class="full">
95 <a href="admin.php?page=<?php echo esc_attr( $this->base->plugin->name ); ?>-settings&amp;<?php echo esc_attr( $this->base->plugin->name ); ?>-disconnect=1" class="button wpzinc-button-red">
96 <?php esc_html_e( 'Deauthorize Plugin', 'wp-to-buffer' ); ?>
97 </a>
98 </div>
99 </div>
100 </div>
101 </div>
102
103 <!-- General Settings -->
104 <div id="general-settings" class="panel">
105 <div class="postbox">
106 <header>
107 <h3><?php esc_html_e( 'General Settings', 'wp-to-buffer' ); ?></h3>
108 <p class="description">
109 <?php esc_html_e( 'Provides options for logging, Post default level settings and whether to use WordPress Cron when publishing or updating Posts.', 'wp-to-buffer' ); ?>
110 </p>
111 </header>
112
113 <div class="wpzinc-option">
114 <div class="left">
115 <label for="test_mode"><?php esc_html_e( 'Enable Test Mode', 'wp-to-buffer' ); ?></label>
116 </div>
117 <div class="right">
118 <input type="checkbox" name="test_mode" id="test_mode" value="1" <?php checked( $this->get_setting( '', 'test_mode' ), 1 ); ?> />
119
120 <p class="description">
121 <?php
122 echo esc_html(
123 sprintf(
124 /* translators: Social Media Service Name (Buffer, Hootsuite, SocialPilot) */
125 __( 'If enabled, status(es) are not sent to %s, but will appear in the Log, if logging is enabled. This is useful to test status text, conditions etc.', 'wp-to-buffer' ),
126 $this->base->plugin->account
127 )
128 );
129 ?>
130 </p>
131 </div>
132 </div>
133
134 <div class="wpzinc-option">
135 <div class="left">
136 <label for="force_trailing_forwardslash"><?php esc_html_e( 'Force Trailing Forwardslash?', 'wp-to-buffer' ); ?></label>
137 </div>
138 <div class="right">
139 <input type="checkbox" name="force_trailing_forwardslash" id="force_trailing_forwardslash" value="1" <?php checked( $this->get_setting( '', 'force_trailing_forwardslash' ), 1 ); ?> />
140
141 <p class="description">
142 <?php
143 esc_html_e( 'If enabled, any URLs in statuses will always end with a forwardslash. This might be required if the wrong image is shared with a status.', 'wp-to-buffer' );
144 ?>
145 <br />
146 <?php
147 echo sprintf(
148 '%1$s <a href="options-permalink.php">%2$s</a> %3$s',
149 esc_html__( 'It\'s better to ensure your', 'wp-to-buffer' ),
150 esc_html__( 'Permalink', 'wp-to-buffer' ),
151 esc_html__( 'settings end with a forwardslash, but this option is a useful fallback if changing Permalink structure isn\'t possible.', 'wp-to-buffer' )
152 );
153 ?>
154 </p>
155 </div>
156 </div>
157
158 <div class="wpzinc-option">
159 <div class="left">
160 <label for="proxy"><?php esc_html_e( 'Use Proxy?', 'wp-to-buffer' ); ?></label>
161 </div>
162 <div class="right">
163 <input type="checkbox" name="proxy" id="proxy" value="1" <?php checked( $this->get_setting( '', 'proxy' ), 1 ); ?> />
164
165 <p class="description">
166 <?php
167 echo esc_html(
168 sprintf(
169 /* translators: %1$s: Social Media Service Name (Buffer, Hootsuite, SocialPilot), %2$s: Social Media Service Name (Buffer, Hootsuite, SocialPilot) */
170 __( 'If enabled, statuses sent to %1$s are performed through our proxy. This is useful if your ISP or host\'s country prevents access to %1$s.', 'wp-to-buffer' ),
171 $this->base->plugin->account,
172 $this->base->plugin->account
173 )
174 );
175 ?>
176 <br />
177 <?php esc_html_e( 'You may still need to use a VPN for initial Authentication when setting up the Plugin for the first time.', 'wp-to-buffer' ); ?>
178 </p>
179 </div>
180 </div>
181 </div>
182 </div>
183
184 <!-- Image Settings -->
185 <div id="image-settings" class="panel">
186 <div class="postbox">
187 <header>
188 <h3><?php esc_html_e( 'Text to Image Settings', 'wp-to-buffer' ); ?></h3>
189 <p class="description">
190 <?php
191 esc_html_e(
192 'Provides options for automatically generating images from text, when a Status\' image option is set to Use Text to Image
193 and a status has Text to Image defined.',
194 'wp-to-buffer'
195 );
196 ?>
197 </p>
198 </header>
199
200 <div class="wpzinc-option highlight">
201 <div class="full">
202 <h4>
203 <?php
204 esc_html_e( 'Need to automatically generate images?', 'wp-to-buffer' );
205 ?>
206 </h4>
207
208 <p>
209 <?php
210 echo sprintf(
211 /* translators: Service name (Buffer, Hootsuite, SocialPilot) */
212 esc_html__( '%s Pro provides options to generate images based on text, which are them submitted with your status message.', 'wp-to-buffer' ),
213 esc_html( $this->base->plugin->displayName )
214 );
215 ?>
216 </p>
217
218 <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_inline_upgrade' ) ); ?>" class="button button-primary" target="_blank"><?php esc_html_e( 'Upgrade', 'wp-to-buffer' ); ?></a>
219 </div>
220 </div>
221 </div>
222 </div>
223
224 <!-- Log Settings -->
225 <div id="log-settings" class="panel">
226 <div class="postbox">
227 <header>
228 <h3><?php esc_html_e( 'Log Settings', 'wp-to-buffer' ); ?></h3>
229 <p class="description">
230 <?php esc_html_e( 'Provides options to enable logging, display logs on Posts and how long to keep logs for.', 'wp-to-buffer' ); ?>
231 </p>
232 </header>
233
234 <div class="wpzinc-option">
235 <div class="left">
236 <label for="log_enabled"><?php esc_html_e( 'Enable Logging?', 'wp-to-buffer' ); ?></label>
237 </div>
238 <div class="right">
239 <input type="checkbox" name="log[enabled]" id="log_enabled" value="1" <?php checked( $this->get_setting( 'log', '[enabled]' ), 1 ); ?> data-conditional="enable_logging" />
240 <p class="description">
241 <?php
242 if ( $this->get_setting( 'log', '[enabled]' ) ) {
243 echo sprintf(
244 '%1$s <a href="%2$s">%3$s</a> %4$s',
245 esc_html__( 'If enabled, the', 'wp-to-buffer' ),
246 esc_html( admin_url( 'admin.php?page=' . $this->base->plugin->name . '-log' ) ),
247 esc_html__( 'Plugin Logs', 'wp-to-buffer' ),
248 esc_html(
249 sprintf(
250 /* translators: Social Media Service Name (Buffer, Hootsuite, SocialPilot) */
251 __( 'will detail status(es) sent to %s, including any errors or reasons why no status(es) were sent.', 'wp-to-buffer' ),
252 $this->base->plugin->account
253 )
254 )
255 );
256 } else {
257 // Don't link "Plugin Log" text, as Logs are disabled so it won't show anything.
258 echo esc_html(
259 sprintf(
260 /* translators: %1$s: Social Media Service Name (Buffer, Hootsuite, SocialPilot) */
261 __( 'If enabled, the Plugin Logs will detail status(es) sent to %1$s, including any errors or reasons why no status(es) were sent.', 'wp-to-buffer' ),
262 $this->base->plugin->account
263 )
264 );
265 }
266 ?>
267 </p>
268 </div>
269 </div>
270
271 <div id="enable_logging">
272 <div class="wpzinc-option">
273 <div class="left">
274 <label for="log_display_on_posts"><?php esc_html_e( 'Display on Posts?', 'wp-to-buffer' ); ?></label>
275 </div>
276 <div class="right">
277 <input type="checkbox" name="log[display_on_posts]" id="log_display_on_posts" value="1" <?php checked( $this->get_setting( 'log', '[display_on_posts]' ), 1 ); ?> />
278
279 <p class="description">
280 <?php
281 if ( $this->get_setting( 'log', '[enabled]' ) ) {
282 echo sprintf(
283 '%1$s <a href="%2$s">%3$s</a> %4$s',
284 esc_html__( 'If enabled, a Log will be displayed when editing a Post. Logs are always available through the', 'wp-to-buffer' ),
285 esc_html( admin_url( 'admin.php?page=' . $this->base->plugin->name . '-log' ) ),
286 esc_html__( 'Plugin Logs', 'wp-to-buffer' ),
287 esc_html__( 'screen', 'wp-to-buffer' )
288 );
289 } else {
290 // Don't link "Plugin Log" text, as Logs are disabled so it won't show anything.
291 esc_html_e( 'If enabled, a Log will be displayed when editing a Post. Logs are always available through the Plugin Logs screen.', 'wp-to-buffer' );
292 }
293 ?>
294 </p>
295 </div>
296 </div>
297
298 <div class="wpzinc-option">
299 <div class="left">
300 <label for="log_level"><?php esc_html_e( 'Log Level', 'wp-to-buffer' ); ?></label>
301 </div>
302 <div class="right">
303 <?php
304 $log_levels_settings = $this->get_setting( 'log', 'log_level' );
305
306 foreach ( $log_levels as $log_level => $label ) {
307 ?>
308 <label for="log_level_<?php echo esc_attr( $log_level ); ?>">
309 <input type="checkbox"
310 name="log[log_level][]"
311 id="log_level_<?php echo esc_attr( $log_level ); ?>"
312 value="<?php echo esc_attr( $log_level ); ?>"
313 <?php echo ( in_array( $log_level, $log_levels_settings, true ) || $log_level === 'error' ? ' checked' : '' ); ?>
314 <?php echo ( ( $log_level === 'error' ) ? ' disabled' : '' ); ?>
315 />
316
317 <?php echo esc_html( $label ); ?>
318 </label>
319 <br />
320 <?php
321 }
322 ?>
323
324 <p class="description">
325 <?php esc_html_e( 'Defines which log results to save to the Log database. Errors will always be logged.', 'wp-to-buffer' ); ?>
326 </p>
327 </div>
328 </div>
329
330 <div class="wpzinc-option">
331 <div class="left">
332 <label for="log_preserve_days"><?php esc_html_e( 'Preserve Logs', 'wp-to-buffer' ); ?></strong>
333 </div>
334 <div class="right">
335 <input type="number" name="log[preserve_days]" id="log_preserve_days" value="<?php echo esc_attr( $this->get_setting( 'log', '[preserve_days]' ) ); ?>" min="0" max="9999" step="1" />
336 <?php esc_html_e( 'days', 'wp-to-buffer' ); ?>
337
338 <p class="description">
339 <?php
340 esc_html_e( 'The number of days to preserve logs for. Zero means logs are kept indefinitely.', 'wp-to-buffer' );
341 ?>
342 </p>
343 </div>
344 </div>
345 </div>
346 </div>
347 </div>
348
349 <!-- Repost Settings -->
350 <div id="repost-settings" class="panel">
351 <div class="postbox">
352 <header>
353 <h3><?php esc_html_e( 'Repost Settings', 'wp-to-buffer' ); ?></h3>
354 <p class="description">
355 <?php esc_html_e( 'Provides options for when to run the WordPress Repost Cron Event on this WordPress installation.', 'wp-to-buffer' ); ?><br />
356 <?php
357 echo sprintf(
358 /* translators: Service (Buffer, Hootsuite, SocialPilot) */
359 esc_html__( 'When Post(s) are scheduled on %s will depend on the Repost Status Settings.', 'wp-to-buffer' ),
360 esc_html( $this->base->plugin->displayName )
361 );
362 ?>
363 </p>
364 </header>
365
366 <div class="wpzinc-option highlight">
367 <div class="full">
368 <h4><?php esc_html_e( 'Revive Old Posts with Repost', 'wp-to-buffer' ); ?></h4>
369
370 <p>
371 <?php
372 echo sprintf(
373 /* translators: %1$s: Service (Buffer, Hootsuite, SocialPilot), %2$s: Service (Buffer, Hootsuite, SocialPilot) */
374 esc_html__( 'Automatically schedule old Posts to %1$s with %2$s Pro.', 'wp-to-buffer' ),
375 esc_html( $this->base->plugin->displayName ),
376 esc_html( $this->base->plugin->displayName )
377 );
378 ?>
379 </p>
380
381 <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_inline_upgrade' ) ); ?>" class="button button-primary" target="_blank"><?php esc_html_e( 'Upgrade', 'wp-to-buffer' ); ?></a>
382 </div>
383 </div>
384 </div>
385 </div>
386
387 <!-- User Access -->
388 <div id="user-access" class="panel">
389 <div class="postbox">
390 <header>
391 <h3><?php esc_html_e( 'User Access', 'wp-to-buffer' ); ?></h3>
392 <p class="description">
393 <?php esc_html_e( 'Optionally define which of your Post Types and connected social media account(s) should be available for configuration based on various WordPress User Roles.', 'wp-to-buffer' ); ?>
394 </p>
395 </header>
396
397 <div class="wpzinc-option highlight">
398 <div class="full">
399 <h4><?php esc_html_e( 'Limit Post Types and Social Profiles by WordPress User Role', 'wp-to-buffer' ); ?></h4>
400
401 <p>
402 <?php
403 echo sprintf(
404 /* translators: %1$s: Service (Buffer, Hootsuite, SocialPilot) */
405 esc_html__( '%s Pro provides options to limit which Post Types to show in the Settings screens, as well as prevent access to specific social media profiles linked to your Buffer account, on a per-WordPress Role basis.', 'wp-to-buffer' ),
406 esc_html( $this->base->plugin->displayName )
407 );
408 ?>
409 </p>
410
411 <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_inline_upgrade' ) ); ?>" class="button button-primary" target="_blank"><?php esc_html_e( 'Upgrade', 'wp-to-buffer' ); ?></a>
412 </div>
413 </div>
414 </div>
415 </div>
416
417 <!-- Custom Tags -->
418 <div id="custom-tags" class="panel">
419 <div class="postbox">
420 <header>
421 <h3><?php esc_html_e( 'Custom Tags', 'wp-to-buffer' ); ?></h3>
422 <p class="description">
423 <?php esc_html_e( 'If your site uses Custom Fields, ACF or similar, you can specify additional tags to be added to the "Insert Tag" dropdown for each of your Post Types. These can then be used by Users, instead of having to remember the template tag text to use.', 'wp-to-buffer' ); ?>
424 </p>
425 </header>
426
427 <div class="wpzinc-option highlight">
428 <div class="full">
429 <h4><?php esc_html_e( 'Need to define your own Tags to use in status messages?', 'wp-to-buffer' ); ?></h4>
430
431 <p>
432 <?php
433 echo sprintf(
434 /* translators: %1$s: Service (Buffer, Hootsuite, SocialPilot) */
435 esc_html__( '%s Pro provides options to define Custom Field / ACF Tags, which will then populate with Post data when used in status messages. Tags also appear in the Insert Tags dropdown.', 'wp-to-buffer' ),
436 esc_html( $this->base->plugin->displayName )
437 );
438 ?>
439 </p>
440
441 <a href="<?php echo esc_url( $this->base->dashboard->get_upgrade_url( 'settings_inline_upgrade' ) ); ?>" class="button button-primary" target="_blank"><?php esc_html_e( 'Upgrade', 'wp-to-buffer' ); ?></a>
442 </div>
443 </div>
444 </div>
445 </div>
446 </div>
447 </div>
448