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