PluginProbe
Social Media Auto Poster – Schedule & Publish to Buffer / 6.0.9
Social Media Auto Poster – Schedule & Publish to Buffer v6.0.9
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-post.php

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

124 lines 4.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Outputs Settings View for a Post Type
4 *
5 * @since 3.0.0
6 *
7 * @package WP_To_Social_Pro
8 * @author WP Zinc
9 */
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit; // Exit if accessed directly.
13 }
14 ?>
15
16 <!-- Post Type -->
17 <div class="postbox wpzinc-vertical-tabbed-ui">
18
19 <!-- Profile Tabs -->
20 <ul class="wpzinc-nav-tabs wpzinc-js-tabs" data-panels-container="#profiles-container" data-panel=".profile" data-active="wpzinc-nav-tab-vertical-active">
21 <!-- Default Settings -->
22 <li class="wpzinc-nav-tab default">
23 <a href="#profile-default" class="wpzinc-nav-tab-vertical-active">
24 <?php esc_html_e( 'Defaults', 'wp-to-buffer' ); ?>
25 </a>
26 </li>
27
28 <?php
29 // Account tabs.
30 if ( ! is_wp_error( $profiles ) ) {
31 foreach ( $profiles as $key => $profile ) {
32 $profile_enabled = $this->get_setting( $post_type, '[' . $profile['id'] . '][enabled]', 0 );
33 ?>
34 <li class="wpzinc-nav-tab <?php echo esc_attr( $profile['service'] ); ?>">
35 <a href="#profile-<?php echo esc_attr( $profile['id'] ); ?>"<?php echo ( $profile_enabled ? ' class="enabled"' : '' ); ?> title="<?php echo esc_attr( $profile['formatted_service'] . ': ' . $profile['formatted_username'] ); ?>"<?php echo ( empty( $profile['formatted_username'] ) ? ' data-wp-to-social-pro-twitter-id="' . esc_attr( $profile['social_network_id'] ) . '"' : '' ); ?>>
36 <span class="formatted-username"><?php echo esc_html( $profile['formatted_username'] ); ?></span>
37 <span class="dashicons dashicons-yes"></span>
38 </a>
39 </li>
40 <?php
41
42 }
43 }
44 unset( $profile );
45 ?>
46 </ul>
47
48 <!-- Content -->
49 <div id="profiles-container" class="wpzinc-nav-tabs-content">
50 <!-- Defaults -->
51 <?php
52 $profile_id = 'default';
53 ?>
54 <div id="profile-<?php echo esc_attr( $profile_id ); ?>" class="profile">
55 <!-- Action Tabs -->
56 <ul class="wpzinc-nav-tabs-horizontal wpzinc-js-tabs" data-panels-container="#profile-<?php echo esc_attr( $profile_id ); ?>-actions-container" data-panel=".action" data-active="wpzinc-nav-tab-horizontal-active">
57 <?php
58 foreach ( $post_actions as $post_action => $action_label ) {
59 $action_enabled = $this->get_setting( $post_type, '[' . $profile_id . '][' . $post_action . '][enabled]', 0 );
60 ?>
61 <li class="wpzinc-nav-tab-horizontal <?php echo esc_attr( $post_action ); ?>">
62 <a href="#profile-<?php echo esc_attr( $profile_id ); ?>-<?php echo esc_attr( $post_action ); ?>" class="<?php echo esc_attr( $action_enabled ? ' enabled' : '' ) . ( $post_action === 'publish' ? ' wpzinc-nav-tab-horizontal-active' : '' ); ?>">
63 <?php
64 echo esc_html( $action_label );
65 ?>
66 <span class="dashicons dashicons-yes"></span>
67 </a>
68 </li>
69 <?php
70 }
71 ?>
72 </ul>
73
74 <div id="profile-<?php echo esc_attr( $profile_id ); ?>-actions-container">
75 <?php
76 // Iterate through Post Actions (Publish, Update etc).
77 foreach ( $post_actions as $post_action => $action_label ) {
78 ?>
79 <div id="profile-<?php echo esc_attr( $profile_id ); ?>-<?php echo esc_attr( $post_action ); ?>" class="action">
80 <?php
81 require $this->base->plugin->folder . 'lib/views/settings-post-action.php';
82 ?>
83 </div>
84 <?php
85 }
86 ?>
87 </div>
88 </div>
89 <!-- /Defaults -->
90
91 <!-- Profiles -->
92 <?php
93 if ( is_wp_error( $profiles ) ) {
94 ?>
95 <div>
96 <?php esc_html_e( 'Hmm, we couldn\'t fetch your social media profiles. Please refresh the Page.', 'wp-to-buffer' ); ?>
97 </div>
98 <?php
99 } else {
100 foreach ( $profiles as $key => $profile ) {
101 $profile_id = $profile['id'];
102 ?>
103 <div id="profile-<?php echo esc_attr( $profile_id ); ?>" class="profile <?php echo esc_attr( $profile['service'] ); ?>">
104 <?php
105 require $this->base->plugin->folder . 'lib/views/settings-post-actionheader.php';
106 ?>
107 </div>
108 <?php
109 }
110 }
111 ?>
112 <!-- /Profiles -->
113
114 <!-- Status Editor -->
115 <?php
116 require $this->base->plugin->folder . 'lib/views/settings-post-action-status.php';
117 ?>
118
119 <!-- Submitted Form Data -->
120 <input type="hidden" name="<?php echo esc_attr( $this->base->plugin->name ); ?>[statuses]" value='<?php echo wp_json_encode( $original_statuses, JSON_HEX_APOS ); ?>' />
121 </div>
122 </div>
123 <!-- /post_type -->
124