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