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-post.php

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

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