PluginProbe
Social Media Auto Poster – Schedule & Publish to Buffer / 6.1.1
Social Media Auto Poster – Schedule & Publish to Buffer v6.1.1
6.2.4 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 All 125 releases
wp-to-buffer / lib / views / settings-post-actionheader.php

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

103 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Outputs status settings when editing a Post.
4 *
5 * @package WP_To_Social_Pro
6 * @author WP Zinc
7 */
8
9 if ( ! defined( 'ABSPATH' ) ) {
10 exit; // Exit if accessed directly.
11 }
12 ?>
13 <!-- Action Header -->
14 <div class="postbox">
15 <header>
16 <h3>
17 <?php
18 echo esc_html(
19 sprintf(
20 /* translators: %1$s: Social Media Service (Facebook, Twitter etc.), %2$s: Social Media Profile Name */
21 __( '%1$s: %2$s: Settings', 'wp-to-buffer' ),
22 $profile['formatted_service'],
23 $profile['formatted_username']
24 )
25 );
26 ?>
27 </h3>
28
29 <?php
30 // If this Profile's timezone doesn't match WordPress' timezone, show a warning.
31 if ( isset( $profile['timezone'] ) ) {
32 $timezones_match = $this->base->get_class( 'validation' )->timezones_match(
33 $profile['timezone'],
34 $profile['formatted_username'],
35 $this->base->get_class( 'api' )->get_timezone_settings_url( $profile['id'] )
36 );
37 if ( is_wp_error( $timezones_match ) ) {
38 ?>
39 <div class="notice-inline notice-warning">
40 <p>
41 <?php
42 echo wp_kses(
43 $timezones_match->get_error_message(),
44 array(
45 'a' => array(
46 'href' => array(),
47 'target' => array(),
48 ),
49 'br' => array(),
50 )
51 );
52 ?>
53 </p>
54 </div>
55 <?php
56 }
57 }
58 ?>
59 </header>
60
61 <?php
62 if ( ( class_exists( 'WP_To_Buffer' ) || class_exists( 'WP_To_Hootsuite' ) ) &&
63 ( $profile['service'] === 'instagram' || $profile['service'] === 'pinterest' || $profile['service'] === 'googlebusiness' ) ) {
64 require $this->base->plugin->folder . 'lib/views/settings-post-actionheader-upgrade-profile.php';
65 } else {
66 ?>
67 <!-- Account Enabled -->
68 <div class="wpzinc-option">
69 <div class="left">
70 <label for="<?php echo esc_attr( $profile_id ); ?>_enabled"><?php esc_html_e( 'Account Enabled', 'wp-to-buffer' ); ?></label>
71 </div>
72 <div class="right">
73 <input type="checkbox" id="<?php echo esc_attr( $profile_id ); ?>_enabled" class="enable" name="<?php echo esc_attr( $this->base->plugin->name ); ?>[<?php echo esc_attr( $profile_id ); ?>][enabled]" id="<?php echo esc_attr( $profile_id ); ?>_enabled" value="1"<?php checked( $this->get_setting( $post_type, '[' . $profile_id . '][enabled]', 0 ), 1, true ); ?> data-tab="profile-<?php echo esc_attr( $profile_id ); ?>" />
74 <p class="description"><?php esc_html_e( 'Enabling this social media account means that Posts will be sent to this social media account.', 'wp-to-buffer' ); ?></p>
75 </div>
76 </div>
77 <?php
78 // Upgrade Notice.
79 if ( class_exists( 'WP_To_Buffer' ) || class_exists( 'WP_To_Hootsuite' ) ) {
80 require $this->base->plugin->folder . 'lib/views/settings-post-actionheader-upgrade.php';
81 } else {
82 // Force override if a subprofile is required.
83 $override = $this->get_setting( $post_type, '[' . $profile_id . '][override]', 0 );
84 $disabled = false;
85 if ( isset( $profile['service'] ) && $profile['service'] === 'pinterest' ) {
86 if ( ! isset( $profile['can_be_subprofile'] ) || ! $profile['can_be_subprofile'] ) {
87 // Subprofile is required.
88 $override = 1;
89 $disabled = true;
90 }
91 }
92
93 // If Override is Disabled, store the value in a hidden field.
94 if ( $disabled ) {
95 ?>
96 <input type="hidden" name="<?php echo esc_attr( $this->base->plugin->name ); ?>[<?php echo esc_attr( $profile_id ); ?>][override]" value="<?php echo esc_attr( $override ); ?>" data-conditional="<?php echo esc_attr( $post_type ); ?>-<?php echo esc_attr( $profile_id ); ?>-actions-panel" />
97 <?php
98 }
99 }
100 }
101 ?>
102 </div>
103