PluginProbe ʕ •ᴥ•ʔ
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress / 2.14.1
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress v2.14.1
4.8.1 trunk 1.0 1.1 1.12.1 1.2.3 1.2.4 1.2.5 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.5 1.5.1 1.5.2 1.5.9 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.4.1 1.6.5 1.6.5.1 1.6.6 1.6.6.1 1.6.6.2 1.6.6.3 1.6.7 1.6.7.1 1.6.8 1.6.8.1 1.6.8.2 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 1.8.2 1.8.2.1 1.8.2.2 1.8.2.3 1.9.0 1.9.1 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.8.1 1.9.9 1.9.9.1 1.9.9.2 1.9.9.3 2.0 2.0.1 2.1 2.1.1 2.1.2 2.1.3 2.10 2.11 2.11.1 2.12 2.12.1 2.12.2 2.12.3 2.12.4 2.13 2.14 2.14.1 2.15 2.15.1 2.16 2.16.1 2.17 2.17.1 2.18 2.18.1 2.18.2 2.18.3 2.19 2.19.1 2.19.2 2.19.3 2.2 2.2.1 2.3 2.3.1 2.3.10 2.3.2 2.3.3 2.3.4 2.3.6 2.3.7 2.3.8 2.3.9 2.4 2.4.1 2.4.1.1 2.4.1.2 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.5 2.5.1 2.5.2 2.6 2.6.1 2.6.2 2.6.3 2.6.4 2.7 2.7.1 2.7.2 2.8 2.9 2.9.1 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.1 4.1.1 4.1.2 4.1.3 4.1.4 4.1.5 4.1.6 4.1.7 4.1.8 4.1.9 4.2 4.2.1 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.7.5 4.7.6 4.7.7
custom-facebook-feed / custom-facebook-feed-admin.php
custom-facebook-feed Last commit date
admin 6 years ago blocks 6 years ago css 6 years ago fonts 6 years ago img 6 years ago js 6 years ago languages 6 years ago README.txt 6 years ago changelog.txt 6 years ago class-cff-education.php 6 years ago class-cff-error-reporter.php 6 years ago class-cff-sitehealth.php 6 years ago custom-facebook-feed-admin.php 6 years ago custom-facebook-feed.php 6 years ago email.php 6 years ago gpl-2.0.txt 6 years ago
custom-facebook-feed-admin.php
4715 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
4 function cff_menu() {
5 global $cff_error_reporter;
6 $notice = '';
7 if ( $cff_error_reporter->are_critical_errors() ) {
8 $notice = ' <span class="update-plugins cff-error-alert"><span>!</span></span>';
9 }
10 add_menu_page(
11 '',
12 'Facebook Feed'. $notice,
13 'manage_options',
14 'cff-top',
15 'cff_settings_page'
16 );
17 add_submenu_page(
18 'cff-top',
19 'Settings',
20 'Settings'. $notice,
21 'manage_options',
22 'cff-top',
23 'cff_settings_page'
24 );
25 }
26 add_action('admin_menu', 'cff_menu');
27 //Add styling page
28 function cff_styling_menu() {
29 add_submenu_page(
30 'cff-top',
31 'Customize',
32 'Customize',
33 'manage_options',
34 'cff-style',
35 'cff_style_page'
36 );
37 add_submenu_page(
38 'cff-top',
39 __( 'About Us', 'custom-facebook-feed' ),
40 __( 'About Us', 'custom-facebook-feed' ),
41 'manage_options',
42 'cff-about',
43 'cff_about_page'
44 );
45 }
46 add_action('admin_menu', 'cff_styling_menu');
47
48 function cff_about_page() {
49 do_action('cff_admin_page' );
50 }
51
52 //Create Settings page
53 function cff_settings_page() {
54 //Declare variables for fields
55 $hidden_field_name = 'cff_submit_hidden';
56 $show_access_token = 'cff_show_access_token';
57 $access_token = 'cff_access_token';
58 $page_id = 'cff_page_id';
59 $cff_connected_accounts = 'cff_connected_accounts';
60 $cff_page_type = 'cff_page_type';
61 $num_show = 'cff_num_show';
62 $cff_post_limit = 'cff_post_limit';
63 $cff_show_others = 'cff_show_others';
64 $cff_cache_time = 'cff_cache_time';
65 $cff_cache_time_unit = 'cff_cache_time_unit';
66 $cff_locale = 'cff_locale';
67 // Read in existing option value from database
68 $show_access_token_val = true;
69 $access_token_val = get_option( $access_token );
70 $page_id_val = get_option( $page_id );
71 $cff_connected_accounts_val = get_option( $cff_connected_accounts );
72
73 $cff_page_type_val = get_option( $cff_page_type, 'page' );
74 $num_show_val = get_option( $num_show, '5' );
75 $cff_post_limit_val = get_option( $cff_post_limit );
76 $cff_show_others_val = get_option( $cff_show_others );
77 $cff_cache_time_val = get_option( $cff_cache_time, '1' );
78 $cff_cache_time_unit_val = get_option( $cff_cache_time_unit, 'hours' );
79 $cff_locale_val = get_option( $cff_locale, 'en_US' );
80
81 //Timezone
82 $defaults = array(
83 'cff_timezone' => 'America/Chicago'
84 );
85 $options = wp_parse_args(get_option('cff_style_settings'), $defaults);
86 $cff_timezone = $options[ 'cff_timezone' ];
87
88
89 //Check nonce before saving data
90 if ( ! isset( $_POST['cff_settings_nonce'] ) || ! wp_verify_nonce( $_POST['cff_settings_nonce'], 'cff_saving_settings' ) ) {
91 //Nonce did not verify
92 } else {
93 // See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
94 if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) {
95 // Read their posted value
96 isset( $_POST[ $show_access_token ] ) ? $show_access_token_val = true : $show_access_token_val = true;
97 isset( $_POST[ $access_token ] ) ? $access_token_val = sanitize_text_field( $_POST[ $access_token ] ) : $access_token_val = '';
98 isset( $_POST[ $page_id ] ) ? $page_id_val = sanitize_text_field( $_POST[ $page_id ] ) : $page_id_val = '';
99 isset( $_POST[ $cff_connected_accounts ] ) ? $cff_connected_accounts_val = $_POST[ $cff_connected_accounts ] : $cff_connected_accounts_val = '';
100 isset( $_POST[ $cff_page_type ] ) ? $cff_page_type_val = sanitize_text_field( $_POST[ $cff_page_type ] ) : $cff_page_type_val = '';
101 isset( $_POST[ $num_show ] ) ? $num_show_val = sanitize_text_field( $_POST[ $num_show ] ) : $num_show_val = '';
102 isset( $_POST[ $cff_post_limit ] ) ? $cff_post_limit_val = sanitize_text_field( $_POST[ $cff_post_limit ] ) : $cff_post_limit_val = '';
103 isset( $_POST[ $cff_show_others ] ) ? $cff_show_others_val = sanitize_text_field( $_POST[ $cff_show_others ] ) : $cff_show_others_val = '';
104 isset( $_POST[ $cff_cache_time ] ) ? $cff_cache_time_val = sanitize_text_field( $_POST[ $cff_cache_time ] ) : $cff_cache_time_val = '';
105 isset( $_POST[ $cff_cache_time_unit ] ) ? $cff_cache_time_unit_val = sanitize_text_field( $_POST[ $cff_cache_time_unit ] ) : $cff_cache_time_unit_val = '';
106 isset( $_POST[ $cff_locale ] ) ? $cff_locale_val = sanitize_text_field( $_POST[ $cff_locale ] ) : $cff_locale_val = '';
107 if (isset($_POST[ 'cff_timezone' ]) ) $cff_timezone = sanitize_text_field( $_POST[ 'cff_timezone' ] );
108
109 // Save the posted value in the database
110 update_option( $show_access_token, true );
111 update_option( $access_token, $access_token_val );
112 update_option( $page_id, $page_id_val );
113 update_option( $cff_connected_accounts, $cff_connected_accounts_val );
114
115 update_option( $cff_page_type, $cff_page_type_val );
116 update_option( $num_show, $num_show_val );
117 update_option( $cff_post_limit, $cff_post_limit_val );
118 update_option( $cff_show_others, $cff_show_others_val );
119 update_option( $cff_cache_time, $cff_cache_time_val );
120 update_option( $cff_cache_time_unit, $cff_cache_time_unit_val );
121 update_option( $cff_locale, $cff_locale_val );
122
123 $options[ 'cff_timezone' ] = $cff_timezone;
124 update_option( 'cff_style_settings', $options );
125
126 //Delete ALL transients
127 cff_delete_cache();
128 // Put an settings updated message on the screen
129 ?>
130 <div class="updated"><p><strong><?php _e('Settings saved.', 'custom-facebook-feed' ); ?></strong></p></div>
131 <?php } ?>
132
133 <?php } //End nonce check ?>
134
135 <div id="cff-admin" class="wrap">
136
137 <?php
138 $lite_notice_dismissed = get_transient( 'facebook_feed_dismiss_lite' );
139
140 if ( ! $lite_notice_dismissed ) :
141 ?>
142 <div id="cff-notice-bar" style="display:none">
143 <span class="cff-notice-bar-message"><?php _e( 'You\'re using Custom Facebook Feed Lite. To unlock more features consider <a href="https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=notices&utm_medium=lite" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'custom-facebook-feed'); ?></span>
144 <button type="button" class="dismiss" title="<?php _e( 'Dismiss this message.', 'custom-facebook-feed'); ?>" data-page="overview">
145 </button>
146 </div>
147 <?php endif; ?>
148
149 <div id="header">
150 <h1><?php _e('Custom Facebook Feed', 'custom-facebook-feed'); ?></h1>
151 </div>
152
153 <?php
154 $cff_active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'configuration';
155 ?>
156 <h2 class="nav-tab-wrapper">
157 <a href="?page=cff-top&amp;tab=configuration" class="nav-tab <?php echo $cff_active_tab == 'configuration' ? 'nav-tab-active' : ''; ?>"><?php _e('Configuration', 'custom-facebook-feed'); ?></a>
158 <a href="?page=cff-style" class="nav-tab <?php echo $cff_active_tab == 'customize' ? 'nav-tab-active' : ''; ?>"><?php _e('Customize', 'custom-facebook-feed'); ?></a>
159 <a href="?page=cff-top&amp;tab=support" class="nav-tab <?php echo $cff_active_tab == 'support' ? 'nav-tab-active' : ''; ?>"><?php _e('Support', 'custom-facebook-feed'); ?></a>
160 </h2>
161
162 <?php if( $cff_active_tab == 'configuration' ) { //Start tab ?>
163
164 <form name="form1" method="post" action="">
165 <input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
166 <?php wp_nonce_field( 'cff_saving_settings', 'cff_settings_nonce' ); ?>
167
168 <br />
169 <h3><?php _e('Configuration', 'custom-facebook-feed'); ?></h3>
170
171
172 <div id="cff_fb_login_modal">
173 <div class="cff_modal_box">
174
175 <p>Log into your Facebook account using the button below and approve the plugin to connect your account.</p>
176
177
178 <div class="cff-login-options">
179 <label for="cff_login_type">Would you like to display a Facebook Page or Group?</label>
180 <select id="cff_login_type">
181 <option value="page">Facebook Page</option>
182 <option value="group">Facebook Group</option>
183 </select>
184
185 <p>
186 <a href="javascript:void(0);" id="cff_admin_cancel_btn" class="cff-admin-cancel-btn">Cancel</a>
187
188 <?php
189 $admin_url_state = admin_url('admin.php?page=cff-top');
190 //If the admin_url isn't returned correctly then use a fallback
191 if( $admin_url_state == '/wp-admin/admin.php?page=cff-top' || $admin_url_state == '/wp-admin/admin.php?page=cff-top&tab=configuration' ){
192 $admin_url_state = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
193 }
194 ?>
195 <a href="https://api.smashballoon.com/facebook-login.php?state=<?php echo $admin_url_state; ?>" class="cff_admin_btn" id="cff_page_app"><i class="fa fa-facebook-square"></i> <?php _e( 'Continue', 'custom-facebook-feed' ); ?></a>
196
197 <a href="https://api.smashballoon.com/facebook-group-login.php?state=<?php echo $admin_url_state; ?>" class="cff_admin_btn" id="cff_group_app"><i class="fa fa-facebook-square"></i> <?php _e( 'Continue', 'custom-facebook-feed' ); ?></a>
198
199 </p>
200 </div>
201
202 <p style="font-size: 11px; margin-top: 25px;"><b>Please note:</b> this does not give us permission to manage your Facebook pages or groups, it simply allows the plugin to see a list that you manage and retrieve an Access Token.</p>
203
204 </div>
205 </div>
206
207 <a href="JavaScript:void(0);" class="cff_admin_btn" id="cff_fb_login"><i class="fa fa-facebook-square"></i> <?php _e( 'Log in and get my Access Token', 'custom-facebook-feed' ); ?></a>
208
209
210 <?php
211 if( isset($_GET['access_token']) && isset($_GET['final_response']) ){
212
213 if( $_GET['final_response'] == 'true' ){
214 global $cff_error_reporter;
215
216 $cff_error_reporter->remove_error( 'accesstoken' );
217
218 $access_token = $_GET['access_token'];
219 $cff_is_groups = false;
220 $pages_data_arr = '';
221 $groups_data_arr = '';
222
223 if( isset($_GET['group']) ){
224 //Get Groups
225
226 $cff_is_groups = true;
227 $groups_data_arr = '';
228
229 //Extend the user token by making a call to /me/accounts. User must be an admin of a page for this to work as won't work if the response is empty.
230 $url = 'https://graph.facebook.com/me/accounts?limit=500&access_token='.$access_token;
231
232 $accounts_data = cff_fetchUrl($url);
233 $accounts_data_arr = json_decode($accounts_data);
234 $cff_token_expiration = 'never';
235 if( empty($accounts_data_arr->data) ){
236 $cff_token_expiration = '60 days';
237 }
238
239 //Get User ID
240 $user_url = 'https://graph.facebook.com/me?fields=id&access_token='.$access_token;
241 $user_id_data = cff_fetchUrl($user_url);
242
243 if( !empty($user_id_data) ){
244 $user_id_data_arr = json_decode($user_id_data);
245 $user_id = $user_id_data_arr->id;
246
247 //Get groups they're admin of
248 $groups_admin_url = 'https://graph.facebook.com/'.$user_id.'/groups?admin_only=true&fields=name,id,picture&access_token='.$access_token;
249 $groups_admin_data = cff_fetchUrl($groups_admin_url);
250 $groups_admin_data_arr = json_decode($groups_admin_data);
251
252 //Get member groups
253 $groups_url = 'https://graph.facebook.com/'.$user_id.'/groups?admin_only=false&fields=name,id,picture&access_token='.$access_token;
254 $groups_data = cff_fetchUrl($groups_url);
255 $groups_data_arr = json_decode($groups_data);
256
257 // $pages_data_arr = $groups_data_arr;
258 }
259 } else {
260 //Get Pages
261
262 $url = 'https://graph.facebook.com/me/accounts?limit=500&access_token='.$access_token;
263 $pages_data = cff_fetchUrl($url);
264 $pages_data_arr = json_decode($pages_data);
265
266 if( empty($pages_data_arr->data) ){
267 //If they don't manage any pages then just use the user token instead
268 ?>
269 <script type='text/javascript'>
270 jQuery(document).ready(function($) {
271 $('#cff_access_token').val('<?php echo $access_token ?>').addClass('cff-success');
272 //Check the own access token setting so it reveals token field
273 if( $('#cff_show_access_token:checked').length < 1 ){
274 $("#cff_show_access_token").trigger("change").prop( "checked", true );
275 }
276 });
277 </script>
278 <?php
279 }
280
281 }
282
283
284 if( !empty($pages_data_arr->data) || $cff_is_groups ){
285 //Show the pages they manage
286 echo '<div id="cff_fb_login_modal" class="cff_modal_tokens cffnomodal">';
287 echo '<div class="cff_modal_box">';
288 echo '<div class="cff-managed-pages">';
289
290 if( $cff_is_groups ){
291 //GROUPS
292
293 if( empty($groups_data_arr->data) && empty($groups_admin_data_arr->data) ){
294 echo '<h3>No Groups Returned</h3>';
295 echo "<p>Facebook has not returned any groups for your user. It is only possible to display a feed from a group which you are either an admin or a member. Please note, if you are not an admin of the group then it is required that an admin add our app in the group settings in order to display a feed.</p><p>Please either create or join a Facebook group and then follow the directions when connecting your account on this page.</p>";
296 echo '<a href="JavaScript:void(0);" class="button button-primary" id="cff-close-modal-primary-button">Close</a>';
297 } else {
298 global $cff_error_reporter;
299
300 $cff_error_reporter->remove_error( 'accesstoken' );
301 echo '<div class="cff-groups-list">';
302 echo '<p style="margin-top: 0;"><i class="fa fa-check-circle" aria-hidden="true" style="font-size: 15px; margin: 0 8px 0 2px;"></i>Select a Facebook group below to get an Access Token.</p>';
303
304 echo '<div class="cff-pages-wrap">';
305 //Admin groups
306 foreach ( $groups_admin_data_arr->data as $page => $group_data ) {
307 echo '<div class="cff-managed-page cff-group-admin';
308 if( $group_data->id == $page_id_val ) echo ' cff-page-selected';
309 echo '" data-token="'.$access_token.'" data-page-id="'.$group_data->id.'" id="cff_'.$group_data->id.'" data-pagetype="group">';
310 echo '<p>';
311 if( isset( $group_data->picture->data->url ) ) echo '<img class="cff-page-avatar" border="0" height="50" width="50" src="'.$group_data->picture->data->url.'">';
312 echo '<b class="cff-page-info-name">'.$group_data->name.'</b><span class="cff-page-info">(Group ID: '.$group_data->id.')</span></p>';
313 echo '<div class="cff-group-admin-icon"><i class="fa fa-user" aria-hidden="true"></i> Admin</div>';
314 echo '</div>';
315 }
316 //Member groups
317 foreach ( $groups_data_arr->data as $page => $group_data ) {
318 echo '<div class="cff-managed-page';
319 if( $group_data->id == $page_id_val ) echo ' cff-page-selected';
320 echo '" data-token="'.$access_token.'" data-page-id="'.$group_data->id.'" id="cff_'.$group_data->id.'" data-pagetype="group">';
321 echo '<p>';
322 if( isset( $group_data->picture->data->url ) ) echo '<img class="cff-page-avatar" border="0" height="50" width="50" src="'.$group_data->picture->data->url.'">';
323 echo '<b class="cff-page-info-name">'.$group_data->name.'</b><span class="cff-page-info">(Group ID: '.$group_data->id.')</span></p>';
324 echo '</div>';
325 }
326 echo '</div>';
327 echo '<a href="JavaScript:void(0);" class="button button-primary cff-group-btn" id="cff-insert-token" disabled="disabled">Use token for this Group</a>';
328 if( $cff_token_expiration == "60 days" ) echo '<div id="cff_token_expiration_note" class="cff-error"><b>Important:</b> This token will expire in 60 days.<br /><a href="https://smashballoon.com/extending-a-group-access-token-so-it-never-expires/" target="_blank">Extend token so it never expires</a></div>';
329 echo '</div>';
330
331 echo '<div id="cff-group-installation">';
332 echo '<h3>Important</h3>';
333
334 echo '<div id="cff-group-admin-directions">';
335 echo '<p>To display a feed from your group you need to add our app in your Facebook group settings:</p>';
336 echo '<ul>';
337 echo '<li><b>1)</b> Go to your group settings page by clicking <a id="cff-group-edit" href="https://www.facebook.com/groups/" target="_blank">here<i class="fa fa-external-link" aria-hidden="true" style="font-size: 13px; position: relative; top: 2px; margin-left: 5px;"></i></a></li>';
338 echo '<li><b>2)</b> In the "Apps" section click "Add Apps".</li>';
339 echo '<li><b>3)</b> Search for "Smash Balloon" and select our app (<a id="cff-group-app-tooltip">screenshot</a>).<img id="cff-group-app-screenshot" src="'. plugins_url( "img/group-app.png" , __FILE__ ) .'" alt="Thumbnail Layout" /></li>';
340 echo '<li><b>4</b>) Click "Add".</li>';
341 echo '</ul>';
342
343 echo '<p style="margin-bottom: 10px;">You can now use the plugin to display a feed from your group.</p>';
344 echo '</div>';
345
346 echo '<div id="cff-group-member-directions">';
347 echo '<p>To display a feed from this group an admin needs to first add our app in the group settings. Please ask an admin to follow the directions <a href="https://smashballoon.com/adding-our-app-to-a-facebook-group/" target="_blank">here</a> to add our app.</p>';
348 echo '<p>Once this is done you will then be able to display a feed from this group.</p>';
349 echo '</div>';
350
351 echo '<a href="JavaScript:void(0);" class="button button-primary" id="cff-close-modal-primary-button">Done</a>';
352 echo '<a href="https://smashballoon.com/display-facebook-group-feed/" target="_blank" class="button button-secondary"><i class="fa fa-life-ring"></i> Help</a>';
353 echo '</div>';
354
355 }
356
357 } else {
358 //PAGES
359 global $cff_error_reporter;
360
361 $cff_error_reporter->remove_error( 'accesstoken' );
362 echo '<p style="margin-top: 0;"><i class="fa fa-check-circle" aria-hidden="true" style="font-size: 15px; margin: 0 8px 0 2px;"></i>Select a Facebook page below to get an Access Token.</p>';
363 echo '<p class="cff-tokens-note">Note: This Access Token will allow you to display posts from <b style="font-weight: 900;">any</b> public Facebook page, not just the one selected.</p>';
364
365 echo '<div class="cff-pages-wrap">';
366 foreach ( $pages_data_arr->data as $page => $page_data ) {
367 echo '<div class="cff-managed-page ';
368 if( $page_data->id == $page_id_val ) echo 'cff-page-selected';
369 echo '" data-token="'.$page_data->access_token.'" data-page-id="'.$page_data->id.'" data-pagetype="page">';
370 echo '<p><img class="cff-page-avatar" border="0" height="50" width="50" src="https://graph.facebook.com/'.$page_data->id.'/picture"><b class="cff-page-info-name">'.$page_data->name.'</b><span class="cff-page-info">(Page ID: '.$page_data->id.')</span></p>';
371 echo '</div>';
372 }
373 echo '</div>';
374
375 $cff_use_token_text = 'Connect this page';
376 echo '<a href="JavaScript:void(0);" id="cff-insert-token" class="button button-primary" disabled="disabled">'.$cff_use_token_text.'</a>';
377 echo '<a href="JavaScript:void(0);" id="cff-insert-all-tokens" class="button button-secondary cff_connect_all">Connect All</a>';
378
379 }
380
381 echo '</div>';
382 echo '<a href="JavaScript:void(0);" class="cff-modal-close"><i class="fa fa-times"></i></a>';
383 echo '</div>';
384 echo '</div>';
385
386 echo '<a href="JavaScript:void(0);" class="cff_admin_btn" id="cff_fb_show_tokens"><i class="fa fa-th-list" aria-hidden="true" style="font-size: 14px; margin-right: 8px;"></i>';
387 $cff_is_groups ? _e( "Show Available Groups", "custom-facebook-feed" ) : _e( "Show Available Pages", "custom-facebook-feed" );
388 echo '</a>';
389
390 }
391
392 }
393 }
394 ?>
395
396 <table class="form-table">
397 <tbody>
398 <tr valign="top">
399 <th scope="row"><label><?php _e('Facebook Page ID<br /><i style="font-weight: normal; font-size: 12px;">ID of your Facebook Page or Group</i>', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> id
400 Eg: id="YOUR_PAGE_OR_GROUP_ID"</code></th>
401 <td>
402 <p id="cff_primary_account_label"></p>
403 <input name="cff_page_id" id="cff_page_id" type="text" value="<?php esc_attr_e( $page_id_val, 'custom-facebook-feed' ); ?>" size="45" data-page-id="<?php esc_attr_e( $page_id_val ); ?>" />
404 &nbsp;<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What\'s my Page ID?', 'custom-facebook-feed'); ?></a>
405 <br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123 or smashballoon</i>
406 <div class="cff-tooltip cff-more-info">
407 <ul>
408 <li><?php _e('<b>Facebook Page</b><br />
409 You can find the ID of your Facebook <b>Page</b> from the URL. In each URL format, the ID is highlighted below:<br /><br />
410 URL Format 1: <code>https://www.facebook.com/<span class="cff-highlight">your_page_name</span></code>
411 <br />
412 URL Format 2: <code>https://www.facebook.com/your_page_name-<span class="cff-highlight">1234567890</span></code>
413 <br />
414 URL Format 3: <code>https://www.facebook.com/pages/your_page_name/<span class="cff-highlight">1234567890</span></code>
415 '); ?>
416 </li>
417 <li><?php _e('<b>Facebook Group</b><br />You can find the ID of your Facebook <b>Group</b> from the URL, like so: <code>https://www.facebook.com/groups/<span class="cff-highlight">1234567890</span></code>'); ?></li>
418 </ul>
419 </div>
420 </td>
421 </tr>
422
423 <?php
424 //When connecting an account check the current access token to see if it has an error. If so then add a class to the field and replace it automatically in JS when getting a new one.
425 $cff_replace_token = false;
426 if( isset($_GET['access_token']) && isset($_GET['final_response']) ){
427
428 if( $_GET['final_response'] == 'true' ){
429 $api_page_id = trim($page_id_val);
430 $url = 'https://graph.facebook.com/'.$api_page_id.'?limit=1&fields=id&access_token='.$access_token_val;
431 $accounts_data = cff_fetchUrl($url);
432 //If there's an error (and it's not the PPCA one) then mark the token as needing to be replaced
433 if (strpos($accounts_data, 'error') !== false && strpos($accounts_data, 'Public') == false) $cff_replace_token = true;
434 }
435
436 }
437
438 ?>
439
440 <tr valign="top">
441 <th scope="row" style="padding-bottom: 10px;"><?php _e('Facebook Access Token', 'custom-facebook-feed'); ?><br /><i style="font-weight: normal; font-size: 12px; color: red;"><?php _e('Required', 'custom-facebook-feed'); ?></i></th>
442 <td>
443 <textarea name="cff_access_token" id="cff_access_token" <?php if($cff_replace_token) echo 'class="cff-replace-token"' ?> style="min-width: 60%;" data-accesstoken="<?php esc_attr_e( $access_token_val ); ?>"><?php esc_attr_e( $access_token_val ); ?></textarea><br /><a class="cff-tooltip-link" style="margin-left: 3px;" href="JavaScript:void(0);"><?php _e("What is this?", 'custom-facebook-feed'); ?></a>
444 <p class="cff-tooltip cff-more-info"><?php _e("In order to connect to Facebook and get a feed, you need to use an Access Token. To get one, simply use the blue button above to log into your Facebook account. You will then receive a token that will be used to connect to Facebook's API. If you already have an Access Token then you can enter it here.", 'custom-facebook-feed'); ?></p>
445
446 <div class="cff-notice cff-profile-error cff-access-token">
447 <?php _e("<p>This doesn't appear to be an Access Token. Please be sure that you didn't enter your App Secret instead of your Access Token.<br />Your App ID and App Secret are used to obtain your Access Token; simply paste them into the fields in the last step of the <a href='https://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>Access Token instructions</a> and click '<b>Get my Access Token</b>'.</p>", 'custom-facebook-feed'); ?>
448 </div>
449 </td>
450 </tr>
451 </tbody>
452 </table>
453
454 <div id="cff_accounts_section">
455 <a href="JavaScript:void(0);" class="button-secondary button" id="cff_manual_account_button">Manually connect account</a>
456
457 <div id="cff_manual_account">
458 <div id="cff_manual_account_step_1">
459 <label for="cff_manual_account_type"><?php _e('Is it a Facebook page or group?'); ?></label>
460 <select name="cff_manual_account_type" id="cff_manual_account_type">
461 <option value="" disabled selected><?php _e('- Select one -'); ?></option>
462 <option value="page"><?php _e('Page'); ?></option>
463 <option value="group"><?php _e('Group'); ?></option>
464 </select>
465 <a href="javascript:void(0);" class="cff_manual_forward button-primary"><i class="fa fa-chevron-right" aria-hidden="true"></i></a>
466 </div>
467
468 <div id="cff_manual_account_step_2" class="cff_account_type_page">
469 <div>
470 <label for="cff_manual_account_name"><span class="cff_page"><?php _e('Page'); ?></span><span class="cff_group"><?php _e('Group'); ?></span> <?php _e('Name'); ?> <span style="font-size: 11px;"><?php _e('(optional)'); ?></span></label>
471 <input name="cff_manual_account_name" id="cff_manual_account_name" type="text" value="" placeholder="Eg: John's Facebook Page" />
472 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
473 <p class="cff-tooltip cff-more-info"><?php _e('This is just for labeling the account here on this settings page'); ?></p>
474 </div>
475
476 <div>
477 <label for="cff_manual_account_id"><span class="cff_page"><?php _e('Page'); ?></span><span class="cff_group"><?php _e('Group'); ?></span> <?php _e('ID'); ?></label>
478 <input name="cff_manual_account_id" id="cff_manual_account_id" type="text" value="" placeholder="Eg: 1234567890123 or smashballoon" />
479 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
480 <p class="cff-tooltip cff-more-info"><?php _e('The ID of the Facebook'); ?> <span class="cff_page"><?php _e('Page'); ?></span><span class="cff_group"><?php _e('Group'); ?></span> <?php _e('you want to add.'); ?> &nbsp;<a href='https://smashballoon.com/custom-facebook-feed/id/' target='_blank'><?php _e("How do I find my Page ID?"); ?></a></p>
481 </div>
482
483 <div>
484 <label for="cff_manual_account_token"><?php _e('Access Token'); ?></label>
485 <input name="cff_manual_account_token" id="cff_manual_account_token" type="text" value="" />
486 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
487 <p class="cff-tooltip cff-more-info"><?php _e('The Access Token of the Facebook'); ?> <span class="cff_page"><?php _e('Page'); ?></span><span class="cff_group"><?php _e('Group'); ?></span> <?php _e('you want to add'); ?></p>
488 </div>
489
490 <?php
491 $cff_submit_btn_atts = array( 'disabled' => 'true' );
492 submit_button('Connect Account', 'primary', 'submit', true, $cff_submit_btn_atts);
493 ?>
494 <a href="javascript:void(0);" class="cff_manual_back button-secondary">Back</a>
495 </div>
496
497 </div>
498
499 <h3 class="cff_connected_actions">Connected Accounts:</h3>
500 <div id="cff_connected_accounts_wrap"><?php //Add connected accounts here ?></div>
501
502 <div class="cff_connected_actions">
503 <a href="JavaScript:void(0);" id="cff_export_accounts">Show raw account data</a>
504 <div id="cff_export_accounts_wrap">
505 <textarea name="cff_connected_accounts" id="cff_connected_accounts" style="width: 100%;" rows="5" /><?php echo stripslashes( esc_attr( $cff_connected_accounts_val ) ); ?></textarea>
506 </div>
507
508 <?php submit_button('Save Settings'); ?>
509 </div>
510
511 </div>
512
513 <hr />
514 <table class="form-table">
515 <tbody>
516 <h3><?php _e('Settings', 'custom-facebook-feed'); ?></h3>
517
518 <tr valign="top" class="cff-page-type">
519 <th scope="row"><label><?php _e('Is it a page or group?'); ?></label><code class="cff_shortcode"> pagetype
520 Eg: pagetype=group</code></th>
521 <td>
522 <select name="cff_page_type" id="cff_page_type" style="width: 100px;">
523 <option value="page" <?php if($cff_page_type_val == "page") echo 'selected="selected"' ?> ><?php _e('Page'); ?></option>
524 <option value="group" <?php if($cff_page_type_val == "group") echo 'selected="selected"' ?> ><?php _e('Group'); ?></option>
525 <option value="profile" <?php if($cff_page_type_val == "profile") echo 'selected="selected"' ?> ><?php _e('Profile'); ?></option>
526 </select>
527 <div class="cff-notice cff-profile-error cff-page-type">
528 <?php _e("<p>Due to Facebook's privacy policy you're not able to display posts from a personal profile, only from a public Facebook Page.</p><p>If you're using a profile to represent a business, organization, product, public figure or the like, then Facebook recommends <a href='http://www.facebook.com/help/175644189234902/' target='_blank'>converting your profile to a page</a>. There are many advantages to using pages over profiles, and once you've converted then the plugin will be able to successfully retrieve and display all of your posts.</p>", 'custom-facebook-feed'); ?>
529 </div>
530 </td>
531 </tr>
532
533 <tr valign="top">
534 <th scope="row"><label><?php _e('Show posts on my page by:', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> showpostsby
535 Eg: showpostsby=others</code></th>
536 <td>
537 <select name="cff_show_others" id="cff_show_others" style="width: 250px;">
538 <option value="me" <?php if($cff_show_others_val == 'me') echo 'selected="selected"' ?> ><?php _e('Only the page owner (me)', 'custom-facebook-feed'); ?></option>
539 <option value="others" <?php if($cff_show_others_val == 'others' || $cff_show_others_val == 'on') echo 'selected="selected"' ?> ><?php _e('Page owner + other people', 'custom-facebook-feed'); ?></option>
540 <option value="onlyothers" <?php if($cff_show_others_val == 'onlyothers') echo 'selected="selected"' ?> ><?php _e('Only other people', 'custom-facebook-feed'); ?></option>
541 </select>
542 </td>
543 </tr>
544
545 <tr valign="top">
546 <th scope="row"><label><?php _e('Number of posts to display', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> num
547 Eg: num=5</code></th>
548 <td>
549 <input name="cff_num_show" type="text" value="<?php esc_attr_e( $num_show_val, 'custom-facebook-feed' ); ?>" size="4" />
550 <i style="color: #666; font-size: 11px;">Max 100</i>
551 </td>
552 </tr>
553 <tr valign="top">
554 <th scope="row"><label><?php _e('Facebook API post limit', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> limit
555 Eg: limit=10</code></th>
556 <td>
557 <select name="cff_limit_setting" id="cff_limit_setting" style="width: 90px;">
558 <option value="auto" selected="selected"><?php _e('Auto'); ?></option>
559 <option value="manual"><?php _e('Manual'); ?></option>
560 </select>
561 <div id="cff_limit_manual_settings">
562 <input name="cff_post_limit" id="cff_post_limit" type="text" value="<?php esc_attr_e( $cff_post_limit_val ); ?>" size="4" />
563 <i style="color: #666; font-size: 11px;">Eg. 10. Max 100.</i>
564 </div>
565 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
566 <p class="cff-tooltip cff-more-info"><?php _e("The post 'limit' is the number of posts retrieved from the Facebook API. Most users won't need to manually adjust this setting as by default the plugin automatically retrieves a few more posts from the Facebook API than you need, as some posts may be filtered out.", "custom-facebook-feed"); ?><br /><br />
567
568 <b><?php _e('Auto', 'custom-facebook-feed'); ?></b> (<?php _e('Recommended', 'custom-facebook-feed'); ?>)<br />
569 <?php _e("Allow the plugin to automatically decide how many posts to retrieve from Facebook's API.", "custom-facebook-feed"); ?><br /><br />
570
571 <b><?php _e('Manual', 'custom-facebook-feed'); ?></b><br />
572 <?php _e("Manually set how many posts to retrieve from Facebook's API.<br /><b>Note:</b> If you choose to retrieve a high number of posts then it will take longer for Facebook to return the posts when the plugin checks for new ones.", "custom-facebook-feed"); ?></p>
573 </td>
574 </tr>
575 <tr valign="top">
576 <th scope="row"><?php _e('Check for new posts every', 'custom-facebook-feed'); ?></th>
577 <td>
578 <input name="cff_cache_time" type="text" value="<?php esc_attr_e( $cff_cache_time_val, 'custom-facebook-feed' ); ?>" size="4" />
579 <select name="cff_cache_time_unit" style="width: 100px;">
580 <option value="minutes" <?php if($cff_cache_time_unit_val == "minutes") echo 'selected="selected"' ?> ><?php _e('Minutes', 'custom-facebook-feed'); ?></option>
581 <option value="hours" <?php if($cff_cache_time_unit_val == "hours") echo 'selected="selected"' ?> ><?php _e('Hours', 'custom-facebook-feed'); ?></option>
582 <option value="days" <?php if($cff_cache_time_unit_val == "days") echo 'selected="selected"' ?> ><?php _e('Days', 'custom-facebook-feed'); ?></option>
583 </select>
584 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
585 <p class="cff-tooltip cff-more-info"><?php _e('Your Facebook posts and comments data is temporarily cached by the plugin in your WordPress database. You can choose how long this data should be cached for. If you set the time to 60 minutes then the plugin will clear the cached data after that length of time, and the next time the page is viewed it will check for new data.', 'custom-facebook-feed'); ?></p>
586 </td>
587 </tr>
588
589 <tr valign="top">
590 <th scope="row"><label><?php _e('Localization', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> locale
591 Eg: locale=es_ES</code></th>
592 <td>
593 <select name="cff_locale">
594 <option value="af_ZA" <?php if($cff_locale_val == "af_ZA") echo 'selected="selected"' ?> ><?php _e('Afrikaans', 'custom-facebook-feed'); ?></option>
595 <option value="ar_AR" <?php if($cff_locale_val == "ar_AR") echo 'selected="selected"' ?> ><?php _e('Arabic', 'custom-facebook-feed'); ?></option>
596 <option value="az_AZ" <?php if($cff_locale_val == "az_AZ") echo 'selected="selected"' ?> ><?php _e('Azerbaijani', 'custom-facebook-feed'); ?></option>
597 <option value="be_BY" <?php if($cff_locale_val == "be_BY") echo 'selected="selected"' ?> ><?php _e('Belarusian', 'custom-facebook-feed'); ?></option>
598 <option value="bg_BG" <?php if($cff_locale_val == "bg_BG") echo 'selected="selected"' ?> ><?php _e('Bulgarian', 'custom-facebook-feed'); ?></option>
599 <option value="bn_IN" <?php if($cff_locale_val == "bn_IN") echo 'selected="selected"' ?> ><?php _e('Bengali', 'custom-facebook-feed'); ?></option>
600 <option value="bs_BA" <?php if($cff_locale_val == "bs_BA") echo 'selected="selected"' ?> ><?php _e('Bosnian', 'custom-facebook-feed'); ?></option>
601 <option value="ca_ES" <?php if($cff_locale_val == "ca_ES") echo 'selected="selected"' ?> ><?php _e('Catalan', 'custom-facebook-feed'); ?></option>
602 <option value="cs_CZ" <?php if($cff_locale_val == "cs_CZ") echo 'selected="selected"' ?> ><?php _e('Czech', 'custom-facebook-feed'); ?></option>
603 <option value="cy_GB" <?php if($cff_locale_val == "cy_GB") echo 'selected="selected"' ?> ><?php _e('Welsh', 'custom-facebook-feed'); ?></option>
604 <option value="da_DK" <?php if($cff_locale_val == "da_DK") echo 'selected="selected"' ?> ><?php _e('Danish', 'custom-facebook-feed'); ?></option>
605 <option value="de_DE" <?php if($cff_locale_val == "de_DE") echo 'selected="selected"' ?> ><?php _e('German', 'custom-facebook-feed'); ?></option>
606 <option value="el_GR" <?php if($cff_locale_val == "el_GR") echo 'selected="selected"' ?> ><?php _e('Greek', 'custom-facebook-feed'); ?></option>
607 <option value="en_GB" <?php if($cff_locale_val == "en_GB") echo 'selected="selected"' ?> ><?php _e('English (UK)', 'custom-facebook-feed'); ?></option>
608 <option value="en_PI" <?php if($cff_locale_val == "en_PI") echo 'selected="selected"' ?> ><?php _e('English (Pirate)', 'custom-facebook-feed'); ?></option>
609 <option value="en_UD" <?php if($cff_locale_val == "en_UD") echo 'selected="selected"' ?> ><?php _e('English (Upside Down)', 'custom-facebook-feed'); ?></option>
610 <option value="en_US" <?php if($cff_locale_val == "en_US") echo 'selected="selected"' ?> ><?php _e('English (US)', 'custom-facebook-feed'); ?></option>
611 <option value="eo_EO" <?php if($cff_locale_val == "eo_EO") echo 'selected="selected"' ?> ><?php _e('Esperanto', 'custom-facebook-feed'); ?></option>
612 <option value="es_ES" <?php if($cff_locale_val == "es_ES") echo 'selected="selected"' ?> ><?php _e('Spanish (Spain)', 'custom-facebook-feed'); ?></option>
613 <option value="es_LA" <?php if($cff_locale_val == "es_LA") echo 'selected="selected"' ?> ><?php _e('Spanish', 'custom-facebook-feed'); ?></option>
614 <option value="et_EE" <?php if($cff_locale_val == "et_EE") echo 'selected="selected"' ?> ><?php _e('Estonian', 'custom-facebook-feed'); ?></option>
615 <option value="eu_ES" <?php if($cff_locale_val == "eu_ES") echo 'selected="selected"' ?> ><?php _e('Basque', 'custom-facebook-feed'); ?></option>
616 <option value="fa_IR" <?php if($cff_locale_val == "fa_IR") echo 'selected="selected"' ?> ><?php _e('Persian', 'custom-facebook-feed'); ?></option>
617 <option value="fb_LT" <?php if($cff_locale_val == "fb_LT") echo 'selected="selected"' ?> ><?php _e('Leet Speak', 'custom-facebook-feed'); ?></option>
618 <option value="fi_FI" <?php if($cff_locale_val == "fi_FI") echo 'selected="selected"' ?> ><?php _e('Finnish', 'custom-facebook-feed'); ?></option>
619 <option value="fo_FO" <?php if($cff_locale_val == "fo_FO") echo 'selected="selected"' ?> ><?php _e('Faroese', 'custom-facebook-feed'); ?></option>
620 <option value="fr_CA" <?php if($cff_locale_val == "fr_CA") echo 'selected="selected"' ?> ><?php _e('French (Canada)', 'custom-facebook-feed'); ?></option>
621 <option value="fr_FR" <?php if($cff_locale_val == "fr_FR") echo 'selected="selected"' ?> ><?php _e('French (France)', 'custom-facebook-feed'); ?></option>
622 <option value="fy_NL" <?php if($cff_locale_val == "fy_NL") echo 'selected="selected"' ?> ><?php _e('Frisian', 'custom-facebook-feed'); ?></option>
623 <option value="ga_IE" <?php if($cff_locale_val == "ga_IE") echo 'selected="selected"' ?> ><?php _e('Irish', 'custom-facebook-feed'); ?></option>
624 <option value="gl_ES" <?php if($cff_locale_val == "gl_ES") echo 'selected="selected"' ?> ><?php _e('Galician', 'custom-facebook-feed'); ?></option>
625 <option value="he_IL" <?php if($cff_locale_val == "he_IL") echo 'selected="selected"' ?> ><?php _e('Hebrew', 'custom-facebook-feed'); ?></option>
626 <option value="hi_IN" <?php if($cff_locale_val == "hi_IN") echo 'selected="selected"' ?> ><?php _e('Hindi', 'custom-facebook-feed'); ?></option>
627 <option value="hr_HR" <?php if($cff_locale_val == "hr_HR") echo 'selected="selected"' ?> ><?php _e('Croatian', 'custom-facebook-feed'); ?></option>
628 <option value="hu_HU" <?php if($cff_locale_val == "hu_HU") echo 'selected="selected"' ?> ><?php _e('Hungarian', 'custom-facebook-feed'); ?></option>
629 <option value="hy_AM" <?php if($cff_locale_val == "hy_AM") echo 'selected="selected"' ?> ><?php _e('Armenian', 'custom-facebook-feed'); ?></option>
630 <option value="id_ID" <?php if($cff_locale_val == "id_ID") echo 'selected="selected"' ?> ><?php _e('Indonesian', 'custom-facebook-feed'); ?></option>
631 <option value="is_IS" <?php if($cff_locale_val == "is_IS") echo 'selected="selected"' ?> ><?php _e('Icelandic', 'custom-facebook-feed'); ?></option>
632 <option value="it_IT" <?php if($cff_locale_val == "it_IT") echo 'selected="selected"' ?> ><?php _e('Italian', 'custom-facebook-feed'); ?></option>
633 <option value="ja_JP" <?php if($cff_locale_val == "ja_JP") echo 'selected="selected"' ?> ><?php _e('Japanese', 'custom-facebook-feed'); ?></option>
634 <option value="ka_GE" <?php if($cff_locale_val == "ka_GE") echo 'selected="selected"' ?> ><?php _e('Georgian', 'custom-facebook-feed'); ?></option>
635 <option value="km_KH" <?php if($cff_locale_val == "km_KH") echo 'selected="selected"' ?> ><?php _e('Khmer', 'custom-facebook-feed'); ?></option>
636 <option value="ko_KR" <?php if($cff_locale_val == "ko_KR") echo 'selected="selected"' ?> ><?php _e('Korean', 'custom-facebook-feed'); ?></option>
637 <option value="ku_TR" <?php if($cff_locale_val == "ku_TR") echo 'selected="selected"' ?> ><?php _e('Kurdish', 'custom-facebook-feed'); ?></option>
638 <option value="la_VA" <?php if($cff_locale_val == "la_VA") echo 'selected="selected"' ?> ><?php _e('Latin', 'custom-facebook-feed'); ?></option>
639 <option value="lt_LT" <?php if($cff_locale_val == "lt_LT") echo 'selected="selected"' ?> ><?php _e('Lithuanian', 'custom-facebook-feed'); ?></option>
640 <option value="lv_LV" <?php if($cff_locale_val == "lv_LV") echo 'selected="selected"' ?> ><?php _e('Latvian', 'custom-facebook-feed'); ?></option>
641 <option value="mk_MK" <?php if($cff_locale_val == "mk_MK") echo 'selected="selected"' ?> ><?php _e('Macedonian', 'custom-facebook-feed'); ?></option>
642 <option value="ml_IN" <?php if($cff_locale_val == "ml_IN") echo 'selected="selected"' ?> ><?php _e('Malayalam', 'custom-facebook-feed'); ?></option>
643 <option value="ms_MY" <?php if($cff_locale_val == "ms_MY") echo 'selected="selected"' ?> ><?php _e('Malay', 'custom-facebook-feed'); ?></option>
644 <option value="nb_NO" <?php if($cff_locale_val == "nb_NO") echo 'selected="selected"' ?> ><?php _e('Norwegian (bokmal)', 'custom-facebook-feed'); ?></option>
645 <option value="ne_NP" <?php if($cff_locale_val == "ne_NP") echo 'selected="selected"' ?> ><?php _e('Nepali', 'custom-facebook-feed'); ?></option>
646 <option value="nl_NL" <?php if($cff_locale_val == "nl_NL") echo 'selected="selected"' ?> ><?php _e('Dutch', 'custom-facebook-feed'); ?></option>
647 <option value="nn_NO" <?php if($cff_locale_val == "nn_NO") echo 'selected="selected"' ?> ><?php _e('Norwegian (nynorsk)', 'custom-facebook-feed'); ?></option>
648 <option value="pa_IN" <?php if($cff_locale_val == "pa_IN") echo 'selected="selected"' ?> ><?php _e('Punjabi', 'custom-facebook-feed'); ?></option>
649 <option value="pl_PL" <?php if($cff_locale_val == "pl_PL") echo 'selected="selected"' ?> ><?php _e('Polish', 'custom-facebook-feed'); ?></option>
650 <option value="ps_AF" <?php if($cff_locale_val == "ps_AF") echo 'selected="selected"' ?> ><?php _e('Pashto', 'custom-facebook-feed'); ?></option>
651 <option value="pt_BR" <?php if($cff_locale_val == "pt_BR") echo 'selected="selected"' ?> ><?php _e('Portuguese (Brazil)', 'custom-facebook-feed'); ?></option>
652 <option value="pt_PT" <?php if($cff_locale_val == "pt_PT") echo 'selected="selected"' ?> ><?php _e('Portuguese (Portugal)', 'custom-facebook-feed'); ?></option>
653 <option value="ro_RO" <?php if($cff_locale_val == "ro_RO") echo 'selected="selected"' ?> ><?php _e('Romanian', 'custom-facebook-feed'); ?></option>
654 <option value="ru_RU" <?php if($cff_locale_val == "ru_RU") echo 'selected="selected"' ?> ><?php _e('Russian', 'custom-facebook-feed'); ?></option>
655 <option value="sk_SK" <?php if($cff_locale_val == "sk_SK") echo 'selected="selected"' ?> ><?php _e('Slovak', 'custom-facebook-feed'); ?></option>
656 <option value="sl_SI" <?php if($cff_locale_val == "sl_SI") echo 'selected="selected"' ?> ><?php _e('Slovenian', 'custom-facebook-feed'); ?></option>
657 <option value="sq_AL" <?php if($cff_locale_val == "sq_AL") echo 'selected="selected"' ?> ><?php _e('Albanian', 'custom-facebook-feed'); ?></option>
658 <option value="sr_RS" <?php if($cff_locale_val == "sr_RS") echo 'selected="selected"' ?> ><?php _e('Serbian', 'custom-facebook-feed'); ?></option>
659 <option value="sv_SE" <?php if($cff_locale_val == "sv_SE") echo 'selected="selected"' ?> ><?php _e('Swedish', 'custom-facebook-feed'); ?></option>
660 <option value="sw_KE" <?php if($cff_locale_val == "sw_KE") echo 'selected="selected"' ?> ><?php _e('Swahili', 'custom-facebook-feed'); ?></option>
661 <option value="ta_IN" <?php if($cff_locale_val == "ta_IN") echo 'selected="selected"' ?> ><?php _e('Tamil', 'custom-facebook-feed'); ?></option>
662 <option value="te_IN" <?php if($cff_locale_val == "te_IN") echo 'selected="selected"' ?> ><?php _e('Telugu', 'custom-facebook-feed'); ?></option>
663 <option value="th_TH" <?php if($cff_locale_val == "th_TH") echo 'selected="selected"' ?> ><?php _e('Thai', 'custom-facebook-feed'); ?></option>
664 <option value="tl_PH" <?php if($cff_locale_val == "tl_PH") echo 'selected="selected"' ?> ><?php _e('Filipino', 'custom-facebook-feed'); ?></option>
665 <option value="tr_TR" <?php if($cff_locale_val == "tr_TR") echo 'selected="selected"' ?> ><?php _e('Turkish', 'custom-facebook-feed'); ?></option>
666 <option value="uk_UA" <?php if($cff_locale_val == "uk_UA") echo 'selected="selected"' ?> ><?php _e('Ukrainian', 'custom-facebook-feed'); ?></option>
667 <option value="vi_VN" <?php if($cff_locale_val == "vi_VN") echo 'selected="selected"' ?> ><?php _e('Vietnamese', 'custom-facebook-feed'); ?></option>
668 <option value="zh_CN" <?php if($cff_locale_val == "zh_CN") echo 'selected="selected"' ?> ><?php _e('Simplified Chinese (China)', 'custom-facebook-feed'); ?></option>
669 <option value="zh_HK" <?php if($cff_locale_val == "zh_HK") echo 'selected="selected"' ?> ><?php _e('Traditional Chinese (Hong Kong)', 'custom-facebook-feed'); ?></option>
670 <option value="zh_TW" <?php if($cff_locale_val == "zh_TW") echo 'selected="selected"' ?> ><?php _e('Traditional Chinese (Taiwan)', 'custom-facebook-feed'); ?></option>
671 </select>
672 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
673 <p class="cff-tooltip cff-more-info"><?php _e("This translates some of the text sent by Facebook, specifically, the descriptive post text (eg: Smash Balloon shared a link) and the text in the 'Like Box' widget. To find out how to translate the other text in the plugin see <a href='https://smashballoon.com/cff-how-does-the-plugin-handle-text-and-language-translation/' target='_blank'>this FAQ</a>."); ?></p>
674 </td>
675 </tr>
676
677 <tr>
678 <th><label for="cff_timezone" class="bump-left"><?php _e('Timezone', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> timezone
679 Eg: timezone="America/New_York"
680 <a href="http://php.net/manual/en/timezones.php" target="_blank">See full list</a></code></th>
681 <td>
682 <select name="cff_timezone" style="width: 300px;">
683 <option value="Pacific/Midway" <?php if($cff_timezone == "Pacific/Midway") echo 'selected="selected"' ?> ><?php _e('(GMT-11:00) Midway Island, Samoa', 'custom-facebook-feed'); ?></option>
684 <option value="America/Adak" <?php if($cff_timezone == "America/Adak") echo 'selected="selected"' ?> ><?php _e('(GMT-10:00) Hawaii-Aleutian', 'custom-facebook-feed'); ?></option>
685 <option value="Etc/GMT+10" <?php if($cff_timezone == "Etc/GMT+10") echo 'selected="selected"' ?> ><?php _e('(GMT-10:00) Hawaii', 'custom-facebook-feed'); ?></option>
686 <option value="Pacific/Marquesas" <?php if($cff_timezone == "Pacific/Marquesas") echo 'selected="selected"' ?> ><?php _e('(GMT-09:30) Marquesas Islands', 'custom-facebook-feed'); ?></option>
687 <option value="Pacific/Gambier" <?php if($cff_timezone == "Pacific/Gambier") echo 'selected="selected"' ?> ><?php _e('(GMT-09:00) Gambier Islands', 'custom-facebook-feed'); ?></option>
688 <option value="America/Anchorage" <?php if($cff_timezone == "America/Anchorage") echo 'selected="selected"' ?> ><?php _e('(GMT-09:00) Alaska', 'custom-facebook-feed'); ?></option>
689 <option value="America/Ensenada" <?php if($cff_timezone == "America/Ensenada") echo 'selected="selected"' ?> ><?php _e('(GMT-08:00) Tijuana, Baja California', 'custom-facebook-feed'); ?></option>
690 <option value="Etc/GMT+8" <?php if($cff_timezone == "Etc/GMT+8") echo 'selected="selected"' ?> ><?php _e('(GMT-08:00) Pitcairn Islands', 'custom-facebook-feed'); ?></option>
691 <option value="America/Los_Angeles" <?php if($cff_timezone == "America/Los_Angeles") echo 'selected="selected"' ?> ><?php _e('(GMT-08:00) Pacific Time (US & Canada)', 'custom-facebook-feed'); ?></option>
692 <option value="America/Denver" <?php if($cff_timezone == "America/Denver") echo 'selected="selected"' ?> ><?php _e('(GMT-07:00) Mountain Time (US & Canada)', 'custom-facebook-feed'); ?></option>
693 <option value="America/Chihuahua" <?php if($cff_timezone == "America/Chihuahua") echo 'selected="selected"' ?> ><?php _e('(GMT-07:00) Chihuahua, La Paz, Mazatlan', 'custom-facebook-feed'); ?></option>
694 <option value="America/Dawson_Creek" <?php if($cff_timezone == "America/Dawson_Creek") echo 'selected="selected"' ?> ><?php _e('(GMT-07:00) Arizona', 'custom-facebook-feed'); ?></option>
695 <option value="America/Belize" <?php if($cff_timezone == "America/Belize") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Saskatchewan, Central America', 'custom-facebook-feed'); ?></option>
696 <option value="America/Cancun" <?php if($cff_timezone == "America/Cancun") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Guadalajara, Mexico City, Monterrey', 'custom-facebook-feed'); ?></option>
697 <option value="Chile/EasterIsland" <?php if($cff_timezone == "Chile/EasterIsland") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Easter Island', 'custom-facebook-feed'); ?></option>
698 <option value="America/Chicago" <?php if($cff_timezone == "America/Chicago") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Central Time (US & Canada)', 'custom-facebook-feed'); ?></option>
699 <option value="America/New_York" <?php if($cff_timezone == "America/New_York") echo 'selected="selected"' ?> ><?php _e('(GMT-05:00) Eastern Time (US & Canada)', 'custom-facebook-feed'); ?></option>
700 <option value="America/Havana" <?php if($cff_timezone == "America/Havana") echo 'selected="selected"' ?> ><?php _e('(GMT-05:00) Cuba', 'custom-facebook-feed'); ?></option>
701 <option value="America/Bogota" <?php if($cff_timezone == "America/Bogota") echo 'selected="selected"' ?> ><?php _e('(GMT-05:00) Bogota, Lima, Quito, Rio Branco', 'custom-facebook-feed'); ?></option>
702 <option value="America/Caracas" <?php if($cff_timezone == "America/Caracas") echo 'selected="selected"' ?> ><?php _e('(GMT-04:30) Caracas', 'custom-facebook-feed'); ?></option>
703 <option value="America/Santiago" <?php if($cff_timezone == "America/Santiago") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Santiago', 'custom-facebook-feed'); ?></option>
704 <option value="America/La_Paz" <?php if($cff_timezone == "America/La_Paz") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) La Paz', 'custom-facebook-feed'); ?></option>
705 <option value="Atlantic/Stanley" <?php if($cff_timezone == "Atlantic/Stanley") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Faukland Islands', 'custom-facebook-feed'); ?></option>
706 <option value="America/Campo_Grande" <?php if($cff_timezone == "America/Campo_Grande") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Brazil', 'custom-facebook-feed'); ?></option>
707 <option value="America/Goose_Bay" <?php if($cff_timezone == "America/Goose_Bay") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Atlantic Time (Goose Bay)', 'custom-facebook-feed'); ?></option>
708 <option value="America/Glace_Bay" <?php if($cff_timezone == "America/Glace_Bay") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Atlantic Time (Canada)', 'custom-facebook-feed'); ?></option>
709 <option value="America/St_Johns" <?php if($cff_timezone == "America/St_Johns") echo 'selected="selected"' ?> ><?php _e('(GMT-03:30) Newfoundland', 'custom-facebook-feed'); ?></option>
710 <option value="America/Araguaina" <?php if($cff_timezone == "America/Araguaina") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) UTC-3', 'custom-facebook-feed'); ?></option>
711 <option value="America/Montevideo" <?php if($cff_timezone == "America/Montevideo") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Montevideo', 'custom-facebook-feed'); ?></option>
712 <option value="America/Miquelon" <?php if($cff_timezone == "America/Miquelon") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Miquelon, St. Pierre', 'custom-facebook-feed'); ?></option>
713 <option value="America/Godthab" <?php if($cff_timezone == "America/Godthab") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Greenland', 'custom-facebook-feed'); ?></option>
714 <option value="America/Argentina/Buenos_Aires" <?php if($cff_timezone == "America/Argentina/Buenos_Aires") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Buenos Aires', 'custom-facebook-feed'); ?></option>
715 <option value="America/Sao_Paulo" <?php if($cff_timezone == "America/Sao_Paulo") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Brasilia', 'custom-facebook-feed'); ?></option>
716 <option value="America/Noronha" <?php if($cff_timezone == "America/Noronha") echo 'selected="selected"' ?> ><?php _e('(GMT-02:00) Mid-Atlantic', 'custom-facebook-feed'); ?></option>
717 <option value="Atlantic/Cape_Verde" <?php if($cff_timezone == "Atlantic/Cape_Verde") echo 'selected="selected"' ?> ><?php _e('(GMT-01:00) Cape Verde Is.', 'custom-facebook-feed'); ?></option>
718 <option value="Atlantic/Azores" <?php if($cff_timezone == "Atlantic/Azores") echo 'selected="selected"' ?> ><?php _e('(GMT-01:00) Azores', 'custom-facebook-feed'); ?></option>
719 <option value="Europe/Belfast" <?php if($cff_timezone == "Europe/Belfast") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : Belfast', 'custom-facebook-feed'); ?></option>
720 <option value="Europe/Dublin" <?php if($cff_timezone == "Europe/Dublin") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : Dublin', 'custom-facebook-feed'); ?></option>
721 <option value="Europe/Lisbon" <?php if($cff_timezone == "Europe/Lisbon") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : Lisbon', 'custom-facebook-feed'); ?></option>
722 <option value="Europe/London" <?php if($cff_timezone == "Europe/London") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : London', 'custom-facebook-feed'); ?></option>
723 <option value="Africa/Abidjan" <?php if($cff_timezone == "Africa/Abidjan") echo 'selected="selected"' ?> ><?php _e('(GMT) Monrovia, Reykjavik', 'custom-facebook-feed'); ?></option>
724 <option value="Europe/Amsterdam" <?php if($cff_timezone == "Europe/Amsterdam") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna', 'custom-facebook-feed'); ?></option>
725 <option value="Europe/Belgrade" <?php if($cff_timezone == "Europe/Belgrade") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague', 'custom-facebook-feed'); ?></option>
726 <option value="Europe/Brussels" <?php if($cff_timezone == "Europe/Brussels") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) Brussels, Copenhagen, Madrid, Paris', 'custom-facebook-feed'); ?></option>
727 <option value="Africa/Algiers" <?php if($cff_timezone == "Africa/Algiers") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) West Central Africa', 'custom-facebook-feed'); ?></option>
728 <option value="Africa/Windhoek" <?php if($cff_timezone == "Africa/Windhoek") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) Windhoek', 'custom-facebook-feed'); ?></option>
729 <option value="Asia/Beirut" <?php if($cff_timezone == "Asia/Beirut") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Beirut', 'custom-facebook-feed'); ?></option>
730 <option value="Africa/Cairo" <?php if($cff_timezone == "Africa/Cairo") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Cairo', 'custom-facebook-feed'); ?></option>
731 <option value="Asia/Gaza" <?php if($cff_timezone == "Asia/Gaza") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Gaza', 'custom-facebook-feed'); ?></option>
732 <option value="Africa/Blantyre" <?php if($cff_timezone == "Africa/Blantyre") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Harare, Pretoria', 'custom-facebook-feed'); ?></option>
733 <option value="Asia/Jerusalem" <?php if($cff_timezone == "Asia/Jerusalem") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Jerusalem', 'custom-facebook-feed'); ?></option>
734 <option value="Europe/Minsk" <?php if($cff_timezone == "Europe/Minsk") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Minsk', 'custom-facebook-feed'); ?></option>
735 <option value="Asia/Damascus" <?php if($cff_timezone == "Asia/Damascus") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Syria', 'custom-facebook-feed'); ?></option>
736 <option value="Europe/Moscow" <?php if($cff_timezone == "Europe/Moscow") echo 'selected="selected"' ?> ><?php _e('(GMT+03:00) Moscow, St. Petersburg, Volgograd', 'custom-facebook-feed'); ?></option>
737 <option value="Africa/Addis_Ababa" <?php if($cff_timezone == "Africa/Addis_Ababa") echo 'selected="selected"' ?> ><?php _e('(GMT+03:00) Nairobi', 'custom-facebook-feed'); ?></option>
738 <option value="Asia/Tehran" <?php if($cff_timezone == "Asia/Tehran") echo 'selected="selected"' ?> ><?php _e('(GMT+03:30) Tehran', 'custom-facebook-feed'); ?></option>
739 <option value="Asia/Dubai" <?php if($cff_timezone == "Asia/Dubai") echo 'selected="selected"' ?> ><?php _e('(GMT+04:00) Abu Dhabi, Muscat', 'custom-facebook-feed'); ?></option>
740 <option value="Asia/Yerevan" <?php if($cff_timezone == "Asia/Yerevan") echo 'selected="selected"' ?> ><?php _e('(GMT+04:00) Yerevan', 'custom-facebook-feed'); ?></option>
741 <option value="Asia/Kabul" <?php if($cff_timezone == "Asia/Kabul") echo 'selected="selected"' ?> ><?php _e('(GMT+04:30) Kabul', 'custom-facebook-feed'); ?></option>
742 <option value="Asia/Yekaterinburg" <?php if($cff_timezone == "Asia/Yekaterinburg") echo 'selected="selected"' ?> ><?php _e('(GMT+05:00) Ekaterinburg', 'custom-facebook-feed'); ?></option>
743 <option value="Asia/Tashkent" <?php if($cff_timezone == "Asia/Tashkent") echo 'selected="selected"' ?> ><?php _e('(GMT+05:00) Tashkent', 'custom-facebook-feed'); ?></option>
744 <option value="Asia/Kolkata" <?php if($cff_timezone == "Asia/Kolkata") echo 'selected="selected"' ?> ><?php _e('(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi', 'custom-facebook-feed'); ?></option>
745 <option value="Asia/Katmandu" <?php if($cff_timezone == "Asia/Katmandu") echo 'selected="selected"' ?> ><?php _e('(GMT+05:45) Kathmandu', 'custom-facebook-feed'); ?></option>
746 <option value="Asia/Dhaka" <?php if($cff_timezone == "Asia/Dhaka") echo 'selected="selected"' ?> ><?php _e('(GMT+06:00) Astana, Dhaka', 'custom-facebook-feed'); ?></option>
747 <option value="Asia/Novosibirsk" <?php if($cff_timezone == "Asia/Novosibirsk") echo 'selected="selected"' ?> ><?php _e('(GMT+06:00) Novosibirsk', 'custom-facebook-feed'); ?></option>
748 <option value="Asia/Rangoon" <?php if($cff_timezone == "Asia/Rangoon") echo 'selected="selected"' ?> ><?php _e('(GMT+06:30) Yangon (Rangoon)', 'custom-facebook-feed'); ?></option>
749 <option value="Asia/Bangkok" <?php if($cff_timezone == "Asia/Bangkok") echo 'selected="selected"' ?> ><?php _e('(GMT+07:00) Bangkok, Hanoi, Jakarta', 'custom-facebook-feed'); ?></option>
750 <option value="Asia/Krasnoyarsk" <?php if($cff_timezone == "Asia/Krasnoyarsk") echo 'selected="selected"' ?> ><?php _e('(GMT+07:00) Krasnoyarsk', 'custom-facebook-feed'); ?></option>
751 <option value="Asia/Hong_Kong" <?php if($cff_timezone == "Asia/Hong_Kong") echo 'selected="selected"' ?> ><?php _e('(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi', 'custom-facebook-feed'); ?></option>
752 <option value="Asia/Irkutsk" <?php if($cff_timezone == "Asia/Irkutsk") echo 'selected="selected"' ?> ><?php _e('(GMT+08:00) Irkutsk, Ulaan Bataar', 'custom-facebook-feed'); ?></option>
753 <option value="Australia/Perth" <?php if($cff_timezone == "Australia/Perth") echo 'selected="selected"' ?> ><?php _e('(GMT+08:00) Perth', 'custom-facebook-feed'); ?></option>
754 <option value="Australia/Eucla" <?php if($cff_timezone == "Australia/Eucla") echo 'selected="selected"' ?> ><?php _e('(GMT+08:45) Eucla', 'custom-facebook-feed'); ?></option>
755 <option value="Asia/Tokyo" <?php if($cff_timezone == "Asia/Tokyo") echo 'selected="selected"' ?> ><?php _e('(GMT+09:00) Osaka, Sapporo, Tokyo', 'custom-facebook-feed'); ?></option>
756 <option value="Asia/Seoul" <?php if($cff_timezone == "Asia/Seoul") echo 'selected="selected"' ?> ><?php _e('(GMT+09:00) Seoul', 'custom-facebook-feed'); ?></option>
757 <option value="Asia/Yakutsk" <?php if($cff_timezone == "Asia/Yakutsk") echo 'selected="selected"' ?> ><?php _e('(GMT+09:00) Yakutsk', 'custom-facebook-feed'); ?></option>
758 <option value="Australia/Adelaide" <?php if($cff_timezone == "Australia/Adelaide") echo 'selected="selected"' ?> ><?php _e('(GMT+09:30) Adelaide', 'custom-facebook-feed'); ?></option>
759 <option value="Australia/Darwin" <?php if($cff_timezone == "Australia/Darwin") echo 'selected="selected"' ?> ><?php _e('(GMT+09:30) Darwin', 'custom-facebook-feed'); ?></option>
760 <option value="Australia/Brisbane" <?php if($cff_timezone == "Australia/Brisbane") echo 'selected="selected"' ?> ><?php _e('(GMT+10:00) Brisbane', 'custom-facebook-feed'); ?></option>
761 <option value="Australia/Hobart" <?php if($cff_timezone == "Australia/Hobart") echo 'selected="selected"' ?> ><?php _e('(GMT+10:00) Sydney', 'custom-facebook-feed'); ?></option>
762 <option value="Asia/Vladivostok" <?php if($cff_timezone == "Asia/Vladivostok") echo 'selected="selected"' ?> ><?php _e('(GMT+10:00) Vladivostok', 'custom-facebook-feed'); ?></option>
763 <option value="Australia/Lord_Howe" <?php if($cff_timezone == "Australia/Lord_Howe") echo 'selected="selected"' ?> ><?php _e('(GMT+10:30) Lord Howe Island', 'custom-facebook-feed'); ?></option>
764 <option value="Etc/GMT-11" <?php if($cff_timezone == "Etc/GMT-11") echo 'selected="selected"' ?> ><?php _e('(GMT+11:00) Solomon Is., New Caledonia', 'custom-facebook-feed'); ?></option>
765 <option value="Asia/Magadan" <?php if($cff_timezone == "Asia/Magadan") echo 'selected="selected"' ?> ><?php _e('(GMT+11:00) Magadan', 'custom-facebook-feed'); ?></option>
766 <option value="Pacific/Norfolk" <?php if($cff_timezone == "Pacific/Norfolk") echo 'selected="selected"' ?> ><?php _e('(GMT+11:30) Norfolk Island', 'custom-facebook-feed'); ?></option>
767 <option value="Asia/Anadyr" <?php if($cff_timezone == "Asia/Anadyr") echo 'selected="selected"' ?> ><?php _e('(GMT+12:00) Anadyr, Kamchatka', 'custom-facebook-feed'); ?></option>
768 <option value="Pacific/Auckland" <?php if($cff_timezone == "Pacific/Auckland") echo 'selected="selected"' ?> ><?php _e('(GMT+12:00) Auckland, Wellington', 'custom-facebook-feed'); ?></option>
769 <option value="Etc/GMT-12" <?php if($cff_timezone == "Etc/GMT-12") echo 'selected="selected"' ?> ><?php _e('(GMT+12:00) Fiji, Kamchatka, Marshall Is.', 'custom-facebook-feed'); ?></option>
770 <option value="Pacific/Chatham" <?php if($cff_timezone == "Pacific/Chatham") echo 'selected="selected"' ?> ><?php _e('(GMT+12:45) Chatham Islands', 'custom-facebook-feed'); ?></option>
771 <option value="Pacific/Tongatapu" <?php if($cff_timezone == "Pacific/Tongatapu") echo 'selected="selected"' ?> ><?php _e('(GMT+13:00) Nuku\'alofa', 'custom-facebook-feed'); ?></option>
772 <option value="Pacific/Kiritimati" <?php if($cff_timezone == "Pacific/Kiritimati") echo 'selected="selected"' ?> ><?php _e('(GMT+14:00) Kiritimati', 'custom-facebook-feed'); ?></option>
773 </select>
774 </td>
775 </tr>
776
777 </tbody>
778 </table>
779
780 <div class="cff-save-settings-btn">
781 <?php submit_button('Save Settings & Clear Cache'); ?>
782
783 <a class="cff-tooltip-link" href="JavaScript:void(0);">Why is the cache cleared?</a>
784 <p class="cff-tooltip cff-more-info"><?php _e("As the settings on this page directly affect the request made to Facebook to get data, then when these settings are changed the plugin cache is cleared in order for the plugin to check Facebook for data again using these new settings. The plugin will check Facebook for data the next time the page that the feed is on is loaded."); ?></p>
785 </div>
786
787 <p style="padding-top: 5px;"><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Having trouble using the plugin? Check out the', 'custom-facebook-feed'); ?> <a href='admin.php?page=cff-top&amp;tab=support'><?php _e('Support', 'custom-facebook-feed'); ?></a> <?php _e('tab', 'custom-facebook-feed'); ?>.</p>
788 </form>
789
790 <div class="cff_quickstart">
791 <h3><i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; Display your feed</h3>
792 <p>Copy and paste this shortcode directly into the page, post or widget where you'd like to display the feed: <input type="text" value="[custom-facebook-feed]" size="22" readonly="readonly" style="text-align: center;" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."></p>
793 <p>Find out how to display <a href="https://smashballoon.com/using-shortcode-options-customize-facebook-feeds/?utm_campaign=facebook-free&utm_source=settings&utm_medium=multiple" target="_blank"><b>multiple feeds</b></a>.</p>
794 </div>
795
796 <a href="https://smashballoon.com/custom-facebook-feed/demo/?utm_campaign=facebook-free&utm_source=footer&utm_medium=ad" target="_blank" class="cff-pro-notice"><img src="<?php echo plugins_url( 'img/pro.png?2019' , __FILE__ ) ?>" /></a>
797
798 <p class="cff_plugins_promo dashicons-before dashicons-admin-plugins"> <?php _e('Check out our other free plugins for <a href="https://wordpress.org/plugins/instagram-feed/" target="_blank">Instagram</a>, <a href="https://wordpress.org/plugins/custom-twitter-feeds/" target="_blank">Twitter</a>, and <a href="https://wordpress.org/plugins/feeds-for-youtube/" target="_blank">YouTube</a>.', 'custom-facebook-feed' ); ?></p>
799
800 <div class="cff-share-plugin">
801 <h3><?php _e('Like the plugin? Help spread the word!', 'custom-facebook-feed'); ?></h3>
802
803 <button id="cff-admin-show-share-links" class="button secondary" style="margin-bottom: 1px;"><i class="fa fa-share-alt" aria-hidden="true"></i>&nbsp;&nbsp;Share the plugin</button> <div id="cff-admin-share-links"></div>
804 </div>
805
806 <?php } //End config tab ?>
807
808
809 <?php if( $cff_active_tab == 'support' ) { //Start Support tab ?>
810
811 <div class="cff_support">
812
813 <br />
814 <h3 style="padding-bottom: 10px;">Need help?</h3>
815
816 <p>
817 <span class="cff-support-title"><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/custom-facebook-feed/docs/free/?utm_campaign=facebook-free&utm_source=support&utm_medium=setup" target="_blank"><?php _e('Setup Directions'); ?></a></span>
818 <?php _e('A step-by-step guide on how to setup and use the plugin.'); ?>
819 </p>
820
821 <p>
822 <span class="cff-support-title"><i class="fa fa-question-circle" aria-hidden="true"></i>&nbsp; <a href="https://smashballoon.com/custom-facebook-feed/faq/?utm_campaign=facebook-free&utm_source=support&utm_medium=faqs" target="_blank"><?php _e('FAQs and Docs'); ?></a></span>
823 <?php _e('View our expansive library of FAQs and documentation to help solve your problem as quickly as possible.'); ?>
824 </p>
825
826 <div class="cff-support-faqs">
827
828 <ul class="cff-faq-col-1">
829 <li><b>FAQs</b></li>
830 <li>&bull;&nbsp; <?php _e('<a href="https://smashballoon.com/category/custom-facebook-feed/faq/?utm_campaign=facebook-free&utm_source=support&utm_medium=general" target="_blank">General Questions</a>'); ?></li>
831 <li>&bull;&nbsp; <?php _e('<a href="https://smashballoon.com/category/custom-facebook-feed/getting-started/?utm_campaign=facebook-free&utm_source=support&utm_medium=setup" target="_blank">Getting Started</a>'); ?></li>
832 <li>&bull;&nbsp; <?php _e('<a href="https://smashballoon.com/category/custom-facebook-feed/troubleshooting/?utm_campaign=facebook-free&utm_source=support&utm_medium=issues" target="_blank">Common Issues</a>'); ?></li>
833 <li style="margin-top: 8px; font-size: 12px;"><a href="https://smashballoon.com/custom-facebook-feed/faq/?utm_campaign=facebook-free&utm_source=support&utm_medium=faqs" target="_blank">See all<i class="fa fa-chevron-right" aria-hidden="true"></i></a></li>
834
835 </ul>
836
837 <ul>
838 <li><b>Documentation</b></li>
839 <li>&bull;&nbsp; <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/docs/free/?utm_campaign=facebook-free&utm_source=support&utm_medium=setup" target="_blank">Installation and Configuration</a>'); ?></li>
840 <li>&bull;&nbsp; <?php _e('<a href="https://smashballoon.com/custom-facebook-feed/docs/shortcodes/?utm_campaign=facebook-free&utm_source=support&utm_medium=shortcode" target="_blank">Shortcode Reference</a>', 'custom-facebook-feed'); ?></li>
841 <li>&bull;&nbsp; <?php _e('<a href="https://smashballoon.com/snippets/?utm_campaign=facebook-free&utm_source=support&utm_medium=snippets" target="_blank">Custom CSS and JavaScript Snippets</a>'); ?></li>
842 <li style="margin-top: 8px; font-size: 12px;"><a href="https://smashballoon.com/custom-facebook-feed/docs/?utm_campaign=facebook-free&utm_source=support&utm_medium=docs" target="_blank">See all<i class="fa fa-chevron-right" aria-hidden="true"></i></a></li>
843 </ul>
844 </div>
845
846 <p>
847 <span class="cff-support-title"><i class="fa fa-envelope" aria-hidden="true"></i>&nbsp; <a href="http://smashballoon.com/custom-facebook-feed/support/?utm_campaign=facebook-free&utm_source=support&utm_medium=support" target="_blank"><?php _e('Request Support'); ?></a></span>
848 <?php _e('Still need help? Submit a ticket and one of our support experts will get back to you as soon as possible.<br /><b>Important:</b> Please include your <b>System Info</b> below with all support requests.'); ?>
849 </p>
850 </div>
851
852 <hr />
853
854 <h3><?php _e('System Info &nbsp; <i style="color: #666; font-size: 11px; font-weight: normal;">Click the text below to select all</i>', 'custom-facebook-feed'); ?></h3>
855
856 <?php
857 $cff_use_own_token = get_option( 'cff_show_access_token' );
858 $access_token = get_option( $access_token );
859 $posts_json = cff_fetchUrl("https://graph.facebook.com/".get_option( trim($page_id) )."/feed?access_token=". trim($access_token) ."&limit=1");
860 ?>
861
862 <textarea readonly="readonly" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)." style="width: 70%; height: 500px; white-space: pre; font-family: Menlo,Monaco,monospace;">
863 ## SITE/SERVER INFO: ##
864 Site URL: <?php echo site_url() . "\n"; ?>
865 Home URL: <?php echo home_url() . "\n"; ?>
866 WordPress Version: <?php echo get_bloginfo( 'version' ) . "\n"; ?>
867 PHP Version: <?php echo PHP_VERSION . "\n"; ?>
868 Web Server Info: <?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?>
869 PHP allow_url_fopen: <?php echo ini_get( 'allow_url_fopen' ) ? "Yes" . "\n" : "No" . "\n"; ?>
870 PHP cURL: <?php echo is_callable('curl_init') ? "Yes" . "\n" : "No" . "\n"; ?>
871 JSON: <?php echo function_exists("json_decode") ? "Yes" . "\n" : "No" . "\n" ?>
872 SSL Stream: <?php echo in_array('https', stream_get_wrappers()) ? "Yes" . "\n" : "No" . "\n" ?>
873
874 ## ACTIVE PLUGINS: ##
875 <?php
876 $plugins = get_plugins();
877 $active_plugins = get_option( 'active_plugins', array() );
878
879 foreach ( $plugins as $plugin_path => $plugin ) {
880 // If the plugin isn't active, don't show it.
881 if ( ! in_array( $plugin_path, $active_plugins ) )
882 continue;
883
884 echo $plugin['Name'] . ': ' . $plugin['Version'] ."\n";
885 }
886 ?>
887
888 ## PLUGIN SETTINGS: ##
889 Access Token: <?php echo chunk_split( get_option( 'cff_access_token' ), 110 ); ?>
890 Page ID: <?php echo get_option( 'cff_page_id' ) ."\n"; ?>
891 Number of Posts: <?php echo get_option( 'cff_num_show' ) ."\n"; ?>
892 Post Limit: <?php echo get_option( 'cff_post_limit' ) ."\n"; ?>
893 Show Posts by: <?php echo get_option( 'cff_show_others' ) ."\n"; ?>
894 Cache Time: <?php echo get_option( 'cff_cache_time' ) ." ".get_option( 'cff_cache_time_unit' )."\n"; ?>
895 Locale: <?php echo get_option( 'cff_locale' ) ."\n"; ?>
896 Timezone: <?php $options = get_option( 'cff_style_settings', array() );
897 echo $options[ 'cff_timezone' ] ."\n"; ?>
898
899 <?php if( isset( $options[ 'cff_feed_width' ] ) ) { ?>
900 ## CUSTOMIZE ##
901 Feed Width => <?php echo $options[ 'cff_feed_width' ] ."\n"; ?>
902 Responsive => <?php echo $options[ 'cff_feed_width_resp' ] ."\n"; ?>
903 Feed Height => <?php echo $options[ 'cff_feed_height' ] ."\n"; ?>
904 Feed Padding => <?php echo $options[ 'cff_feed_padding' ] ."\n"; ?>
905 Feed BG Color => <?php echo $options[ 'cff_bg_color' ] ."\n"; ?>
906 CSS Class => <?php echo $options[ 'cff_class' ] ."\n"; ?>
907 Feed Columns => <?php echo $options['cff_cols'] ."\n"; ?>
908 Mobile Columns => <?php echo $options['cff_cols_mobile'] ."\n"; ?>
909
910 ## HEADER: ##
911 Show Header => <?php echo $options[ 'cff_show_header' ] ."\n"; ?>
912 Text => <?php echo $options[ 'cff_header_text' ] ."\n"; ?>
913 Header Outside => <?php echo $options[ 'cff_header_outside' ] ."\n"; ?>
914 Background Color => <?php echo $options[ 'cff_header_bg_color' ] ."\n"; ?>
915 Padding => <?php echo $options[ 'cff_header_padding' ] ."\n"; ?>
916 Text Size => <?php echo $options[ 'cff_header_text_size' ] ."\n"; ?>
917 Text Weight => <?php echo $options[ 'cff_header_text_weight' ] ."\n"; ?>
918 Text Color => <?php echo $options[ 'cff_header_text_color' ] ."\n"; ?>
919 Icon => <?php echo $options[ 'cff_header_icon' ] ."\n"; ?>
920 Icon Color => <?php echo $options[ 'cff_header_icon_color' ] ."\n"; ?>
921 Icon Size => <?php echo $options[ 'cff_header_icon_size' ] ."\n"; ?>
922
923 ## LIKE BOX: ##
924 Position => <?php echo $options[ 'cff_like_box_position' ] ."\n"; ?>
925 Display Outside => <?php echo $options[ 'cff_like_box_outside' ] ."\n"; ?>
926 Show Fans => <?php echo $options[ 'cff_like_box_faces' ] ."\n"; ?>
927 Cover Photo => <?php echo $options[ 'cff_like_box_cover' ] ."\n"; ?>
928 Small Header => <?php echo $options[ 'cff_like_box_small_header' ] ."\n"; ?>
929 Hide CTA => <?php echo $options[ 'cff_like_box_hide_cta' ] ."\n"; ?>
930 Custom Width => <?php echo $options[ 'cff_likebox_width' ] ."\n"; ?>
931
932 ## SHOW/HIDE: ##
933 Show => <?php if( $options[ 'cff_show_author' ] ) echo 'Author, ';
934 if( $options[ 'cff_show_text' ] ) echo 'Post Text, ';
935 if( $options[ 'cff_show_desc' ] ) echo 'Description, ';
936 if( $options[ 'cff_show_shared_links' ] ) echo 'Shared Links, ';
937 if( $options[ 'cff_show_date' ] ) echo 'Date, ';
938 if( $options[ 'cff_show_media' ] ) echo 'Photos/Videos, ';
939 if( $options[ 'cff_show_event_title' ] ) echo 'Event Title, ';
940 if( $options[ 'cff_show_event_details' ] ) echo 'Event Details, ';
941 if( $options[ 'cff_show_meta' ] ) echo 'Comments Box, ';
942 if( $options[ 'cff_show_link' ] ) echo 'Post Link';
943 echo "\n"; ?>
944 Hide => <?php if( !$options[ 'cff_show_author' ] ) echo 'Author, ';
945 if( !$options[ 'cff_show_text' ] ) echo 'Post Text, ';
946 if( !$options[ 'cff_show_desc' ] ) echo 'Description, ';
947 if( !$options[ 'cff_show_shared_links' ] ) echo 'Shared Links, ';
948 if( !$options[ 'cff_show_date' ] ) echo 'Date, ';
949 if( !$options[ 'cff_show_media' ] ) echo 'Photos/Videos, ';
950 if( !$options[ 'cff_show_event_title' ] ) echo 'Event Title, ';
951 if( !$options[ 'cff_show_event_details' ] ) echo 'Event Details, ';
952 if( !$options[ 'cff_show_meta' ] ) echo 'Comments Box, ';
953 if( !$options[ 'cff_show_link' ] ) echo 'Post Link';
954 echo "\n"; ?>
955
956 ## STYLE POSTS: ##
957 Post Style => <?php echo $options[ 'cff_post_style' ] ."\n"; ?>
958 Background Color => <?php echo $options[ 'cff_post_bg_color' ] ."\n"; ?>
959 Rounded => <?php echo $options[ 'cff_post_rounded' ] ."\n"; ?>
960 Seperator Color => <?php echo $options[ 'cff_sep_color' ] ."\n"; ?>
961 Seperator Size => <?php echo $options[ 'cff_sep_size' ] ."\n"; ?>
962 Box Shadow => <?php echo $options[ 'cff_box_shadow' ] ."\n"; ?>
963
964 ## POST AUTHOR: ##
965 Text Size => <?php echo $options[ 'cff_author_size' ] ."\n"; ?>
966 Text Color => <?php echo $options[ 'cff_author_color' ] ."\n"; ?>
967
968 ## POST TEXT: ##
969 Text Length => <?php echo get_option('cff_title_length') ."\n"; ?>
970 Format => <?php echo $options['cff_title_format'] ."\n"; ?>
971 Text Size => <?php echo $options['cff_title_size'] ."\n"; ?>
972 Text Weight => <?php echo $options['cff_title_weight'] ."\n"; ?>
973 Text Color => <?php echo $options['cff_title_color'] ."\n"; ?>
974 Link Color => <?php echo $options['cff_link_color'] ."\n"; ?>
975 Link Text To Facebook => <?php echo $options['cff_link_to_timeline'] ."\n"; ?>
976 Link Post Tags => <?php echo $options['cff_post_tags'] ."\n"; ?>
977 Link Hashags => <?php echo $options['cff_link_hashtags'] ."\n"; ?>
978
979 ## SHARED POST DESCRIPTION: ##
980 Text Size => <?php echo $options['cff_body_size'] ."\n"; ?>
981 Text Weight => <?php echo $options['cff_body_weight'] ."\n"; ?>
982 Text Color => <?php echo $options['cff_body_color'] ."\n"; ?>
983
984 ## POST DATE: ##
985 Position => <?php echo $options['cff_date_position'] ."\n"; ?>
986 Text Size => <?php echo $options['cff_date_size'] ."\n"; ?>
987 Text Weight => <?php echo $options['cff_date_weight'] ."\n"; ?>
988 Text Color => <?php echo $options['cff_date_color'] ."\n"; ?>
989 Date Formatting => <?php echo $options['cff_date_formatting'] ."\n"; ?>
990 Timezone => <?php echo $options['cff_timezone'] ."\n"; ?>
991 Custom Format => <?php echo $options['cff_date_custom'] ."\n"; ?>
992 Text Before Date => <?php echo $options['cff_date_before'] ."\n"; ?>
993 Text After Date => <?php echo $options['cff_date_after'] ."\n"; ?>
994
995 ## SHARED LINK BOXES: ##
996 Link Box BG Color => <?php echo $options['cff_link_bg_color'] ."\n"; ?>
997 Link Box Border Color => <?php echo $options['cff_link_border_color'] ."\n"; ?>
998 Remove Background/Border => <?php echo $options['cff_disable_link_box'] ."\n"; ?>
999 Link Title Format => <?php echo $options['cff_link_title_format'] ."\n"; ?>
1000 Link Title Color => <?php echo $options['cff_link_title_color'] ."\n"; ?>
1001 Link Title Size => <?php echo $options['cff_link_title_size'] ."\n"; ?>
1002 Link URL Size => <?php echo $options['cff_link_url_size'] ."\n"; ?>
1003 Link URL Color => <?php echo $options['cff_link_url_color'] ."\n"; ?>
1004 Link Description Size => <?php echo $options['cff_link_desc_size'] ."\n"; ?>
1005 Link Description Color => <?php echo $options['cff_link_desc_color'] ."\n"; ?>
1006 Max Length => <?php echo get_option('cff_body_length') ."\n"; ?>
1007
1008 ## EVENT TITLE: ##
1009 Format => <?php echo $options['cff_event_title_format'] ."\n"; ?>
1010 Text Size => <?php echo $options['cff_event_title_size'] ."\n"; ?>
1011 Text Weight => <?php echo $options['cff_event_title_weight'] ."\n"; ?>
1012 Text Color => <?php echo $options['cff_event_title_color'] ."\n"; ?>
1013 Link To Facebook => <?php echo $options['cff_event_title_link'] ."\n"; ?>
1014
1015 ## EVENT DATE: ##
1016 Text Size => <?php echo $options['cff_event_date_size'] ."\n"; ?>
1017 Text Weight => <?php echo $options['cff_event_date_weight'] ."\n"; ?>
1018 Text Color => <?php echo $options['cff_event_date_color'] ."\n"; ?>
1019 Date Position => <?php echo $options['cff_event_date_position'] ."\n"; ?>
1020 Date Formatting => <?php echo $options['cff_event_date_formatting'] ."\n"; ?>
1021 Custom Format => <?php echo $options['cff_event_date_custom'] ."\n"; ?>
1022
1023 ## EVENT DETAILS: ##
1024 Text Size => <?php echo $options['cff_event_details_size'] ."\n"; ?>
1025 Text Weight => <?php echo $options['cff_event_details_weight'] ."\n"; ?>
1026 Text Color => <?php echo $options['cff_event_details_color'] ."\n"; ?>
1027 Link Color => <?php echo $options['cff_event_link_color'] ."\n"; ?>
1028
1029 ## POST ACTION LINKS: ##
1030 Text Size => <?php echo $options['cff_link_size'] ."\n"; ?>
1031 Text Weight => <?php echo $options['cff_link_weight'] ."\n"; ?>
1032 Text Color => <?php echo $options['cff_link_color'] ."\n"; ?>
1033 View on Facebook Text => <?php echo $options['cff_facebook_link_text'] ."\n"; ?>
1034 Share Text => <?php echo $options['cff_facebook_share_text'] ."\n"; ?>
1035 Show View on Facebook Text => <?php echo $options['cff_show_facebook_link'] ."\n"; ?>
1036 Show Share Text => <?php echo $options['cff_show_facebook_share'] ."\n"; ?>
1037
1038 ## CUSTOM CSS/JS: ##
1039 Custom CSS => <?php echo $options['cff_custom_css'] ."\n"; ?>
1040 Custom JavaScript => <?php echo $options['cff_custom_js'] ."\n"; ?>
1041
1042 ## MISC SETTINGS: ##
1043 Loading via AJAX => <?php echo get_option('cff_ajax') ."\n"; ?>
1044 Preserve Settings => <?php echo get_option('cff_preserve_settings') ."\n"; ?>
1045 Credit Link => <?php echo $options['cff_show_credit'] ."\n"; ?>
1046 Minify CSS/JS => <?php echo $options['cff_minify'] ."\n"; ?>
1047 Restricted Page => <?php echo $options['cff_restricted_page'] ."\n"; ?>
1048 Icon Font Source Method => <?php echo $options['cff_font_source'] ."\n"; ?>
1049 Force Cache To Clear => <?php echo $options['cff_cron'] ."\n"; ?>
1050 Request Method => <?php echo $options['cff_request_method'] ."\n"; ?>
1051 Fix Text Shortening => <?php echo $options['cff_format_issue'] ."\n"; ?>
1052 Disable Default Styles => <?php echo $options['cff_disable_styles'] ."\n"; ?>
1053 Disable Frontend Error Notice => <?php if ( isset( $options['disable_admin_notice'] ) ) echo $options['disable_admin_notice']; echo "\n"; ?>
1054 Enable Email => <?php if ( isset( $options['enable_email_report'] ) ) echo $options['enable_email_report']; echo "\n" ?>
1055 Email Addresses => <?php if ( isset( $options['enable_email_report'] ) ) echo $options['email_notification_addresses']; echo "\n"; ?>
1056
1057 ## CUSTOM TEXT/TRANSLATE: ##
1058 Modified text strings:
1059 <?php if($options['cff_see_more_text'] != 'See More'){ ?>See More => <?php echo $options['cff_see_more_text'] ."\n"; ?><?php } ?>
1060 <?php if($options['cff_see_less_text'] != 'See Less'){ ?>See Less => <?php echo $options['cff_see_less_text'] ."\n"; ?><?php } ?>
1061 <?php if($options['cff_facebook_link_text'] != 'View on Facebook'){ ?>View on Facebook => <?php echo $options['cff_facebook_link_text'] ."\n"; ?><?php } ?>
1062 <?php if($options['cff_facebook_share_text'] != 'Share'){ ?>Share => <?php echo $options['cff_facebook_share_text'] ."\n"; ?><?php } ?>
1063 <?php if($options['cff_translate_photos_text'] != 'photos'){ ?>Photos => <?php echo $options['cff_translate_photos_text'] ."\n"; ?><?php } ?>
1064 <?php if($options['cff_translate_photo_text'] != 'Photo'){ ?>Photo => <?php echo $options['cff_translate_photo_text'] ."\n"; ?><?php } ?>
1065 <?php if($options['cff_translate_video_text'] != 'Video'){ ?>Video => <?php echo $options['cff_translate_video_text'] ."\n"; ?><?php } ?>
1066 <?php if($options['cff_translate_learn_more_text'] != 'Learn More'){ ?>Learn More => <?php echo $options['cff_translate_learn_more_text'] ."\n"; ?><?php } ?>
1067 <?php if($options['cff_translate_shop_now_text'] != 'Shop Now'){ ?>Shop Now => <?php echo $options['cff_translate_shop_now_text'] ."\n"; ?><?php } ?>
1068 <?php if($options['cff_translate_message_page_text'] != 'Message Page'){ ?>Message Page => <?php echo $options['cff_translate_message_page_text'] ."\n"; ?><?php } ?>
1069 <?php if($options['cff_translate_second'] != 'second'){ ?>Second => <?php echo $options['cff_translate_second'] ."\n"; ?><?php } ?>
1070 <?php if($options['cff_translate_seconds'] != 'seconds'){ ?>Seconds => <?php echo $options['cff_translate_seconds'] ."\n"; ?><?php } ?>
1071 <?php if($options['cff_translate_minute'] != 'minute'){ ?>Minute => <?php echo $options['cff_translate_minute'] ."\n"; ?><?php } ?>
1072 <?php if($options['cff_translate_minutes'] != 'minutes'){ ?>Minutes => <?php echo $options['cff_translate_minutes'] ."\n"; ?><?php } ?>
1073 <?php if($options['cff_translate_hour'] != 'hour'){ ?>Hour => <?php echo $options['cff_translate_hour'] ."\n"; ?><?php } ?>
1074 <?php if($options['cff_translate_hours'] != 'hours'){ ?>Hours => <?php echo $options['cff_translate_hours'] ."\n"; ?><?php } ?>
1075 <?php if($options['cff_translate_day'] != 'day'){ ?>Day => <?php echo $options['cff_translate_day'] ."\n"; ?><?php } ?>
1076 <?php if($options['cff_translate_days'] != 'days'){ ?>Days => <?php echo $options['cff_translate_days'] ."\n"; ?><?php } ?>
1077 <?php if($options['cff_translate_week'] != 'week'){ ?>Week => <?php echo $options['cff_translate_week'] ."\n"; ?><?php } ?>
1078 <?php if($options['cff_translate_weeks'] != 'weeks'){ ?>Weeks => <?php echo $options['cff_translate_weeks'] ."\n"; ?><?php } ?>
1079 <?php if($options['cff_translate_month'] != 'month'){ ?>Month => <?php echo $options['cff_translate_month'] ."\n"; ?><?php } ?>
1080 <?php if($options['cff_translate_months'] != 'months'){ ?>Months => <?php echo $options['cff_translate_months'] ."\n"; ?><?php } ?>
1081 <?php if($options['cff_translate_year'] != 'year'){ ?>Year => <?php echo $options['cff_translate_year'] ."\n"; ?><?php } ?>
1082 <?php if($options['cff_translate_years'] != 'years'){ ?>Years => <?php echo $options['cff_translate_years'] ."\n"; ?><?php } ?>
1083 <?php if($options['cff_translate_ago'] != 'ago'){ ?>Ago => <?php echo $options['cff_translate_ago'] ."\n"; ?><?php } ?>
1084 <?php } else {
1085 echo "\n"."## CUSTOMIZE ##"."\n";
1086 echo '-----------------------------'."\n";
1087 echo "Customize Settings not saved."."\n";
1088 echo '-----------------------------'."\n";
1089 } ?>
1090
1091 ## FACEBOOK API RESPONSE: ##
1092 <?php
1093 $api_response_json = json_decode($posts_json);
1094 if( isset( $api_response_json->error ) ) echo $posts_json;
1095 if( isset( $api_response_json->data ) ){
1096 $posts_json_split = explode(',"paging":{', $posts_json);
1097 echo $posts_json_split[0];
1098 } ?>
1099
1100
1101 ## CRON EVENTS: ##
1102 <?php
1103 $cron = _get_cron_array();
1104 foreach ( $cron as $key => $data ) {
1105 $is_target = false;
1106 foreach ( $data as $key2 => $val ) {
1107 if ( strpos( $key2, 'cff' ) !== false ) {
1108 $is_target = true;
1109 echo $key2;
1110 echo "\n";
1111 }
1112 }
1113 if ( $is_target) {
1114 echo date( "Y-m-d H:i:s", $key );
1115 echo "\n";
1116 echo 'Next Scheduled: ' . ((int)$key - time())/60 . ' minutes';
1117 echo "\n\n";
1118 }
1119 }
1120 ?>
1121
1122 ## Error Log: ##
1123 <?php
1124 global $cff_error_reporter;
1125 $errors = $cff_error_reporter->get_errors();
1126 if ( ! empty( $errors ) ) :
1127 foreach ( $errors as $error ) :
1128 echo $error['admin_message']."\n";
1129 echo 'Feed with error: ' . esc_url( get_the_permalink( $error['post_id'] ) )."\n";
1130
1131 endforeach;
1132 endif;
1133
1134 ?>
1135 </textarea>
1136
1137 <?php } ?>
1138
1139
1140 <?php
1141 } //End Settings_Page
1142 //Create Style page
1143 function cff_style_page() {
1144 //Declare variables for fields
1145 $style_hidden_field_name = 'cff_style_submit_hidden';
1146 $style_general_hidden_field_name = 'cff_style_general_submit_hidden';
1147 $style_post_layout_hidden_field_name = 'cff_style_post_layout_submit_hidden';
1148 $style_typography_hidden_field_name = 'cff_style_typography_submit_hidden';
1149 $style_misc_hidden_field_name = 'cff_style_misc_submit_hidden';
1150 $style_custom_text_hidden_field_name = 'cff_style_custom_text_submit_hidden';
1151
1152 //Defaults need to be here on the Settings page so that they're saved when the initial settings are saved
1153 $defaults = array(
1154 //Post types
1155 'cff_show_links_type' => true,
1156 'cff_show_event_type' => true,
1157 'cff_show_video_type' => true,
1158 'cff_show_photos_type' => true,
1159 'cff_show_status_type' => true,
1160 //Layout
1161 'cff_preset_layout' => 'thumb',
1162 //Include
1163 'cff_show_text' => true,
1164 'cff_show_desc' => true,
1165 'cff_show_shared_links' => true,
1166 'cff_show_date' => true,
1167 'cff_show_media' => true,
1168 'cff_show_media_link' => true,
1169 'cff_show_event_title' => true,
1170 'cff_show_event_details' => true,
1171 'cff_show_meta' => true,
1172 'cff_show_link' => true,
1173 'cff_show_like_box' => true,
1174 //Post Style
1175 'cff_post_style' => '',
1176 'cff_post_bg_color' => '',
1177 'cff_post_rounded' => '0',
1178 'cff_box_shadow' => false,
1179 //Typography
1180 'cff_title_format' => 'p',
1181 'cff_title_size' => 'inherit',
1182 'cff_title_weight' => 'inherit',
1183 'cff_title_color' => '',
1184 'cff_posttext_link_color' => '',
1185 'cff_body_size' => '12',
1186 'cff_body_weight' => 'inherit',
1187 'cff_body_color' => '',
1188 'cff_link_title_format' => 'p',
1189 'cff_link_title_size' => 'inherit',
1190 'cff_link_url_size' => '12',
1191 'cff_link_desc_size' => 'inherit',
1192 'cff_link_desc_color' => '',
1193 'cff_link_title_color' => '',
1194 'cff_link_url_color' => '',
1195 'cff_link_bg_color' => '',
1196 'cff_link_border_color' => '',
1197 'cff_disable_link_box' => '',
1198 //Event title
1199 'cff_event_title_format' => 'p',
1200 'cff_event_title_size' => 'inherit',
1201 'cff_event_title_weight' => 'inherit',
1202 'cff_event_title_color' => '',
1203 //Event date
1204 'cff_event_date_size' => 'inherit',
1205 'cff_event_date_weight' => 'inherit',
1206 'cff_event_date_color' => '',
1207 'cff_event_date_position' => 'below',
1208 'cff_event_date_formatting' => '1',
1209 'cff_event_date_custom' => '',
1210 //Event details
1211 'cff_event_details_size' => 'inherit',
1212 'cff_event_details_weight' => 'inherit',
1213 'cff_event_details_color' => '',
1214 'cff_event_link_color' => '',
1215 //Date
1216 'cff_date_position' => 'author',
1217 'cff_date_size' => 'inherit',
1218 'cff_date_weight' => 'inherit',
1219 'cff_date_color' => '',
1220 'cff_date_formatting' => '1',
1221 'cff_date_custom' => '',
1222 'cff_date_before' => '',
1223 'cff_date_after' => '',
1224 'cff_timezone' => 'America/Chicago',
1225
1226 //Link to Facebook
1227 'cff_link_size' => 'inherit',
1228 'cff_link_weight' => 'inherit',
1229 'cff_link_color' => '',
1230 'cff_facebook_link_text' => 'View on Facebook',
1231 'cff_view_link_text' => 'View Link',
1232 'cff_link_to_timeline' => false,
1233 //Meta
1234 'cff_icon_style' => 'light',
1235 'cff_meta_text_color' => '',
1236 'cff_meta_bg_color' => '',
1237 'cff_nocomments_text' => 'No comments yet',
1238 'cff_hide_comments' => '',
1239 //Misc
1240 'cff_feed_width' => '100%',
1241 'cff_feed_width_resp' => false,
1242 'cff_feed_height' => '',
1243 'cff_feed_padding' => '',
1244 'cff_like_box_position' => 'bottom',
1245 'cff_like_box_outside' => false,
1246 'cff_likebox_width' => '',
1247 'cff_likebox_height' => '',
1248 'cff_like_box_faces' => false,
1249 'cff_like_box_border' => false,
1250 'cff_like_box_cover' => true,
1251 'cff_like_box_small_header' => false,
1252 'cff_like_box_hide_cta' => false,
1253
1254 'cff_bg_color' => '',
1255 'cff_likebox_bg_color' => '',
1256 'cff_like_box_text_color' => 'blue',
1257 'cff_video_height' => '',
1258 'cff_show_author' => true,
1259 'cff_class' => '',
1260 'cff_open_links' => true,
1261 'cff_cron' => 'unset',
1262 'cff_request_method' => 'auto',
1263 'cff_disable_styles' => false,
1264 'cff_format_issue' => false,
1265 'cff_restricted_page' => false,
1266 'cff_cols' => 1,
1267 'cff_cols_mobile' => 1,
1268
1269 //New
1270 'cff_custom_css' => '',
1271 'cff_custom_js' => '',
1272 'cff_title_link' => false,
1273 'cff_post_tags' => true,
1274 'cff_link_hashtags' => true,
1275 'cff_event_title_link' => true,
1276 'cff_video_action' => 'post',
1277 'cff_app_id' => '',
1278 'cff_show_credit' => '',
1279 'cff_font_source' => '',
1280 'cff_minify' => false,
1281 'disable_admin_notice' => false,
1282 'cff_sep_color' => '',
1283 'cff_sep_size' => '1',
1284
1285 //Feed Header
1286 'cff_show_header' => '',
1287 'cff_header_outside' => false,
1288 'cff_header_text' => 'Facebook Posts',
1289 'cff_header_bg_color' => '',
1290 'cff_header_padding' => '',
1291 'cff_header_text_size' => '',
1292 'cff_header_text_weight' => '',
1293 'cff_header_text_color' => '',
1294 'cff_header_icon' => '',
1295 'cff_header_icon_color' => '',
1296 'cff_header_icon_size' => '28',
1297
1298 //Author
1299 'cff_author_size' => 'inherit',
1300 'cff_author_color' => '',
1301
1302 //Translate - general
1303 'cff_see_more_text' => 'See More',
1304 'cff_see_less_text' => 'See Less',
1305 'cff_facebook_link_text' => 'View on Facebook',
1306 'cff_facebook_share_text' => 'Share',
1307 'cff_show_facebook_link' => true,
1308 'cff_show_facebook_share' => true,
1309
1310 'cff_translate_photos_text' => 'photos',
1311 'cff_translate_photo_text' => 'Photo',
1312 'cff_translate_video_text' => 'Video',
1313
1314 'cff_translate_learn_more_text' => 'Learn More',
1315 'cff_translate_shop_now_text' => 'Shop Now',
1316 'cff_translate_message_page_text' => 'Message Page',
1317
1318 //Translate - date
1319 'cff_translate_second' => 'second',
1320 'cff_translate_seconds' => 'seconds',
1321 'cff_translate_minute' => 'minute',
1322 'cff_translate_minutes' => 'minutes',
1323 'cff_translate_hour' => 'hour',
1324 'cff_translate_hours' => 'hours',
1325 'cff_translate_day' => 'day',
1326 'cff_translate_days' => 'days',
1327 'cff_translate_week' => 'week',
1328 'cff_translate_weeks' => 'weeks',
1329 'cff_translate_month' => 'month',
1330 'cff_translate_months' => 'months',
1331 'cff_translate_year' => 'year',
1332 'cff_translate_years' => 'years',
1333 'cff_translate_ago' => 'ago',
1334
1335 // email
1336 'enable_email_report' => 'on',
1337 'email_notification' => 'monday',
1338 'email_notification_addresses' => get_option( 'admin_email' )
1339 );
1340 //Save layout option in an array
1341 $options = wp_parse_args(get_option('cff_style_settings'), $defaults);
1342 add_option( 'cff_style_settings', $options );
1343
1344 //Set the page variables
1345 //Post types
1346 $cff_show_links_type = $options[ 'cff_show_links_type' ];
1347 $cff_show_event_type = $options[ 'cff_show_event_type' ];
1348 $cff_show_video_type = $options[ 'cff_show_video_type' ];
1349 $cff_show_photos_type = $options[ 'cff_show_photos_type' ];
1350 $cff_show_status_type = $options[ 'cff_show_status_type' ];
1351 //Layout
1352 $cff_preset_layout = $options[ 'cff_preset_layout' ];
1353 //Include
1354 $cff_show_text = $options[ 'cff_show_text' ];
1355 $cff_show_desc = $options[ 'cff_show_desc' ];
1356 $cff_show_shared_links = $options[ 'cff_show_shared_links' ];
1357 $cff_show_date = $options[ 'cff_show_date' ];
1358 $cff_show_media = $options[ 'cff_show_media' ];
1359 $cff_show_media_link = $options[ 'cff_show_media_link' ];
1360 $cff_show_event_title = $options[ 'cff_show_event_title' ];
1361 $cff_show_event_details = $options[ 'cff_show_event_details' ];
1362 $cff_show_meta = $options[ 'cff_show_meta' ];
1363 $cff_show_link = $options[ 'cff_show_link' ];
1364 $cff_show_like_box = $options[ 'cff_show_like_box' ];
1365 //Post Style
1366 $cff_post_style = $options[ 'cff_post_style' ];
1367 $cff_post_bg_color = $options[ 'cff_post_bg_color' ];
1368 $cff_post_rounded = $options[ 'cff_post_rounded' ];
1369 $cff_box_shadow = $options[ 'cff_box_shadow' ];
1370
1371 //Typography
1372 $cff_see_more_text = $options[ 'cff_see_more_text' ];
1373 $cff_see_less_text = $options[ 'cff_see_less_text' ];
1374 $cff_title_format = $options[ 'cff_title_format' ];
1375 $cff_title_size = $options[ 'cff_title_size' ];
1376 $cff_title_weight = $options[ 'cff_title_weight' ];
1377 $cff_title_color = $options[ 'cff_title_color' ];
1378 $cff_posttext_link_color = $options[ 'cff_posttext_link_color' ];
1379 $cff_body_size = $options[ 'cff_body_size' ];
1380 $cff_body_weight = $options[ 'cff_body_weight' ];
1381 $cff_body_color = $options[ 'cff_body_color' ];
1382 $cff_link_title_format = $options[ 'cff_link_title_format' ];
1383 $cff_link_title_size = $options[ 'cff_link_title_size' ];
1384 $cff_link_url_size = $options[ 'cff_link_url_size' ];
1385 $cff_link_desc_size = $options[ 'cff_link_desc_size' ];
1386 $cff_link_desc_color = $options[ 'cff_link_desc_color' ];
1387 $cff_link_title_color = $options[ 'cff_link_title_color' ];
1388 $cff_link_url_color = $options[ 'cff_link_url_color' ];
1389 $cff_link_bg_color = $options[ 'cff_link_bg_color' ];
1390 $cff_link_border_color = $options[ 'cff_link_border_color' ];
1391 $cff_disable_link_box = $options[ 'cff_disable_link_box' ];
1392
1393 //Event title
1394 $cff_event_title_format = $options[ 'cff_event_title_format' ];
1395 $cff_event_title_size = $options[ 'cff_event_title_size' ];
1396 $cff_event_title_weight = $options[ 'cff_event_title_weight' ];
1397 $cff_event_title_color = $options[ 'cff_event_title_color' ];
1398 //Event date
1399 $cff_event_date_size = $options[ 'cff_event_date_size' ];
1400 $cff_event_date_weight = $options[ 'cff_event_date_weight' ];
1401 $cff_event_date_color = $options[ 'cff_event_date_color' ];
1402 $cff_event_date_position = $options[ 'cff_event_date_position' ];
1403 $cff_event_date_formatting = $options[ 'cff_event_date_formatting' ];
1404 $cff_event_date_custom = $options[ 'cff_event_date_custom' ];
1405 //Event details
1406 $cff_event_details_size = $options[ 'cff_event_details_size' ];
1407 $cff_event_details_weight = $options[ 'cff_event_details_weight' ];
1408 $cff_event_details_color = $options[ 'cff_event_details_color' ];
1409 $cff_event_link_color = $options[ 'cff_event_link_color' ];
1410 //Date
1411 $cff_date_position = $options[ 'cff_date_position' ];
1412 $cff_date_size = $options[ 'cff_date_size' ];
1413 $cff_date_weight = $options[ 'cff_date_weight' ];
1414 $cff_date_color = $options[ 'cff_date_color' ];
1415 $cff_date_formatting = $options[ 'cff_date_formatting' ];
1416 $cff_date_custom = $options[ 'cff_date_custom' ];
1417 $cff_date_before = $options[ 'cff_date_before' ];
1418 $cff_date_after = $options[ 'cff_date_after' ];
1419 $cff_timezone = $options[ 'cff_timezone' ];
1420
1421 //Date translate
1422 $cff_translate_second = $options[ 'cff_translate_second' ];
1423 $cff_translate_seconds = $options[ 'cff_translate_seconds' ];
1424 $cff_translate_minute = $options[ 'cff_translate_minute' ];
1425 $cff_translate_minutes = $options[ 'cff_translate_minutes' ];
1426 $cff_translate_hour = $options[ 'cff_translate_hour' ];
1427 $cff_translate_hours = $options[ 'cff_translate_hours' ];
1428 $cff_translate_day = $options[ 'cff_translate_day' ];
1429 $cff_translate_days = $options[ 'cff_translate_days' ];
1430 $cff_translate_week = $options[ 'cff_translate_week' ];
1431 $cff_translate_weeks = $options[ 'cff_translate_weeks' ];
1432 $cff_translate_month = $options[ 'cff_translate_month' ];
1433 $cff_translate_months = $options[ 'cff_translate_months' ];
1434 $cff_translate_year = $options[ 'cff_translate_year' ];
1435 $cff_translate_years = $options[ 'cff_translate_years' ];
1436 $cff_translate_ago = $options[ 'cff_translate_ago' ];
1437 //Photos translate
1438 $cff_translate_photos_text = $options[ 'cff_translate_photos_text' ];
1439 $cff_translate_photo_text = $options[ 'cff_translate_photo_text' ];
1440 $cff_translate_video_text = $options[ 'cff_translate_video_text' ];
1441
1442 $cff_translate_learn_more_text = $options[ 'cff_translate_learn_more_text' ];
1443 $cff_translate_shop_now_text = $options[ 'cff_translate_shop_now_text' ];
1444 $cff_translate_message_page_text = $options[ 'cff_translate_message_page_text' ];
1445
1446 //View on Facebook link
1447 $cff_link_size = $options[ 'cff_link_size' ];
1448 $cff_link_weight = $options[ 'cff_link_weight' ];
1449 $cff_link_color = $options[ 'cff_link_color' ];
1450 $cff_facebook_link_text = $options[ 'cff_facebook_link_text' ];
1451 $cff_view_link_text = $options[ 'cff_view_link_text' ];
1452 $cff_link_to_timeline = $options[ 'cff_link_to_timeline' ];
1453 $cff_facebook_share_text = $options[ 'cff_facebook_share_text' ];
1454 $cff_show_facebook_link = $options[ 'cff_show_facebook_link' ];
1455 $cff_show_facebook_share = $options[ 'cff_show_facebook_share' ];
1456 //Meta
1457 $cff_icon_style = $options[ 'cff_icon_style' ];
1458 $cff_meta_text_color = $options[ 'cff_meta_text_color' ];
1459 $cff_meta_bg_color = $options[ 'cff_meta_bg_color' ];
1460 $cff_nocomments_text = $options[ 'cff_nocomments_text' ];
1461 $cff_hide_comments = $options[ 'cff_hide_comments' ];
1462 //Misc
1463 $cff_feed_width = $options[ 'cff_feed_width' ];
1464 $cff_feed_width_resp = $options[ 'cff_feed_width_resp' ];
1465 $cff_feed_height = $options[ 'cff_feed_height' ];
1466 $cff_feed_padding = $options[ 'cff_feed_padding' ];
1467 $cff_like_box_position = $options[ 'cff_like_box_position' ];
1468 $cff_like_box_outside = $options[ 'cff_like_box_outside' ];
1469 $cff_likebox_width = $options[ 'cff_likebox_width' ];
1470 $cff_likebox_height = $options[ 'cff_likebox_height' ];
1471 $cff_like_box_faces = $options[ 'cff_like_box_faces' ];
1472 $cff_like_box_border = $options[ 'cff_like_box_border' ];
1473 $cff_like_box_cover = $options[ 'cff_like_box_cover' ];
1474 $cff_like_box_small_header = $options[ 'cff_like_box_small_header' ];
1475 $cff_like_box_hide_cta = $options[ 'cff_like_box_hide_cta' ];
1476
1477
1478 $cff_show_media = $options[ 'cff_show_media' ];
1479 $cff_bg_color = $options[ 'cff_bg_color' ];
1480 $cff_likebox_bg_color = $options[ 'cff_likebox_bg_color' ];
1481 $cff_like_box_text_color = $options[ 'cff_like_box_text_color' ];
1482 $cff_video_height = $options[ 'cff_video_height' ];
1483 $cff_show_author = $options[ 'cff_show_author' ];
1484 $cff_class = $options[ 'cff_class' ];
1485 $cff_open_links = $options[ 'cff_open_links' ];
1486 $cff_app_id = $options[ 'cff_app_id' ];
1487 $cff_show_credit = $options[ 'cff_show_credit' ];
1488 $cff_font_source = $options[ 'cff_font_source' ];
1489 $cff_preserve_settings = 'cff_preserve_settings';
1490 $cff_preserve_settings_val = get_option( $cff_preserve_settings );
1491 $cff_cron = $options[ 'cff_cron' ];
1492 $cff_request_method = $options[ 'cff_request_method' ];
1493 $cff_disable_styles = $options[ 'cff_disable_styles' ];
1494 $cff_format_issue = $options[ 'cff_format_issue' ];
1495 $cff_restricted_page = $options[ 'cff_restricted_page' ];
1496 $cff_minify = $options[ 'cff_minify' ];
1497 $cff_cols = $options[ 'cff_cols' ];
1498 $cff_cols_mobile = $options[ 'cff_cols_mobile' ];
1499 $cff_disable_admin_notice = $options[ 'disable_admin_notice' ];
1500 $cff_enable_email_report = $options[ 'enable_email_report' ];
1501 $cff_email_notification = $options[ 'email_notification' ];
1502 $cff_email_notification_addresses = $options[ 'email_notification_addresses' ];
1503
1504 //Page Header
1505 $cff_show_header = $options[ 'cff_show_header' ];
1506 $cff_header_outside = $options[ 'cff_header_outside' ];
1507 $cff_header_text = $options[ 'cff_header_text' ];
1508 $cff_header_bg_color = $options[ 'cff_header_bg_color' ];
1509 $cff_header_padding = $options[ 'cff_header_padding' ];
1510 $cff_header_text_size = $options[ 'cff_header_text_size' ];
1511 $cff_header_text_weight = $options[ 'cff_header_text_weight' ];
1512 $cff_header_text_color = $options[ 'cff_header_text_color' ];
1513 $cff_header_icon = $options[ 'cff_header_icon' ];
1514 $cff_header_icon_color = $options[ 'cff_header_icon_color' ];
1515 $cff_header_icon_size = $options[ 'cff_header_icon_size' ];
1516
1517 //Author
1518 $cff_author_size = $options[ 'cff_author_size' ];
1519 $cff_author_color = $options[ 'cff_author_color' ];
1520
1521 //New
1522 $cff_custom_css = $options[ 'cff_custom_css' ];
1523 $cff_custom_js = $options[ 'cff_custom_js' ];
1524 $cff_title_link = $options[ 'cff_title_link' ];
1525 $cff_post_tags = $options[ 'cff_post_tags' ];
1526 $cff_link_hashtags = $options[ 'cff_link_hashtags' ];
1527 $cff_event_title_link = $options[ 'cff_event_title_link' ];
1528 $cff_video_action = $options[ 'cff_video_action' ];
1529 $cff_sep_color = $options[ 'cff_sep_color' ];
1530 $cff_sep_size = $options[ 'cff_sep_size' ];
1531
1532 // Texts lengths
1533 $cff_title_length = 'cff_title_length';
1534 $cff_body_length = 'cff_body_length';
1535 // Read in existing option value from database
1536 $cff_title_length_val = get_option( $cff_title_length, '400' );
1537 $cff_body_length_val = get_option( $cff_body_length, '200' );
1538
1539 //Ajax
1540 $cff_ajax = 'cff_ajax';
1541 $cff_ajax_val = get_option( $cff_ajax );
1542
1543
1544 //Check nonce before saving data
1545 if ( ! isset( $_POST['cff_customize_nonce'] ) || ! wp_verify_nonce( $_POST['cff_customize_nonce'], 'cff_saving_customize' ) ) {
1546 //Nonce did not verify
1547 } else {
1548 // See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
1549 if( isset($_POST[ $style_hidden_field_name ]) && $_POST[ $style_hidden_field_name ] == 'Y' ) {
1550 //Update the General options
1551 if( isset($_POST[ $style_general_hidden_field_name ]) && $_POST[ $style_general_hidden_field_name ] == 'Y' ) {
1552 //General
1553 if (isset($_POST[ 'cff_feed_width' ]) ) $cff_feed_width = sanitize_text_field( $_POST[ 'cff_feed_width' ] );
1554 (isset($_POST[ 'cff_feed_width_resp' ]) ) ? $cff_feed_width_resp = sanitize_text_field( $_POST[ 'cff_feed_width_resp' ] ) : $cff_feed_width_resp = '';
1555 if (isset($_POST[ 'cff_feed_height' ]) ) $cff_feed_height = sanitize_text_field( $_POST[ 'cff_feed_height' ] );
1556 if (isset($_POST[ 'cff_feed_padding' ]) ) $cff_feed_padding = sanitize_text_field( $_POST[ 'cff_feed_padding' ] );
1557 if (isset($_POST[ 'cff_bg_color' ]) ) $cff_bg_color = sanitize_text_field( $_POST[ 'cff_bg_color' ] );
1558 if (isset($_POST[ 'cff_class' ]) ) $cff_class = sanitize_text_field( $_POST[ 'cff_class' ] );
1559 if (isset($_POST[ 'cff_cols' ])) $cff_cols = sanitize_text_field( $_POST[ 'cff_cols' ] );
1560 if (isset($_POST[ 'cff_cols_mobile' ])) $cff_cols_mobile = sanitize_text_field( $_POST[ 'cff_cols_mobile' ] );
1561
1562 //Page Header
1563 (isset($_POST[ 'cff_show_header' ])) ? $cff_show_header = sanitize_text_field( $_POST[ 'cff_show_header' ] ) : $cff_show_header = '';
1564 (isset($_POST[ 'cff_header_outside' ])) ? $cff_header_outside = sanitize_text_field( $_POST[ 'cff_header_outside' ] ) : $cff_header_outside = '';
1565 if (isset($_POST[ 'cff_header_text' ])) $cff_header_text = sanitize_text_field( $_POST[ 'cff_header_text' ] );
1566 if (isset($_POST[ 'cff_header_bg_color' ])) $cff_header_bg_color = sanitize_text_field( $_POST[ 'cff_header_bg_color' ] );
1567 if (isset($_POST[ 'cff_header_padding' ])) $cff_header_padding = sanitize_text_field( $_POST[ 'cff_header_padding' ] );
1568 if (isset($_POST[ 'cff_header_text_size' ])) $cff_header_text_size = sanitize_text_field( $_POST[ 'cff_header_text_size' ] );
1569 if (isset($_POST[ 'cff_header_text_weight' ])) $cff_header_text_weight = sanitize_text_field( $_POST[ 'cff_header_text_weight' ] );
1570 if (isset($_POST[ 'cff_header_text_color' ])) $cff_header_text_color = sanitize_text_field( $_POST[ 'cff_header_text_color' ] );
1571 if (isset($_POST[ 'cff_header_icon' ])) $cff_header_icon = sanitize_text_field( $_POST[ 'cff_header_icon' ] );
1572 if (isset($_POST[ 'cff_header_icon_color' ])) $cff_header_icon_color = sanitize_text_field( $_POST[ 'cff_header_icon_color' ] );
1573 if (isset($_POST[ 'cff_header_icon_size' ])) $cff_header_icon_size = sanitize_text_field( $_POST[ 'cff_header_icon_size' ] );
1574
1575 //Like Box
1576 (isset($_POST[ 'cff_show_like_box' ])) ? $cff_show_like_box = sanitize_text_field( $_POST[ 'cff_show_like_box' ] ) : $cff_show_like_box = '';
1577 if (isset($_POST[ 'cff_like_box_position' ])) $cff_like_box_position = sanitize_text_field( $_POST[ 'cff_like_box_position' ] );
1578 (isset($_POST[ 'cff_like_box_outside' ])) ? $cff_like_box_outside = sanitize_text_field( $_POST[ 'cff_like_box_outside' ] ) : $cff_like_box_outside = '';
1579 if (isset($_POST[ 'cff_likebox_bg_color' ])) $cff_likebox_bg_color = sanitize_text_field( $_POST[ 'cff_likebox_bg_color' ] );
1580 if (isset($_POST[ 'cff_like_box_text_color' ])) $cff_like_box_text_color = sanitize_text_field( $_POST[ 'cff_like_box_text_color' ] );
1581 if (isset($_POST[ 'cff_likebox_width' ])) $cff_likebox_width = sanitize_text_field( $_POST[ 'cff_likebox_width' ] );
1582 if (isset($_POST[ 'cff_likebox_height' ])) $cff_likebox_height = sanitize_text_field( $_POST[ 'cff_likebox_height' ] );
1583 (isset($_POST[ 'cff_like_box_faces' ])) ? $cff_like_box_faces = sanitize_text_field( $_POST[ 'cff_like_box_faces' ] ) : $cff_like_box_faces = '';
1584 (isset($_POST[ 'cff_like_box_border' ])) ? $cff_like_box_border = sanitize_text_field( $_POST[ 'cff_like_box_border' ] ) : $cff_like_box_border = '';
1585 (isset($_POST[ 'cff_like_box_cover' ])) ? $cff_like_box_cover = sanitize_text_field( $_POST[ 'cff_like_box_cover' ] ) : $cff_like_box_cover = '';
1586 (isset($_POST[ 'cff_like_box_small_header' ])) ? $cff_like_box_small_header = sanitize_text_field( $_POST[ 'cff_like_box_small_header' ] ) : $cff_like_box_small_header = '';
1587 (isset($_POST[ 'cff_like_box_hide_cta' ])) ? $cff_like_box_hide_cta = sanitize_text_field( $_POST[ 'cff_like_box_hide_cta' ] ) : $cff_like_box_hide_cta = '';
1588
1589 //Post types
1590 if (isset($_POST[ 'cff_show_links_type' ]) ) $cff_show_links_type = sanitize_text_field( $_POST[ 'cff_show_links_type' ] );
1591 if (isset($_POST[ 'cff_show_event_type' ]) ) $cff_show_event_type = sanitize_text_field( $_POST[ 'cff_show_event_type' ] );
1592 if (isset($_POST[ 'cff_show_video_type' ]) ) $cff_show_video_type = sanitize_text_field( $_POST[ 'cff_show_video_type' ] );
1593 if (isset($_POST[ 'cff_show_photos_type' ]) ) $cff_show_photos_type = sanitize_text_field( $_POST[ 'cff_show_photos_type' ] );
1594 if (isset($_POST[ 'cff_show_status_type' ]) ) $cff_show_status_type = sanitize_text_field( $_POST[ 'cff_show_status_type' ] );
1595 //General
1596 $options[ 'cff_feed_width' ] = $cff_feed_width;
1597 $options[ 'cff_feed_width_resp' ] = $cff_feed_width_resp;
1598 $options[ 'cff_feed_height' ] = $cff_feed_height;
1599 $options[ 'cff_feed_padding' ] = $cff_feed_padding;
1600 $options[ 'cff_bg_color' ] = $cff_bg_color;
1601 $options[ 'cff_class' ] = $cff_class;
1602 $options[ 'cff_cols' ] = $cff_cols;
1603 $options[ 'cff_cols_mobile' ] = $cff_cols_mobile;
1604
1605 //Page Header
1606 $options[ 'cff_show_header' ] = $cff_show_header;
1607 $options[ 'cff_header_outside' ] = $cff_header_outside;
1608 $options[ 'cff_header_text' ] = $cff_header_text;
1609 $options[ 'cff_header_bg_color' ] = $cff_header_bg_color;
1610 $options[ 'cff_header_padding' ] = $cff_header_padding;
1611 $options[ 'cff_header_text_size' ] = $cff_header_text_size;
1612 $options[ 'cff_header_text_weight' ] = $cff_header_text_weight;
1613 $options[ 'cff_header_text_color' ] = $cff_header_text_color;
1614 $options[ 'cff_header_icon' ] = $cff_header_icon;
1615 $options[ 'cff_header_icon_color' ] = $cff_header_icon_color;
1616 $options[ 'cff_header_icon_size' ] = $cff_header_icon_size;
1617
1618 //Misc
1619 $options[ 'cff_show_like_box' ] = $cff_show_like_box;
1620 $options[ 'cff_like_box_position' ] = $cff_like_box_position;
1621 $options[ 'cff_like_box_outside' ] = $cff_like_box_outside;
1622 $options[ 'cff_likebox_bg_color' ] = $cff_likebox_bg_color;
1623 $options[ 'cff_like_box_text_color' ] = $cff_like_box_text_color;
1624 $options[ 'cff_likebox_width' ] = $cff_likebox_width;
1625 $options[ 'cff_likebox_height' ] = $cff_likebox_height;
1626 $options[ 'cff_like_box_faces' ] = $cff_like_box_faces;
1627 $options[ 'cff_like_box_border' ] = $cff_like_box_border;
1628 $options[ 'cff_like_box_cover' ] = $cff_like_box_cover;
1629 $options[ 'cff_like_box_small_header' ] = $cff_like_box_small_header;
1630 $options[ 'cff_like_box_hide_cta' ] = $cff_like_box_hide_cta;
1631
1632 //Post types
1633 $options[ 'cff_show_links_type' ] = $cff_show_links_type;
1634 $options[ 'cff_show_event_type' ] = $cff_show_event_type;
1635 $options[ 'cff_show_video_type' ] = $cff_show_video_type;
1636 $options[ 'cff_show_photos_type' ] = $cff_show_photos_type;
1637 $options[ 'cff_show_status_type' ] = $cff_show_status_type;
1638 }
1639 //Update the Post Layout options
1640 if( isset($_POST[ $style_post_layout_hidden_field_name ]) && $_POST[ $style_post_layout_hidden_field_name ] == 'Y' ) {
1641 //Layout
1642 if (isset($_POST[ 'cff_preset_layout' ]) ) $cff_preset_layout = sanitize_text_field( $_POST[ 'cff_preset_layout' ] );
1643 //Include
1644 (isset($_POST[ 'cff_show_author' ]) ) ? $cff_show_author = sanitize_text_field( $_POST[ 'cff_show_author' ] ) : $cff_show_author = '';
1645 (isset($_POST[ 'cff_show_text' ]) ) ? $cff_show_text = sanitize_text_field( $_POST[ 'cff_show_text' ] ) : $cff_show_text = '';
1646 (isset($_POST[ 'cff_show_desc' ]) ) ? $cff_show_desc = sanitize_text_field( $_POST[ 'cff_show_desc' ] ) : $cff_show_desc = '';
1647 (isset($_POST[ 'cff_show_shared_links' ]) ) ? $cff_show_shared_links = sanitize_text_field( $_POST[ 'cff_show_shared_links' ] ) : $cff_show_shared_links = '';
1648 (isset($_POST[ 'cff_show_date' ]) ) ? $cff_show_date = sanitize_text_field( $_POST[ 'cff_show_date' ] ) : $cff_show_date = '';
1649 (isset($_POST[ 'cff_show_media' ]) ) ? $cff_show_media = sanitize_text_field( $_POST[ 'cff_show_media' ] ) : $cff_show_media = '';
1650 (isset($_POST[ 'cff_show_media_link' ]) ) ? $cff_show_media_link = sanitize_text_field( $_POST[ 'cff_show_media_link' ] ) : $cff_show_media_link = '';
1651 (isset($_POST[ 'cff_show_event_title' ]) ) ? $cff_show_event_title = sanitize_text_field( $_POST[ 'cff_show_event_title' ] ) : $cff_show_event_title = '';
1652 (isset($_POST[ 'cff_show_event_details' ]) ) ? $cff_show_event_details = sanitize_text_field( $_POST[ 'cff_show_event_details' ] ) : $cff_show_event_details = '';
1653 (isset($_POST[ 'cff_show_meta' ]) ) ? $cff_show_meta = sanitize_text_field( $_POST[ 'cff_show_meta' ] ) : $cff_show_meta = '';
1654 (isset($_POST[ 'cff_show_link' ]) ) ? $cff_show_link = sanitize_text_field( $_POST[ 'cff_show_link' ] ) : $cff_show_link = '';
1655
1656 //Layout
1657 $options[ 'cff_preset_layout' ] = $cff_preset_layout;
1658 //Include
1659 $options[ 'cff_show_author' ] = $cff_show_author;
1660 $options[ 'cff_show_text' ] = $cff_show_text;
1661 $options[ 'cff_show_desc' ] = $cff_show_desc;
1662 $options[ 'cff_show_shared_links' ] = $cff_show_shared_links;
1663 $options[ 'cff_show_date' ] = $cff_show_date;
1664 $options[ 'cff_show_media' ] = $cff_show_media;
1665 $options[ 'cff_show_media_link' ] = $cff_show_media_link;
1666 $options[ 'cff_show_event_title' ] = $cff_show_event_title;
1667 $options[ 'cff_show_event_details' ] = $cff_show_event_details;
1668 $options[ 'cff_show_meta' ] = $cff_show_meta;
1669 $options[ 'cff_show_link' ] = $cff_show_link;
1670
1671 }
1672 //Update the Typography options
1673 if( isset($_POST[ $style_typography_hidden_field_name ]) && $_POST[ $style_typography_hidden_field_name ] == 'Y' ) {
1674 //Character limits
1675 if (isset($_POST[ 'cff_title_length' ]) ) $cff_title_length_val = sanitize_text_field( $_POST[ $cff_title_length ] );
1676 if (isset($_POST[ 'cff_body_length' ]) ) $cff_body_length_val = sanitize_text_field( $_POST[ $cff_body_length ] );
1677
1678 //Post Style
1679 if (isset($_POST[ 'cff_post_style' ]) ) $cff_post_style = $_POST[ 'cff_post_style' ];
1680 (isset($_POST[ 'cff_post_bg_color' ]) ) ? $cff_post_bg_color = $_POST[ 'cff_post_bg_color' ] : $cff_post_bg_color = '';
1681 (isset($_POST[ 'cff_post_rounded' ]) ) ? $cff_post_rounded = $_POST[ 'cff_post_rounded' ] : $cff_post_rounded = '';
1682 if (isset($_POST[ 'cff_sep_color' ])) $cff_sep_color = $_POST[ 'cff_sep_color' ];
1683 if (isset($_POST[ 'cff_sep_size' ])) $cff_sep_size = $_POST[ 'cff_sep_size' ];
1684 (isset($_POST[ 'cff_box_shadow' ]) ) ? $cff_box_shadow = $_POST[ 'cff_box_shadow' ] : $cff_box_shadow = '';
1685
1686 //Author
1687 if (isset($_POST[ 'cff_author_size' ])) $cff_author_size = sanitize_text_field( $_POST[ 'cff_author_size' ] );
1688 if (isset($_POST[ 'cff_author_color' ])) $cff_author_color = sanitize_text_field( $_POST[ 'cff_author_color' ] );
1689
1690 //Typography
1691 if (isset($_POST[ 'cff_title_format' ]) ) $cff_title_format = sanitize_text_field( $_POST[ 'cff_title_format' ] );
1692 if (isset($_POST[ 'cff_title_size' ]) ) $cff_title_size = sanitize_text_field( $_POST[ 'cff_title_size' ] );
1693 if (isset($_POST[ 'cff_title_weight' ]) ) $cff_title_weight = sanitize_text_field( $_POST[ 'cff_title_weight' ] );
1694 if (isset($_POST[ 'cff_title_color' ]) ) $cff_title_color = sanitize_text_field( $_POST[ 'cff_title_color' ] );
1695 if (isset($_POST[ 'cff_posttext_link_color' ]) ) $cff_posttext_link_color = sanitize_text_field( $_POST[ 'cff_posttext_link_color' ] );
1696
1697 (isset($_POST[ 'cff_title_link' ]) ) ? $cff_title_link = sanitize_text_field( $_POST[ 'cff_title_link' ] ) : $cff_title_link = '';
1698 (isset($_POST[ 'cff_post_tags' ]) ) ? $cff_post_tags = sanitize_text_field( $_POST[ 'cff_post_tags' ] ) : $cff_post_tags = '';
1699 (isset($_POST[ 'cff_link_hashtags' ]) ) ? $cff_link_hashtags = sanitize_text_field( $_POST[ 'cff_link_hashtags' ] ) : $cff_link_hashtags = '';
1700
1701 $cff_body_size = $_POST[ 'cff_body_size' ];
1702 if (isset($_POST[ 'cff_body_weight' ]) ) $cff_body_weight = sanitize_text_field( $_POST[ 'cff_body_weight' ] );
1703 if (isset($_POST[ 'cff_body_color' ]) ) $cff_body_color = sanitize_text_field( $_POST[ 'cff_body_color' ] );
1704 if (isset($_POST[ 'cff_link_title_format' ]) ) $cff_link_title_format = sanitize_text_field( $_POST[ 'cff_link_title_format' ] );
1705 if (isset($_POST[ 'cff_link_title_size' ]) ) $cff_link_title_size = $_POST[ 'cff_link_title_size' ];
1706 if (isset($_POST[ 'cff_link_url_size' ]) ) $cff_link_url_size = $_POST[ 'cff_link_url_size' ];
1707 if (isset($_POST[ 'cff_link_desc_size' ]) ) $cff_link_desc_size = $_POST[ 'cff_link_desc_size' ];
1708 if (isset($_POST[ 'cff_link_desc_color' ]) ) $cff_link_desc_color = $_POST[ 'cff_link_desc_color' ];
1709 if (isset($_POST[ 'cff_link_title_color' ]) ) $cff_link_title_color = $_POST[ 'cff_link_title_color' ];
1710 if (isset($_POST[ 'cff_link_url_color' ]) ) $cff_link_url_color = $_POST[ 'cff_link_url_color' ];
1711 if (isset($_POST[ 'cff_link_bg_color' ]) ) $cff_link_bg_color = $_POST[ 'cff_link_bg_color' ];
1712 if (isset($_POST[ 'cff_link_border_color' ]) ) $cff_link_border_color = $_POST[ 'cff_link_border_color' ];
1713 (isset($_POST[ 'cff_disable_link_box' ])) ? $cff_disable_link_box = $_POST[ 'cff_disable_link_box' ] : $cff_disable_link_box = '';
1714
1715
1716 //Event title
1717 if (isset($_POST[ 'cff_event_title_format' ]) ) $cff_event_title_format = sanitize_text_field( $_POST[ 'cff_event_title_format' ] );
1718 if (isset($_POST[ 'cff_event_title_size' ]) ) $cff_event_title_size = sanitize_text_field( $_POST[ 'cff_event_title_size' ] );
1719 if (isset($_POST[ 'cff_event_title_weight' ]) ) $cff_event_title_weight = sanitize_text_field( $_POST[ 'cff_event_title_weight' ] );
1720 if (isset($_POST[ 'cff_event_title_color' ]) ) $cff_event_title_color = sanitize_text_field( $_POST[ 'cff_event_title_color' ] );
1721 (isset($_POST[ 'cff_event_title_link' ]) ) ? $cff_event_title_link = sanitize_text_field( $_POST[ 'cff_event_title_link' ] ) : $cff_event_title_link = '';
1722 //Event date
1723 if (isset($_POST[ 'cff_event_date_size' ]) ) $cff_event_date_size = sanitize_text_field( $_POST[ 'cff_event_date_size' ] );
1724 if (isset($_POST[ 'cff_event_date_weight' ]) ) $cff_event_date_weight = sanitize_text_field( $_POST[ 'cff_event_date_weight' ] );
1725 if (isset($_POST[ 'cff_event_date_color' ]) ) $cff_event_date_color = sanitize_text_field( $_POST[ 'cff_event_date_color' ] );
1726 if (isset($_POST[ 'cff_event_date_position' ]) ) $cff_event_date_position = sanitize_text_field( $_POST[ 'cff_event_date_position' ] );
1727 if (isset($_POST[ 'cff_event_date_formatting' ]) ) $cff_event_date_formatting = sanitize_text_field( $_POST[ 'cff_event_date_formatting' ] );
1728 if (isset($_POST[ 'cff_event_date_custom' ]) ) $cff_event_date_custom = sanitize_text_field( $_POST[ 'cff_event_date_custom' ] );
1729 //Event details
1730 if (isset($_POST[ 'cff_event_details_size' ]) ) $cff_event_details_size = sanitize_text_field( $_POST[ 'cff_event_details_size' ] );
1731 if (isset($_POST[ 'cff_event_details_weight' ]) ) $cff_event_details_weight = sanitize_text_field( $_POST[ 'cff_event_details_weight' ] );
1732 if (isset($_POST[ 'cff_event_details_color' ]) ) $cff_event_details_color = sanitize_text_field( $_POST[ 'cff_event_details_color' ] );
1733 if (isset($_POST[ 'cff_event_link_color' ]) ) $cff_event_link_color = sanitize_text_field( $_POST[ 'cff_event_link_color' ] );
1734 //Date
1735 if (isset($_POST[ 'cff_date_position' ]) ) $cff_date_position = sanitize_text_field( $_POST[ 'cff_date_position' ] );
1736 if (isset($_POST[ 'cff_date_size' ]) ) $cff_date_size = sanitize_text_field( $_POST[ 'cff_date_size' ] );
1737 if (isset($_POST[ 'cff_date_weight' ]) ) $cff_date_weight = sanitize_text_field( $_POST[ 'cff_date_weight' ] );
1738 if (isset($_POST[ 'cff_date_color' ]) ) $cff_date_color = sanitize_text_field( $_POST[ 'cff_date_color' ] );
1739 if (isset($_POST[ 'cff_date_formatting' ]) ) $cff_date_formatting = sanitize_text_field( $_POST[ 'cff_date_formatting' ] );
1740 if (isset($_POST[ 'cff_date_custom' ]) ) $cff_date_custom = sanitize_text_field( $_POST[ 'cff_date_custom' ] );
1741 if (isset($_POST[ 'cff_date_before' ]) ) $cff_date_before = sanitize_text_field( $_POST[ 'cff_date_before' ] );
1742 if (isset($_POST[ 'cff_date_after' ]) ) $cff_date_after = sanitize_text_field( $_POST[ 'cff_date_after' ] );
1743 if (isset($_POST[ 'cff_timezone' ]) ) $cff_timezone = sanitize_text_field( $_POST[ 'cff_timezone' ] );
1744
1745 //Date translate
1746 if (isset($_POST[ 'cff_translate_second' ]) ) $cff_translate_second = sanitize_text_field( $_POST[ 'cff_translate_second' ] );
1747 if (isset($_POST[ 'cff_translate_seconds' ]) ) $cff_translate_seconds = sanitize_text_field( $_POST[ 'cff_translate_seconds' ] );
1748 if (isset($_POST[ 'cff_translate_minute' ]) ) $cff_translate_minute = sanitize_text_field( $_POST[ 'cff_translate_minute' ] );
1749 if (isset($_POST[ 'cff_translate_minutes' ]) ) $cff_translate_minutes = sanitize_text_field( $_POST[ 'cff_translate_minutes' ] );
1750 if (isset($_POST[ 'cff_translate_hour' ]) ) $cff_translate_hour = sanitize_text_field( $_POST[ 'cff_translate_hour' ] );
1751 if (isset($_POST[ 'cff_translate_hours' ]) ) $cff_translate_hours = sanitize_text_field( $_POST[ 'cff_translate_hours' ] );
1752 if (isset($_POST[ 'cff_translate_day' ]) ) $cff_translate_day = sanitize_text_field( $_POST[ 'cff_translate_day' ] );
1753 if (isset($_POST[ 'cff_translate_days' ]) ) $cff_translate_days = sanitize_text_field( $_POST[ 'cff_translate_days' ] );
1754 if (isset($_POST[ 'cff_translate_week' ]) ) $cff_translate_week = sanitize_text_field( $_POST[ 'cff_translate_week' ] );
1755 if (isset($_POST[ 'cff_translate_weeks' ]) ) $cff_translate_weeks = sanitize_text_field( $_POST[ 'cff_translate_weeks' ] );
1756 if (isset($_POST[ 'cff_translate_month' ]) ) $cff_translate_month = sanitize_text_field( $_POST[ 'cff_translate_month' ] );
1757 if (isset($_POST[ 'cff_translate_months' ]) ) $cff_translate_months = sanitize_text_field( $_POST[ 'cff_translate_months' ] );
1758 if (isset($_POST[ 'cff_translate_year' ]) ) $cff_translate_year = sanitize_text_field( $_POST[ 'cff_translate_year' ] );
1759 if (isset($_POST[ 'cff_translate_years' ]) ) $cff_translate_years = sanitize_text_field( $_POST[ 'cff_translate_years' ] );
1760 if (isset($_POST[ 'cff_translate_ago' ]) ) $cff_translate_ago = sanitize_text_field( $_POST[ 'cff_translate_ago' ] );
1761
1762 //Meta
1763 if (isset($_POST[ 'cff_icon_style' ])) $cff_icon_style = sanitize_text_field( $_POST[ 'cff_icon_style' ] );
1764 if (isset($_POST[ 'cff_meta_text_color' ])) $cff_meta_text_color = sanitize_text_field( $_POST[ 'cff_meta_text_color' ] );
1765 if (isset($_POST[ 'cff_meta_bg_color' ])) $cff_meta_bg_color = sanitize_text_field( $_POST[ 'cff_meta_bg_color' ] );
1766 if (isset($_POST[ 'cff_nocomments_text' ])) $cff_nocomments_text = sanitize_text_field( $_POST[ 'cff_nocomments_text' ] );
1767 if (isset($_POST[ 'cff_hide_comments' ])) $cff_hide_comments = sanitize_text_field( $_POST[ 'cff_hide_comments' ] );
1768
1769 //View on Facebook link
1770 if (isset($_POST[ 'cff_link_size' ]) ) $cff_link_size = sanitize_text_field( $_POST[ 'cff_link_size' ] );
1771 if (isset($_POST[ 'cff_link_weight' ]) ) $cff_link_weight = sanitize_text_field( $_POST[ 'cff_link_weight' ] );
1772 if (isset($_POST[ 'cff_link_color' ]) ) $cff_link_color = sanitize_text_field( $_POST[ 'cff_link_color' ] );
1773 if (isset($_POST[ 'cff_facebook_link_text' ]) ) $cff_facebook_link_text = sanitize_text_field( $_POST[ 'cff_facebook_link_text' ] );
1774 if (isset($_POST[ 'cff_facebook_share_text' ]) ) $cff_facebook_share_text = sanitize_text_field( $_POST[ 'cff_facebook_share_text' ] );
1775 (isset($_POST[ 'cff_show_facebook_link' ]) ) ? $cff_show_facebook_link = sanitize_text_field( $_POST[ 'cff_show_facebook_link' ] ) : $cff_show_facebook_link = '';
1776 (isset($_POST[ 'cff_show_facebook_share' ]) ) ? $cff_show_facebook_share = sanitize_text_field( $_POST[ 'cff_show_facebook_share' ] ) : $cff_show_facebook_share = '';
1777 if (isset($_POST[ 'cff_view_link_text' ]) ) $cff_view_link_text = sanitize_text_field( $_POST[ 'cff_view_link_text' ] );
1778 if (isset($_POST[ 'cff_link_to_timeline' ]) ) $cff_link_to_timeline = sanitize_text_field( $_POST[ 'cff_link_to_timeline' ] );
1779
1780 //Character limits
1781 update_option( $cff_title_length, $cff_title_length_val );
1782 update_option( $cff_body_length, $cff_body_length_val );
1783 //Author
1784 $options[ 'cff_author_size' ] = $cff_author_size;
1785 $options[ 'cff_author_color' ] = $cff_author_color;
1786
1787 //Post Style
1788 $options[ 'cff_post_style' ] = $cff_post_style;
1789 $options[ 'cff_post_bg_color' ] = $cff_post_bg_color;
1790 $options[ 'cff_post_rounded' ] = $cff_post_rounded;
1791 $options[ 'cff_sep_color' ] = $cff_sep_color;
1792 $options[ 'cff_sep_size' ] = $cff_sep_size;
1793 $options[ 'cff_box_shadow' ] = $cff_box_shadow;
1794
1795 //Typography
1796 $options[ 'cff_title_format' ] = $cff_title_format;
1797 $options[ 'cff_title_size' ] = $cff_title_size;
1798 $options[ 'cff_title_weight' ] = $cff_title_weight;
1799 $options[ 'cff_title_color' ] = $cff_title_color;
1800 $options[ 'cff_posttext_link_color' ] = $cff_posttext_link_color;
1801 $options[ 'cff_title_link' ] = $cff_title_link;
1802 $options[ 'cff_post_tags' ] = $cff_post_tags;
1803 $options[ 'cff_link_hashtags' ] = $cff_link_hashtags;
1804 $options[ 'cff_body_size' ] = $cff_body_size;
1805 $options[ 'cff_body_weight' ] = $cff_body_weight;
1806 $options[ 'cff_body_color' ] = $cff_body_color;
1807 $options[ 'cff_link_title_format' ] = $cff_link_title_format;
1808 $options[ 'cff_link_title_size' ] = $cff_link_title_size;
1809 $options[ 'cff_link_url_size' ] = $cff_link_url_size;
1810 $options[ 'cff_link_desc_size' ] = $cff_link_desc_size;
1811 $options[ 'cff_link_desc_color' ] = $cff_link_desc_color;
1812 $options[ 'cff_link_title_color' ] = $cff_link_title_color;
1813 $options[ 'cff_link_url_color' ] = $cff_link_url_color;
1814 $options[ 'cff_link_bg_color' ] = $cff_link_bg_color;
1815 $options[ 'cff_link_border_color' ] = $cff_link_border_color;
1816 $options[ 'cff_disable_link_box' ] = $cff_disable_link_box;
1817
1818 //Event title
1819 $options[ 'cff_event_title_format' ] = $cff_event_title_format;
1820 $options[ 'cff_event_title_size' ] = $cff_event_title_size;
1821 $options[ 'cff_event_title_weight' ] = $cff_event_title_weight;
1822 $options[ 'cff_event_title_color' ] = $cff_event_title_color;
1823 $options[ 'cff_event_title_link' ] = $cff_event_title_link;
1824 //Event date
1825 $options[ 'cff_event_date_size' ] = $cff_event_date_size;
1826 $options[ 'cff_event_date_weight' ] = $cff_event_date_weight;
1827 $options[ 'cff_event_date_color' ] = $cff_event_date_color;
1828 $options[ 'cff_event_date_position' ] = $cff_event_date_position;
1829 $options[ 'cff_event_date_formatting' ] = $cff_event_date_formatting;
1830 $options[ 'cff_event_date_custom' ] = $cff_event_date_custom;
1831 //Event details
1832 $options[ 'cff_event_details_size' ] = $cff_event_details_size;
1833 $options[ 'cff_event_details_weight' ] = $cff_event_details_weight;
1834 $options[ 'cff_event_details_color' ] = $cff_event_details_color;
1835 $options[ 'cff_event_link_color' ] = $cff_event_link_color;
1836 //Date
1837 $options[ 'cff_date_position' ] = $cff_date_position;
1838 $options[ 'cff_date_size' ] = $cff_date_size;
1839 $options[ 'cff_date_weight' ] = $cff_date_weight;
1840 $options[ 'cff_date_color' ] = $cff_date_color;
1841 $options[ 'cff_date_formatting' ] = $cff_date_formatting;
1842 $options[ 'cff_date_custom' ] = $cff_date_custom;
1843 $options[ 'cff_date_before' ] = $cff_date_before;
1844 $options[ 'cff_date_after' ] = $cff_date_after;
1845 $options[ 'cff_timezone' ] = $cff_timezone;
1846
1847 //Date translate
1848 $options[ 'cff_translate_second' ] = $cff_translate_second;
1849 $options[ 'cff_translate_seconds' ] = $cff_translate_seconds;
1850 $options[ 'cff_translate_minute' ] = $cff_translate_minute;
1851 $options[ 'cff_translate_minutes' ] = $cff_translate_minutes;
1852 $options[ 'cff_translate_hour' ] = $cff_translate_hour;
1853 $options[ 'cff_translate_hours' ] = $cff_translate_hours;
1854 $options[ 'cff_translate_day' ] = $cff_translate_day;
1855 $options[ 'cff_translate_days' ] = $cff_translate_days;
1856 $options[ 'cff_translate_week' ] = $cff_translate_week;
1857 $options[ 'cff_translate_weeks' ] = $cff_translate_weeks;
1858 $options[ 'cff_translate_month' ] = $cff_translate_month;
1859 $options[ 'cff_translate_months' ] = $cff_translate_months;
1860 $options[ 'cff_translate_year' ] = $cff_translate_year;
1861 $options[ 'cff_translate_years' ] = $cff_translate_years;
1862 $options[ 'cff_translate_ago' ] = $cff_translate_ago;
1863
1864 //Meta
1865 $options[ 'cff_icon_style' ] = $cff_icon_style;
1866 $options[ 'cff_meta_text_color' ] = $cff_meta_text_color;
1867 $options[ 'cff_meta_bg_color' ] = $cff_meta_bg_color;
1868 $options[ 'cff_nocomments_text' ] = $cff_nocomments_text;
1869 $options[ 'cff_hide_comments' ] = $cff_hide_comments;
1870
1871 //View on Facebook link
1872 $options[ 'cff_link_size' ] = $cff_link_size;
1873 $options[ 'cff_link_weight' ] = $cff_link_weight;
1874 $options[ 'cff_link_color' ] = $cff_link_color;
1875 $options[ 'cff_facebook_link_text' ] = $cff_facebook_link_text;
1876 $options[ 'cff_facebook_share_text' ] = $cff_facebook_share_text;
1877 $options[ 'cff_show_facebook_link' ] = $cff_show_facebook_link;
1878 $options[ 'cff_show_facebook_share' ] = $cff_show_facebook_share;
1879 $options[ 'cff_view_link_text' ] = $cff_view_link_text;
1880 $options[ 'cff_link_to_timeline' ] = $cff_link_to_timeline;
1881 }
1882 //Update the Misc options
1883 if( isset($_POST[ $style_misc_hidden_field_name ]) && $_POST[ $style_misc_hidden_field_name ] == 'Y' ) {
1884 //Custom CSS
1885 if (isset($_POST[ 'cff_custom_css' ])) $cff_custom_css = $_POST[ 'cff_custom_css' ];
1886 if (isset($_POST[ 'cff_custom_js' ])) $cff_custom_js = $_POST[ 'cff_custom_js' ];
1887
1888 if (isset($_POST[ 'cff_video_height' ])) $cff_video_height = sanitize_text_field( $_POST[ 'cff_video_height' ] );
1889 if (isset($_POST[ 'cff_video_action' ])) $cff_video_action = sanitize_text_field( $_POST[ 'cff_video_action' ] );
1890 if (isset($_POST[ 'cff_open_links' ])) $cff_open_links = sanitize_text_field( $_POST[ 'cff_open_links' ] );
1891
1892 (isset($_POST[ $cff_ajax ])) ? $cff_ajax_val = sanitize_text_field( $_POST[ 'cff_ajax' ] ) : $cff_ajax_val = '';
1893 if (isset($_POST[ 'cff_app_id' ])) $cff_app_id = sanitize_text_field( $_POST[ 'cff_app_id' ] );
1894 (isset($_POST[ 'cff_show_credit' ])) ? $cff_show_credit = sanitize_text_field( $_POST[ 'cff_show_credit' ] ) : $cff_show_credit = '';
1895 (isset($_POST[ 'cff_font_source' ])) ? $cff_font_source = sanitize_text_field( $_POST[ 'cff_font_source' ] ) : $cff_font_source = '';
1896 (isset($_POST[ $cff_preserve_settings ])) ? $cff_preserve_settings_val = sanitize_text_field( $_POST[ 'cff_preserve_settings' ] ) : $cff_preserve_settings_val = '';
1897 if (isset($_POST[ 'cff_cron' ])) $cff_cron = sanitize_text_field( $_POST[ 'cff_cron' ] );
1898 if (isset($_POST[ 'cff_request_method' ])) $cff_request_method = sanitize_text_field( $_POST[ 'cff_request_method' ] );
1899 (isset($_POST[ 'cff_disable_styles' ])) ? $cff_disable_styles = sanitize_text_field( $_POST[ 'cff_disable_styles' ] ) : $cff_disable_styles = '';
1900 (isset($_POST[ 'cff_format_issue' ])) ? $cff_format_issue = sanitize_text_field( $_POST[ 'cff_format_issue' ] ) : $cff_format_issue = '';
1901 (isset($_POST[ 'cff_restricted_page' ])) ? $cff_restricted_page = sanitize_text_field( $_POST[ 'cff_restricted_page' ] ) : $cff_restricted_page = '';
1902 (isset($_POST[ 'cff_minify' ])) ? $cff_minify = sanitize_text_field( $_POST[ 'cff_minify' ] ) : $cff_minify = '';
1903 (isset($_POST[ 'cff_disable_admin_notice' ])) ? $cff_disable_admin_notice = sanitize_text_field( $_POST[ 'cff_disable_admin_notice' ] ) : $cff_disable_admin_notice = '';
1904
1905 //Custom CSS
1906 $options[ 'cff_custom_css' ] = $cff_custom_css;
1907 $options[ 'cff_custom_js' ] = $cff_custom_js;
1908
1909 $options[ 'cff_video_height' ] = $cff_video_height;
1910 $options[ 'cff_video_action' ] = $cff_video_action;
1911 $options[ 'cff_open_links' ] = $cff_open_links;
1912
1913 update_option( $cff_ajax, $cff_ajax_val );
1914 $options[ 'cff_app_id' ] = $cff_app_id;
1915 $options[ 'cff_show_credit' ] = $cff_show_credit;
1916 $options[ 'cff_font_source' ] = $cff_font_source;
1917 update_option( $cff_preserve_settings, $cff_preserve_settings_val );
1918
1919 $options[ 'cff_cron' ] = $cff_cron;
1920 $options[ 'cff_request_method' ] = $cff_request_method;
1921 $options[ 'cff_disable_styles' ] = $cff_disable_styles;
1922 $options[ 'cff_format_issue' ] = $cff_format_issue;
1923 $options[ 'cff_restricted_page' ] = $cff_restricted_page;
1924 $options[ 'cff_minify' ] = $cff_minify;
1925 $options[ 'disable_admin_notice' ] = $cff_disable_admin_notice;
1926
1927 if( $cff_cron == 'no' ) wp_clear_scheduled_hook('cff_cron_job');
1928
1929 //Run cron when Misc settings are saved
1930 if( $cff_cron == 'yes' ){
1931 //Clear the existing cron event
1932 wp_clear_scheduled_hook('cff_cron_job');
1933
1934 $cff_cache_time = get_option( 'cff_cache_time' );
1935 $cff_cache_time_unit = get_option( 'cff_cache_time_unit' );
1936
1937 //Set the event schedule based on what the caching time is set to
1938 $cff_cron_schedule = 'hourly';
1939 if( $cff_cache_time_unit == 'hours' && $cff_cache_time > 5 ) $cff_cron_schedule = 'twicedaily';
1940 if( $cff_cache_time_unit == 'days' ) $cff_cron_schedule = 'daily';
1941
1942 wp_schedule_event(time(), $cff_cron_schedule, 'cff_cron_job');
1943 }
1944
1945 isset($_POST[ 'cff_enable_email_report' ]) ? $cff_enable_email_report = $_POST[ 'cff_enable_email_report' ] : $cff_enable_email_report = '';
1946 $options['enable_email_report'] = $cff_enable_email_report;
1947 isset($_POST[ 'cff_email_notification' ]) ? $cff_email_notification = $_POST[ 'cff_email_notification' ] : $cff_email_notification = '';
1948 $original = $options['email_notification'];
1949 $options['email_notification'] = $cff_email_notification;
1950 isset($_POST[ 'cff_email_notification_addresses' ]) ? $cff_email_notification_addresses = $_POST[ 'cff_email_notification_addresses' ] : $cff_email_notification_addresses = get_option( 'admin_email' );
1951 $options['email_notification_addresses'] = $cff_email_notification_addresses;
1952
1953 if ( $original !== $cff_email_notification && $cff_enable_email_report === 'on' ){
1954 //Clear the existing cron event
1955 wp_clear_scheduled_hook('cff_feed_issue_email');
1956
1957 $input = sanitize_text_field($_POST[ 'cff_email_notification' ] );
1958 $timestamp = strtotime( 'next ' . $input );
1959
1960 if ( $timestamp - (3600 * 1) < time() ) {
1961 $timestamp = $timestamp + (3600 * 24 * 7);
1962 }
1963 $six_am_local = $timestamp + cff_get_utc_offset() + (6*60*60);
1964
1965 wp_schedule_event( $six_am_local, 'cffweekly', 'cff_feed_issue_email' );
1966 }
1967
1968 }
1969 //Update the Custom Text / Translate options
1970 if( isset($_POST[ $style_custom_text_hidden_field_name ]) && $_POST[ $style_custom_text_hidden_field_name ] == 'Y' ) {
1971
1972 //Translate
1973 if (isset($_POST[ 'cff_see_more_text' ])) $cff_see_more_text = sanitize_text_field( $_POST[ 'cff_see_more_text' ] );
1974 if (isset($_POST[ 'cff_see_less_text' ])) $cff_see_less_text = sanitize_text_field( $_POST[ 'cff_see_less_text' ] );
1975 if (isset($_POST[ 'cff_facebook_link_text' ])) $cff_facebook_link_text = sanitize_text_field( $_POST[ 'cff_facebook_link_text' ] );
1976 if (isset($_POST[ 'cff_facebook_share_text' ])) $cff_facebook_share_text = sanitize_text_field( $_POST[ 'cff_facebook_share_text' ] );
1977
1978 //Social translate
1979 if (isset($_POST[ 'cff_translate_photos_text' ])) $cff_translate_photos_text = sanitize_text_field( $_POST[ 'cff_translate_photos_text' ] );
1980 if (isset($_POST[ 'cff_translate_photo_text' ])) $cff_translate_photo_text = sanitize_text_field( $_POST[ 'cff_translate_photo_text' ] );
1981 if (isset($_POST[ 'cff_translate_video_text' ])) $cff_translate_video_text = sanitize_text_field( $_POST[ 'cff_translate_video_text' ] );
1982
1983 if (isset($_POST[ 'cff_translate_learn_more_text' ])) $cff_translate_learn_more_text = sanitize_text_field( $_POST[ 'cff_translate_learn_more_text' ] );
1984 if (isset($_POST[ 'cff_translate_shop_now_text' ])) $cff_translate_shop_now_text = sanitize_text_field( $_POST[ 'cff_translate_shop_now_text' ] );
1985 if (isset($_POST[ 'cff_translate_message_page_text' ])) $cff_translate_message_page_text = sanitize_text_field( $_POST[ 'cff_translate_message_page_text' ] );
1986
1987 //Date translate
1988 if (isset($_POST[ 'cff_translate_second' ])) $cff_translate_second = sanitize_text_field( $_POST[ 'cff_translate_second' ] );
1989 if (isset($_POST[ 'cff_translate_seconds' ])) $cff_translate_seconds = sanitize_text_field( $_POST[ 'cff_translate_seconds' ] );
1990 if (isset($_POST[ 'cff_translate_minute' ])) $cff_translate_minute = sanitize_text_field( $_POST[ 'cff_translate_minute' ] );
1991 if (isset($_POST[ 'cff_translate_minutes' ])) $cff_translate_minutes = sanitize_text_field( $_POST[ 'cff_translate_minutes' ] );
1992 if (isset($_POST[ 'cff_translate_hour' ])) $cff_translate_hour = sanitize_text_field( $_POST[ 'cff_translate_hour' ] );
1993 if (isset($_POST[ 'cff_translate_hours' ])) $cff_translate_hours = sanitize_text_field( $_POST[ 'cff_translate_hours' ] );
1994 if (isset($_POST[ 'cff_translate_day' ])) $cff_translate_day = sanitize_text_field( $_POST[ 'cff_translate_day' ] );
1995 if (isset($_POST[ 'cff_translate_days' ])) $cff_translate_days = sanitize_text_field( $_POST[ 'cff_translate_days' ] );
1996 if (isset($_POST[ 'cff_translate_week' ])) $cff_translate_week = sanitize_text_field( $_POST[ 'cff_translate_week' ] );
1997 if (isset($_POST[ 'cff_translate_weeks' ])) $cff_translate_weeks = sanitize_text_field( $_POST[ 'cff_translate_weeks' ] );
1998 if (isset($_POST[ 'cff_translate_month' ])) $cff_translate_month = sanitize_text_field( $_POST[ 'cff_translate_month' ] );
1999 if (isset($_POST[ 'cff_translate_months' ])) $cff_translate_months = sanitize_text_field( $_POST[ 'cff_translate_months' ] );
2000 if (isset($_POST[ 'cff_translate_year' ])) $cff_translate_year = sanitize_text_field( $_POST[ 'cff_translate_year' ] );
2001 if (isset($_POST[ 'cff_translate_years' ])) $cff_translate_years = sanitize_text_field( $_POST[ 'cff_translate_years' ] );
2002 if (isset($_POST[ 'cff_translate_ago' ])) $cff_translate_ago = sanitize_text_field( $_POST[ 'cff_translate_ago' ] );
2003
2004 //Translate
2005 $options[ 'cff_see_more_text' ] = $cff_see_more_text;
2006 $options[ 'cff_see_less_text' ] = $cff_see_less_text;
2007 $options[ 'cff_facebook_link_text' ] = $cff_facebook_link_text;
2008 $options[ 'cff_facebook_share_text' ] = $cff_facebook_share_text;
2009
2010 //Social translate
2011 $options[ 'cff_translate_photos_text' ] = $cff_translate_photos_text;
2012 $options[ 'cff_translate_photo_text' ] = $cff_translate_photo_text;
2013 $options[ 'cff_translate_video_text' ] = $cff_translate_video_text;
2014
2015 $options[ 'cff_translate_learn_more_text' ] = $cff_translate_learn_more_text;
2016 $options[ 'cff_translate_shop_now_text' ] = $cff_translate_shop_now_text;
2017 $options[ 'cff_translate_message_page_text' ] = $cff_translate_message_page_text;
2018
2019 //Date translate
2020 $options[ 'cff_translate_second' ] = $cff_translate_second;
2021 $options[ 'cff_translate_seconds' ] = $cff_translate_seconds;
2022 $options[ 'cff_translate_minute' ] = $cff_translate_minute;
2023 $options[ 'cff_translate_minutes' ] = $cff_translate_minutes;
2024 $options[ 'cff_translate_hour' ] = $cff_translate_hour;
2025 $options[ 'cff_translate_hours' ] = $cff_translate_hours;
2026 $options[ 'cff_translate_day' ] = $cff_translate_day;
2027 $options[ 'cff_translate_days' ] = $cff_translate_days;
2028 $options[ 'cff_translate_week' ] = $cff_translate_week;
2029 $options[ 'cff_translate_weeks' ] = $cff_translate_weeks;
2030 $options[ 'cff_translate_month' ] = $cff_translate_month;
2031 $options[ 'cff_translate_months' ] = $cff_translate_months;
2032 $options[ 'cff_translate_year' ] = $cff_translate_year;
2033 $options[ 'cff_translate_years' ] = $cff_translate_years;
2034 $options[ 'cff_translate_ago' ] = $cff_translate_ago;
2035
2036 }
2037 //Update the array
2038 update_option( 'cff_style_settings', $options );
2039 // Put an settings updated message on the screen
2040 ?>
2041 <div class="updated"><p><strong><?php _e('Settings saved.', 'custom-facebook-feed' ); ?></strong></p></div>
2042 <?php } ?>
2043
2044 <?php } //End nonce check ?>
2045
2046 <?php
2047 $lite_notice_dismissed = get_transient( 'facebook_feed_dismiss_lite' );
2048
2049 if ( ! $lite_notice_dismissed ) :
2050 ?>
2051 <div id="cff-notice-bar" style="display:none">
2052 <span class="cff-notice-bar-message"><?php _e( 'You\'re using Custom Facebook Feed Lite. To unlock more features consider <a href="https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=notices&utm_medium=lite" target="_blank" rel="noopener noreferrer">upgrading to Pro</a>.', 'custom-facebook-feed'); ?></span>
2053 <button type="button" class="dismiss" title="<?php _e( 'Dismiss this message.', 'custom-facebook-feed'); ?>" data-page="overview">
2054 </button>
2055 </div>
2056 <?php endif; ?>
2057
2058 <div id="cff-admin" class="wrap">
2059 <div id="header">
2060 <h1><?php _e('Custom Facebook Feed', 'custom-facebook-feed'); ?></h1>
2061 </div>
2062
2063 <form name="form1" method="post" action="">
2064 <input type="hidden" name="<?php echo $style_hidden_field_name; ?>" value="Y">
2065 <?php wp_nonce_field( 'cff_saving_customize', 'cff_customize_nonce' ); ?>
2066
2067 <?php
2068 $cff_active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general';
2069 ?>
2070
2071 <h2 class="nav-tab-wrapper">
2072 <a href="?page=cff-top&amp;tab=configuration" class="nav-tab <?php echo $cff_active_tab == 'configuration' ? 'nav-tab-active' : ''; ?>"><?php _e('Configuration'); ?></a>
2073 <a href="?page=cff-style" class="nav-tab nav-tab-active"><?php _e('Customize'); ?></a>
2074 <a href="?page=cff-top&amp;tab=support" class="nav-tab <?php echo $cff_active_tab == 'support' ? 'nav-tab-active' : ''; ?>"><?php _e('Support'); ?></a>
2075 </h2>
2076
2077 <h2 class="nav-tab-wrapper cff-subtabs">
2078 <a href="?page=cff-style&amp;tab=general" class="nav-tab <?php echo $cff_active_tab == 'general' ? 'nav-tab-active' : ''; ?>"><?php _e('General'); ?></a>
2079 <a href="?page=cff-style&amp;tab=post_layout" class="nav-tab <?php echo $cff_active_tab == 'post_layout' ? 'nav-tab-active' : ''; ?>"><?php _e('Post Layout'); ?></a>
2080 <a href="?page=cff-style&amp;tab=typography" class="nav-tab <?php echo $cff_active_tab == 'typography' ? 'nav-tab-active' : ''; ?>"><?php _e('Style Posts'); ?></a>
2081 <a href="?page=cff-style&amp;tab=misc" class="nav-tab <?php echo $cff_active_tab == 'misc' ? 'nav-tab-active' : ''; ?>"><?php _e('Misc'); ?></a>
2082 <a href="?page=cff-style&amp;tab=custom_text" class="nav-tab <?php echo $cff_active_tab == 'custom_text' ? 'nav-tab-active' : ''; ?>"><?php _e('Custom Text / Translate'); ?></a>
2083 </h2>
2084 <?php if( $cff_active_tab == 'general' ) { //Start General tab ?>
2085
2086 <p class="cff_contents_links" id="general">
2087 <span>Jump to: </span>
2088 <a href="#general"><?php _e('General', 'custom-facebook-feed'); ?></a>
2089 <a href="#header"><?php _e('Header', 'custom-facebook-feed'); ?></a>
2090 <a href="#likebox"><?php _e('Like Box', 'custom-facebook-feed'); ?></a>
2091 </p>
2092
2093 <input type="hidden" name="<?php echo $style_general_hidden_field_name; ?>" value="Y">
2094 <br />
2095 <table class="form-table">
2096 <tbody>
2097 <h3><?php _e('General', 'custom-facebook-feed'); ?></h3>
2098 <tr valign="top">
2099 <th class="bump-left" scope="row"><label><?php _e('Feed Width', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> width
2100 Eg: width=500px</code></th>
2101 <td>
2102 <input name="cff_feed_width" id="cff_feed_width" type="text" value="<?php esc_attr_e( $cff_feed_width, 'custom-facebook-feed' ); ?>" size="6" />
2103 <i style="color: #666; font-size: 11px;">Eg. 100% or 500px</i>
2104 <div id="cff_width_options">
2105 <input name="cff_feed_width_resp" type="checkbox" id="cff_feed_width_resp" <?php if($cff_feed_width_resp == true) echo "checked"; ?> /><label for="cff_feed_width_resp"><?php _e('Set to be 100% width on mobile?', 'custom-facebook-feed'); ?></label>
2106 <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?', 'custom-facebook-feed'); ?></a>
2107 <p class="cff-tooltip cff-more-info"><?php _e("If you set a width on the feed then this will be used on mobile as well as desktop. Check this setting to set the feed width to be 100% on mobile so that it is responsive.", 'custom-facebook-feed'); ?></p>
2108 </div>
2109 </td>
2110 </tr>
2111 <tr valign="top">
2112 <th class="bump-left" scope="row"><label><?php _e('Feed Height', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> height
2113 Eg: height=500px</code></th>
2114 <td>
2115 <input name="cff_feed_height" type="text" value="<?php esc_attr_e( $cff_feed_height, 'custom-facebook-feed' ); ?>" size="6" />
2116 <i style="color: #666; font-size: 11px;">Eg. 500px</i>
2117 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2118 <p class="cff-tooltip cff-more-info"><?php _e("Use this to set a fixed height on the feed. If the feed exceeds this height then a scroll bar will be used. Leave it empty to set no maximum height."); ?></p>
2119 </td>
2120 </tr>
2121 <th class="bump-left" scope="row"><label><?php _e('Feed Padding', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> padding
2122 Eg: padding=20px</code></th>
2123 <td>
2124 <input name="cff_feed_padding" type="text" value="<?php esc_attr_e( $cff_feed_padding, 'custom-facebook-feed' ); ?>" size="6" />
2125 <i style="color: #666; font-size: 11px;">Eg. 20px or 2%</i>
2126 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2127 <p class="cff-tooltip cff-more-info"><?php _e("This is the amount of padding/spacing that goes around the feed. This is particularly useful if you intend to set a background color on the feed."); ?></p>
2128 </td>
2129 </tr>
2130 <tr valign="top">
2131 <th class="bump-left" scope="row"><label><?php _e('Feed Background Color', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> bgcolor
2132 Eg: bgcolor=FF0000</code></th>
2133 <td>
2134 <input name="cff_bg_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_bg_color), 'custom-facebook-feed' ); ?>" class="cff-colorpicker" />
2135 </td>
2136 </tr>
2137 <tr valign="top">
2138 <th class="bump-left" scope="row"><label><?php _e('Add CSS class to feed', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> class
2139 Eg: class=myfeed</code></th>
2140 <td>
2141 <input name="cff_class" type="text" value="<?php esc_attr_e( $cff_class, 'custom-facebook-feed' ); ?>" size="25" />
2142 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2143 <p class="cff-tooltip cff-more-info"><?php _e("You can add your own CSS classes to the feed here. To add multiple classes separate each with a space, Eg. classone classtwo classthree"); ?></p>
2144 </td>
2145 </tr>
2146
2147 <tr valign="top">
2148 <th class="bump-left" scope="row"><label for="cff_cols">Feed Columns</label><code class="cff_shortcode"> cols
2149 Eg: cols=3</code></th>
2150 <td class="cff-short">
2151 <select name="cff_cols" id="cff_cols">
2152 <option value="1" <?php if( $cff_cols == 1 ) { echo 'selected'; } ?>>1</option>
2153 <option value="2" <?php if( $cff_cols == 2 ) { echo 'selected'; } ?>>2</option>
2154 <option value="3" <?php if( $cff_cols == 3 ) { echo 'selected'; } ?>>3</option>
2155 <option value="4" <?php if( $cff_cols == 4 ) { echo 'selected'; } ?>>4</option>
2156 <option value="5" <?php if( $cff_cols == 5 ) { echo 'selected'; } ?>>5</option>
2157 <option value="6" <?php if( $cff_cols == 6 ) { echo 'selected'; } ?>>6</option>
2158 </select>
2159
2160 <br />
2161 <div class="cff-mobile-col-settings" <?php if( intval($cff_cols) > 1 ) echo 'style="display:block;"' ?>>
2162 <div class="cff-row">
2163 <label title="Click for shortcode option">Mobile Columns:</label><code class="cff_shortcode"> colsmobile
2164 Eg: colsmobile=2</code>
2165 <select name="cff_cols_mobile" id="cff_cols_mobile">
2166 <option value="1" <?php if( $cff_cols_mobile == 1 ) { echo 'selected'; } ?>>1</option>
2167 <option value="2" <?php if( $cff_cols_mobile == 2 ) { echo 'selected'; } ?>>2</option>
2168 </select>
2169 </div>
2170 </div>
2171
2172 </td>
2173 </tr>
2174
2175 </tbody>
2176 </table>
2177
2178 <?php submit_button(); ?>
2179
2180 <hr id="types" />
2181 <table class="form-table">
2182 <tbody>
2183 <h3><?php _e('Post Types', 'custom-facebook-feed'); ?></h3>
2184 <tr valign="top">
2185 <th scope="row"><?php _e('Only show these types of posts:', 'custom-facebook-feed'); ?><br />
2186 <i style="color: #666; font-size: 11px;"><a href="https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=settings&utm_medium=types" target="_blank"><?php _e('Upgrade to Pro to enable post types, photos, videos and more', 'custom-facebook-feed'); ?></a></i></th>
2187 <td>
2188 <div>
2189 <input name="cff_show_status_type" type="checkbox" id="cff_show_status_type" disabled checked />
2190 <label for="cff_show_status_type"><?php _e('Statuses', 'custom-facebook-feed'); ?></label>
2191 </div>
2192 <div>
2193 <input type="checkbox" name="cff_show_event_type" id="cff_show_event_type" disabled checked />
2194 <label for="cff_show_event_type"><?php _e('Events', 'custom-facebook-feed'); ?></label>
2195 </div>
2196 <div>
2197 <input type="checkbox" name="cff_show_photos_type" id="cff_show_photos_type" disabled checked />
2198 <label for="cff_show_photos_type"><?php _e('Photos', 'custom-facebook-feed'); ?></label>
2199 </div>
2200 <div>
2201 <input type="checkbox" name="cff_show_video_type" id="cff_show_video_type" disabled checked />
2202 <label for="cff_show_video_type"><?php _e('Videos', 'custom-facebook-feed'); ?></label>
2203 </div>
2204 <div>
2205 <input type="checkbox" name="cff_show_links_type" id="cff_show_links_type" disabled checked />
2206 <label for="cff_show_links_type"><?php _e('Links', 'custom-facebook-feed'); ?></label>
2207 </div>
2208 <div>
2209 <input type="checkbox" name="cff_show_links_type" id="cff_show_links_type" disabled checked />
2210 <label for="cff_show_links_type"><?php _e('Albums', 'custom-facebook-feed'); ?></label>
2211 </div>
2212 </td>
2213 </tr>
2214 </tbody>
2215 </table>
2216
2217 <hr />
2218
2219 <table class="form-table">
2220 <tbody>
2221 <h3><?php _e('Header', 'custom-facebook-feed'); ?></h3>
2222 <tr valign="top">
2223 <th class="bump-left" scope="row"><label><?php _e('Show Feed Header', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> showheader
2224 Eg: showheader=true</code></th>
2225 <td>
2226 <input type="checkbox" name="cff_show_header" id="cff_show_header" <?php if($cff_show_header == true) echo 'checked="checked"' ?> />
2227 <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is the header?', 'custom-facebook-feed'); ?></a>
2228 <p class="cff-tooltip cff-more-info"><?php _e("The header allows you to display text and an icon at the top of your feed. Customize the text, style, and layout of the header using the settings below.", "custom-facebook-feed"); ?></p>
2229 </td>
2230 </tr>
2231
2232 <tr valign="top">
2233 <th class="bump-left" scope="row"><label><?php _e('Header Text', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> headertext
2234 Eg: headertext='Facebook Feed'</code></th>
2235 <td>
2236 <input name="cff_header_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_header_text, 'custom-facebook-feed' ) ); ?>" size="30" />
2237 </td>
2238 </tr>
2239
2240 <tr valign="top">
2241 <th class="bump-left" scope="row"><label><?php _e('Display outside the scrollable area', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> headeroutside
2242 Eg: headeroutside=true</code></th>
2243 <td>
2244 <input type="checkbox" name="cff_header_outside" id="cff_header_outside" <?php if($cff_header_outside == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes', 'custom-facebook-feed'); ?>
2245 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2246 <p class="cff-tooltip cff-more-info"><?php _e("This positions the Header outside of the feed container. It is useful if your feed has a vertical scrollbar as it places it outside of the scrollable area and fixes it at the top."); ?></p>
2247 </td>
2248 </tr>
2249
2250 <tr valign="top">
2251 <th class="bump-left" scope="row"><label><?php _e('Background Color', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> headerbg
2252 Eg: headerbg=DDD</code></th>
2253 <td>
2254 <input name="cff_header_bg_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_header_bg_color), 'custom-facebook-feed' ); ?>" class="cff-colorpicker" />
2255 </td>
2256 </tr>
2257 <tr valign="top">
2258 <th class="bump-left" scope="row"><label><?php _e('Padding', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> headerpadding
2259 Eg: headerpadding=20px</code></th>
2260 <td>
2261 <input name="cff_header_padding" type="text" value="<?php esc_attr_e( $cff_header_padding, 'custom-facebook-feed' ); ?>" size="6" />
2262 <i style="color: #666; font-size: 11px;">Eg. 20px</i>
2263 </td>
2264 </tr>
2265 <tr valign="top">
2266 <th class="bump-left" scope="row"><label><?php _e('Text Size', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> headertextsize
2267 Eg: headertextsize=28</code></th>
2268 <td>
2269 <select name="cff_header_text_size">
2270 <option value="inherit" <?php if($cff_header_text_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
2271 <option value="10" <?php if($cff_header_text_size == "10") echo 'selected="selected"' ?> >10px</option>
2272 <option value="11" <?php if($cff_header_text_size == "11") echo 'selected="selected"' ?> >11px</option>
2273 <option value="12" <?php if($cff_header_text_size == "12") echo 'selected="selected"' ?> >12px</option>
2274 <option value="13" <?php if($cff_header_text_size == "13") echo 'selected="selected"' ?> >13px</option>
2275 <option value="14" <?php if($cff_header_text_size == "14") echo 'selected="selected"' ?> >14px</option>
2276 <option value="16" <?php if($cff_header_text_size == "16") echo 'selected="selected"' ?> >16px</option>
2277 <option value="18" <?php if($cff_header_text_size == "18") echo 'selected="selected"' ?> >18px</option>
2278 <option value="20" <?php if($cff_header_text_size == "20") echo 'selected="selected"' ?> >20px</option>
2279 <option value="24" <?php if($cff_header_text_size == "24") echo 'selected="selected"' ?> >24px</option>
2280 <option value="28" <?php if($cff_header_text_size == "28") echo 'selected="selected"' ?> >28px</option>
2281 <option value="32" <?php if($cff_header_text_size == "32") echo 'selected="selected"' ?> >32px</option>
2282 <option value="36" <?php if($cff_header_text_size == "36") echo 'selected="selected"' ?> >36px</option>
2283 <option value="42" <?php if($cff_header_text_size == "42") echo 'selected="selected"' ?> >42px</option>
2284 <option value="48" <?php if($cff_header_text_size == "48") echo 'selected="selected"' ?> >48px</option>
2285 <option value="54" <?php if($cff_header_text_size == "54") echo 'selected="selected"' ?> >54px</option>
2286 <option value="60" <?php if($cff_header_text_size == "60") echo 'selected="selected"' ?> >60px</option>
2287 </select>
2288 </td>
2289 </tr>
2290 <tr valign="top">
2291 <th class="bump-left" scope="row"><label><?php _e('Text Weight', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> headertextweight
2292 Eg: headertextweight=bold</code></th>
2293 <td>
2294 <select name="cff_header_text_weight">
2295 <option value="inherit" <?php if($cff_header_text_weight == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
2296 <option value="normal" <?php if($cff_header_text_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
2297 <option value="bold" <?php if($cff_header_text_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
2298 </select>
2299 </td>
2300 </tr>
2301 <tr valign="top">
2302 <th class="bump-left" scope="row"><label><?php _e('Text Color', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> headertextcolor
2303 Eg: headertextcolor=333</code></th>
2304 <td>
2305 <input name="cff_header_text_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_header_text_color), 'custom-facebook-feed' ); ?>" class="cff-colorpicker" />
2306 </td>
2307 </tr>
2308 <tr valign="top">
2309 <th class="bump-left" scope="row"><label><?php _e('Icon Type', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> headericon
2310 Eg: headericon=facebook</code></th>
2311 <td>
2312 <select name="cff_header_icon" id="cff-header-icon">
2313 <option value="facebook-square" <?php if($cff_header_icon == "facebook-square") echo 'selected="selected"' ?> >Facebook 1</option>
2314 <option value="facebook" <?php if($cff_header_icon == "facebook") echo 'selected="selected"' ?> >Facebook 2</option>
2315 <option value="calendar" <?php if($cff_header_icon == "calendar") echo 'selected="selected"' ?> >Events 1</option>
2316 <option value="calendar-o" <?php if($cff_header_icon == "calendar-o") echo 'selected="selected"' ?> >Events 2</option>
2317 <option value="picture-o" <?php if($cff_header_icon == "picture-o") echo 'selected="selected"' ?> >Photos</option>
2318 <option value="users" <?php if($cff_header_icon == "users") echo 'selected="selected"' ?> >People</option>
2319 <option value="thumbs-o-up" <?php if($cff_header_icon == "thumbs-o-up") echo 'selected="selected"' ?> >Thumbs Up 1</option>
2320 <option value="thumbs-up" <?php if($cff_header_icon == "thumbs-up") echo 'selected="selected"' ?> >Thumbs Up 2</option>
2321 <option value="comment-o" <?php if($cff_header_icon == "comment-o") echo 'selected="selected"' ?> >Speech Bubble 1</option>
2322 <option value="comment" <?php if($cff_header_icon == "comment") echo 'selected="selected"' ?> >Speech Bubble 2</option>
2323 <option value="ticket" <?php if($cff_header_icon == "ticket") echo 'selected="selected"' ?> >Ticket</option>
2324 <option value="list-alt" <?php if($cff_header_icon == "list-alt") echo 'selected="selected"' ?> >News List</option>
2325 <option value="file" <?php if($cff_header_icon == "file") echo 'selected="selected"' ?> >File 1</option>
2326 <option value="file-o" <?php if($cff_header_icon == "file-o") echo 'selected="selected"' ?> >File 2</option>
2327 <option value="file-text" <?php if($cff_header_icon == "file-text") echo 'selected="selected"' ?> >File 3</option>
2328 <option value="file-text-o" <?php if($cff_header_icon == "file-text-o") echo 'selected="selected"' ?> >File 4</option>
2329 <option value="youtube-play" <?php if($cff_header_icon == "youtube-play") echo 'selected="selected"' ?> >Video</option>
2330 <option value="youtube" <?php if($cff_header_icon == "youtube") echo 'selected="selected"' ?> >YouTube</option>
2331 <option value="vimeo-square" <?php if($cff_header_icon == "vimeo-square") echo 'selected="selected"' ?> >Vimeo</option>
2332 </select>
2333
2334 <i id="cff-header-icon-example" class="fa fa-facebook-square"></i>
2335 </td>
2336 </tr>
2337 <tr valign="top">
2338 <th class="bump-left" scope="row"><label><?php _e('Icon Color', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> headericoncolor
2339 Eg: headericoncolor=FFF</code></th>
2340 <td>
2341 <input name="cff_header_icon_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_header_icon_color), 'custom-facebook-feed' ); ?>" class="cff-colorpicker" />
2342 </td>
2343 </tr>
2344 <tr valign="top">
2345 <th class="bump-left" scope="row"><label><?php _e('Icon Size', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> headericonsize
2346 Eg: headericonsize=28</code></th>
2347 <td>
2348 <select name="cff_header_icon_size" id="cff-header-icon-size">
2349 <option value="10" <?php if($cff_header_icon_size == "10") echo 'selected="selected"' ?> >10px</option>
2350 <option value="11" <?php if($cff_header_icon_size == "11") echo 'selected="selected"' ?> >11px</option>
2351 <option value="12" <?php if($cff_header_icon_size == "12") echo 'selected="selected"' ?> >12px</option>
2352 <option value="13" <?php if($cff_header_icon_size == "13") echo 'selected="selected"' ?> >13px</option>
2353 <option value="14" <?php if($cff_header_icon_size == "14") echo 'selected="selected"' ?> >14px</option>
2354 <option value="16" <?php if($cff_header_icon_size == "16") echo 'selected="selected"' ?> >16px</option>
2355 <option value="18" <?php if($cff_header_icon_size == "18") echo 'selected="selected"' ?> >18px</option>
2356 <option value="20" <?php if($cff_header_icon_size == "20") echo 'selected="selected"' ?> >20px</option>
2357 <option value="24" <?php if($cff_header_icon_size == "24") echo 'selected="selected"' ?> >24px</option>
2358 <option value="28" <?php if($cff_header_icon_size == "28") echo 'selected="selected"' ?> >28px</option>
2359 <option value="32" <?php if($cff_header_icon_size == "32") echo 'selected="selected"' ?> >32px</option>
2360 <option value="36" <?php if($cff_header_icon_size == "36") echo 'selected="selected"' ?> >36px</option>
2361 <option value="42" <?php if($cff_header_icon_size == "42") echo 'selected="selected"' ?> >42px</option>
2362 <option value="48" <?php if($cff_header_icon_size == "48") echo 'selected="selected"' ?> >48px</option>
2363 <option value="54" <?php if($cff_header_icon_size == "54") echo 'selected="selected"' ?> >54px</option>
2364 <option value="60" <?php if($cff_header_icon_size == "60") echo 'selected="selected"' ?> >60px</option>
2365 </select>
2366 </td>
2367 </tr>
2368 <tr id="author"><!-- Quick link --></tr>
2369 </tbody>
2370 </table>
2371
2372 <?php submit_button(); ?>
2373
2374 <hr id="likebox" /><!-- Quick link -->
2375
2376 <h3><?php _e('Like Box / Page Plugin', 'custom-facebook-feed'); ?></h3>
2377 <table class="form-table">
2378 <tbody>
2379 <tr valign="top">
2380 <th class="bump-left" scope="row"><label><?php _e('Show the Like Box', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> include exclude
2381 Eg: include/exclude=likebox</code></th>
2382 <td>
2383 <input type="checkbox" name="cff_show_like_box" id="cff_show_like_box" <?php if($cff_show_like_box == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes', 'custom-facebook-feed'); ?>
2384 <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is the Like Box?'); ?></a>
2385 <p class="cff-tooltip cff-more-info"><?php _e("The Like Box is an official Facebook widget that we include at the bottom or top of the feed. It contains information about your Facebook Page and allows users to 'like' it directly on your site."); ?></p>
2386 </td>
2387 </tr>
2388 <tr valign="top">
2389 <th class="bump-left" scope="row"><label><?php _e('Position', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> likeboxpos
2390 Eg: likeboxpos=top</code></th>
2391 <td>
2392 <select name="cff_like_box_position">
2393 <option value="bottom" <?php if($cff_like_box_position == "bottom") echo 'selected="selected"' ?> ><?php _e('Bottom of feed', 'custom-facebook-feed'); ?></option>
2394 <option value="top" <?php if($cff_like_box_position == "top") echo 'selected="selected"' ?> ><?php _e('Top of feed', 'custom-facebook-feed'); ?></option>
2395 </select>
2396 </td>
2397 </tr>
2398 <tr valign="top">
2399 <th class="bump-left" scope="row"><label><?php _e('Display outside the scrollable area', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> likeboxoutside
2400 Eg: likeboxoutside=true</code></th>
2401 <td>
2402 <input type="checkbox" name="cff_like_box_outside" id="cff_like_box_outside" <?php if($cff_like_box_outside == true) echo 'checked="checked"' ?> />
2403 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2404 <p class="cff-tooltip cff-more-info"><?php _e("This positions the Like Box widget outside of the feed container. It is useful if your feed has a vertical scrollbar as it places it outside of the scrollable area and fixes it at the top or bottom."); ?></p>
2405 </td>
2406 </tr>
2407
2408 <tr valign="top">
2409 <th class="bump-left" scope="row"><label><?php _e('Show faces of fans', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> likeboxfaces
2410 Eg: likeboxfaces=true</code></th>
2411 <td>
2412 <input type="checkbox" name="cff_like_box_faces" id="cff_like_box_faces" <?php if($cff_like_box_faces == true) echo 'checked="checked"' ?> />
2413 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2414 <p class="cff-tooltip cff-more-info"><?php _e("This will display thumbnail photos within the Like Box of some of the people who like your page."); ?></p>
2415 </td>
2416 </tr>
2417 <tr valign="top">
2418 <th class="bump-left" scope="row"><label><?php _e('Include the Cover Photo', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> likeboxcover
2419 Eg: likeboxcover=true</code></th>
2420 <td>
2421 <input type="checkbox" name="cff_like_box_cover" id="cff_like_box_cover" <?php if($cff_like_box_cover == true) echo 'checked="checked"' ?> />
2422 </td>
2423 </tr>
2424 <tr valign="top">
2425 <th class="bump-left" scope="row"><label><?php _e('Use a small header', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> likeboxsmallheader
2426 Eg: likeboxsmallheader=true</code></th>
2427 <td>
2428 <input type="checkbox" name="cff_like_box_small_header" id="cff_like_box_small_header" <?php if($cff_like_box_small_header == true) echo 'checked="checked"' ?> />
2429 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2430 <p class="cff-tooltip cff-more-info"><?php _e("This will display a shorter version of the Like Box with a slimmer cover photo and less information."); ?></p>
2431 </td>
2432 </tr>
2433 <tr valign="top">
2434 <th class="bump-left" scope="row"><label><?php _e('Hide custom call to action button', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> likeboxhidebtn
2435 Eg: likeboxhidebtn=true</code></th>
2436 <td>
2437 <input type="checkbox" name="cff_like_box_hide_cta" id="cff_like_box_hide_cta" <?php if($cff_like_box_hide_cta == true) echo 'checked="checked"' ?> />
2438 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2439 <p class="cff-tooltip cff-more-info"><?php _e("If you have a custom 'Call To Action' button for your Facebook Page then this will hide it and display the default Like Box button."); ?></p>
2440 </td>
2441 </tr>
2442 <tr valign="top">
2443 <th class="bump-left" for="cff_likebox_width" scope="row"><label><?php _e('Custom Like Box Width', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> likeboxwidth
2444 Eg: likeboxwidth=500</code></th>
2445 <td>
2446 <input name="cff_likebox_width" type="text" value="<?php esc_attr_e( $cff_likebox_width, 'custom-facebook-feed' ); ?>" size="3" /><span class="cff-pixel-label">px</span>
2447 <span><i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Default: 340, Min: 180, Max: 500', 'custom-facebook-feed'); ?></i></span>
2448 </td>
2449 </tr>
2450 </tbody>
2451 </table>
2452
2453 <?php submit_button(); ?>
2454
2455 <hr />
2456
2457 <h3><?php _e('"Load More" button'); ?></h3>
2458 <a href="https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=settings&utm_medium=loadmore" target="_blank">Upgrade to Pro to enable the Load More button</a>
2459 <p class="submit cff-expand-button">
2460 <a href="javascript:void(0);" class="button"><b>+</b> Show Pro Options</a>
2461 </p>
2462 <table class="form-table cff-expandable-options">
2463 <tbody>
2464 <tr valign="top" class="cff-pro">
2465 <th class="bump-left" scope="row"><label><?php _e('Show "Load More" Button'); ?></label></th>
2466 <td>
2467 <input type="checkbox" name="cff_load_more" id="cff_load_more" disabled />
2468 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2469 <p class="cff-tooltip cff-more-info"><?php _e("The Load More button is added to the bottom of your feed and allows you to dynamically load more posts into your feed. Use the button below to reveal customization settings for the button."); ?></p>
2470 </td>
2471 </tr>
2472 <tr valign="top" class="cff-pro">
2473 <th class="bump-left" scope="row"><label><?php _e('Button Background Color'); ?></label></th>
2474 <td>
2475 <input name="cff_load_more_bg" type="text" class="cff-colorpicker" disabled />
2476 </td>
2477 </tr>
2478 <tr valign="top" class="cff-pro">
2479 <th class="bump-left" scope="row"><label><?php _e('Button Hover Color'); ?></label></th>
2480 <td>
2481 <input name="cff_load_more_bg_hover" type="text" class="cff-colorpicker" disabled />
2482 </td>
2483 </tr>
2484 <tr valign="top" class="cff-pro">
2485 <th class="bump-left" scope="row"><label><?php _e('Button Text Color'); ?></label></th>
2486 <td>
2487 <input name="cff_load_more_text_color" type="text" class="cff-colorpicker" disabled />
2488 </td>
2489 </tr>
2490 <tr valign="top" class="cff-pro">
2491 <th class="bump-left" scope="row"><label><?php _e('Button Text'); ?></label></th>
2492 <td>
2493 <input name="cff_load_more_text" type="text" size="30" disabled />
2494 </td>
2495 </tr>
2496 </tbody>
2497 </table>
2498
2499 <hr />
2500
2501 <h3><?php _e('Lightbox'); ?></h3>
2502 <a href="https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=settings&utm_medium=lightbox" target="_blank">Upgrade to Pro to enable the Lightbox</a>
2503 <p class="submit cff-expand-button">
2504 <a href="javascript:void(0);" class="button"><b>+</b> Show Pro Options</a>
2505 </p>
2506 <table class="form-table cff-expandable-options">
2507 <tbody>
2508 <tr valign="top" class="cff-pro">
2509 <th class="bump-left" scope="row"><label><?php _e('Disable Popup Lightbox'); ?></label><code class="cff_shortcode"> disablelightbox
2510 Eg: disablelightbox=true</code></th>
2511 <td>
2512 <input name="cff_disable_lightbox" type="checkbox" id="cff_disable_lightbox" disabled />
2513 <label for="cff_disable_lightbox"><?php _e('Disable'); ?></label>
2514 </td>
2515 </tr>
2516 <tr valign="top" class="cff-pro">
2517 <th class="bump-left" scope="row"><label><?php _e('Background Color'); ?></label></th>
2518 <td>
2519 <input name="cff_lightbox_bg_color" type="text" class="cff-colorpicker" disabled />
2520 </td>
2521 </tr>
2522 <tr valign="top" class="cff-pro">
2523 <th class="bump-left" scope="row"><label><?php _e('Text Color'); ?></label></th>
2524 <td>
2525 <input name="cff_lightbox_text_color" type="text" class="cff-colorpicker" disabled />
2526 </td>
2527 </tr>
2528 <tr valign="top" class="cff-pro">
2529 <th class="bump-left" scope="row"><label><?php _e('Link Color'); ?></label></th>
2530 <td>
2531 <input name="cff_lightbox_link_color" type="text" class="cff-colorpicker" disabled />
2532 </td>
2533 </tr>
2534 <tr valign="top" class="cff-pro">
2535 <th class="bump-left" scope="row"><label><?php _e('Show Comments in Lightbox'); ?></label><code class="cff_shortcode"> lightboxcomments
2536 Eg: lightboxcomments=true</code></th>
2537 <td>
2538 <input type="checkbox" name="cff_lightbox_comments" id="cff_lightbox_comments" disabled/>
2539 <span><i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('For timeline posts only'); ?></i></span>
2540 </td>
2541 </tr>
2542 </tbody>
2543 </table>
2544
2545 <hr />
2546
2547 <h3><?php _e('Filter Content by String'); ?></h3>
2548 <a href="https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=settings&utm_medium=filtering" target="_blank">Upgrade to Pro to enable Filtering</a>
2549 <p class="submit cff-expand-button">
2550 <a href="javascript:void(0);" class="button"><b>+</b> Show Pro Options</a>
2551 </p>
2552 <table class="form-table cff-expandable-options">
2553 <tbody>
2554 <tr valign="top" class="cff-pro">
2555 <th class="bump-left" scope="row"><label><?php _e('Only show posts containing:'); ?></label></th>
2556 <td>
2557 <input name="cff_filter_string" type="text" size="25" disabled />
2558 <i style="color: #666; font-size: 11px;">Eg. #smash, balloon </i>
2559 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2560 <p class="cff-tooltip cff-more-info"><?php _e("You can use this setting to only display posts containing these text strings. Separate multiple strings using commas. If only a few posts, or none at all, are displayed then you may need to increase the plugin's 'Post Limit' settings. See <a href='https://smashballoon.com/filtering-your-facebook-posts/' target='_blank'>this FAQ</a> to learn more about how filtering works."); ?></p>
2561 </td>
2562 </tr>
2563 <tr valign="top" class="cff-pro">
2564 <th class="bump-left" scope="row"><label><?php _e("Don't show posts containing:"); ?></label></th>
2565 <td>
2566 <input name="cff_exclude_string" type="text" size="25" disabled />
2567 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2568 <p class="cff-tooltip cff-more-info"><?php _e("You can use this setting to remove any posts containing these text strings. Separate multiple strings using commas."); ?></p>
2569 </td>
2570 </tr>
2571 </tbody>
2572 </table>
2573
2574 <hr />
2575
2576 <?php submit_button(); ?>
2577
2578 <p style="padding-top: 5px;"><i class="fa fa-life-ring" aria-hidden="true"></i>&nbsp; <?php _e('Having trouble using the plugin? Check out the', 'custom-facebook-feed'); ?> <a href='admin.php?page=cff-top&amp;tab=support'><?php _e('Support', 'custom-facebook-feed'); ?></a> <?php _e('tab', 'custom-facebook-feed'); ?>.</p>
2579
2580 <div class="cff_quickstart">
2581 <h3><i class="fa fa-rocket" aria-hidden="true"></i>&nbsp; Display your feed</h3>
2582 <p>Copy and paste this shortcode directly into the page, post or widget where you'd like to display the feed: <input type="text" value="[custom-facebook-feed]" size="22" readonly="readonly" style="text-align: center;" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."></p>
2583 <p>Find out how to display <a href="https://smashballoon.com/using-shortcode-options-customize-facebook-feeds/" target="_blank"><b>multiple feeds</b></a>.</p>
2584 </div>
2585
2586
2587 <a href="https://smashballoon.com/custom-facebook-feed/demo/?utm_campaign=facebook-free&utm_source=footer&utm_medium=ad" target="_blank" class="cff-pro-notice"><img src="<?php echo plugins_url( 'img/pro.png?2019' , __FILE__ ) ?>" /></a>
2588
2589 <?php } //End General tab ?>
2590 <?php if( $cff_active_tab == 'post_layout' ) { //Start Post Layout tab ?>
2591
2592 <p class="cff_contents_links" id="layout">
2593 <span>Jump to: </span>
2594 <a href="#showhide">Show/Hide</a>
2595 </p>
2596
2597 <input type="hidden" name="<?php echo $style_post_layout_hidden_field_name; ?>" value="Y">
2598 <br />
2599 <h3><?php _e('Post Layouts', 'custom-facebook-feed'); ?></h3>
2600 <a href="https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=settings&utm_medium=layouts" target="_blank"><?php _e('Upgrade to Pro to enable layouts', 'custom-facebook-feed'); ?></a>
2601 <p class="submit cff-expand-button">
2602 <a href="javascript:void(0);" class="button"><b>+</b> Show Pro Options</a>
2603 </p>
2604
2605 <div class="form-table cff-expandable-options cff-pro">
2606 <p><?php _e("Choose a layout from the 3 below."); ?>
2607
2608 <div class="cff-layouts">
2609 <div class="cff-layout cff-thumb <?php if($cff_preset_layout == "thumb") echo "cff-layout-selected"; ?>">
2610 <h3><input type="radio" name="cff_preset_layout" id="cff_preset_layout" value="thumb" disabled />&nbsp;<?php _e('Thumbnail'); ?></h3>
2611 <img src="<?php echo plugins_url( 'img/layout-thumb.png' , __FILE__ ) ?>" alt="Thumbnail Layout" />
2612
2613 </div>
2614 <div class="cff-layout cff-half <?php if($cff_preset_layout == "half") echo "cff-layout-selected"; ?>">
2615 <h3><input type="radio" name="cff_preset_layout" id="cff_preset_layout" value="half" disabled />&nbsp;<?php _e('Half-width'); ?></h3>
2616 <img src="<?php echo plugins_url( 'img/layout-half.png' , __FILE__ ) ?>" alt="Half Width Layout" />
2617
2618 </div>
2619 <div class="cff-layout cff-full <?php if($cff_preset_layout == "full") echo "cff-layout-selected"; ?>">
2620 <h3><input type="radio" name="cff_preset_layout" id="cff_preset_layout" value="full" disabled />&nbsp;<?php _e('Full-width'); ?></h3>
2621 <img src="<?php echo plugins_url( 'img/layout-full.png' , __FILE__ ) ?>" alt="Full Width Layout" />
2622
2623 </div>
2624 </div>
2625
2626 <table class="form-table">
2627 <tbody>
2628 <tr class="cff-media-position" class="cff-pro">
2629 <th><label for="cff_media_position" class="bump-left"><?php _e('Photo/Video Position'); ?></label></th>
2630 <td>
2631 <select name="cff_media_position" disabled>
2632 <option value="below">Below Text</option>
2633 <option value="above">Above Text</option>
2634 </select>
2635 </td>
2636 </tr>
2637 <tr class="cff-pro">
2638 <th><label for="cff_media_position" class="bump-left"><?php _e('Photo/Video Position'); ?></label></th>
2639 <td>
2640 <select name="cff_media_position" disabled>
2641 <option value="below">Below Text</option>
2642 <option value="above">Above Text</option>
2643 </select>
2644 <i style="color: #666; font-size: 11px; margin-left: 5px;">Only applies to Full-width layout</i>
2645 </td>
2646 </tr>
2647 <tr class="cff-pro">
2648 <th><label for="cff_enable_narrow" class="bump-left"><?php _e('Always use the Full-width layout when feed is narrow?'); ?></label></th>
2649 <td>
2650 <input name="cff_enable_narrow" type="checkbox" id="cff_enable_narrow" disabled />
2651 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2652 <p class="cff-tooltip cff-more-info"><?php _e("When displaying posts in either a narrow column or on a mobile device the plugin will automatically default to using the 'Full-width' layout as it's better suited to narrow sizes."); ?></p>
2653 </td>
2654 </tr>
2655 <tr class="cff-pro">
2656 <th><label for="cff_one_image" class="bump-left"><?php _e('Only show one image per post'); ?></label></th>
2657 <td>
2658 <input name="cff_one_image" type="checkbox" id="cff_one_image" disabled />
2659 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2660 <p class="cff-tooltip cff-more-info"><?php _e("If a Facebook post contains more than photo then enabling this setting means that only the first photo in the post is displayed."); ?></p>
2661 </td>
2662 </tr>
2663 </tbody>
2664 </table>
2665 </div>
2666
2667
2668
2669 <table class="form-table" id="showhide">
2670
2671 <hr />
2672 <h3><?php _e('Show/Hide'); ?></h3>
2673 <table class="form-table">
2674 <tbody>
2675 <tr valign="top">
2676 <th scope="row"><label><?php _e('Include the following in posts: <i style="font-size: 11px;">(when applicable)</i>'); ?></label><code class="cff_shortcode"> include exclude
2677 Eg: include=text,date,likebox
2678 Eg: exclude=likebox
2679
2680 Options: author, text, desc, sharedlinks, date, eventtitle, eventdetails, link, likebox</code></th>
2681 <td class="cff_show_hide_settings">
2682 <div>
2683 <input name="cff_show_author" type="checkbox" id="cff_show_author" <?php if($cff_show_author == true) echo "checked"; ?> />
2684 <label for="cff_show_author">
2685 <b><?php _e('Author Name and Avatar'); ?></b>
2686 <p class="cff-show-hide-desc"><?php _e("The author name and avatar image that's shown at the top of each timeline post"); ?></p>
2687 </label>
2688
2689 </div>
2690 <div>
2691 <input name="cff_show_text" type="checkbox" id="cff_show_text" <?php if($cff_show_text == true) echo "checked"; ?> />
2692 <label for="cff_show_text">
2693 <b><?php _e('Post Text'); ?></b>
2694 <p class="cff-show-hide-desc"><?php _e("The main text of the Facebook post"); ?></p>
2695 </label>
2696 </div>
2697 <div>
2698 <input type="checkbox" name="cff_show_desc" id="cff_show_desc" <?php if($cff_show_desc == true) echo 'checked="checked"' ?> />
2699 <label for="cff_show_desc">
2700 <b><?php _e('Description Text'); ?></b>
2701 <p class="cff-show-hide-desc"><?php _e("The description text associated with shared photos, videos, or links"); ?></p>
2702 </label>
2703 </div>
2704 <div>
2705 <input type="checkbox" name="cff_show_shared_links" id="cff_show_shared_links" <?php if($cff_show_shared_links == true) echo 'checked="checked"' ?> />
2706 <label for="cff_show_shared_links">
2707 <b><?php _e('Shared Link Box'); ?></b>
2708 <p class="cff-show-hide-desc"><?php _e("The link info box that's created when a link is shared in a Facebook post"); ?></p>
2709 </label>
2710 </div>
2711 <div>
2712 <input type="checkbox" name="cff_show_date" id="cff_show_date" <?php if($cff_show_date == true) echo 'checked="checked"' ?> />
2713 <label for="cff_show_date">
2714 <b><?php _e('Date'); ?></b>
2715 <p class="cff-show-hide-desc"><?php _e("The date of the post"); ?></p>
2716 </label>
2717 </div>
2718 <div class="cff-disabled">
2719 <input type="checkbox" name="cff_show_media" disabled />
2720 <label for="cff_show_media">
2721 <b><?php _e('Photos and Videos'); ?></b>
2722 <p class="cff-show-hide-desc"><?php _e("Any photos or videos in your posts"); ?></p>
2723 </label>
2724 </div>
2725 <div>
2726 <input type="checkbox" name="cff_show_media_link" id="cff_show_media_link" <?php if($cff_show_media_link == true) echo 'checked="checked"' ?> />
2727 <label for="cff_show_media_link">
2728 <b><?php _e('Media link', 'custom-facebook-feed'); ?></b>
2729 <p class="cff-show-hide-desc"><?php _e("Display an icon and link to Facebook if the post contains either a photo or video"); ?></p>
2730 </label>
2731 </div>
2732 <div>
2733 <input type="checkbox" name="cff_show_event_title" id="cff_show_event_title" <?php if($cff_show_event_title == true) echo 'checked="checked"' ?> />
2734 <label for="cff_show_event_title">
2735 <b><?php _e('Event Title'); ?></b>
2736 <p class="cff-show-hide-desc"><?php _e("The title of an event"); ?></p>
2737 </label>
2738 </div>
2739 <div>
2740 <input type="checkbox" name="cff_show_event_details" id="cff_show_event_details" <?php if($cff_show_event_details == true) echo 'checked="checked"' ?> />
2741 <label for="cff_show_event_details">
2742 <b><?php _e('Event Details'); ?></b>
2743 <p class="cff-show-hide-desc"><?php _e("The information associated with an event"); ?></p>
2744 </label>
2745 </div>
2746 <div class="cff-disabled">
2747 <input type="checkbox" name="cff_show_meta" disabled />
2748 <label for="cff_show_meta">
2749 <b><?php _e('Like, Shares, and Comments'); ?></b>
2750 <p class="cff-show-hide-desc"><?php _e("The comments box displayed at the bottom of each timeline post"); ?></p>
2751 </label>
2752 </div>
2753 <div>
2754 <input type="checkbox" name="cff_show_link" id="cff_show_link" <?php if($cff_show_link == true) echo 'checked="checked"' ?> />
2755 <label for="cff_show_link">
2756 <b><?php _e('Post Action Links'); ?></b>
2757 <p class="cff-show-hide-desc"><?php _e('The "View on Facebook" and "Share" links at the bottom of each post'); ?></p>
2758 </label>
2759 </div>
2760 </td>
2761 </tr>
2762 <tr id="poststyle"><!-- Quick link --></tr>
2763 </tbody>
2764 </table>
2765
2766 <?php submit_button(); ?>
2767 <a href="https://smashballoon.com/custom-facebook-feed/demo/?utm_campaign=facebook-free&utm_source=footer&utm_medium=ad" target="_blank" class="cff-pro-notice"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
2768 <?php } //End Post Layout tab ?>
2769 <?php if( $cff_active_tab == 'typography' ) { //Start Typography tab ?>
2770
2771 <p class="cff_contents_links" id="postitem">
2772 <span>Jump to: </span>
2773 <a href="#postitem">Post Item</a>
2774 <a href="#author">Post Author</a>
2775 <a href="#text">Post Text</a>
2776 <a href="#description">Shared Post Description</a>
2777 <a href="#date">Post Date</a>
2778 <a href="#links">Shared Link Boxes</a>
2779 <a href="#eventtitle">Event Title</a>
2780 <a href="#eventdate">Event Date</a>
2781 <a href="#eventdetails">Event Details</a>
2782 <a href="#comments">Comments Box</a>
2783 <a href="#action">Post Action Links</a>
2784 </p>
2785
2786 <input type="hidden" name="<?php echo $style_typography_hidden_field_name; ?>" value="Y">
2787 <br />
2788
2789 <h3><?php _e('Post Item'); ?></h3>
2790 <table class="form-table">
2791 <tbody>
2792 <tr>
2793 <th class="bump-left" scope="row"><label><?php _e('Post Style'); ?></label><code class="cff_shortcode"> poststyle
2794 Eg: poststyle=regular/boxed</code></th>
2795 <td>
2796 <?php
2797 //If a post style isn't set (eg on initial update) then set it to be regular unless a bgcolor is set
2798 if( $cff_post_style == '' || empty($cff_post_style) ){
2799 $cff_post_style = 'regular';
2800 if( strlen($cff_post_bg_color) > 1 ) $cff_post_style = 'boxed';
2801 }
2802
2803 ?>
2804 <div class="cff-layouts">
2805 <div class="cff-post-style cff-layout <?php if($cff_post_style == "regular") echo "cff-layout-selected"; ?>">
2806 <h3><input type="radio" name="cff_post_style" id="cff_post_style" class="cff_post_style" value="regular" <?php if($cff_post_style == "regular") echo "checked"; ?> />&nbsp;<?php _e('Regular'); ?></h3>
2807 <img src="<?php echo plugins_url( 'img/post-style.png' , __FILE__ ) ?>" alt="Regular Post Style" />
2808 <img src="<?php echo plugins_url( 'img/post-style.png' , __FILE__ ) ?>" alt="Regular Post Style" />
2809 </div>
2810
2811 <div class="cff-post-style cff-boxed cff-layout <?php if($cff_post_style == "boxed") echo "cff-layout-selected"; ?>">
2812 <h3><input type="radio" name="cff_post_style" id="cff_post_style" class="cff_post_style" value="boxed" <?php if($cff_post_style == "boxed") echo "checked"; ?> />&nbsp;<?php _e('Boxed'); ?></h3>
2813 <img src="<?php echo plugins_url( 'img/post-style.png' , __FILE__ ) ?>" alt="Box Post Style" style="margin-top: -2px;" />
2814 <img src="<?php echo plugins_url( 'img/post-style.png' , __FILE__ ) ?>" alt="Box Post Style" style="margin-top: 2px;" />
2815 </div>
2816
2817 <div class="cff-post-style-settings cff-regular">
2818
2819 <div class="cff-row">
2820 <label><?php _e('Separating Line Color'); ?></label><code class="cff_shortcode"> sepcolor
2821 Eg: sepcolor=CFCFCF</code>
2822 <br />
2823 <input name="cff_sep_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_sep_color) ); ?>" class="cff-colorpicker" />
2824 </div>
2825 <div class="cff-row">
2826 <label><?php _e('Separating Line Thickness'); ?></label><code class="cff_shortcode"> sepsize
2827 Eg: sepsize=3</code>
2828 <br />
2829 <input name="cff_sep_size" type="text" value="<?php esc_attr_e( $cff_sep_size ); ?>" size="1" /><span class="cff-pixel-label">px</span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Leave empty to hide'); ?></i>
2830 </div>
2831 </div>
2832
2833 <div class="cff-post-style-settings cff-boxed">
2834 <div class="cff-row">
2835 <label><?php _e('Background Color'); ?></label><code class="cff_shortcode"> postbgcolor
2836 Eg: postbgcolor=ff0000</code>
2837 <br />
2838 <input name="cff_post_bg_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_post_bg_color) ); ?>" class="cff-colorpicker" />
2839 </div>
2840 <div class="cff-row">
2841 <label><?php _e('Rounded Corner Size'); ?></label><code class="cff_shortcode"> postcorners
2842 Eg: postcorners=10</code>
2843 <br />
2844 <input name="cff_post_rounded" type="text" value="<?php esc_attr_e( $cff_post_rounded ); ?>" size="3" /><span class="cff-pixel-label">px</span> <span><i style="color: #666; font-size: 11px; margin-left: 5px;">Eg. 5</i></span>
2845 </div>
2846 <div class="cff-row">
2847 <label><?php _e('Box Shadow'); ?></label><code class="cff_shortcode"> boxshadow
2848 Eg: boxshadow=true</code>
2849 <br />
2850 <input type="checkbox" name="cff_box_shadow" id="cff_box_shadow" <?php if($cff_box_shadow == true) echo 'checked="checked"' ?> /> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Adds a subtle shadow around the post'); ?></i>
2851 </div>
2852 </div>
2853
2854 </div>
2855 </td>
2856 </tr>
2857 </tbody>
2858 </table>
2859 <hr />
2860
2861 <h3><?php _e('Post Author'); ?></h3>
2862 <table class="form-table">
2863 <tbody>
2864 <tr>
2865 <th class="bump-left"><label for="cff_author_size" class="bump-left"><?php _e('Text Size'); ?></label><code class="cff_shortcode"> authorsize
2866 Eg: authorsize=20</code></th>
2867 <td>
2868 <select name="cff_author_size" class="cff-text-size-setting">
2869 <option value="inherit" <?php if($cff_author_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
2870 <option value="10" <?php if($cff_author_size == "10") echo 'selected="selected"' ?> >10px</option>
2871 <option value="11" <?php if($cff_author_size == "11") echo 'selected="selected"' ?> >11px</option>
2872 <option value="12" <?php if($cff_author_size == "12") echo 'selected="selected"' ?> >12px</option>
2873 <option value="13" <?php if($cff_author_size == "13") echo 'selected="selected"' ?> >13px</option>
2874 <option value="14" <?php if($cff_author_size == "14") echo 'selected="selected"' ?> >14px</option>
2875 <option value="16" <?php if($cff_author_size == "16") echo 'selected="selected"' ?> >16px</option>
2876 <option value="18" <?php if($cff_author_size == "18") echo 'selected="selected"' ?> >18px</option>
2877 <option value="20" <?php if($cff_author_size == "20") echo 'selected="selected"' ?> >20px</option>
2878 <option value="24" <?php if($cff_author_size == "24") echo 'selected="selected"' ?> >24px</option>
2879 <option value="28" <?php if($cff_author_size == "28") echo 'selected="selected"' ?> >28px</option>
2880 <option value="32" <?php if($cff_author_size == "32") echo 'selected="selected"' ?> >32px</option>
2881 <option value="36" <?php if($cff_author_size == "36") echo 'selected="selected"' ?> >36px</option>
2882 <option value="42" <?php if($cff_author_size == "42") echo 'selected="selected"' ?> >42px</option>
2883 <option value="48" <?php if($cff_author_size == "48") echo 'selected="selected"' ?> >48px</option>
2884 <option value="54" <?php if($cff_author_size == "54") echo 'selected="selected"' ?> >54px</option>
2885 <option value="60" <?php if($cff_author_size == "60") echo 'selected="selected"' ?> >60px</option>
2886 </select>
2887 </td>
2888 </tr>
2889 <tr>
2890 <th class="bump-left"><label for="cff_author_color" class="bump-left"><?php _e('Text Color'); ?></label><code class="cff_shortcode"> authorcolor
2891 Eg: authorcolor=ff0000</code></th>
2892 <td>
2893 <input name="cff_author_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_author_color) ); ?>" class="cff-colorpicker" />
2894 </td>
2895 </tr>
2896 <tr id="text"><!-- Quick link --></tr>
2897 </tbody>
2898 </table>
2899
2900 <div style="margin-top: -15px;">
2901 <?php submit_button(); ?>
2902 </div>
2903
2904 <hr />
2905
2906 <h3><?php _e('Post Text'); ?></h3>
2907 <table class="form-table">
2908 <tbody>
2909 <tr valign="top">
2910 <th class="bump-left" scope="row"><label class="bump-left"><?php _e('Maximum Post Text Length'); ?></label><code class="cff_shortcode"> textlength
2911 Eg: textlength=200</code></th>
2912 <td>
2913 <input name="cff_title_length" type="text" value="<?php esc_attr_e( $cff_title_length_val ); ?>" size="4" /><span class="cff-pixel-label"><?php _e('Characters'); ?></span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Eg. 200'); ?></i>
2914 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
2915 <p class="cff-tooltip cff-more-info"><?php _e("If the post text exceeds this length then a 'See More' link will be added. Leave empty to set no maximum length."); ?></p>
2916 </td>
2917 </tr>
2918 <tr>
2919 <th class="bump-left"><label for="cff_title_format" class="bump-left"><?php _e('Format'); ?></label><code class="cff_shortcode"> textformat
2920 Eg: textformat=h4</code></th>
2921 <td>
2922 <select name="cff_title_format" class="cff-text-size-setting">
2923 <option value="p" <?php if($cff_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
2924 <option value="h3" <?php if($cff_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
2925 <option value="h4" <?php if($cff_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
2926 <option value="h5" <?php if($cff_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
2927 <option value="h6" <?php if($cff_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
2928 </select>
2929 </td>
2930 </tr>
2931 <tr>
2932 <th class="bump-left"><label for="cff_title_size" class="bump-left"><?php _e('Text Size'); ?></label><code class="cff_shortcode"> textsize
2933 Eg: textsize=12</code></th>
2934 <td>
2935 <select name="cff_title_size" class="cff-text-size-setting">
2936 <option value="inherit" <?php if($cff_title_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
2937 <option value="10" <?php if($cff_title_size == "10") echo 'selected="selected"' ?> >10px</option>
2938 <option value="11" <?php if($cff_title_size == "11") echo 'selected="selected"' ?> >11px</option>
2939 <option value="12" <?php if($cff_title_size == "12") echo 'selected="selected"' ?> >12px</option>
2940 <option value="13" <?php if($cff_title_size == "13") echo 'selected="selected"' ?> >13px</option>
2941 <option value="14" <?php if($cff_title_size == "14") echo 'selected="selected"' ?> >14px</option>
2942 <option value="16" <?php if($cff_title_size == "16") echo 'selected="selected"' ?> >16px</option>
2943 <option value="18" <?php if($cff_title_size == "18") echo 'selected="selected"' ?> >18px</option>
2944 <option value="20" <?php if($cff_title_size == "20") echo 'selected="selected"' ?> >20px</option>
2945 <option value="24" <?php if($cff_title_size == "24") echo 'selected="selected"' ?> >24px</option>
2946 <option value="28" <?php if($cff_title_size == "28") echo 'selected="selected"' ?> >28px</option>
2947 <option value="32" <?php if($cff_title_size == "32") echo 'selected="selected"' ?> >32px</option>
2948 <option value="36" <?php if($cff_title_size == "36") echo 'selected="selected"' ?> >36px</option>
2949 <option value="42" <?php if($cff_title_size == "42") echo 'selected="selected"' ?> >42px</option>
2950 <option value="48" <?php if($cff_title_size == "48") echo 'selected="selected"' ?> >48px</option>
2951 <option value="54" <?php if($cff_title_size == "54") echo 'selected="selected"' ?> >54px</option>
2952 <option value="60" <?php if($cff_title_size == "60") echo 'selected="selected"' ?> >60px</option>
2953 </select>
2954 </td>
2955 </tr>
2956 <tr>
2957 <th class="bump-left"><label for="cff_title_weight" class="bump-left"><?php _e('Text Weight'); ?></label><code class="cff_shortcode"> textweight
2958 Eg: textweight=bold</code></th>
2959 <td>
2960 <select name="cff_title_weight" class="cff-text-size-setting">
2961 <option value="inherit" <?php if($cff_title_weight == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
2962 <option value="normal" <?php if($cff_title_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
2963 <option value="bold" <?php if($cff_title_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
2964 </select>
2965 </td>
2966 </tr>
2967 <tr>
2968 <th class="bump-left"><label for="cff_title_color" class="bump-left"><?php _e('Text Color'); ?></label><code class="cff_shortcode"> textcolor
2969 Eg: textcolor=333</code></th>
2970 <td>
2971 <input name="cff_title_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_title_color) ); ?>" class="cff-colorpicker" />
2972 </td>
2973 </tr>
2974 <tr>
2975 <th class="bump-left"><label for="cff_posttext_link_color" class="bump-left"><?php _e('Link Color'); ?></label><code class="cff_shortcode"> textlinkcolor
2976 Eg: textlinkcolor=E69100</code></th>
2977 <td>
2978 <input name="cff_posttext_link_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_posttext_link_color) ); ?>" class="cff-colorpicker" />
2979 </td>
2980 </tr>
2981 <tr>
2982 <th class="bump-left"><label for="cff_title_link" class="bump-left"><?php _e('Link Text to Facebook Post'); ?></label><code class="cff_shortcode"> textlink
2983 Eg: textlink=true</code></th>
2984 <td><input type="checkbox" name="cff_title_link" id="cff_title_link" <?php if($cff_title_link == true) echo 'checked="checked"' ?> /></td>
2985 </tr>
2986
2987 <tr>
2988 <th class="bump-left"><label for="cff_post_tags" class="bump-left"><?php _e('Link Post Tags'); ?></label><code class="cff_shortcode"> posttags
2989 Eg: posttags=false</code></th>
2990 <td>
2991 <input type="checkbox" name="cff_post_tags" id="cff_post_tags" <?php if($cff_post_tags == true) echo 'checked="checked"' ?> />
2992 <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What are Post Tags?'); ?></a>
2993 <p class="cff-tooltip cff-more-info"><?php _e("When you tag another Facebook page or user in your post using the @ symbol it creates a post tag, which is a link to either that Facebook page or user profile."); ?></p>
2994 </td>
2995 </tr>
2996
2997 <tr>
2998 <th class="bump-left"><label for="cff_link_hashtags" class="bump-left"><?php _e('Link Hashtags'); ?></label><code class="cff_shortcode"> linkhashtags
2999 Eg: linkhashtags=false</code></th>
3000 <td>
3001 <input type="checkbox" name="cff_link_hashtags" id="cff_link_hashtags" <?php if($cff_link_hashtags == true) echo 'checked="checked"' ?> />
3002 </td>
3003 </tr>
3004 <tr id="description"><!-- Quick link --></tr>
3005 </tbody>
3006 </table>
3007
3008 <hr />
3009
3010 <h3><?php _e('Shared Post Description'); ?></h3>
3011 <table class="form-table">
3012 <tbody>
3013 <tr>
3014 <th class="bump-left"><label for="cff_body_size" class="bump-left"><?php _e('Text Size'); ?></label><code class="cff_shortcode"> descsize
3015 Eg: descsize=11</code></th>
3016 <td>
3017 <select name="cff_body_size" class="cff-text-size-setting">
3018 <option value="inherit" <?php if($cff_body_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3019 <option value="10" <?php if($cff_body_size == "10") echo 'selected="selected"' ?> >10px</option>
3020 <option value="11" <?php if($cff_body_size == "11") echo 'selected="selected"' ?> >11px</option>
3021 <option value="12" <?php if($cff_body_size == "12") echo 'selected="selected"' ?> >12px</option>
3022 <option value="13" <?php if($cff_body_size == "13") echo 'selected="selected"' ?> >13px</option>
3023 <option value="14" <?php if($cff_body_size == "14") echo 'selected="selected"' ?> >14px</option>
3024 <option value="16" <?php if($cff_body_size == "16") echo 'selected="selected"' ?> >16px</option>
3025 <option value="18" <?php if($cff_body_size == "18") echo 'selected="selected"' ?> >18px</option>
3026 <option value="20" <?php if($cff_body_size == "20") echo 'selected="selected"' ?> >20px</option>
3027 <option value="24" <?php if($cff_body_size == "24") echo 'selected="selected"' ?> >24px</option>
3028 <option value="28" <?php if($cff_body_size == "28") echo 'selected="selected"' ?> >28px</option>
3029 <option value="32" <?php if($cff_body_size == "32") echo 'selected="selected"' ?> >32px</option>
3030 <option value="36" <?php if($cff_body_size == "36") echo 'selected="selected"' ?> >36px</option>
3031 <option value="42" <?php if($cff_body_size == "42") echo 'selected="selected"' ?> >42px</option>
3032 <option value="48" <?php if($cff_body_size == "48") echo 'selected="selected"' ?> >48px</option>
3033 <option value="54" <?php if($cff_body_size == "54") echo 'selected="selected"' ?> >54px</option>
3034 <option value="60" <?php if($cff_body_size == "60") echo 'selected="selected"' ?> >60px</option>
3035 </select>
3036 </td>
3037 </tr>
3038 <tr>
3039 <th class="bump-left"><label for="cff_body_weight" class="bump-left"><?php _e('Text Weight'); ?></label><code class="cff_shortcode"> descweight
3040 Eg: descweight=bold</code></th>
3041 <td>
3042 <select name="cff_body_weight" class="cff-text-size-setting">
3043 <option value="inherit" <?php if($cff_body_weight == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3044 <option value="normal" <?php if($cff_body_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
3045 <option value="bold" <?php if($cff_body_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
3046 </select>
3047 </td>
3048 </tr>
3049 <tr>
3050 <th class="bump-left"><label for="cff_body_color" class="bump-left"><?php _e('Text Color'); ?></label><code class="cff_shortcode"> desccolor
3051 Eg: desccolor=9F9F9F</code></th>
3052
3053 <td>
3054 <input name="cff_body_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_body_color) ); ?>" class="cff-colorpicker" />
3055 </td>
3056 </tr>
3057 <tr id="date"><!-- Quick link --></tr>
3058 </tbody>
3059 </table>
3060
3061 <div style="margin-top: -15px;">
3062 <?php submit_button(); ?>
3063 </div>
3064 <hr />
3065
3066 <h3><?php _e('Post Date'); ?></h3>
3067 <table class="form-table">
3068 <tbody>
3069 <tr>
3070 <th class="bump-left"><label for="cff_date_position" class="bump-left"><?php _e('Position'); ?></label><code class="cff_shortcode"> datepos
3071 Eg: datepos=below</code></th>
3072 <td>
3073 <select name="cff_date_position" style="width: 300px;">
3074 <option value="author" <?php if($cff_date_position == "author") echo 'selected="selected"' ?> >Immediately under the post author</option>
3075 <option value="above" <?php if($cff_date_position == "above") echo 'selected="selected"' ?> >At the top of the post</option>
3076 <option value="below" <?php if($cff_date_position == "below") echo 'selected="selected"' ?> >At the bottom of the post</option>
3077 </select>
3078 </td>
3079 </tr>
3080 <tr>
3081 <th class="bump-left"><label for="cff_date_size" class="bump-left"><?php _e('Text Size'); ?></label><code class="cff_shortcode"> datesize
3082 Eg: datesize=14</code></th>
3083 <td>
3084 <select name="cff_date_size" class="cff-text-size-setting">
3085 <option value="inherit" <?php if($cff_date_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3086 <option value="10" <?php if($cff_date_size == "10") echo 'selected="selected"' ?> >10px</option>
3087 <option value="11" <?php if($cff_date_size == "11") echo 'selected="selected"' ?> >11px</option>
3088 <option value="12" <?php if($cff_date_size == "12") echo 'selected="selected"' ?> >12px</option>
3089 <option value="13" <?php if($cff_date_size == "13") echo 'selected="selected"' ?> >13px</option>
3090 <option value="14" <?php if($cff_date_size == "14") echo 'selected="selected"' ?> >14px</option>
3091 <option value="16" <?php if($cff_date_size == "16") echo 'selected="selected"' ?> >16px</option>
3092 <option value="18" <?php if($cff_date_size == "18") echo 'selected="selected"' ?> >18px</option>
3093 <option value="20" <?php if($cff_date_size == "20") echo 'selected="selected"' ?> >20px</option>
3094 <option value="24" <?php if($cff_date_size == "24") echo 'selected="selected"' ?> >24px</option>
3095 <option value="28" <?php if($cff_date_size == "28") echo 'selected="selected"' ?> >28px</option>
3096 <option value="32" <?php if($cff_date_size == "32") echo 'selected="selected"' ?> >32px</option>
3097 <option value="36" <?php if($cff_date_size == "36") echo 'selected="selected"' ?> >36px</option>
3098 <option value="42" <?php if($cff_date_size == "42") echo 'selected="selected"' ?> >42px</option>
3099 <option value="48" <?php if($cff_date_size == "48") echo 'selected="selected"' ?> >48px</option>
3100 <option value="54" <?php if($cff_date_size == "54") echo 'selected="selected"' ?> >54px</option>
3101 <option value="60" <?php if($cff_date_size == "60") echo 'selected="selected"' ?> >60px</option>
3102 </select>
3103 </td>
3104 </tr>
3105 <tr>
3106 <th class="bump-left"><label for="cff_date_weight" class="bump-left"><?php _e('Text Weight'); ?></label><code class="cff_shortcode"> dateweight
3107 Eg: dateweight=normal</code></th>
3108 <td>
3109 <select name="cff_date_weight" class="cff-text-size-setting">
3110 <option value="inherit" <?php if($cff_date_weight == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3111 <option value="normal" <?php if($cff_date_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
3112 <option value="bold" <?php if($cff_date_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
3113 </select>
3114 </td>
3115 </tr>
3116 <tr>
3117 <th class="bump-left"><label for="cff_date_color" class="bump-left"><?php _e('Text Color'); ?></label><code class="cff_shortcode"> datecolor
3118 Eg: datecolor=EAD114</code></th>
3119 <td>
3120 <input name="cff_date_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_date_color) ); ?>" class="cff-colorpicker" />
3121 </td>
3122 </tr>
3123
3124 <tr>
3125 <th class="bump-left"><label for="cff_date_formatting" class="bump-left"><?php _e('Date Formatting'); ?></label><code class="cff_shortcode"> dateformat
3126 Eg: dateformat=3</code></th>
3127 <td>
3128 <select name="cff_date_formatting" style="width: 300px;">
3129 <?php $original = strtotime('2016-07-25T17:30:00+0000'); ?>
3130 <option value="1" <?php if($cff_date_formatting == "1") echo 'selected="selected"' ?> ><?php _e('2 days ago'); ?></option>
3131 <option value="2" <?php if($cff_date_formatting == "2") echo 'selected="selected"' ?> ><?php echo date('F jS, g:i a', $original); ?></option>
3132 <option value="3" <?php if($cff_date_formatting == "3") echo 'selected="selected"' ?> ><?php echo date('F jS', $original); ?></option>
3133 <option value="4" <?php if($cff_date_formatting == "4") echo 'selected="selected"' ?> ><?php echo date('D F jS', $original); ?></option>
3134 <option value="5" <?php if($cff_date_formatting == "5") echo 'selected="selected"' ?> ><?php echo date('l F jS', $original); ?></option>
3135 <option value="6" <?php if($cff_date_formatting == "6") echo 'selected="selected"' ?> ><?php echo date('D M jS, Y', $original); ?></option>
3136 <option value="7" <?php if($cff_date_formatting == "7") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y', $original); ?></option>
3137 <option value="8" <?php if($cff_date_formatting == "8") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y - g:i a', $original); ?></option>
3138 <option value="9" <?php if($cff_date_formatting == "9") echo 'selected="selected"' ?> ><?php echo date("l M jS, 'y", $original); ?></option>
3139 <option value="10" <?php if($cff_date_formatting == "10") echo 'selected="selected"' ?> ><?php echo date('m.d.y', $original); ?></option>
3140 <option value="18" <?php if($cff_date_formatting == "18") echo 'selected="selected"' ?> ><?php echo date('m.d.y - G:i', $original); ?></option>
3141 <option value="11" <?php if($cff_date_formatting == "11") echo 'selected="selected"' ?> ><?php echo date('m/d/y', $original); ?></option>
3142 <option value="12" <?php if($cff_date_formatting == "12") echo 'selected="selected"' ?> ><?php echo date('d.m.y', $original); ?></option>
3143 <option value="19" <?php if($cff_date_formatting == "19") echo 'selected="selected"' ?> ><?php echo date('d.m.y - G:i', $original); ?></option>
3144 <option value="13" <?php if($cff_date_formatting == "13") echo 'selected="selected"' ?> ><?php echo date('d/m/y', $original); ?></option>
3145
3146 <option value="14" <?php if($cff_date_formatting == "14") echo 'selected="selected"' ?> ><?php echo date('d-m-Y, G:i', $original); ?></option>
3147 <option value="15" <?php if($cff_date_formatting == "15") echo 'selected="selected"' ?> ><?php echo date('jS F Y, G:i', $original); ?></option>
3148 <option value="16" <?php if($cff_date_formatting == "16") echo 'selected="selected"' ?> ><?php echo date('d M Y, G:i', $original); ?></option>
3149 <option value="17" <?php if($cff_date_formatting == "17") echo 'selected="selected"' ?> ><?php echo date('l jS F Y, G:i', $original); ?></option>
3150 </select>
3151 </tr>
3152
3153 <tr>
3154 <th class="bump-left"><label for="cff_timezone" class="bump-left"><?php _e('Timezone'); ?></label><code class="cff_shortcode"> timezone
3155 Eg: timezone="America/New_York"
3156 <a href="http://php.net/manual/en/timezones.php" target="_blank">See full list</a></code></th>
3157 <td>
3158 <select name="cff_timezone" style="width: 300px;">
3159 <option value="Pacific/Midway" <?php if($cff_timezone == "Pacific/Midway") echo 'selected="selected"' ?> ><?php _e('(GMT-11:00) Midway Island, Samoa'); ?></option>
3160 <option value="America/Adak" <?php if($cff_timezone == "America/Adak") echo 'selected="selected"' ?> ><?php _e('(GMT-10:00) Hawaii-Aleutian'); ?></option>
3161 <option value="Etc/GMT+10" <?php if($cff_timezone == "Etc/GMT+10") echo 'selected="selected"' ?> ><?php _e('(GMT-10:00) Hawaii'); ?></option>
3162 <option value="Pacific/Marquesas" <?php if($cff_timezone == "Pacific/Marquesas") echo 'selected="selected"' ?> ><?php _e('(GMT-09:30) Marquesas Islands'); ?></option>
3163 <option value="Pacific/Gambier" <?php if($cff_timezone == "Pacific/Gambier") echo 'selected="selected"' ?> ><?php _e('(GMT-09:00) Gambier Islands'); ?></option>
3164 <option value="America/Anchorage" <?php if($cff_timezone == "America/Anchorage") echo 'selected="selected"' ?> ><?php _e('(GMT-09:00) Alaska'); ?></option>
3165 <option value="America/Ensenada" <?php if($cff_timezone == "America/Ensenada") echo 'selected="selected"' ?> ><?php _e('(GMT-08:00) Tijuana, Baja California'); ?></option>
3166 <option value="Etc/GMT+8" <?php if($cff_timezone == "Etc/GMT+8") echo 'selected="selected"' ?> ><?php _e('(GMT-08:00) Pitcairn Islands'); ?></option>
3167 <option value="America/Los_Angeles" <?php if($cff_timezone == "America/Los_Angeles") echo 'selected="selected"' ?> ><?php _e('(GMT-08:00) Pacific Time (US & Canada)'); ?></option>
3168 <option value="America/Denver" <?php if($cff_timezone == "America/Denver") echo 'selected="selected"' ?> ><?php _e('(GMT-07:00) Mountain Time (US & Canada)'); ?></option>
3169 <option value="America/Chihuahua" <?php if($cff_timezone == "America/Chihuahua") echo 'selected="selected"' ?> ><?php _e('(GMT-07:00) Chihuahua, La Paz, Mazatlan'); ?></option>
3170 <option value="America/Dawson_Creek" <?php if($cff_timezone == "America/Dawson_Creek") echo 'selected="selected"' ?> ><?php _e('(GMT-07:00) Arizona'); ?></option>
3171 <option value="America/Belize" <?php if($cff_timezone == "America/Belize") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Saskatchewan, Central America'); ?></option>
3172 <option value="America/Cancun" <?php if($cff_timezone == "America/Cancun") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Guadalajara, Mexico City, Monterrey'); ?></option>
3173 <option value="Chile/EasterIsland" <?php if($cff_timezone == "Chile/EasterIsland") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Easter Island'); ?></option>
3174 <option value="America/Chicago" <?php if($cff_timezone == "America/Chicago") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Central Time (US & Canada)'); ?></option>
3175 <option value="America/New_York" <?php if($cff_timezone == "America/New_York") echo 'selected="selected"' ?> ><?php _e('(GMT-05:00) Eastern Time (US & Canada)'); ?></option>
3176 <option value="America/Havana" <?php if($cff_timezone == "America/Havana") echo 'selected="selected"' ?> ><?php _e('(GMT-05:00) Cuba'); ?></option>
3177 <option value="America/Bogota" <?php if($cff_timezone == "America/Bogota") echo 'selected="selected"' ?> ><?php _e('(GMT-05:00) Bogota, Lima, Quito, Rio Branco'); ?></option>
3178 <option value="America/Caracas" <?php if($cff_timezone == "America/Caracas") echo 'selected="selected"' ?> ><?php _e('(GMT-04:30) Caracas'); ?></option>
3179 <option value="America/Santiago" <?php if($cff_timezone == "America/Santiago") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Santiago'); ?></option>
3180 <option value="America/La_Paz" <?php if($cff_timezone == "America/La_Paz") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) La Paz'); ?></option>
3181 <option value="Atlantic/Stanley" <?php if($cff_timezone == "Atlantic/Stanley") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Faukland Islands'); ?></option>
3182 <option value="America/Campo_Grande" <?php if($cff_timezone == "America/Campo_Grande") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Brazil'); ?></option>
3183 <option value="America/Goose_Bay" <?php if($cff_timezone == "America/Goose_Bay") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Atlantic Time (Goose Bay)'); ?></option>
3184 <option value="America/Glace_Bay" <?php if($cff_timezone == "America/Glace_Bay") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Atlantic Time (Canada)'); ?></option>
3185 <option value="America/St_Johns" <?php if($cff_timezone == "America/St_Johns") echo 'selected="selected"' ?> ><?php _e('(GMT-03:30) Newfoundland'); ?></option>
3186 <option value="America/Araguaina" <?php if($cff_timezone == "America/Araguaina") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) UTC-3'); ?></option>
3187 <option value="America/Montevideo" <?php if($cff_timezone == "America/Montevideo") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Montevideo'); ?></option>
3188 <option value="America/Miquelon" <?php if($cff_timezone == "America/Miquelon") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Miquelon, St. Pierre'); ?></option>
3189 <option value="America/Godthab" <?php if($cff_timezone == "America/Godthab") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Greenland'); ?></option>
3190 <option value="America/Argentina/Buenos_Aires" <?php if($cff_timezone == "America/Argentina/Buenos_Aires") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Buenos Aires'); ?></option>
3191 <option value="America/Sao_Paulo" <?php if($cff_timezone == "America/Sao_Paulo") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Brasilia'); ?></option>
3192 <option value="America/Noronha" <?php if($cff_timezone == "America/Noronha") echo 'selected="selected"' ?> ><?php _e('(GMT-02:00) Mid-Atlantic'); ?></option>
3193 <option value="Atlantic/Cape_Verde" <?php if($cff_timezone == "Atlantic/Cape_Verde") echo 'selected="selected"' ?> ><?php _e('(GMT-01:00) Cape Verde Is.'); ?></option>
3194 <option value="Atlantic/Azores" <?php if($cff_timezone == "Atlantic/Azores") echo 'selected="selected"' ?> ><?php _e('(GMT-01:00) Azores'); ?></option>
3195 <option value="Europe/Belfast" <?php if($cff_timezone == "Europe/Belfast") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : Belfast'); ?></option>
3196 <option value="Europe/Dublin" <?php if($cff_timezone == "Europe/Dublin") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : Dublin'); ?></option>
3197 <option value="Europe/Lisbon" <?php if($cff_timezone == "Europe/Lisbon") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : Lisbon'); ?></option>
3198 <option value="Europe/London" <?php if($cff_timezone == "Europe/London") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : London'); ?></option>
3199 <option value="Africa/Abidjan" <?php if($cff_timezone == "Africa/Abidjan") echo 'selected="selected"' ?> ><?php _e('(GMT) Monrovia, Reykjavik'); ?></option>
3200 <option value="Europe/Amsterdam" <?php if($cff_timezone == "Europe/Amsterdam") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna'); ?></option>
3201 <option value="Europe/Belgrade" <?php if($cff_timezone == "Europe/Belgrade") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague'); ?></option>
3202 <option value="Europe/Brussels" <?php if($cff_timezone == "Europe/Brussels") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) Brussels, Copenhagen, Madrid, Paris'); ?></option>
3203 <option value="Africa/Algiers" <?php if($cff_timezone == "Africa/Algiers") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) West Central Africa'); ?></option>
3204 <option value="Africa/Windhoek" <?php if($cff_timezone == "Africa/Windhoek") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) Windhoek'); ?></option>
3205 <option value="Asia/Beirut" <?php if($cff_timezone == "Asia/Beirut") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Beirut'); ?></option>
3206 <option value="Africa/Cairo" <?php if($cff_timezone == "Africa/Cairo") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Cairo'); ?></option>
3207 <option value="Asia/Gaza" <?php if($cff_timezone == "Asia/Gaza") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Gaza'); ?></option>
3208 <option value="Africa/Blantyre" <?php if($cff_timezone == "Africa/Blantyre") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Harare, Pretoria'); ?></option>
3209 <option value="Asia/Jerusalem" <?php if($cff_timezone == "Asia/Jerusalem") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Jerusalem'); ?></option>
3210 <option value="Europe/Helsinki" <?php if($cff_timezone == "Europe/Helsinki") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Helsinki'); ?></option>
3211 <option value="Europe/Minsk" <?php if($cff_timezone == "Europe/Minsk") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Minsk'); ?></option>
3212 <option value="Asia/Damascus" <?php if($cff_timezone == "Asia/Damascus") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Syria'); ?></option>
3213 <option value="Europe/Moscow" <?php if($cff_timezone == "Europe/Moscow") echo 'selected="selected"' ?> ><?php _e('(GMT+03:00) Moscow, St. Petersburg, Volgograd'); ?></option>
3214 <option value="Africa/Addis_Ababa" <?php if($cff_timezone == "Africa/Addis_Ababa") echo 'selected="selected"' ?> ><?php _e('(GMT+03:00) Nairobi'); ?></option>
3215 <option value="Asia/Tehran" <?php if($cff_timezone == "Asia/Tehran") echo 'selected="selected"' ?> ><?php _e('(GMT+03:30) Tehran'); ?></option>
3216 <option value="Asia/Dubai" <?php if($cff_timezone == "Asia/Dubai") echo 'selected="selected"' ?> ><?php _e('(GMT+04:00) Abu Dhabi, Muscat'); ?></option>
3217 <option value="Asia/Yerevan" <?php if($cff_timezone == "Asia/Yerevan") echo 'selected="selected"' ?> ><?php _e('(GMT+04:00) Yerevan'); ?></option>
3218 <option value="Asia/Kabul" <?php if($cff_timezone == "Asia/Kabul") echo 'selected="selected"' ?> ><?php _e('(GMT+04:30) Kabul'); ?></option>
3219 <option value="Asia/Yekaterinburg" <?php if($cff_timezone == "Asia/Yekaterinburg") echo 'selected="selected"' ?> ><?php _e('(GMT+05:00) Ekaterinburg'); ?></option>
3220 <option value="Asia/Tashkent" <?php if($cff_timezone == "Asia/Tashkent") echo 'selected="selected"' ?> ><?php _e('(GMT+05:00) Tashkent'); ?></option>
3221 <option value="Asia/Kolkata" <?php if($cff_timezone == "Asia/Kolkata") echo 'selected="selected"' ?> ><?php _e('(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi'); ?></option>
3222 <option value="Asia/Katmandu" <?php if($cff_timezone == "Asia/Katmandu") echo 'selected="selected"' ?> ><?php _e('(GMT+05:45) Kathmandu'); ?></option>
3223 <option value="Asia/Dhaka" <?php if($cff_timezone == "Asia/Dhaka") echo 'selected="selected"' ?> ><?php _e('(GMT+06:00) Astana, Dhaka'); ?></option>
3224 <option value="Asia/Novosibirsk" <?php if($cff_timezone == "Asia/Novosibirsk") echo 'selected="selected"' ?> ><?php _e('(GMT+06:00) Novosibirsk'); ?></option>
3225 <option value="Asia/Rangoon" <?php if($cff_timezone == "Asia/Rangoon") echo 'selected="selected"' ?> ><?php _e('(GMT+06:30) Yangon (Rangoon)'); ?></option>
3226 <option value="Asia/Bangkok" <?php if($cff_timezone == "Asia/Bangkok") echo 'selected="selected"' ?> ><?php _e('(GMT+07:00) Bangkok, Hanoi, Jakarta'); ?></option>
3227 <option value="Asia/Krasnoyarsk" <?php if($cff_timezone == "Asia/Krasnoyarsk") echo 'selected="selected"' ?> ><?php _e('(GMT+07:00) Krasnoyarsk'); ?></option>
3228 <option value="Asia/Hong_Kong" <?php if($cff_timezone == "Asia/Hong_Kong") echo 'selected="selected"' ?> ><?php _e('(GMT+08:00) Beijing, Chongqing, Hong Kong, Urumqi'); ?></option>
3229 <option value="Asia/Irkutsk" <?php if($cff_timezone == "Asia/Irkutsk") echo 'selected="selected"' ?> ><?php _e('(GMT+08:00) Irkutsk, Ulaan Bataar'); ?></option>
3230 <option value="Australia/Perth" <?php if($cff_timezone == "Australia/Perth") echo 'selected="selected"' ?> ><?php _e('(GMT+08:00) Perth'); ?></option>
3231 <option value="Australia/Eucla" <?php if($cff_timezone == "Australia/Eucla") echo 'selected="selected"' ?> ><?php _e('(GMT+08:45) Eucla'); ?></option>
3232 <option value="Asia/Tokyo" <?php if($cff_timezone == "Asia/Tokyo") echo 'selected="selected"' ?> ><?php _e('(GMT+09:00) Osaka, Sapporo, Tokyo'); ?></option>
3233 <option value="Asia/Seoul" <?php if($cff_timezone == "Asia/Seoul") echo 'selected="selected"' ?> ><?php _e('(GMT+09:00) Seoul'); ?></option>
3234 <option value="Asia/Yakutsk" <?php if($cff_timezone == "Asia/Yakutsk") echo 'selected="selected"' ?> ><?php _e('(GMT+09:00) Yakutsk'); ?></option>
3235 <option value="Australia/Adelaide" <?php if($cff_timezone == "Australia/Adelaide") echo 'selected="selected"' ?> ><?php _e('(GMT+09:30) Adelaide'); ?></option>
3236 <option value="Australia/Darwin" <?php if($cff_timezone == "Australia/Darwin") echo 'selected="selected"' ?> ><?php _e('(GMT+09:30) Darwin'); ?></option>
3237 <option value="Australia/Brisbane" <?php if($cff_timezone == "Australia/Brisbane") echo 'selected="selected"' ?> ><?php _e('(GMT+10:00) Brisbane'); ?></option>
3238 <option value="Australia/Hobart" <?php if($cff_timezone == "Australia/Hobart") echo 'selected="selected"' ?> ><?php _e('(GMT+10:00) Hobart'); ?></option>
3239 <option value="Asia/Vladivostok" <?php if($cff_timezone == "Asia/Vladivostok") echo 'selected="selected"' ?> ><?php _e('(GMT+10:00) Vladivostok'); ?></option>
3240 <option value="Australia/Lord_Howe" <?php if($cff_timezone == "Australia/Lord_Howe") echo 'selected="selected"' ?> ><?php _e('(GMT+10:30) Lord Howe Island'); ?></option>
3241 <option value="Etc/GMT-11" <?php if($cff_timezone == "Etc/GMT-11") echo 'selected="selected"' ?> ><?php _e('(GMT+11:00) Solomon Is., New Caledonia'); ?></option>
3242 <option value="Asia/Magadan" <?php if($cff_timezone == "Asia/Magadan") echo 'selected="selected"' ?> ><?php _e('(GMT+11:00) Magadan'); ?></option>
3243 <option value="Pacific/Norfolk" <?php if($cff_timezone == "Pacific/Norfolk") echo 'selected="selected"' ?> ><?php _e('(GMT+11:30) Norfolk Island'); ?></option>
3244 <option value="Asia/Anadyr" <?php if($cff_timezone == "Asia/Anadyr") echo 'selected="selected"' ?> ><?php _e('(GMT+12:00) Anadyr, Kamchatka'); ?></option>
3245 <option value="Pacific/Auckland" <?php if($cff_timezone == "Pacific/Auckland") echo 'selected="selected"' ?> ><?php _e('(GMT+12:00) Auckland, Wellington'); ?></option>
3246 <option value="Etc/GMT-12" <?php if($cff_timezone == "Etc/GMT-12") echo 'selected="selected"' ?> ><?php _e('(GMT+12:00) Fiji, Kamchatka, Marshall Is.'); ?></option>
3247 <option value="Pacific/Chatham" <?php if($cff_timezone == "Pacific/Chatham") echo 'selected="selected"' ?> ><?php _e('(GMT+12:45) Chatham Islands'); ?></option>
3248 <option value="Pacific/Tongatapu" <?php if($cff_timezone == "Pacific/Tongatapu") echo 'selected="selected"' ?> ><?php _e('(GMT+13:00) Nuku\'alofa'); ?></option>
3249 <option value="Pacific/Kiritimati" <?php if($cff_timezone == "Pacific/Kiritimati") echo 'selected="selected"' ?> ><?php _e('(GMT+14:00) Kiritimati'); ?></option>
3250 </select>
3251 </td>
3252 </tr>
3253
3254 <tr>
3255 <th class="bump-left"><label for="cff_date_custom" class="bump-left"><?php _e('Custom Format'); ?></label><code class="cff_shortcode"> datecustom
3256 Eg: datecustom='D M jS, Y'</code></th>
3257 <td>
3258 <input name="cff_date_custom" type="text" value="<?php esc_attr_e( $cff_date_custom ); ?>" size="10" placeholder="Eg. F j, Y" />
3259 <a href="http://smashballoon.com/custom-facebook-feed/docs/date/" class="cff-external-link" target="_blank"><?php _e('Examples'); ?></a>
3260 </td>
3261 </tr>
3262 <tr>
3263 <th class="bump-left"><label for="cff_date_before" class="bump-left"><?php _e('Text Before Date'); ?></label></th>
3264 <td>
3265 <input name="cff_date_before" type="text" value="<?php esc_attr_e( $cff_date_before ); ?>" size="20" placeholder="Eg. Posted" />
3266 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3267 <p class="cff-tooltip cff-more-info"><?php _e('You can add custom text here to display immediately <b>before</b> the date text'); ?></p>
3268 </td>
3269 </tr>
3270 <tr>
3271 <th class="bump-left"><label for="cff_date_after" class="bump-left"><?php _e('Text After Date'); ?></label></th>
3272 <td>
3273 <input name="cff_date_after" type="text" value="<?php esc_attr_e( $cff_date_after ); ?>" size="20" placeholder="Eg. by ___" />
3274 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3275 <p class="cff-tooltip cff-more-info"><?php _e('You can add custom text here to display immediately <b>after</b> the date text'); ?></p>
3276 </td>
3277 </tr>
3278 <tr id="links"><!-- Quick link --></tr>
3279 </tbody>
3280 </table>
3281
3282 <hr />
3283
3284
3285 <h3><?php _e('Shared Link Boxes'); ?></h3>
3286 <table class="form-table">
3287 <tbody>
3288
3289 <tr class="cff-settings-row-header"><th>Box Style</th></tr>
3290 <tr>
3291 <th class="bump-left"><label for="cff_link_bg_color" class="bump-left"><?php _e('Link Box Background Color'); ?></label><code class="cff_shortcode"> linkbgcolor
3292 Eg: linkbgcolor='EEE'</code></th>
3293 <td>
3294 <input name="cff_link_bg_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_bg_color) ); ?>" class="cff-colorpicker" />
3295 </td>
3296 </tr>
3297
3298 <tr>
3299 <th class="bump-left"><label for="cff_link_border_color" class="bump-left"><?php _e('Link Box Border Color'); ?></label><code class="cff_shortcode"> linkbordercolor
3300 Eg: linkbordercolor='CCC'</code></th>
3301 <td>
3302 <input name="cff_link_border_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_border_color) ); ?>" class="cff-colorpicker" />
3303 </td>
3304 </tr>
3305
3306 <tr>
3307 <th class="bump-left"><label for="cff_disable_link_box" class="bump-left"><?php _e('Remove Background/Border'); ?></label><code class="cff_shortcode"> disablelinkbox
3308 Eg: disablelinkbox=true</code></th>
3309 <td><input type="checkbox" name="cff_disable_link_box" id="cff_disable_link_box" <?php if($cff_disable_link_box == true) echo 'checked="checked"' ?> /></td>
3310 </tr>
3311
3312 <tr class="cff-settings-row-header"><th>Link Title</th></tr>
3313 <tr>
3314 <th class="bump-left"><label for="cff_link_title_format" class="bump-left"><?php _e('Link Title Format'); ?></label><code class="cff_shortcode"> linktitleformat
3315 Eg: linktitleformat='h3'</code></th>
3316 <td>
3317 <select name="cff_link_title_format" class="cff-text-size-setting">
3318 <option value="p" <?php if($cff_link_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
3319 <option value="h3" <?php if($cff_link_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
3320 <option value="h4" <?php if($cff_link_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
3321 <option value="h5" <?php if($cff_link_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
3322 <option value="h6" <?php if($cff_link_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
3323 </select>
3324 </td>
3325 </tr>
3326 <tr>
3327 <th class="bump-left"><label for="cff_link_title_size" class="bump-left"><?php _e('Link Title Size'); ?></label><code class="cff_shortcode"> linktitlesize
3328 Eg: linktitlesize='18'</code></th>
3329 <td>
3330 <select name="cff_link_title_size" class="cff-text-size-setting">
3331 <option value="inherit" <?php if($cff_link_title_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3332 <option value="10" <?php if($cff_link_title_size == "10") echo 'selected="selected"' ?> >10px</option>
3333 <option value="11" <?php if($cff_link_title_size == "11") echo 'selected="selected"' ?> >11px</option>
3334 <option value="12" <?php if($cff_link_title_size == "12") echo 'selected="selected"' ?> >12px</option>
3335 <option value="13" <?php if($cff_link_title_size == "13") echo 'selected="selected"' ?> >13px</option>
3336 <option value="14" <?php if($cff_link_title_size == "14") echo 'selected="selected"' ?> >14px</option>
3337 <option value="16" <?php if($cff_link_title_size == "16") echo 'selected="selected"' ?> >16px</option>
3338 <option value="18" <?php if($cff_link_title_size == "18") echo 'selected="selected"' ?> >18px</option>
3339 <option value="20" <?php if($cff_link_title_size == "20") echo 'selected="selected"' ?> >20px</option>
3340 <option value="24" <?php if($cff_link_title_size == "24") echo 'selected="selected"' ?> >24px</option>
3341 <option value="28" <?php if($cff_link_title_size == "28") echo 'selected="selected"' ?> >28px</option>
3342 <option value="32" <?php if($cff_link_title_size == "32") echo 'selected="selected"' ?> >32px</option>
3343 <option value="36" <?php if($cff_link_title_size == "36") echo 'selected="selected"' ?> >36px</option>
3344 <option value="42" <?php if($cff_link_title_size == "42") echo 'selected="selected"' ?> >42px</option>
3345 <option value="48" <?php if($cff_link_title_size == "48") echo 'selected="selected"' ?> >48px</option>
3346 <option value="54" <?php if($cff_link_title_size == "54") echo 'selected="selected"' ?> >54px</option>
3347 <option value="60" <?php if($cff_link_title_size == "60") echo 'selected="selected"' ?> >60px</option>
3348 </select>
3349 </td>
3350 </tr>
3351 <tr>
3352 <th class="bump-left"><label for="cff_link_title_color" class="bump-left"><?php _e('Link Title Color'); ?></label><code class="cff_shortcode"> linktitlecolor
3353 Eg: linktitlecolor='ff0000'</code></th>
3354 <td>
3355 <input name="cff_link_title_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_title_color) ); ?>" class="cff-colorpicker" />
3356 </td>
3357 </tr>
3358
3359 <tr class="cff-settings-row-header"><th>Link URL</th></tr>
3360 <tr>
3361 <th class="bump-left"><label for="cff_link_url_size" class="bump-left"><?php _e('Link URL Size'); ?></label><code class="cff_shortcode"> linkurlsize
3362 Eg: linkurlsize='12'</code></th>
3363 <td>
3364 <select name="cff_link_url_size" class="cff-text-size-setting">
3365 <option value="inherit" <?php if($cff_link_url_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3366 <option value="10" <?php if($cff_link_url_size == "10") echo 'selected="selected"' ?> >10px</option>
3367 <option value="11" <?php if($cff_link_url_size == "11") echo 'selected="selected"' ?> >11px</option>
3368 <option value="12" <?php if($cff_link_url_size == "12") echo 'selected="selected"' ?> >12px</option>
3369 <option value="13" <?php if($cff_link_url_size == "13") echo 'selected="selected"' ?> >13px</option>
3370 <option value="14" <?php if($cff_link_url_size == "14") echo 'selected="selected"' ?> >14px</option>
3371 <option value="16" <?php if($cff_link_url_size == "16") echo 'selected="selected"' ?> >16px</option>
3372 <option value="18" <?php if($cff_link_url_size == "18") echo 'selected="selected"' ?> >18px</option>
3373 <option value="20" <?php if($cff_link_url_size == "20") echo 'selected="selected"' ?> >20px</option>
3374 <option value="24" <?php if($cff_link_url_size == "24") echo 'selected="selected"' ?> >24px</option>
3375 <option value="28" <?php if($cff_link_url_size == "28") echo 'selected="selected"' ?> >28px</option>
3376 <option value="32" <?php if($cff_link_url_size == "32") echo 'selected="selected"' ?> >32px</option>
3377 <option value="36" <?php if($cff_link_url_size == "36") echo 'selected="selected"' ?> >36px</option>
3378 <option value="42" <?php if($cff_link_url_size == "42") echo 'selected="selected"' ?> >42px</option>
3379 <option value="48" <?php if($cff_link_url_size == "48") echo 'selected="selected"' ?> >48px</option>
3380 <option value="54" <?php if($cff_link_url_size == "54") echo 'selected="selected"' ?> >54px</option>
3381 <option value="60" <?php if($cff_link_url_size == "60") echo 'selected="selected"' ?> >60px</option>
3382 </select>
3383 </td>
3384 </tr>
3385 <tr>
3386 <th class="bump-left"><label for="cff_link_url_color" class="bump-left"><?php _e('Link URL Color'); ?></label><code class="cff_shortcode"> linkurlcolor
3387 Eg: linkurlcolor='999999'</code></th>
3388 <td>
3389 <input name="cff_link_url_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_url_color) ); ?>" class="cff-colorpicker" />
3390 </td>
3391 </tr>
3392
3393 <tr class="cff-settings-row-header"><th>Link Description</th></tr>
3394
3395 <tr>
3396 <th class="bump-left"><label for="cff_link_desc_size" class="bump-left"><?php _e('Link Description Size'); ?></label><code class="cff_shortcode"> linkdescsize
3397 Eg: linkdescsize='14'</code></th>
3398 <td>
3399 <select name="cff_link_desc_size" class="cff-text-size-setting">
3400 <option value="inherit" <?php if($cff_link_desc_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3401 <option value="10" <?php if($cff_link_desc_size == "10") echo 'selected="selected"' ?> >10px</option>
3402 <option value="11" <?php if($cff_link_desc_size == "11") echo 'selected="selected"' ?> >11px</option>
3403 <option value="12" <?php if($cff_link_desc_size == "12") echo 'selected="selected"' ?> >12px</option>
3404 <option value="13" <?php if($cff_link_desc_size == "13") echo 'selected="selected"' ?> >13px</option>
3405 <option value="14" <?php if($cff_link_desc_size == "14") echo 'selected="selected"' ?> >14px</option>
3406 <option value="16" <?php if($cff_link_desc_size == "16") echo 'selected="selected"' ?> >16px</option>
3407 <option value="18" <?php if($cff_link_desc_size == "18") echo 'selected="selected"' ?> >18px</option>
3408 <option value="20" <?php if($cff_link_desc_size == "20") echo 'selected="selected"' ?> >20px</option>
3409 <option value="24" <?php if($cff_link_desc_size == "24") echo 'selected="selected"' ?> >24px</option>
3410 <option value="28" <?php if($cff_link_desc_size == "28") echo 'selected="selected"' ?> >28px</option>
3411 <option value="32" <?php if($cff_link_desc_size == "32") echo 'selected="selected"' ?> >32px</option>
3412 <option value="36" <?php if($cff_link_desc_size == "36") echo 'selected="selected"' ?> >36px</option>
3413 <option value="42" <?php if($cff_link_desc_size == "42") echo 'selected="selected"' ?> >42px</option>
3414 <option value="48" <?php if($cff_link_desc_size == "48") echo 'selected="selected"' ?> >48px</option>
3415 <option value="54" <?php if($cff_link_desc_size == "54") echo 'selected="selected"' ?> >54px</option>
3416 <option value="60" <?php if($cff_link_desc_size == "60") echo 'selected="selected"' ?> >60px</option>
3417 </select>
3418 </td>
3419 </tr>
3420
3421 <tr>
3422 <th class="bump-left"><label for="cff_link_desc_color" class="bump-left"><?php _e('Link Description Color'); ?></label><code class="cff_shortcode"> linkdesccolor
3423 Eg: linkdesccolor='ff0000'</code></th>
3424 <td>
3425 <input name="cff_link_desc_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_desc_color) ); ?>" class="cff-colorpicker" />
3426 </td>
3427 </tr>
3428
3429 <tr valign="top">
3430 <th class="bump-left" scope="row"><label class="bump-left"><?php _e('Maximum Link Description Length'); ?></label><code class="cff_shortcode"> desclength
3431 Eg: desclength=150</code></th>
3432 <td>
3433 <input name="cff_body_length" type="text" value="<?php esc_attr_e( $cff_body_length_val ); ?>" size="4" /><span class="cff-pixel-label"><?php _e('Characters'); ?></span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Eg. 200'); ?></i>
3434 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3435 <p class="cff-tooltip cff-more-info"><?php _e("If the link description text exceeds this length then it will be truncated with an ellipsis. Leave empty to set no maximum length."); ?></p>
3436 </td>
3437 </tr>
3438 <tr id="eventtitle"><!-- Quick link --></tr>
3439 </tbody>
3440 </table>
3441
3442 <div style="margin-top: -15px;">
3443 <?php submit_button(); ?>
3444 </div>
3445 <hr />
3446
3447 <h3><?php _e('Event Title'); ?></h3>
3448 <table class="form-table">
3449 <tbody>
3450 <tr>
3451 <th class="bump-left"><label for="cff_event_title_format" class="bump-left"><?php _e('Format'); ?></label><code class="cff_shortcode"> eventtitleformat
3452 Eg: eventtitleformat=h5</code></th>
3453 <td>
3454 <select name="cff_event_title_format" class="cff-text-size-setting">
3455 <option value="p" <?php if($cff_event_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
3456 <option value="h3" <?php if($cff_event_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
3457 <option value="h4" <?php if($cff_event_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
3458 <option value="h5" <?php if($cff_event_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
3459 <option value="h6" <?php if($cff_event_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
3460 </select>
3461 </td>
3462 </tr>
3463
3464 <tr>
3465 <th class="bump-left"><label for="cff_event_title_size" class="bump-left"><?php _e('Text Size'); ?></label><code class="cff_shortcode"> eventtitlesize
3466 Eg: eventtitlesize=12</code></th>
3467 <td>
3468 <select name="cff_event_title_size" class="cff-text-size-setting">
3469 <option value="inherit" <?php if($cff_event_title_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3470 <option value="10" <?php if($cff_event_title_size == "10") echo 'selected="selected"' ?> >10px</option>
3471 <option value="11" <?php if($cff_event_title_size == "11") echo 'selected="selected"' ?> >11px</option>
3472 <option value="12" <?php if($cff_event_title_size == "12") echo 'selected="selected"' ?> >12px</option>
3473 <option value="13" <?php if($cff_event_title_size == "13") echo 'selected="selected"' ?> >13px</option>
3474 <option value="14" <?php if($cff_event_title_size == "14") echo 'selected="selected"' ?> >14px</option>
3475 <option value="16" <?php if($cff_event_title_size == "16") echo 'selected="selected"' ?> >16px</option>
3476 <option value="18" <?php if($cff_event_title_size == "18") echo 'selected="selected"' ?> >18px</option>
3477 <option value="20" <?php if($cff_event_title_size == "20") echo 'selected="selected"' ?> >20px</option>
3478 <option value="24" <?php if($cff_event_title_size == "24") echo 'selected="selected"' ?> >24px</option>
3479 <option value="28" <?php if($cff_event_title_size == "28") echo 'selected="selected"' ?> >28px</option>
3480 <option value="32" <?php if($cff_event_title_size == "32") echo 'selected="selected"' ?> >32px</option>
3481 <option value="36" <?php if($cff_event_title_size == "36") echo 'selected="selected"' ?> >36px</option>
3482 <option value="42" <?php if($cff_event_title_size == "42") echo 'selected="selected"' ?> >42px</option>
3483 <option value="48" <?php if($cff_event_title_size == "48") echo 'selected="selected"' ?> >48px</option>
3484 <option value="54" <?php if($cff_event_title_size == "54") echo 'selected="selected"' ?> >54px</option>
3485 <option value="60" <?php if($cff_event_title_size == "60") echo 'selected="selected"' ?> >60px</option>
3486 </select>
3487 </td>
3488 </tr>
3489 <tr>
3490 <th class="bump-left"><label for="cff_event_title_weight" class="bump-left"><?php _e('Text Weight'); ?></label><code class="cff_shortcode"> eventtitleweight
3491 Eg: eventtitleweight=bold</code></th>
3492 <td>
3493 <select name="cff_event_title_weight" class="cff-text-size-setting">
3494 <option value="inherit" <?php if($cff_event_title_weight == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3495 <option value="normal" <?php if($cff_event_title_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
3496 <option value="bold" <?php if($cff_event_title_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
3497 </select>
3498 </td>
3499 </tr>
3500 <tr>
3501 <th class="bump-left"><label for="cff_event_title_color" class="bump-left"><?php _e('Text Color'); ?></label><code class="cff_shortcode"> eventtitlecolor
3502 Eg: eventtitlecolor=666</code></th>
3503 <td>
3504 <input name="cff_event_title_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_event_title_color) ); ?>" class="cff-colorpicker" />
3505 </td>
3506 </tr>
3507 <tr>
3508 <th class="bump-left"><label for="cff_event_title_link" class="bump-left"><?php _e('Link Title to Event on Facebook'); ?></label><code class="cff_shortcode"> eventtitlelink
3509 Eg: eventtitlelink=true</code></th>
3510 <td><input type="checkbox" name="cff_event_title_link" id="cff_event_title_link" <?php if($cff_event_title_link == true) echo 'checked="checked"' ?> /></td>
3511 </tr>
3512 <tr id="eventdate"><!-- Quick link --></tr>
3513 </tbody>
3514 </table>
3515 <hr />
3516
3517 <h3><?php _e('Event Date'); ?></h3>
3518 <table class="form-table">
3519 <tbody>
3520 <tr>
3521 <th class="bump-left"><label for="cff_event_date_size" class="bump-left"><?php _e('Text Size'); ?></label><code class="cff_shortcode"> eventdatesize
3522 Eg: eventdatesize=18</code></th>
3523 <td>
3524 <select name="cff_event_date_size" class="cff-text-size-setting">
3525 <option value="inherit" <?php if($cff_event_date_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3526 <option value="10" <?php if($cff_event_date_size == "10") echo 'selected="selected"' ?> >10px</option>
3527 <option value="11" <?php if($cff_event_date_size == "11") echo 'selected="selected"' ?> >11px</option>
3528 <option value="12" <?php if($cff_event_date_size == "12") echo 'selected="selected"' ?> >12px</option>
3529 <option value="13" <?php if($cff_event_date_size == "13") echo 'selected="selected"' ?> >13px</option>
3530 <option value="14" <?php if($cff_event_date_size == "14") echo 'selected="selected"' ?> >14px</option>
3531 <option value="16" <?php if($cff_event_date_size == "16") echo 'selected="selected"' ?> >16px</option>
3532 <option value="18" <?php if($cff_event_date_size == "18") echo 'selected="selected"' ?> >18px</option>
3533 <option value="20" <?php if($cff_event_date_size == "20") echo 'selected="selected"' ?> >20px</option>
3534 <option value="24" <?php if($cff_event_date_size == "24") echo 'selected="selected"' ?> >24px</option>
3535 <option value="28" <?php if($cff_event_date_size == "28") echo 'selected="selected"' ?> >28px</option>
3536 <option value="32" <?php if($cff_event_date_size == "32") echo 'selected="selected"' ?> >32px</option>
3537 <option value="36" <?php if($cff_event_date_size == "36") echo 'selected="selected"' ?> >36px</option>
3538 <option value="42" <?php if($cff_event_date_size == "42") echo 'selected="selected"' ?> >42px</option>
3539 <option value="48" <?php if($cff_event_date_size == "48") echo 'selected="selected"' ?> >48px</option>
3540 <option value="54" <?php if($cff_event_date_size == "54") echo 'selected="selected"' ?> >54px</option>
3541 <option value="60" <?php if($cff_event_date_size == "60") echo 'selected="selected"' ?> >60px</option>
3542 </select>
3543 </td>
3544 </tr>
3545 <tr>
3546 <th class="bump-left"><label for="cff_event_date_weight" class="bump-left"><?php _e('Text Weight'); ?></label><code class="cff_shortcode"> eventdateweight
3547 Eg: eventdateweight=bold</code></th>
3548 <td>
3549 <select name="cff_event_date_weight" class="cff-text-size-setting">
3550 <option value="inherit" <?php if($cff_event_date_weight == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3551 <option value="normal" <?php if($cff_event_date_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
3552 <option value="bold" <?php if($cff_event_date_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
3553 </select>
3554 </td>
3555 </tr>
3556 <tr>
3557 <th class="bump-left"><label for="cff_event_date_color" class="bump-left"><?php _e('Text Color'); ?></label><code class="cff_shortcode"> eventdatecolor
3558 Eg: eventdatecolor=EB6A00</code></th>
3559 <td>
3560 <input name="cff_event_date_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_event_date_color) ); ?>" class="cff-colorpicker" />
3561 </td>
3562 </tr>
3563 <tr valign="top">
3564 <th class="bump-left" scope="row"><label class="bump-left"><?php _e('Date Position'); ?></label><code class="cff_shortcode"> eventdatepos
3565 Eg: eventdatepos=below</code></th>
3566 <td>
3567 <select name="cff_event_date_position">
3568 <option value="below" <?php if($cff_event_date_position == "below") echo 'selected="selected"' ?> ><?php _e('Below event title'); ?></option>
3569 <option value="above" <?php if($cff_event_date_position == "above") echo 'selected="selected"' ?> ><?php _e('Above event title'); ?></option>
3570 </select>
3571 </td>
3572 </tr>
3573 <tr>
3574 <th class="bump-left"><label for="cff_event_date_formatting" class="bump-left"><?php _e('Event Date Formatting'); ?></label><code class="cff_shortcode"> eventdateformat
3575 Eg: eventdateformat=12</code></th>
3576 <td>
3577 <select name="cff_event_date_formatting" style="width: 280px;">
3578 <?php $original = strtotime('2016-07-25T17:30:00+0000'); ?>
3579 <option value="14" <?php if($cff_event_date_formatting == "14") echo 'selected="selected"' ?> ><?php echo date('M j, g:ia', $original); ?></option>
3580 <option value="15" <?php if($cff_event_date_formatting == "15") echo 'selected="selected"' ?> ><?php echo date('M j, G:i', $original); ?></option>
3581 <option value="1" <?php if($cff_event_date_formatting == "1") echo 'selected="selected"' ?> ><?php echo date('F j, Y, g:ia', $original); ?></option>
3582 <option value="2" <?php if($cff_event_date_formatting == "2") echo 'selected="selected"' ?> ><?php echo date('F jS, g:ia', $original); ?></option>
3583 <option value="3" <?php if($cff_event_date_formatting == "3") echo 'selected="selected"' ?> ><?php echo date('g:ia - F jS', $original); ?></option>
3584 <option value="4" <?php if($cff_event_date_formatting == "4") echo 'selected="selected"' ?> ><?php echo date('g:ia, F jS', $original); ?></option>
3585 <option value="5" <?php if($cff_event_date_formatting == "5") echo 'selected="selected"' ?> ><?php echo date('l F jS - g:ia', $original); ?></option>
3586 <option value="6" <?php if($cff_event_date_formatting == "6") echo 'selected="selected"' ?> ><?php echo date('D M jS, Y, g:iA', $original); ?></option>
3587 <option value="7" <?php if($cff_event_date_formatting == "7") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y, g:iA', $original); ?></option>
3588 <option value="8" <?php if($cff_event_date_formatting == "8") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y - g:ia', $original); ?></option>
3589 <option value="9" <?php if($cff_event_date_formatting == "9") echo 'selected="selected"' ?> ><?php echo date("l M jS, 'y", $original); ?></option>
3590 <option value="10" <?php if($cff_event_date_formatting == "10") echo 'selected="selected"' ?> ><?php echo date('m.d.y - g:iA', $original); ?></option>
3591 <option value="20" <?php if($cff_event_date_formatting == "20") echo 'selected="selected"' ?> ><?php echo date('m.d.y - G:i', $original); ?></option>
3592 <option value="11" <?php if($cff_event_date_formatting == "11") echo 'selected="selected"' ?> ><?php echo date('m/d/y, g:ia', $original); ?></option>
3593 <option value="12" <?php if($cff_event_date_formatting == "12") echo 'selected="selected"' ?> ><?php echo date('d.m.y - g:iA', $original); ?></option>
3594 <option value="21" <?php if($cff_event_date_formatting == "21") echo 'selected="selected"' ?> ><?php echo date('d.m.y - G:i', $original); ?></option>
3595 <option value="13" <?php if($cff_event_date_formatting == "13") echo 'selected="selected"' ?> ><?php echo date('d/m/y, g:ia', $original); ?></option>
3596
3597 <option value="16" <?php if($cff_event_date_formatting == "16") echo 'selected="selected"' ?> ><?php echo date('d-m-Y, G:i', $original); ?></option>
3598 <option value="17" <?php if($cff_event_date_formatting == "17") echo 'selected="selected"' ?> ><?php echo date('jS F Y, G:i', $original); ?></option>
3599 <option value="18" <?php if($cff_event_date_formatting == "18") echo 'selected="selected"' ?> ><?php echo date('d M Y, G:i', $original); ?></option>
3600 <option value="19" <?php if($cff_event_date_formatting == "19") echo 'selected="selected"' ?> ><?php echo date('l jS F Y, G:i', $original); ?></option>
3601 </select>
3602 </td>
3603 </tr>
3604 <tr>
3605 <th class="bump-left"><label for="cff_event_date_custom" class="bump-left"><?php _e('Custom Event Date Format'); ?></label><code class="cff_shortcode"> eventdatecustom
3606 Eg: eventdatecustom='D M jS, Y'</code></th>
3607 <td>
3608 <input name="cff_event_date_custom" type="text" value="<?php _e($cff_event_date_custom); ?>" size="10" placeholder="Eg. F j, Y - g:ia" />
3609 <a href="http://smashballoon.com/custom-facebook-feed/docs/date/" class="cff-external-link" target="_blank"><?php _e('Examples'); ?></a>
3610 </td>
3611 </tr>
3612 <tr id="eventdetails"><!-- Quick link --></tr>
3613 </tbody>
3614 </table>
3615 <hr />
3616
3617 <h3><?php _e('Event Details'); ?></h3>
3618 <table class="form-table">
3619 <tbody>
3620 <tr>
3621 <th class="bump-left"><label for="cff_event_details_size" class="bump-left"><?php _e('Text Size'); ?></label><code class="cff_shortcode"> eventdetailssize
3622 Eg: eventdetailssize=13</code></th>
3623 <td>
3624 <select name="cff_event_details_size" class="cff-text-size-setting">
3625 <option value="inherit" <?php if($cff_event_details_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3626 <option value="10" <?php if($cff_event_details_size == "10") echo 'selected="selected"' ?> >10px</option>
3627 <option value="11" <?php if($cff_event_details_size == "11") echo 'selected="selected"' ?> >11px</option>
3628 <option value="12" <?php if($cff_event_details_size == "12") echo 'selected="selected"' ?> >12px</option>
3629 <option value="13" <?php if($cff_event_details_size == "13") echo 'selected="selected"' ?> >13px</option>
3630 <option value="14" <?php if($cff_event_details_size == "14") echo 'selected="selected"' ?> >14px</option>
3631 <option value="16" <?php if($cff_event_details_size == "16") echo 'selected="selected"' ?> >16px</option>
3632 <option value="18" <?php if($cff_event_details_size == "18") echo 'selected="selected"' ?> >18px</option>
3633 <option value="20" <?php if($cff_event_details_size == "20") echo 'selected="selected"' ?> >20px</option>
3634 <option value="24" <?php if($cff_event_details_size == "24") echo 'selected="selected"' ?> >24px</option>
3635 <option value="28" <?php if($cff_event_details_size == "28") echo 'selected="selected"' ?> >28px</option>
3636 <option value="32" <?php if($cff_event_details_size == "32") echo 'selected="selected"' ?> >32px</option>
3637 <option value="36" <?php if($cff_event_details_size == "36") echo 'selected="selected"' ?> >36px</option>
3638 <option value="42" <?php if($cff_event_details_size == "42") echo 'selected="selected"' ?> >42px</option>
3639 <option value="48" <?php if($cff_event_details_size == "48") echo 'selected="selected"' ?> >48px</option>
3640 <option value="54" <?php if($cff_event_details_size == "54") echo 'selected="selected"' ?> >54px</option>
3641 <option value="60" <?php if($cff_event_details_size == "60") echo 'selected="selected"' ?> >60px</option>
3642 </select>
3643 </td>
3644 </tr>
3645 <tr>
3646 <th class="bump-left"><label for="cff_event_details_weight" class="bump-left"><?php _e('Text Weight'); ?></label><code class="cff_shortcode"> eventdetailsweight
3647 Eg: eventdetailsweight=bold</code></th>
3648 <td>
3649 <select name="cff_event_details_weight" class="cff-text-size-setting">
3650 <option value="inherit" <?php if($cff_event_details_weight == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3651 <option value="normal" <?php if($cff_event_details_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
3652 <option value="bold" <?php if($cff_event_details_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
3653 </select>
3654 </td>
3655 </tr>
3656 <tr>
3657 <th class="bump-left"><label for="cff_event_details_color" class="bump-left"><?php _e('Text Color'); ?></label><code class="cff_shortcode"> eventdetailscolor
3658 Eg: eventdetailscolor=FFF000</code></th>
3659 <td>
3660 <input name="cff_event_details_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_event_details_color) ); ?>" class="cff-colorpicker" />
3661 </td>
3662 </tr>
3663 <tr>
3664 <th class="bump-left"><label for="cff_event_link_color" class="bump-left"><?php _e('Link Color'); ?></label><code class="cff_shortcode"> eventlinkcolor
3665 Eg: eventlinkcolor=333</code></th>
3666 <td>
3667 <input name="cff_event_link_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_event_link_color) ); ?>" class="cff-colorpicker" />
3668 </td>
3669 </tr>
3670 <tr id="comments"><!-- Quick link --></tr>
3671 </tbody>
3672 </table>
3673
3674 <?php submit_button(); ?>
3675
3676 <hr />
3677
3678 <h3><?php _e('Post Action Links'); ?></span> <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What is this?'); ?></a>
3679 <p class="cff-tooltip cff-more-info"><?php _e('Post action links refer to the "View on Facebook" and "Share" links at the bottom of each post'); ?></p></h3>
3680 <table class="form-table">
3681 <tbody>
3682 <tr>
3683 <th class="bump-left"><label for="cff_link_size" class="bump-left"><?php _e('Text Size'); ?></label><code class="cff_shortcode"> linksize
3684 Eg: linksize=13</code></th>
3685 <td>
3686 <select name="cff_link_size" class="cff-text-size-setting">
3687 <option value="inherit" <?php if($cff_link_size == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3688 <option value="10" <?php if($cff_link_size == "10") echo 'selected="selected"' ?> >10px</option>
3689 <option value="11" <?php if($cff_link_size == "11") echo 'selected="selected"' ?> >11px</option>
3690 <option value="12" <?php if($cff_link_size == "12") echo 'selected="selected"' ?> >12px</option>
3691 <option value="13" <?php if($cff_link_size == "13") echo 'selected="selected"' ?> >13px</option>
3692 <option value="14" <?php if($cff_link_size == "14") echo 'selected="selected"' ?> >14px</option>
3693 <option value="16" <?php if($cff_link_size == "16") echo 'selected="selected"' ?> >16px</option>
3694 <option value="18" <?php if($cff_link_size == "18") echo 'selected="selected"' ?> >18px</option>
3695 <option value="20" <?php if($cff_link_size == "20") echo 'selected="selected"' ?> >20px</option>
3696 <option value="24" <?php if($cff_link_size == "24") echo 'selected="selected"' ?> >24px</option>
3697 <option value="28" <?php if($cff_link_size == "28") echo 'selected="selected"' ?> >28px</option>
3698 <option value="32" <?php if($cff_link_size == "32") echo 'selected="selected"' ?> >32px</option>
3699 <option value="36" <?php if($cff_link_size == "36") echo 'selected="selected"' ?> >36px</option>
3700 <option value="42" <?php if($cff_link_size == "42") echo 'selected="selected"' ?> >42px</option>
3701 <option value="48" <?php if($cff_link_size == "48") echo 'selected="selected"' ?> >48px</option>
3702 <option value="54" <?php if($cff_link_size == "54") echo 'selected="selected"' ?> >54px</option>
3703 <option value="60" <?php if($cff_link_size == "60") echo 'selected="selected"' ?> >60px</option>
3704 </select>
3705 </td>
3706 </tr>
3707 <tr>
3708 <th class="bump-left"><label for="cff_link_weight" class="bump-left"><?php _e('Text Weight'); ?></label><code class="cff_shortcode"> linkweight
3709 Eg: linkweight=bold</code></th>
3710 <td>
3711 <select name="cff_link_weight" class="cff-text-size-setting">
3712 <option value="inherit" <?php if($cff_link_weight == "inherit") echo 'selected="selected"' ?> >Inherit from theme</option>
3713 <option value="normal" <?php if($cff_link_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
3714 <option value="bold" <?php if($cff_link_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
3715 </select>
3716 </td>
3717 </tr>
3718 <tr>
3719 <th class="bump-left"><label for="cff_link_color" class="bump-left"><?php _e('Text Color'); ?></label><code class="cff_shortcode"> linkcolor
3720 Eg: linkcolor=E01B5D</code></th>
3721 <td>
3722 <input name="cff_link_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_color) ); ?>" class="cff-colorpicker" />
3723 </td>
3724 </tr>
3725 <tr>
3726 <th class="bump-left"><label for="cff_facebook_link_text" class="bump-left"><?php _e('"View on Facebook" Text'); ?></label><code class="cff_shortcode"> facebooklinktext
3727 Eg: facebooklinktext='Read more...'</code></th>
3728 <td>
3729 <input name="cff_facebook_link_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_facebook_link_text ) ); ?>" size="25" />
3730 </td>
3731 </tr>
3732
3733 <tr>
3734 <th class="bump-left"><label for="cff_facebook_share_text" class="bump-left"><?php _e('"Share" Text'); ?></label><code class="cff_shortcode"> sharelinktext
3735 Eg: sharelinktext='Share this post'</code></th>
3736 <td>
3737 <input name="cff_facebook_share_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_facebook_share_text ) ); ?>" size="25" />
3738 </td>
3739 </tr>
3740
3741 <tr>
3742 <th class="bump-left"><label for="cff_show_facebook_link" class="bump-left"><?php _e('Show "View on Facebook" link'); ?></label><code class="cff_shortcode"> showfacebooklink
3743 Eg: showfacebooklink=true</code></th>
3744 <td>
3745 <input type="checkbox" name="cff_show_facebook_link" id="cff_show_facebook_link" <?php if($cff_show_facebook_link == true) echo 'checked="checked"' ?> />
3746 </td>
3747 </tr>
3748
3749 <tr>
3750 <th class="bump-left"><label for="cff_show_facebook_share" class="bump-left"><?php _e('Show "Share" link'); ?></label><code class="cff_shortcode"> showsharelink
3751 Eg: showsharelink=true</code></th>
3752 <td>
3753 <input type="checkbox" name="cff_show_facebook_share" id="cff_show_facebook_share" <?php if($cff_show_facebook_share == true) echo 'checked="checked"' ?> />
3754 </td>
3755 </tr>
3756 <tr id="loadmore"><!-- Quick link --></tr>
3757 </tbody>
3758 </table>
3759
3760 <hr />
3761
3762 <h3><?php _e('Likes, Shares and Comments Box'); ?></h3>
3763 <a href="https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=settings&utm_medium=likesharescom" target="_blank">Upgrade to Pro to enable likes, shares and comments</a>
3764 <p class="submit cff-expand-button">
3765 <a href="javascript:void(0);" class="button"><b>+</b> Show Pro Options</a>
3766 </p>
3767 <table class="form-table cff-expandable-options">
3768 <tbody>
3769 <tr valign="top" class="cff-pro">
3770 <th class="bump-left" scope="row"><label><?php _e('Icon Style'); ?></label><code class="cff_shortcode"> iconstyle
3771 Eg: iconstyle=dark</code></th>
3772 <td>
3773 <select name="cff_icon_style" style="width: 250px;" disabled>
3774 <option value="light"><?php _e('Light (for light backgrounds)'); ?></option>
3775 <option value="dark"><?php _e('Dark (for dark backgrounds)'); ?></option>
3776 </select>
3777 </td>
3778 </tr>
3779 <tr valign="top" class="cff-pro">
3780 <th class="bump-left" scope="row"><label><?php _e('Text Color'); ?></label><code class="cff_shortcode"> socialtextcolor
3781 Eg: socialtextcolor=FFF</code></th>
3782 <td>
3783 <input name="cff_meta_text_color" class="cff-colorpicker" />
3784 </td>
3785 </tr>
3786 <tr valign="top" class="cff-pro">
3787 <th class="bump-left" scope="row"><label><?php _e('Link Color'); ?></label><code class="cff_shortcode"> sociallinkcolor
3788 Eg: sociallinkcolor=FFF</code></th>
3789 <td>
3790 <input name="cff_meta_link_color" class="cff-colorpicker" />
3791 </td>
3792 </tr>
3793 <tr valign="top" class="cff-pro">
3794 <th class="bump-left" scope="row"><label><?php _e('Background Color'); ?></label><code class="cff_shortcode"> socialbgcolor
3795 Eg: socialbgcolor=111</code></th>
3796 <td>
3797 <input name="cff_meta_bg_color" class="cff-colorpicker" />
3798 </td>
3799 </tr>
3800 <tr valign="top" class="cff-pro">
3801 <th class="bump-left" scope="row"><label><?php _e('Expand Comments Box Initially'); ?></label><code class="cff_shortcode"> expandcomments
3802 Eg: expandcomments=true</code></th>
3803 <td>
3804 <input type="checkbox" name="cff_expand_comments" id="cff_expand_comments" disabled />
3805 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3806 <p class="cff-tooltip cff-more-info"><?php _e('Checking this box will automatically expand the comments box beneath each post. Unchecking this box will mean that users will need to click the number of comments below each post in order to expand the comments box.'); ?></p>
3807 </td>
3808 </tr>
3809 <tr valign="top" class="cff-pro">
3810 <th class="bump-left" for="cff_comments_num" scope="row"><label><?php _e('Number of Comments to Show Initially'); ?></label><code class="cff_shortcode"> commentsnum
3811 Eg: commentsnum=1</code></th>
3812 <td>
3813 <input name="cff_comments_num" type="text" size="2" disabled />
3814 <span><i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('25 max'); ?></i></span>
3815 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3816 <p class="cff-tooltip cff-more-info"><?php _e('The number of comments to show initially when the comments box is expanded.'); ?></p>
3817 </td>
3818 </tr>
3819 <tr valign="top" class="cff-pro">
3820 <th class="bump-left" scope="row"><label><?php _e('Hide Comment Avatars'); ?></label><code class="cff_shortcode"> hidecommentimages
3821 Eg: hidecommentimages=true</code></th>
3822 <td>
3823 <input type="checkbox" name="cff_hide_comment_avatars" id="cff_hide_comment_avatars" disabled />
3824 </td>
3825 </tr>
3826 <tr valign="top" class="cff-pro">
3827 <th class="bump-left" scope="row"><label><?php _e('Show Comments in Lightbox'); ?></label></th>
3828 <td>
3829 <input type="checkbox" name="cff_lightbox_comments" id="cff_lightbox_comments" disabled />
3830 <span><i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('For timeline posts only'); ?>
3831 </td>
3832 </tr>
3833 <tr id="action"><!-- Quick link --></tr>
3834 </tbody>
3835 </table>
3836
3837
3838 <div style="margin-top: -15px;">
3839 <?php submit_button(); ?>
3840 </div>
3841
3842 <a href="https://smashballoon.com/custom-facebook-feed/demo/?utm_campaign=facebook-free&utm_source=footer&utm_medium=ad" target="_blank" class="cff-pro-notice"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
3843
3844 <?php } //End Typography tab ?>
3845 <?php if( $cff_active_tab == 'misc' ) { //Start Misc tab ?>
3846
3847 <p class="cff_contents_links" id="comments">
3848 <span>Jump to: </span>
3849 <a href="#css">Custom CSS</a>
3850 <a href="#js">Custom JavaScript</a>
3851 <a href="#misc">Misc Settings</a>
3852 </p>
3853
3854 <input type="hidden" name="<?php echo $style_misc_hidden_field_name; ?>" value="Y">
3855 <br />
3856
3857 <span id="css"><!-- Quick link --></span>
3858 <hr />
3859 <h3><?php _e('Custom CSS', 'custom-facebook-feed'); ?></h3>
3860 <table class="form-table">
3861 <tbody>
3862 <tr valign="top">
3863 <td style="padding-top: 0;">
3864 <p style="padding-bottom: 10px;"><?php _e('Enter your own custom CSS in the box below', 'custom-facebook-feed'); ?> <i style="margin-left: 5px; font-size: 11px;"><a href="https://smashballoon.com/snippets/" target="_blank"><?php _e('See some examples', 'custom-facebook-feed'); ?></a></i></p>
3865 <textarea name="cff_custom_css" id="cff_custom_css" style="width: 70%;" rows="7"><?php echo esc_textarea( stripslashes($cff_custom_css), 'custom-facebook-feed' ); ?></textarea>
3866 </td>
3867 </tr>
3868 </tbody>
3869 </table>
3870 <h3 id="js"><?php _e('Custom JavaScript', 'custom-facebook-feed'); ?></h3><!-- Quick link -->
3871 <table class="form-table">
3872 <tbody>
3873 <tr valign="top">
3874 <td style="padding-top: 0;">
3875 <p style="padding-bottom: 10px;"><?php _e('Enter your own custom JavaScript/jQuery in the box below', 'custom-facebook-feed'); ?> <i style="margin-left: 5px; font-size: 11px;"><a href="https://smashballoon.com/snippets/" target="_blank"><?php _e('See some examples', 'custom-facebook-feed'); ?></a></i></p>
3876 <textarea name="cff_custom_js" id="cff_custom_js" style="width: 70%;" rows="7"><?php echo esc_textarea( stripslashes($cff_custom_js), 'custom-facebook-feed' ); ?></textarea>
3877 </td>
3878 </tr>
3879 </tbody>
3880 </table>
3881
3882 <?php submit_button(); ?>
3883
3884 <hr />
3885 <h3><?php _e('Media'); ?></h3>
3886 <a href="https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=settings&utm_medium=media" target="_blank">Upgrade to Pro to enable Media options</a>
3887 <p class="submit cff-expand-button">
3888 <a href="javascript:void(0);" class="button"><b>+</b> Show Pro Options</a>
3889 </p>
3890 <table class="form-table cff-expandable-options">
3891 <tbody>
3892 <tr valign="top" class="cff-pro">
3893 <th class="bump-left" scope="row"><label><?php _e('Disable Popup Lightbox'); ?></label><code class="cff_shortcode"> disablelightbox
3894 Eg: disablelightbox=true</code></th>
3895 <td>
3896 <input name="cff_disable_lightbox" type="checkbox" id="cff_disable_lightbox" disabled />
3897 <label for="cff_disable_lightbox"><?php _e('Disable'); ?></label>
3898 </td>
3899 </tr>
3900 <tr class="cff-pro">
3901 <th class="bump-left"><label class="bump-left"><?php _e('Use full-size shared link images'); ?></label><code class="cff_shortcode"> fulllinkimages
3902 Eg: fulllinkimages=false</code></th>
3903 <td>
3904 <input type="checkbox" name="cff_full_link_images" id="cff_full_link_images" disabled />
3905 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3906 <p class="cff-tooltip cff-more-info"><?php _e("By default the shared link boxes in your posts use the same layout selected on the 'Post Layout' page, however, but you can disable this by unchecking this setting to force all shared links to use the smaller image thumbnails instead."); ?></p>
3907 </td>
3908 </tr>
3909 <tr valign="top" class="cff-pro">
3910 <th class="bump-left" scope="row"><label><?php _e('Lightbox video player'); ?></label><code class="cff_shortcode"> videoplayer
3911 Eg: videoplayer=facebook</code></th>
3912 <td>
3913 <select name="cff_video_player" style="width: 280px;" disabled>
3914 <option value="facebook"><?php _e('Facebook Video Player'); ?></option>
3915 <option value="standard"><?php _e('Standard HTML5 Video'); ?></option>
3916 </select>
3917 </td>
3918 </tr>
3919 <tr valign="top" class="cff-pro">
3920 <th class="bump-left" scope="row"><label><?php _e('Play video action'); ?></label><code class="cff_shortcode"> videoaction
3921 Eg: videoaction=facebook</code></th>
3922 <td>
3923 <select name="cff_video_action" style="width: 280px;" disabled>
3924 <option value="post"><?php _e('Play videos directly in the feed'); ?></option>
3925 <!-- Link to the video either on Facebook or whatever the source is: -->
3926 <option value="facebook"><?php _e('Link to the video on Facebook'); ?></option>
3927 </select>
3928 </td>
3929 </tr>
3930 </tbody>
3931 </table>
3932
3933 <hr id="misc" />
3934 <h3><?php _e('Misc Settings', 'custom-facebook-feed'); ?></h3>
3935 <table class="form-table">
3936 <tbody>
3937 <tr>
3938 <th class="bump-left"><label class="bump-left"><?php _e('Is your theme loading the feed via Ajax?', 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> ajax
3939 Eg: ajax=true</code></th>
3940 <td>
3941 <input name="cff_ajax" type="checkbox" id="cff_ajax" <?php if($cff_ajax_val == true) echo "checked"; ?> />
3942 <label for="cff_ajax"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
3943 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3944 <p class="cff-tooltip cff-more-info"><?php _e('Some modern WordPress themes use Ajax to load content into the page after it has loaded. If your theme uses Ajax to load the Custom Facebook Feed content into the page then check this box. If you are not sure then please check with the theme author.', 'custom-facebook-feed'); ?></p>
3945 </td>
3946 </tr>
3947 <tr>
3948 <th class="bump-left"><label class="bump-left"><?php _e("Preserve settings when plugin is removed", 'custom-facebook-feed'); ?></label></th>
3949 <td>
3950 <input name="cff_preserve_settings" type="checkbox" id="cff_preserve_settings" <?php if($cff_preserve_settings_val == true) echo "checked"; ?> />
3951 <label for="cff_preserve_settings"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
3952 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3953 <p class="cff-tooltip cff-more-info"><?php _e('When removing the plugin your settings are automatically deleted from your database. Checking this box will prevent any settings from being deleted. This means that you can uninstall and reinstall the plugin without losing your settings.', 'custom-facebook-feed'); ?></p>
3954 </td>
3955 </tr>
3956 <tr>
3957 <th class="bump-left"><label class="bump-left"><?php _e("Display credit link", 'custom-facebook-feed'); ?></label><code class="cff_shortcode"> credit
3958 Eg: credit=true</code></th>
3959 <td>
3960 <input name="cff_show_credit" type="checkbox" id="cff_show_credit" <?php if($cff_show_credit == true) echo "checked"; ?> />
3961 <label for="cff_show_credit"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
3962 <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Display a link at the bottom of the feed to help promote the plugin', 'custom-facebook-feed'); ?></i>
3963 </td>
3964 </tr>
3965
3966 <tr>
3967 <th class="bump-left"><label class="bump-left"><?php _e("Minify CSS and JavaScript files"); ?></label></th>
3968 <td>
3969 <input name="cff_minify" type="checkbox" id="cff_minify" <?php if($cff_minify == true) echo "checked"; ?> />
3970 </td>
3971 </tr>
3972
3973 <tr>
3974 <th class="bump-left"><label class="bump-left"><?php _e('Is Facebook Page restricted?'); ?></label><code class="cff_shortcode"> restricedpage
3975 Eg: restricedpage=true</code></th>
3976 <td>
3977 <input name="cff_restricted_page" type="checkbox" id="cff_restricted_page" <?php if($cff_restricted_page == true) echo "checked"; ?> />
3978 <label for="cff_ajax"><?php _e('Yes'); ?></label>
3979 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
3980 <p class="cff-tooltip cff-more-info"><?php _e('If you want to display your Facebook feed on your website then ideally your Facebook page should not have any age or location restrictions on it as that restricts the plugin from being able to fully access the content. If it is not possible for you to remove all restrictions then you can enable this setting.'); ?></p>
3981 </td>
3982 </tr>
3983
3984 <tr>
3985 <th class="bump-left"><label class="bump-left"><?php _e("Icon font source", 'custom-facebook-feed'); ?></label></th>
3986 <td>
3987 <select name="cff_font_source">
3988 <option value="cdn" <?php if($cff_font_source == "cdn") echo 'selected="selected"' ?> ><?php _e('CDN', 'custom-facebook-feed'); ?></option>
3989 <option value="local" <?php if($cff_font_source == "local") echo 'selected="selected"' ?> ><?php _e('Local copy', 'custom-facebook-feed'); ?></option>
3990 <option value="none" <?php if($cff_font_source == "none") echo 'selected="selected"' ?> ><?php _e("Don't load", 'custom-facebook-feed'); ?></option>
3991 </select>
3992 </td>
3993 </tr>
3994
3995 <tr>
3996 <th class="bump-left">
3997 <label class="bump-left"><?php _e("Force cache to clear on interval", 'custom-facebook-feed'); ?></label>
3998 </th>
3999 <td>
4000 <select name="cff_cron">
4001 <option value="unset" <?php if($cff_cron == "unset") echo 'selected="selected"' ?> ><?php _e(' - ', 'custom-facebook-feed'); ?></option>
4002 <option value="yes" <?php if($cff_cron == "yes") echo 'selected="selected"' ?> ><?php _e('Yes', 'custom-facebook-feed'); ?></option>
4003 <option value="no" <?php if($cff_cron == "no") echo 'selected="selected"' ?> ><?php _e('No', 'custom-facebook-feed'); ?></option>
4004 </select>
4005
4006 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
4007 <p class="cff-tooltip cff-more-info"><?php _e("If you're experiencing an issue with the plugin not auto-updating then you can set this to 'Yes' to run a scheduled event behind the scenes which forces the plugin cache to clear on a regular basis and retrieve new data from Facebook.", 'custom-facebook-feed'); ?></p>
4008 </td>
4009 </tr>
4010
4011 <tr>
4012 <th class="bump-left"><label class="bump-left"><?php _e("Request method", 'custom-facebook-feed'); ?></label></th>
4013 <td>
4014 <select name="cff_request_method">
4015 <option value="auto" <?php if($cff_request_method == "auto") echo 'selected="selected"' ?> ><?php _e('Auto', 'custom-facebook-feed'); ?></option>
4016 <option value="1" <?php if($cff_request_method == "1") echo 'selected="selected"' ?> ><?php _e('cURL', 'custom-facebook-feed'); ?></option>
4017 <option value="2" <?php if($cff_request_method == "2") echo 'selected="selected"' ?> ><?php _e('file_get_contents', 'custom-facebook-feed'); ?></option>
4018 <option value="3" <?php if($cff_request_method == "3") echo 'selected="selected"' ?> ><?php _e("WP_Http", 'custom-facebook-feed'); ?></option>
4019 </select>
4020 </td>
4021 </tr>
4022 <tr>
4023 <th class="bump-left"><label class="bump-left"><?php _e('Fix text shortening issue'); ?></label><code class="cff_shortcode"> textissue
4024 Eg: textissue=true</code></th>
4025 <td>
4026 <input name="cff_format_issue" type="checkbox" id="cff_format_issue" <?php if($cff_format_issue == true) echo "checked"; ?> />
4027 </td>
4028 </tr>
4029 <tr>
4030 <th class="bump-left"><label for="cff_disable_styles" class="bump-left"><?php _e("Disable default styles", 'custom-facebook-feed'); ?></label></th>
4031 <td>
4032 <input name="cff_disable_styles" type="checkbox" id="cff_disable_styles" <?php if($cff_disable_styles == true) echo "checked"; ?> />
4033 <label for="cff_disable_styles"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
4034 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
4035 <p class="cff-tooltip cff-more-info"><?php _e("The plugin includes some basic text and link styles which can be disabled by enabling this setting. Note that the styles used for the layout of the posts will still be applied.", 'custom-facebook-feed'); ?></p>
4036 </td>
4037 </tr>
4038
4039 <tr>
4040 <th class="bump-left"><label for="cff_disable_admin_notice" class="bump-left"><?php _e("Disable admin error notice", 'custom-facebook-feed'); ?></label></th>
4041 <td>
4042 <input name="cff_disable_admin_notice" type="checkbox" id="cff_disable_admin_notice" <?php if($cff_disable_admin_notice == true) echo "checked"; ?> />
4043 <label for="cff_disable_admin_notice"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
4044 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
4045 <p class="cff-tooltip cff-more-info"><?php _e("This will permanently disable the feed error notice that displays in the bottom right corner for admins on the front end of your site.", 'custom-facebook-feed'); ?></p>
4046 </td>
4047 </tr>
4048
4049 <tr>
4050 <th class="bump-left"><label for="cff_enable_email_report" class="bump-left"><?php _e("Feed issue email report", 'instagram-feed'); ?></label></th>
4051 <td>
4052 <input name="cff_enable_email_report" type="checkbox" id="cff_enable_email_report" <?php if($cff_enable_email_report == 'on') echo "checked"; ?> />
4053 <label for="cff_enable_email_report"><?php _e('Yes', 'custom-facebook-feed'); ?></label>
4054 <a class="cff-tooltip-link" href="JavaScript:void(0);"><i class="fa fa-question-circle" aria-hidden="true"></i></a>
4055 <p class="cff-tooltip cff-more-info"><?php _e("Custom Facebook Feed will send a weekly notification email using your site's wp_mail() function if one or more of your feeds is not updating or is not displaying. If you're not receiving the emails in your inbox, you may need to configure an SMTP service using another plugin like WP Mail SMTP.", 'custom-facebook-feed'); ?></p>
4056
4057 <div class="cff_box" style="display: block;">
4058 <div class="cff_box_setting">
4059 <label><?php _e('Schedule Weekly on', 'custom-facebook-feed'); ?></label><br>
4060 <?php
4061 $schedule_options = array(
4062 array(
4063 'val' => 'monday',
4064 'label' => __( 'Monday', 'custom-facebook-feed' )
4065 ),
4066 array(
4067 'val' => 'tuesday',
4068 'label' => __( 'Tuesday', 'custom-facebook-feed' )
4069 ),
4070 array(
4071 'val' => 'wednesday',
4072 'label' => __( 'Wednesday', 'custom-facebook-feed' )
4073 ),
4074 array(
4075 'val' => 'thursday',
4076 'label' => __( 'Thursday', 'custom-facebook-feed' )
4077 ),
4078 array(
4079 'val' => 'friday',
4080 'label' => __( 'Friday', 'custom-facebook-feed' )
4081 ),
4082 array(
4083 'val' => 'saturday',
4084 'label' => __( 'Saturday', 'custom-facebook-feed' )
4085 ),
4086 array(
4087 'val' => 'sunday',
4088 'label' => __( 'Sunday', 'custom-facebook-feed' )
4089 ),
4090 );
4091
4092 if ( isset( $_GET['flag'] ) ){
4093 echo '<span id="cff-goto"></span>';
4094 }
4095 ?>
4096 <select name="cff_email_notification" id="cff_email_notification">
4097 <?php foreach ( $schedule_options as $schedule_option ) : ?>
4098 <option value="<?php echo esc_attr( $schedule_option['val'] ) ; ?>" <?php if ( $schedule_option['val'] === $cff_email_notification ) { echo 'selected';} ?>><?php echo esc_html( $schedule_option['label'] ) ; ?></option>
4099 <?php endforeach; ?>
4100 </select>
4101 </div>
4102 <div class="cff_box_setting">
4103 <label><?php _e('Email Recipients', 'custom-facebook-feed'); ?></label><br><input class="regular-text" type="text" name="cff_email_notification_addresses" value="<?php echo esc_attr( $cff_email_notification_addresses ); ?>"><span class="sbi_note"><?php _e('separate multiple emails with commas', 'custom-facebook-feed'); ?></span>
4104 <br><br><?php _e( 'Emails not working?', 'custom-facebook-feed' ) ?> <a href="https://smashballoon.com/email-report-is-not-in-my-inbox/" target="_blank"><?php _e( 'See our related FAQ', 'custom-facebook-feed' ) ?></a>
4105 </div>
4106 </div>
4107
4108 </td>
4109 </tr>
4110
4111 </tbody>
4112 </table>
4113
4114 <?php submit_button(); ?>
4115 <a href="https://smashballoon.com/custom-facebook-feed/demo/?utm_campaign=facebook-free&utm_source=footer&utm_medium=ad" target="_blank" class="cff-pro-notice"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
4116 <?php } //End Misc tab ?>
4117
4118
4119 <?php if( $cff_active_tab == 'custom_text' ) { //Start Custom Text tab ?>
4120
4121 <p class="cff_contents_links">
4122 <span>Jump to: </span>
4123 <a href="#text">Post Text</a>
4124 <a href="#action">Post Action Links</a>
4125 <a href="#medialink">Media Links</a>
4126 <a href="#date">Date</a>
4127 </p>
4128
4129 <input type="hidden" name="<?php echo $style_custom_text_hidden_field_name; ?>" value="Y">
4130 <br />
4131 <h3><?php _e('Custom Text / Translate', 'custom-facebook-feed'); ?></h3>
4132 <p><?php _e('Enter custom text for the words below, or translate it into the language you would like to use.', 'custom-facebook-feed'); ?></p>
4133 <table class="form-table cff-translate-table" style="width: 100%; max-width: 940px;">
4134 <tbody>
4135
4136 <thead id="text">
4137 <tr>
4138 <th><?php _e('Original Text', 'custom-facebook-feed'); ?></th>
4139 <th><?php _e('Custom Text / Translation', 'custom-facebook-feed'); ?></th>
4140 <th><?php _e('Context', 'custom-facebook-feed'); ?></th>
4141 </tr>
4142 </thead>
4143
4144 <tr class="cff-table-header"><th colspan="3"><?php _e('Post Text', 'custom-facebook-feed'); ?></th></tr>
4145 <tr>
4146 <td><label for="cff_see_more_text" class="bump-left"><?php _e('See More', 'custom-facebook-feed'); ?></label></td>
4147 <td><input name="cff_see_more_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_see_more_text ) ); ?>" /></td>
4148 <td class="cff-context"><?php _e('Used when truncating the post text', 'custom-facebook-feed'); ?></td>
4149 </tr>
4150
4151 <tr id="action"><!-- Quick link -->
4152 <td><label for="cff_see_less_text" class="bump-left"><?php _e('See Less', 'custom-facebook-feed'); ?></label></td>
4153 <td><input name="cff_see_less_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_see_less_text ) ); ?>" /></td>
4154 <td class="cff-context"><?php _e('Used when truncating the post text', 'custom-facebook-feed'); ?></td>
4155 </tr>
4156
4157 <tr class="cff-table-header"><th colspan="3"><?php _e('Post Action Links', 'custom-facebook-feed'); ?></th></tr>
4158 <tr>
4159 <td><label for="cff_facebook_link_text" class="bump-left"><?php _e('View on Facebook', 'custom-facebook-feed'); ?></label></td>
4160 <td><input name="cff_facebook_link_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_facebook_link_text ) ); ?>" /></td>
4161 <td class="cff-context"><?php _e('Used for the link to the post on Facebook', 'custom-facebook-feed'); ?></td>
4162 </tr>
4163 <tr>
4164 <td><label for="cff_facebook_share_text" class="bump-left"><?php _e('Share', 'custom-facebook-feed'); ?></label></td>
4165 <td><input name="cff_facebook_share_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_facebook_share_text ) ); ?>" /></td>
4166 <td class="cff-context"><?php _e('Used for sharing the Facebook post via Social Media', 'custom-facebook-feed'); ?></td>
4167 </tr>
4168
4169 <tr id="medialink"><!-- Quick link -->
4170 <td><label for="cff_translate_photos_text" class="bump-left"><?php _e('photos', 'custom-facebook-feed'); ?></label></td>
4171 <td><input name="cff_translate_photos_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_photos_text ) ); ?>" /></td>
4172 <td class="cff-context"><?php _e('Added to the end of an album name. Eg. (6 photos)', 'custom-facebook-feed'); ?></td>
4173 </tr>
4174
4175 <tr class="cff-table-header"><th colspan="3"><?php _e('Media Links', 'custom-facebook-feed'); ?></th></tr>
4176 <tr>
4177 <td><label for="cff_translate_photo_text" class="bump-left"><?php _e('Photo', 'custom-facebook-feed'); ?></label></td>
4178 <td><input name="cff_translate_photo_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_photo_text ) ); ?>" /></td>
4179 <td class="cff-context"><?php _e('Used to link to photos on Facebook', 'custom-facebook-feed'); ?></td>
4180 </tr>
4181 <tr id="date"><!-- Quick link -->
4182 <td><label for="cff_translate_video_text" class="bump-left"><?php _e('Video', 'custom-facebook-feed'); ?></label></td>
4183 <td><input name="cff_translate_video_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_video_text ) ); ?>" /></td>
4184 <td class="cff-context"><?php _e('Used to link to videos on Facebook', 'custom-facebook-feed'); ?></td>
4185 </tr>
4186
4187 <tr class="cff-table-header"><th colspan="3"><?php _e('Call-to-action Buttons', 'custom-facebook-feed'); ?></th></tr>
4188 <tr>
4189 <td><label for="cff_translate_learn_more_text" class="bump-left"><?php _e('Learn More', 'custom-facebook-feed'); ?></label></td>
4190 <td><input name="cff_translate_learn_more_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_learn_more_text ) ); ?>" /></td>
4191 <td class="cff-context"><?php _e("Used for the 'Learn More' button", 'custom-facebook-feed'); ?></td>
4192 </tr>
4193 <tr>
4194 <td><label for="cff_translate_shop_now_text" class="bump-left"><?php _e('Shop Now', 'custom-facebook-feed'); ?></label></td>
4195 <td><input name="cff_translate_shop_now_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_shop_now_text ) ); ?>" /></td>
4196 <td class="cff-context"><?php _e("Used for the 'Shop Now' button", 'custom-facebook-feed'); ?></td>
4197 </tr>
4198 <tr>
4199 <td><label for="cff_translate_message_page_text" class="bump-left"><?php _e('Message Page', 'custom-facebook-feed'); ?></label></td>
4200 <td><input name="cff_translate_message_page_text" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_message_page_text ) ); ?>" /></td>
4201 <td class="cff-context"><?php _e("Used for the 'Message Page' button", 'custom-facebook-feed'); ?></td>
4202 </tr>
4203
4204 <tr class="cff-table-header"><th colspan="3"><?php _e('Date', 'custom-facebook-feed'); ?></th></tr>
4205 <tr>
4206 <td><label for="cff_photos_text" class="bump-left"><?php _e('"Posted _ hours ago" text', 'custom-facebook-feed'); ?></label></td>
4207 <td class="cff-translate-date">
4208
4209 <label for="cff_translate_second"><?php _e("second", 'custom-facebook-feed'); ?></label>
4210 <input name="cff_translate_second" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_second ) ); ?>" size="20" />
4211 <br />
4212 <label for="cff_translate_seconds"><?php _e("seconds", 'custom-facebook-feed'); ?></label>
4213 <input name="cff_translate_seconds" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_seconds ) ); ?>" size="20" />
4214 <br />
4215 <label for="cff_translate_minute"><?php _e("minute", 'custom-facebook-feed'); ?></label>
4216 <input name="cff_translate_minute" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_minute ) ); ?>" size="20" />
4217 <br />
4218 <label for="cff_translate_minutes"><?php _e("minutes", 'custom-facebook-feed'); ?></label>
4219 <input name="cff_translate_minutes" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_minutes ) ); ?>" size="20" />
4220 <br />
4221 <label for="cff_translate_hour"><?php _e("hour", 'custom-facebook-feed'); ?></label>
4222 <input name="cff_translate_hour" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_hour ) ); ?>" size="20" />
4223 <br />
4224 <label for="cff_translate_hours"><?php _e("hours", 'custom-facebook-feed'); ?></label>
4225 <input name="cff_translate_hours" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_hours ) ); ?>" size="20" />
4226 <br />
4227 <label for="cff_translate_day"><?php _e("day", 'custom-facebook-feed'); ?></label>
4228 <input name="cff_translate_day" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_day ) ); ?>" size="20" />
4229 <br />
4230 <label for="cff_translate_days"><?php _e("days", 'custom-facebook-feed'); ?></label>
4231 <input name="cff_translate_days" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_days ) ); ?>" size="20" />
4232 <br />
4233 <label for="cff_translate_week"><?php _e("week", 'custom-facebook-feed'); ?></label>
4234 <input name="cff_translate_week" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_week ) ); ?>" size="20" />
4235 <br />
4236 <label for="cff_translate_weeks"><?php _e("weeks", 'custom-facebook-feed'); ?></label>
4237 <input name="cff_translate_weeks" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_weeks ) ); ?>" size="20" />
4238 <br />
4239 <label for="cff_translate_month"><?php _e("month", 'custom-facebook-feed'); ?></label>
4240 <input name="cff_translate_month" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_month ) ); ?>" size="20" />
4241 <br />
4242 <label for="cff_translate_months"><?php _e("months", 'custom-facebook-feed'); ?></label>
4243 <input name="cff_translate_months" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_months ) ); ?>" size="20" />
4244 <br />
4245 <label for="cff_translate_year"><?php _e("year", 'custom-facebook-feed'); ?></label>
4246 <input name="cff_translate_year" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_year ) ); ?>" size="20" />
4247 <br />
4248 <label for="cff_translate_years"><?php _e("years", 'custom-facebook-feed'); ?></label>
4249 <input name="cff_translate_years" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_years ) ); ?>" size="20" />
4250 <br />
4251 <label for="cff_translate_ago"><?php _e("ago", 'custom-facebook-feed'); ?></label>
4252 <input name="cff_translate_ago" type="text" value="<?php echo stripslashes( esc_attr( $cff_translate_ago ) ); ?>" size="20" />
4253 </td>
4254 <td class="cff-context"><?php _e('Used to translate the "__ days ago" date text', 'custom-facebook-feed'); ?></td>
4255 </tr>
4256
4257 </tbody>
4258 </table>
4259
4260 <?php submit_button(); ?>
4261 <a href="https://smashballoon.com/custom-facebook-feed/demo/?utm_campaign=facebook-free&utm_source=footer&utm_medium=ad" target="_blank" class="cff-pro-notice"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
4262 <?php } //End Custom Text tab ?>
4263
4264 </form>
4265
4266 <div class="cff-share-plugin">
4267 <h3><?php _e('Like the plugin? Help spread the word!', 'custom-facebook-feed'); ?></h3>
4268
4269 <button id="cff-admin-show-share-links" class="button secondary" style="margin-bottom: 1px;"><i class="fa fa-share-alt" aria-hidden="true"></i>&nbsp;&nbsp;Share the plugin</button> <div id="cff-admin-share-links"></div>
4270 </div>
4271
4272 <?php
4273 } //End Style_Page
4274 //Enqueue admin styles
4275 function cff_admin_style() {
4276 wp_register_style( 'custom_wp_admin_css', plugin_dir_url( __FILE__ ) . 'css/cff-admin-style.css', false, CFFVER );
4277 wp_enqueue_style( 'custom_wp_admin_css' );
4278 wp_enqueue_style( 'cff-font-awesome', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css', array(), '4.5.0' );
4279 wp_enqueue_style( 'wp-color-picker' );
4280 }
4281 add_action( 'admin_enqueue_scripts', 'cff_admin_style' );
4282 //Enqueue admin scripts
4283 function cff_admin_scripts() {
4284 //Declare color-picker as a dependency
4285 wp_enqueue_script( 'cff_admin_script', plugin_dir_url( __FILE__ ) . 'js/cff-admin-scripts.js', CFFVER );
4286 wp_localize_script( 'cff_admin_script', 'cffA', array(
4287 'ajax_url' => admin_url( 'admin-ajax.php' ),
4288 'cff_nonce' => wp_create_nonce( 'cff_nonce' )
4289 )
4290 );
4291
4292 if( !wp_script_is('jquery-ui-draggable') ) {
4293 wp_enqueue_script(
4294 array(
4295 'jquery',
4296 'jquery-ui-core',
4297 'jquery-ui-draggable'
4298 )
4299 );
4300 }
4301 wp_enqueue_script(
4302 array(
4303 'hoverIntent',
4304 'wp-color-picker'
4305 )
4306 );
4307 }
4308 add_action( 'admin_enqueue_scripts', 'cff_admin_scripts' );
4309
4310 function cff_lite_dismiss() {
4311 $nonce = isset( $_POST['cff_nonce'] ) ? sanitize_text_field( $_POST['cff_nonce'] ) : '';
4312
4313 if ( ! wp_verify_nonce( $nonce, 'cff_nonce' ) ) {
4314 die ( 'You did not do this the right way!' );
4315 }
4316
4317 set_transient( 'facebook_feed_dismiss_lite', 'dismiss', 1 * WEEK_IN_SECONDS );
4318
4319 die();
4320 }
4321 add_action( 'wp_ajax_cff_lite_dismiss', 'cff_lite_dismiss' );
4322
4323 function cff_reset_log() {
4324 global $cff_error_reporter;
4325
4326 $cff_error_reporter->remove_all_errors();
4327 cff_delete_cache();
4328
4329 die();
4330 }
4331 add_action( 'wp_ajax_cff_reset_log', 'cff_reset_log' );
4332
4333
4334 // Add a Settings link to the plugin on the Plugins page
4335 $cff_plugin_file = 'custom-facebook-feed/custom-facebook-feed.php';
4336 add_filter( "plugin_action_links_{$cff_plugin_file}", 'cff_add_settings_link', 10, 2 );
4337
4338 //modify the link by unshifting the array
4339 function cff_add_settings_link( $links, $file ) {
4340 $cff_settings_link = '<a href="' . admin_url( 'admin.php?page=cff-top' ) . '">' . __( 'Settings', 'cff-top', 'custom-facebook-feed' ) . '</a>';
4341 array_unshift( $links, $cff_settings_link );
4342
4343 return $links;
4344 }
4345
4346
4347 //Delete cache
4348 function cff_delete_cache(){
4349 global $wpdb;
4350 $table_name = $wpdb->prefix . "options";
4351 $wpdb->query( "
4352 DELETE
4353 FROM $table_name
4354 WHERE `option_name` LIKE ('%\_transient\_cff\_%')
4355 " );
4356 $wpdb->query( "
4357 DELETE
4358 FROM $table_name
4359 WHERE `option_name` LIKE ('%\_transient\_cff\_tle\_%')
4360 " );
4361 $wpdb->query( "
4362 DELETE
4363 FROM $table_name
4364 WHERE `option_name` LIKE ('%\_transient\_timeout\_cff\_%')
4365 " );
4366
4367 //Clear cache of major caching plugins
4368 if(isset($GLOBALS['wp_fastest_cache']) && method_exists($GLOBALS['wp_fastest_cache'], 'deleteCache')){
4369 $GLOBALS['wp_fastest_cache']->deleteCache();
4370 }
4371 //WP Super Cache
4372 if (function_exists('wp_cache_clear_cache')) {
4373 wp_cache_clear_cache();
4374 }
4375 //W3 Total Cache
4376 if (function_exists('w3tc_flush_all')) {
4377 w3tc_flush_all();
4378 }
4379
4380 }
4381
4382 //Cron job to clear transients
4383 add_action('cff_cron_job', 'cff_cron_clear_cache');
4384 function cff_cron_clear_cache() {
4385 //Delete all transients
4386 cff_delete_cache();
4387 }
4388
4389
4390
4391 //NOTICES
4392 function cff_get_current_time() {
4393 $current_time = time();
4394
4395 // where to do tests
4396 // $current_time = strtotime( 'November 25, 2020' );
4397
4398 return $current_time;
4399 }
4400
4401 // generates the html for the admin notices
4402 function cff_notices_html() {
4403
4404 //Don't show notices if Instagram notices are being shown
4405 if ( function_exists( 'sbi_notices_html' ) ) {
4406 return;
4407 }
4408
4409 //Only show to admins
4410 if ( ! current_user_can( 'manage_options' ) ) {
4411 return;
4412 }
4413
4414 $cff_statuses_option = get_option( 'cff_statuses', array() );
4415 $current_time = cff_get_current_time();
4416 $cff_bfcm_discount_code = 'happysmashgiving' . date('Y', $current_time );
4417
4418 // reset everything for testing
4419 if ( false ) {
4420 global $current_user;
4421 $user_id = $current_user->ID;
4422 // delete_user_meta( $user_id, 'cff_ignore_bfcm_sale_notice' );
4423 //delete_user_meta( $user_id, 'cff_ignore_new_user_sale_notice' );
4424 // $cff_statuses_option = array( 'first_install' => strtotime( 'December 8, 2017' ) );
4425 //$cff_statuses_option = array( 'first_install' => time() );
4426
4427 //update_option( 'cff_statuses', $cff_statuses_option, false );
4428 //delete_option( 'cff_rating_notice');
4429 //delete_transient( 'custom_facebook_rating_notice_waiting' );
4430
4431 // set_transient( 'custom_facebook_rating_notice_waiting', 'waiting', 2 * WEEK_IN_SECONDS );
4432 delete_transient('custom_facebook_rating_notice_waiting');
4433 update_option( 'cff_rating_notice', 'pending', false );
4434 }
4435
4436 //$cff_statuses_option['rating_notice_dismissed'] = time();
4437 //update_option( 'cff_statuses', $cff_statuses_option, false );
4438 // rating notice logic
4439 $cff_rating_notice_option = get_option( 'cff_rating_notice', false );
4440 $cff_rating_notice_waiting = get_transient( 'custom_facebook_rating_notice_waiting' );
4441 $should_show_rating_notice = ($cff_rating_notice_waiting !== 'waiting' && $cff_rating_notice_option !== 'dismissed');
4442
4443 // black friday cyber monday logic
4444 $thanksgiving_this_year = cff_get_future_date( 11, date('Y', $current_time ), 4, 4, 1 );
4445 $one_week_before_black_friday_this_year = $thanksgiving_this_year - 7*24*60*60;
4446 $one_day_after_cyber_monday_this_year = $thanksgiving_this_year + 5*24*60*60;
4447 $has_been_two_days_since_rating_dismissal = isset( $cff_statuses_option['rating_notice_dismissed'] ) ? ((int)$cff_statuses_option['rating_notice_dismissed'] + 2*24*60*60) < $current_time : true;
4448
4449 $could_show_bfcm_discount = ($current_time > $one_week_before_black_friday_this_year && $current_time < $one_day_after_cyber_monday_this_year);
4450 $should_show_bfcm_discount = false;
4451 if ( $could_show_bfcm_discount && $has_been_two_days_since_rating_dismissal ) {
4452 global $current_user;
4453 $user_id = $current_user->ID;
4454
4455 $ignore_bfcm_sale_notice_meta = get_user_meta( $user_id, 'cff_ignore_bfcm_sale_notice' );
4456 $ignore_bfcm_sale_notice_meta = isset( $ignore_bfcm_sale_notice_meta[0] ) ? $ignore_bfcm_sale_notice_meta[0] : '';
4457
4458 /* Check that the user hasn't already clicked to ignore the message */
4459 $should_show_bfcm_discount = ($ignore_bfcm_sale_notice_meta !== 'always' && $ignore_bfcm_sale_notice_meta !== date( 'Y', $current_time ));
4460 }
4461
4462 // new user discount logic
4463 $in_new_user_month_range = true;
4464 $should_show_new_user_discount = false;
4465 $has_been_one_month_since_rating_dismissal = isset( $cff_statuses_option['rating_notice_dismissed'] ) ? ((int)$cff_statuses_option['rating_notice_dismissed'] + 30*24*60*60) < $current_time + 1: true;
4466
4467 if ( isset( $cff_statuses_option['first_install'] ) && $cff_statuses_option['first_install'] === 'from_update' ) {
4468 global $current_user;
4469 $user_id = $current_user->ID;
4470 $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'cff_ignore_new_user_sale_notice' );
4471 $ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
4472
4473 if ( $ignore_new_user_sale_notice_meta !== 'always' ) {
4474 $should_show_new_user_discount = true;
4475 }
4476 } elseif ( $in_new_user_month_range && $has_been_one_month_since_rating_dismissal ) {
4477 global $current_user;
4478 $user_id = $current_user->ID;
4479 $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'cff_ignore_new_user_sale_notice' );
4480 $ignore_new_user_sale_notice_meta = isset( $ignore_new_user_sale_notice_meta[0] ) ? $ignore_new_user_sale_notice_meta[0] : '';
4481
4482 if ( $ignore_new_user_sale_notice_meta !== 'always'
4483 && isset( $cff_statuses_option['first_install'] )
4484 && $current_time > (int)$cff_statuses_option['first_install'] + 60*60*24*30 ) {
4485 $should_show_new_user_discount = true;
4486 }
4487 }
4488
4489 // for debugging
4490 if ( false ) {
4491 global $current_user;
4492 $user_id = $current_user->ID;
4493 $ignore_bfcm_sale_notice_meta = get_user_meta( $user_id, 'cff_ignore_bfcm_sale_notice' );
4494 $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'cff_ignore_new_user_sale_notice' );
4495
4496 var_dump( 'new user rating option', $cff_rating_notice_option );
4497 var_dump( 'new user rating transient', $cff_rating_notice_waiting );
4498
4499 var_dump( 'should show new user rating notice?', $should_show_rating_notice );
4500
4501 var_dump( 'new user discount month range?', $in_new_user_month_range );
4502 var_dump( 'should show new user discount?', $should_show_new_user_discount );
4503
4504 var_dump( 'Thanksgiving this year?', date('m/d/Y', $thanksgiving_this_year ) );
4505
4506 var_dump( 'could show bfcm discount?', $could_show_bfcm_discount );
4507 var_dump( 'should show bfcm discount?', $should_show_bfcm_discount );
4508
4509 var_dump( 'ignore_bfcm_sale_notice_meta', $ignore_bfcm_sale_notice_meta );
4510 var_dump( 'ignore_new_user_sale_notice_meta', $ignore_new_user_sale_notice_meta );
4511
4512 var_dump( $cff_statuses_option );
4513 }
4514
4515
4516 if ( $should_show_rating_notice ) {
4517 $other_notice_html = '';
4518 $dismiss_url = add_query_arg( 'cff_ignore_rating_notice_nag', '1' );
4519 $later_url = add_query_arg( 'cff_ignore_rating_notice_nag', 'later' );
4520 if ( $should_show_bfcm_discount ) {
4521 $other_notice_html = '<p class="cff_other_notice">' . __( 'PS. We currently have a <a href="https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=notices&utm_medium=rating&discount='.$cff_bfcm_discount_code.'" target="_blank"><b style="font-weight: 700;">Black Friday deal</b></a> for 60% off the Pro version!', 'custom-facebook-feed' ) . '</p>';
4522
4523 $dismiss_url = add_query_arg( array(
4524 'cff_ignore_rating_notice_nag' => '1',
4525 'cff_ignore_bfcm_sale_notice' => date( 'Y', $current_time )
4526 )
4527 );
4528 $later_url = add_query_arg( array(
4529 'cff_ignore_rating_notice_nag' => 'later',
4530 'cff_ignore_bfcm_sale_notice' => date( 'Y', $current_time )
4531 )
4532 );
4533 }
4534
4535 echo"
4536 <div class='cff_notice cff_review_notice'>
4537 <img src='" . plugins_url( 'img/cff-icon.png?74px' , __FILE__ ) . "' alt='" . __( 'Custom Facebook Feed', 'custom-facebook-feed' ) . "'>
4538 <div class='cff-notice-text'>
4539 <p style='padding-top: 4px;'>" . __( "It's great to see that you've been using the <strong style='font-weight: 700;'>Smash Balloon Custom Facebook Feed</strong> plugin for a while now. Hopefully you like it! If so, would you consider leaving a positive review? It really helps support the plugin and helps others to discover it too!", 'custom-facebook-feed' ) . "</p>
4540 <p class='links'";
4541 if( $should_show_bfcm_discount ) echo " style='margin-top: 0 !important;'";
4542 echo ">
4543 <a class='cff_notice_dismiss' style='margin-left:-8px;' href='https://wordpress.org/support/plugin/custom-facebook-feed/reviews/' target='_blank'>" . __( 'Sure, I\'d love to!', 'custom-facebook-feed' ) . "</a>
4544 &middot;
4545 <a class='cff_notice_dismiss' href='" .esc_url( $dismiss_url ). "'>" . __( 'No thanks', 'custom-facebook-feed' ) . "</a>
4546 &middot;
4547 <a class='cff_notice_dismiss' href='" .esc_url( $dismiss_url ). "'>" . __( 'I\'ve already given a review', 'custom-facebook-feed' ) . "</a>
4548 &middot;
4549 <a class='cff_notice_dismiss' href='" .esc_url( $later_url ). "'>" . __( 'Ask Me Later', 'custom-facebook-feed' ) . "</a>
4550 </p>"
4551 . $other_notice_html .
4552 "</div>
4553 <a class='cff_notice_close' href='" .esc_url( $dismiss_url ). "'><i class='fa fa-close'></i></a>
4554 </div>";
4555
4556 } elseif ( $should_show_new_user_discount ) {
4557 global $current_user;
4558 $user_id = $current_user->ID;
4559 $ignore_new_user_sale_notice_meta = get_user_meta( $user_id, 'cff_ignore_new_user_sale_notice' );
4560 if ( $ignore_new_user_sale_notice_meta !== 'always' ) {
4561
4562 echo "
4563 <div class='cff_notice cff_review_notice cff_new_user_sale_notice'>
4564 <img src='" . plugins_url( 'img/cff-icon-offer.png?74px' , __FILE__ ) . "' alt='Facebook Feed'>
4565 <div class='cff-notice-text'>
4566 <p>" . __( '<b style="font-weight: 700;">Exclusive offer!</b> We don\'t run promotions very often, but for a limited time we\'re offering <b style="font-weight: 700;">60% off</b> our Pro version to all users of our free Smash Balloon Custom Facebook Feed plugin.', 'custom-facebook-feed' ) . "</p>
4567 <p class='cff-links'>
4568 <a class='cff_notice_dismiss cff_offer_btn' href='https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=notices&utm_medium=newuser&discount=facebookthankyou' target='_blank'><b>" . __( 'Get this offer', 'custom-facebook-feed' ) . "</b></a>
4569 <a class='cff_notice_dismiss' style='margin-left: 5px;' href='" . esc_url( add_query_arg( 'cff_ignore_new_user_sale_notice', 'always' ) ) . "'>" . __( 'I\'m not interested', 'custom-facebook-feed' ) . "</a>
4570
4571 </p>
4572 </div>
4573 <a class='cff_new_user_sale_notice_close' href='" . esc_url( add_query_arg( 'cff_ignore_new_user_sale_notice', 'always' ) ) . "'><i class='fa fa-close'></i></a>
4574 </div>
4575 ";
4576 }
4577
4578 } elseif ( $should_show_bfcm_discount ) {
4579
4580 echo "
4581 <div class='cff_notice cff_review_notice cff_bfcm_sale_notice'>
4582 <img src='". plugins_url( 'img/cff-icon-offer.png?74px' , __FILE__ ) ."' alt='Facebook Feed'>
4583 <div class='cff-notice-text'>
4584 <p>" . __( '<b style="font-weight: 700;">Black Friday/Cyber Monday Deal!</b> Thank you for using the free Smash Balloon Custom Facebook Feed plugin. For a limited time, we\'re offering <b style="font-weight: 700;">60% off</b> the Pro version for all of our users.', 'custom-facebook-feed' ) . "</p>
4585 <p class='cff-links'>
4586 <a class='cff_notice_dismiss cff_offer_btn' href='https://smashballoon.com/custom-facebook-feed/?utm_campaign=facebook-free&utm_source=notices&utm_medium=bfcm&discount=".$cff_bfcm_discount_code."' target='_blank'><b>" . __( 'Get this offer', 'custom-facebook-feed' ) . "</b></a>
4587 <a class='cff_notice_dismiss' style='margin-left: 5px;' href='" .esc_url( add_query_arg( 'cff_ignore_bfcm_sale_notice', date( 'Y', $current_time ) ) ). "'>" . __( 'I\'m not interested', 'custom-facebook-feed' ) . "</a>
4588 </p>
4589 </div>
4590 <a class='cff_bfcm_sale_notice_close' href='" .esc_url( add_query_arg( 'cff_ignore_bfcm_sale_notice', date( 'Y', $current_time ) ) ). "'><i class='fa fa-close'></i></a>
4591 </div>
4592 ";
4593
4594 }
4595
4596 }
4597 add_action( 'admin_notices', 'cff_notices_html', 10 );
4598
4599 function cff_process_nags() {
4600
4601 global $current_user;
4602 $user_id = $current_user->ID;
4603 $cff_statuses_option = get_option( 'cff_statuses', array() );
4604
4605 if ( isset( $_GET['cff_ignore_rating_notice_nag'] ) ) {
4606 if ( (int)$_GET['cff_ignore_rating_notice_nag'] === 1 ) {
4607 update_option( 'cff_rating_notice', 'dismissed', false );
4608 $cff_statuses_option['rating_notice_dismissed'] = cff_get_current_time();
4609 update_option( 'cff_statuses', $cff_statuses_option, false );
4610
4611 } elseif ( $_GET['cff_ignore_rating_notice_nag'] === 'later' ) {
4612 set_transient( 'custom_facebook_rating_notice_waiting', 'waiting', 2 * WEEK_IN_SECONDS );
4613 update_option( 'cff_rating_notice', 'pending', false );
4614 }
4615 }
4616
4617 if ( isset( $_GET['cff_ignore_new_user_sale_notice'] ) ) {
4618 $response = sanitize_text_field( $_GET['cff_ignore_new_user_sale_notice'] );
4619 if ( $response === 'always' ) {
4620 update_user_meta( $user_id, 'cff_ignore_new_user_sale_notice', 'always' );
4621
4622 $current_month_number = (int)date('n', cff_get_current_time() );
4623 $not_early_in_the_year = ($current_month_number > 5);
4624
4625 if ( $not_early_in_the_year ) {
4626 update_user_meta( $user_id, 'cff_ignore_bfcm_sale_notice', date( 'Y', cff_get_current_time() ) );
4627 }
4628
4629 }
4630 }
4631
4632 if ( isset( $_GET['cff_ignore_bfcm_sale_notice'] ) ) {
4633 $response = sanitize_text_field( $_GET['cff_ignore_bfcm_sale_notice'] );
4634 if ( $response === 'always' ) {
4635 update_user_meta( $user_id, 'cff_ignore_bfcm_sale_notice', 'always' );
4636 } elseif ( $response === date( 'Y', cff_get_current_time() ) ) {
4637 update_user_meta( $user_id, 'cff_ignore_bfcm_sale_notice', date( 'Y', cff_get_current_time() ) );
4638 }
4639 update_user_meta( $user_id, 'cff_ignore_new_user_sale_notice', 'always' );
4640 }
4641
4642 }
4643 add_action( 'admin_init', 'cff_process_nags' );
4644
4645 function cff_get_future_date( $month, $year, $week, $day, $direction ) {
4646 if ( $direction > 0 ) {
4647 $startday = 1;
4648 } else {
4649 $startday = date( 't', mktime(0, 0, 0, $month, 1, $year ) );
4650 }
4651
4652 $start = mktime( 0, 0, 0, $month, $startday, $year );
4653 $weekday = date( 'N', $start );
4654
4655 $offset = 0;
4656 if ( $direction * $day >= $direction * $weekday ) {
4657 $offset = -$direction * 7;
4658 }
4659
4660 $offset += $direction * ($week * 7) + ($day - $weekday);
4661 return mktime( 0, 0, 0, $month, $startday + $offset, $year );
4662 }
4663
4664 function cff_admin_hide_unrelated_notices() {
4665
4666 // Bail if we're not on a sbi screen or page.
4667 if ( ! isset( $_GET['page'] ) || strpos( $_GET['page'], 'cff') === false ) {
4668 return;
4669 }
4670
4671 // Extra banned classes and callbacks from third-party plugins.
4672 $blacklist = array(
4673 'classes' => array(),
4674 'callbacks' => array(
4675 'cffdb_admin_notice', // 'Database for sbi' plugin.
4676 ),
4677 );
4678
4679 global $wp_filter;
4680
4681 foreach ( array( 'user_admin_notices', 'admin_notices', 'all_admin_notices' ) as $notices_type ) {
4682 if ( empty( $wp_filter[ $notices_type ]->callbacks ) || ! is_array( $wp_filter[ $notices_type ]->callbacks ) ) {
4683 continue;
4684 }
4685 foreach ( $wp_filter[ $notices_type ]->callbacks as $priority => $hooks ) {
4686 foreach ( $hooks as $name => $arr ) {
4687 if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
4688 unset( $wp_filter[ $notices_type ]->callbacks[ $priority ][ $name ] );
4689 continue;
4690 }
4691 $class = ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) ? strtolower( get_class( $arr['function'][0] ) ) : '';
4692 if (
4693 ! empty( $class ) &&
4694 strpos( $class, 'cff' ) !== false &&
4695 ! in_array( $class, $blacklist['classes'], true )
4696 ) {
4697 continue;
4698 }
4699 if (
4700 ! empty( $name ) && (
4701 strpos( $name, 'cff' ) === false ||
4702 in_array( $class, $blacklist['classes'], true ) ||
4703 in_array( $name, $blacklist['callbacks'], true )
4704 )
4705 ) {
4706 unset( $wp_filter[ $notices_type ]->callbacks[ $priority ][ $name ] );
4707 }
4708 }
4709 }
4710 }
4711 }
4712 add_action( 'admin_print_scripts', 'cff_admin_hide_unrelated_notices' );
4713
4714
4715 ?>