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