PluginProbe ʕ •ᴥ•ʔ
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress / 1.7.0
Smash Balloon Social Post Feed – Simple Social Feeds for WordPress v1.7.0
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 12 years ago img 12 years ago js 12 years ago README.txt 12 years ago custom-facebook-feed-admin.php 12 years ago custom-facebook-feed.php 12 years ago gpl-2.0.txt 13 years ago
custom-facebook-feed-admin.php
2221 lines
1 <?php
2 function cff_menu() {
3 add_menu_page(
4 '',
5 'Facebook Feed',
6 'manage_options',
7 'cff-top',
8 'cff_settings_page'
9 );
10 add_submenu_page(
11 'cff-top',
12 'Settings',
13 'Settings',
14 'manage_options',
15 'cff-top',
16 'cff_settings_page'
17 );
18 }
19 add_action('admin_menu', 'cff_menu');
20 //Add styling page
21 function cff_styling_menu() {
22 add_submenu_page(
23 'cff-top',
24 'Layout & Style',
25 'Layout & Style',
26 'manage_options',
27 'cff-style',
28 'cff_style_page'
29 );
30 }
31 add_action('admin_menu', 'cff_styling_menu');
32 //Create Settings page
33 function cff_settings_page() {
34 //Declare variables for fields
35 $hidden_field_name = 'cff_submit_hidden';
36 $access_token = 'cff_access_token';
37 $page_id = 'cff_page_id';
38 $cff_page_type = 'cff_page_type';
39 $num_show = 'cff_num_show';
40 $cff_post_limit = 'cff_post_limit';
41 $cff_show_others = 'cff_show_others';
42 $cff_cache_time = 'cff_cache_time';
43 $cff_cache_time_unit = 'cff_cache_time_unit';
44 $cff_locale = 'cff_locale';
45 // Read in existing option value from database
46 $access_token_val = get_option( $access_token );
47 $page_id_val = get_option( $page_id );
48 $cff_page_type_val = get_option( $cff_page_type, 'page' );
49 $num_show_val = get_option( $num_show, '5' );
50 $cff_post_limit_val = get_option( $cff_post_limit );
51 $cff_show_others_val = get_option( $cff_show_others );
52 $cff_cache_time_val = get_option( $cff_cache_time, '1' );
53 $cff_cache_time_unit_val = get_option( $cff_cache_time_unit, 'hours' );
54 $cff_locale_val = get_option( $cff_locale, 'en_US' );
55 // See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
56 if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) {
57 // Read their posted value
58 $access_token_val = $_POST[ $access_token ];
59 $page_id_val = $_POST[ $page_id ];
60 $cff_page_type_val = $_POST[ $cff_page_type ];
61 $num_show_val = $_POST[ $num_show ];
62 $cff_post_limit_val = $_POST[ $cff_post_limit ];
63 $cff_show_others_val = $_POST[ $cff_show_others ];
64 $cff_cache_time_val = $_POST[ $cff_cache_time ];
65 $cff_cache_time_unit_val = $_POST[ $cff_cache_time_unit ];
66 $cff_locale_val = $_POST[ $cff_locale ];
67 // Save the posted value in the database
68 update_option( $access_token, $access_token_val );
69 update_option( $page_id, $page_id_val );
70 update_option( $cff_page_type, $cff_page_type_val );
71 update_option( $num_show, $num_show_val );
72 update_option( $cff_post_limit, $cff_post_limit_val );
73 update_option( $cff_show_others, $cff_show_others_val );
74 update_option( $cff_cache_time, $cff_cache_time_val );
75 update_option( $cff_cache_time_unit, $cff_cache_time_unit_val );
76 update_option( $cff_locale, $cff_locale_val );
77
78 //Delete the transient for the main page ID
79 delete_transient( 'cff_posts_json_' .$page_id_val );
80 delete_transient( 'cff_feed_json_' .$page_id_val );
81 delete_transient( 'cff_events_json_' . $page_id_val );
82 //Delete ALL transients
83 global $wpdb;
84 $table_name = $wpdb->prefix . "options";
85 $wpdb->query( "
86 DELETE
87 FROM $table_name
88 WHERE `option_name` LIKE ('%cff\_posts\_json\_%')
89 " );
90 $wpdb->query( "
91 DELETE
92 FROM $table_name
93 WHERE `option_name` LIKE ('%cff\_feed\_json\_%')
94 " );
95 $wpdb->query( "
96 DELETE
97 FROM $table_name
98 WHERE `option_name` LIKE ('%cff\_events\_json\_%')
99 " );
100 // Put an settings updated message on the screen
101 ?>
102 <div class="updated"><p><strong><?php _e('Settings saved.', 'custom-facebook-feed' ); ?></strong></p></div>
103 <?php } ?>
104
105 <div id="cff-admin" class="wrap">
106 <div id="header">
107 <h1><?php _e('Custom Facebook Feed Settings'); ?></h1>
108 </div>
109
110 <form name="form1" method="post" action="">
111 <input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
112 <br />
113 <h3><?php _e('Configuration'); ?></h3>
114 <table class="form-table">
115 <tbody>
116 <tr valign="top">
117 <th scope="row"><?php _e('Access Token'); ?></th>
118 <td>
119 <input name="cff_access_token" id="cff_access_token" type="text" value="<?php esc_attr_e( $access_token_val ); ?>" size="60" />
120 <!--<a href="#" id="verify-token" class="button-secondary"><?php _e('Verify Access Token'); ?></a>-->
121 &nbsp;<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e("How do I get an Access Token?"); ?></a>
122 <br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123|ABC2fvp5h9tJe4-5-AbC123.</i>
123
124 <div class="cff-profile-error cff-access-token">
125 <?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='http://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>Access Token instructions</a> and click '<b>Get my Access Token</b>'.</p>"); ?>
126 </div>
127
128 <div class="cff-tooltip">
129 <?php _e("<p>In order to use the plugin, Facebook requires you to obtain an access token to verify that you're authorized to access their data. Don't worry though, this is really easy to do. Just follow these <a href='http://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>step-by-step instructions</a>.</p><p><b>Already have an App ID and App Secret?</b> Simply paste them into the fields in the last step of the <a href='http://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>Access Token instructions</a> and click '<b>Get my Access Token</b>'.</p>"); ?>
130 </div>
131 </td>
132 </tr>
133 <tr valign="top">
134 <th scope="row"><?php _e('Facebook Page ID (or slug)'); ?><br /><i style="color: #666; font-size: 11px;"><?php _e('(This can usually be found in your <a class="cff-tooltip-link" href="JavaScript:void(0);">Facebook page URL</a>)</i>'); ?></th>
135 <td>
136 <input name="cff_page_id" id="cff_page_id" type="text" value="<?php esc_attr_e( $page_id_val ); ?>" size="60" />
137 &nbsp;<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What\'s my Page ID?'); ?></a>
138 <br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123 or smashballoon</i>
139 <div class="cff-tooltip">
140 <ul>
141 <li><?php _e('If you have a Facebook <b>page</b> with a URL like this: <code>https://www.facebook.com/your_page_name</code> then the Page ID is just <b>your_page_name</b>. If your page URL is structured like this: <code>https://www.facebook.com/pages/your_page_name/123654123654123</code> then the Page ID is actually the number at the end, so in this case <b>123654123654123</b>.</li>'); ?>
142 <li><?php _e('If you have a Facebook <b>group</b> then use <a href="http://lookup-id.com/" target="_blank" title="Find my ID">this tool</a> to find your ID.'); ?></li>
143 <li><?php _e('You can copy and paste your ID into the <a href="http://smashballoon.com/custom-facebook-feed/demo/" target="_blank">demo</a> to test it.'); ?></li>
144 </ul>
145 </div>
146 </td>
147 </tr>
148
149 <tr valign="top" class="cff-page-type">
150 <th scope="row"><?php _e('Is this a page, group or profile?'); ?></th>
151 <td>
152 <select name="cff_page_type">
153 <option value="page" <?php if($cff_page_type_val == "page") echo 'selected="selected"' ?> ><?php _e('Page'); ?></option>
154 <option value="group" <?php if($cff_page_type_val == "group") echo 'selected="selected"' ?> ><?php _e('Group'); ?></option>
155 <option value="profile" <?php if($cff_page_type_val == "profile") echo 'selected="selected"' ?> ><?php _e('Profile'); ?></option>
156 </select>
157 <div class="cff-profile-error cff-page-type">
158 <?php _e("<p>Due to Facebook's privacy policy you're not able to display posts from a personal profile, only from a public page or group.</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>"); ?>
159 </div>
160 </td>
161 </tr>
162
163 <tr valign="top" class="cff-page-options">
164 <th scope="row"><?php _e('Show posts on my page by:'); ?></th>
165 <td>
166 <select name="cff_show_others" id="cff_show_others" style="width: 250px;">
167 <option value="me" <?php if($cff_show_others_val == 'me') echo 'selected="selected"' ?> ><?php _e('Only the page owner (me)'); ?></option>
168 <option value="others" <?php if($cff_show_others_val == 'others' || $cff_show_others_val == 'on') echo 'selected="selected"' ?> ><?php _e('Page owner + other people'); ?></option>
169 <option value="onlyothers" <?php if($cff_show_others_val == 'onlyothers') echo 'selected="selected"' ?> ><?php _e('Only other people'); ?></option>
170 </select>
171
172 <p id="cff-others-only" style="font-size: 12px;"><b>Note:</b> Only displaying posts by other people works by retrieving your posts from Facebook and then filtering out the posts by the page owner. If this option doesn't display many posts then you can retrieve more by setting the post limit option (below) to a higher number.</p>
173
174 </td>
175 </tr>
176
177 <tr valign="top">
178 <th scope="row"><?php _e('Number of posts to display'); ?></th>
179 <td>
180 <input name="cff_num_show" type="text" value="<?php esc_attr_e( $num_show_val ); ?>" size="4" />
181 <i style="color: #666; font-size: 11px;">Eg. 5</i>
182 </td>
183 </tr>
184 <tr valign="top">
185 <th scope="row"><?php _e('Alter the post limit'); ?></th>
186 <td>
187 <input name="cff_post_limit" type="text" value="<?php esc_attr_e( $cff_post_limit_val ); ?>" size="4" />
188 <i style="color: #666; font-size: 11px;">Eg. 50</i> <a class="cff-tooltip-link bump-left" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
189 <p class="cff-tooltip"><?php _e('By default the Facebook API only returns your latest 25 posts. If you would like to retrieve more than 25 posts then you can increase the limit by specifying a higher value here. However, the more posts you request the slower the page load time may be when the plugin needs to check Facebook for new posts. Similarly, if you only intend to retrieve a few posts then you may wish to set a lower post limit here so that you aren\'t retrieving more posts than necessary. It\'s best to set this higher than the actual number of posts you want to display as some posts may be filtered out.'); ?></p>
190 </td>
191 </tr>
192 <tr valign="top">
193 <th scope="row"><?php _e('Check for new Facebook posts every'); ?></th>
194 <td>
195 <input name="cff_cache_time" type="text" value="<?php esc_attr_e( $cff_cache_time_val ); ?>" size="4" />
196 <select name="cff_cache_time_unit">
197 <option value="minutes" <?php if($cff_cache_time_unit_val == "minutes") echo 'selected="selected"' ?> ><?php _e('Minutes'); ?></option>
198 <option value="hours" <?php if($cff_cache_time_unit_val == "hours") echo 'selected="selected"' ?> ><?php _e('Hours'); ?></option>
199 <option value="days" <?php if($cff_cache_time_unit_val == "days") echo 'selected="selected"' ?> ><?php _e('Days'); ?></option>
200 </select>
201 <a class="cff-tooltip-link bump-left" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
202 <p class="cff-tooltip"><?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.'); ?></p>
203 </td>
204 </tr>
205
206 <tr valign="top">
207 <th scope="row"><?php _e('Localization'); ?></th>
208 <td>
209 <select name="cff_locale">
210 <option value="af_ZA" <?php if($cff_locale_val == "af_ZA") echo 'selected="selected"' ?> ><?php _e('Afrikaans'); ?></option>
211 <option value="ar_AR" <?php if($cff_locale_val == "ar_AR") echo 'selected="selected"' ?> ><?php _e('Arabic'); ?></option>
212 <option value="az_AZ" <?php if($cff_locale_val == "az_AZ") echo 'selected="selected"' ?> ><?php _e('Azerbaijani'); ?></option>
213 <option value="be_BY" <?php if($cff_locale_val == "be_BY") echo 'selected="selected"' ?> ><?php _e('Belarusian'); ?></option>
214 <option value="bg_BG" <?php if($cff_locale_val == "bg_BG") echo 'selected="selected"' ?> ><?php _e('Bulgarian'); ?></option>
215 <option value="bn_IN" <?php if($cff_locale_val == "bn_IN") echo 'selected="selected"' ?> ><?php _e('Bengali'); ?></option>
216 <option value="bs_BA" <?php if($cff_locale_val == "bs_BA") echo 'selected="selected"' ?> ><?php _e('Bosnian'); ?></option>
217 <option value="ca_ES" <?php if($cff_locale_val == "ca_ES") echo 'selected="selected"' ?> ><?php _e('Catalan'); ?></option>
218 <option value="cs_CZ" <?php if($cff_locale_val == "cs_CZ") echo 'selected="selected"' ?> ><?php _e('Czech'); ?></option>
219 <option value="cy_GB" <?php if($cff_locale_val == "cy_GB") echo 'selected="selected"' ?> ><?php _e('Welsh'); ?></option>
220 <option value="da_DK" <?php if($cff_locale_val == "da_DK") echo 'selected="selected"' ?> ><?php _e('Danish'); ?></option>
221 <option value="de_DE" <?php if($cff_locale_val == "de_DE") echo 'selected="selected"' ?> ><?php _e('German'); ?></option>
222 <option value="el_GR" <?php if($cff_locale_val == "el_GR") echo 'selected="selected"' ?> ><?php _e('Greek'); ?></option>
223 <option value="en_GB" <?php if($cff_locale_val == "en_GB") echo 'selected="selected"' ?> ><?php _e('English (UK)'); ?></option>
224 <option value="en_PI" <?php if($cff_locale_val == "en_PI") echo 'selected="selected"' ?> ><?php _e('English (Pirate)'); ?></option>
225 <option value="en_UD" <?php if($cff_locale_val == "en_UD") echo 'selected="selected"' ?> ><?php _e('English (Upside Down)'); ?></option>
226 <option value="en_US" <?php if($cff_locale_val == "en_US") echo 'selected="selected"' ?> ><?php _e('English (US)'); ?></option>
227 <option value="eo_EO" <?php if($cff_locale_val == "eo_EO") echo 'selected="selected"' ?> ><?php _e('Esperanto'); ?></option>
228 <option value="es_ES" <?php if($cff_locale_val == "es_ES") echo 'selected="selected"' ?> ><?php _e('Spanish (Spain)'); ?></option>
229 <option value="es_LA" <?php if($cff_locale_val == "es_LA") echo 'selected="selected"' ?> ><?php _e('Spanish'); ?></option>
230 <option value="et_EE" <?php if($cff_locale_val == "et_EE") echo 'selected="selected"' ?> ><?php _e('Estonian'); ?></option>
231 <option value="eu_ES" <?php if($cff_locale_val == "eu_ES") echo 'selected="selected"' ?> ><?php _e('Basque'); ?></option>
232 <option value="fa_IR" <?php if($cff_locale_val == "fa_IR") echo 'selected="selected"' ?> ><?php _e('Persian'); ?></option>
233 <option value="fb_LT" <?php if($cff_locale_val == "fb_LT") echo 'selected="selected"' ?> ><?php _e('Leet Speak'); ?></option>
234 <option value="fi_FI" <?php if($cff_locale_val == "fi_FI") echo 'selected="selected"' ?> ><?php _e('Finnish'); ?></option>
235 <option value="fo_FO" <?php if($cff_locale_val == "fo_FO") echo 'selected="selected"' ?> ><?php _e('Faroese'); ?></option>
236 <option value="fr_CA" <?php if($cff_locale_val == "fr_CA") echo 'selected="selected"' ?> ><?php _e('French (Canada)'); ?></option>
237 <option value="fr_FR" <?php if($cff_locale_val == "fr_FR") echo 'selected="selected"' ?> ><?php _e('French (France)'); ?></option>
238 <option value="fy_NL" <?php if($cff_locale_val == "fy_NL") echo 'selected="selected"' ?> ><?php _e('Frisian'); ?></option>
239 <option value="ga_IE" <?php if($cff_locale_val == "ga_IE") echo 'selected="selected"' ?> ><?php _e('Irish'); ?></option>
240 <option value="gl_ES" <?php if($cff_locale_val == "gl_ES") echo 'selected="selected"' ?> ><?php _e('Galician'); ?></option>
241 <option value="he_IL" <?php if($cff_locale_val == "he_IL") echo 'selected="selected"' ?> ><?php _e('Hebrew'); ?></option>
242 <option value="hi_IN" <?php if($cff_locale_val == "hi_IN") echo 'selected="selected"' ?> ><?php _e('Hindi'); ?></option>
243 <option value="hr_HR" <?php if($cff_locale_val == "hr_HR") echo 'selected="selected"' ?> ><?php _e('Croatian'); ?></option>
244 <option value="hu_HU" <?php if($cff_locale_val == "hu_HU") echo 'selected="selected"' ?> ><?php _e('Hungarian'); ?></option>
245 <option value="hy_AM" <?php if($cff_locale_val == "hy_AM") echo 'selected="selected"' ?> ><?php _e('Armenian'); ?></option>
246 <option value="id_ID" <?php if($cff_locale_val == "id_ID") echo 'selected="selected"' ?> ><?php _e('Indonesian'); ?></option>
247 <option value="is_IS" <?php if($cff_locale_val == "is_IS") echo 'selected="selected"' ?> ><?php _e('Icelandic'); ?></option>
248 <option value="it_IT" <?php if($cff_locale_val == "it_IT") echo 'selected="selected"' ?> ><?php _e('Italian'); ?></option>
249 <option value="ja_JP" <?php if($cff_locale_val == "ja_JP") echo 'selected="selected"' ?> ><?php _e('Japanese'); ?></option>
250 <option value="ka_GE" <?php if($cff_locale_val == "ka_GE") echo 'selected="selected"' ?> ><?php _e('Georgian'); ?></option>
251 <option value="km_KH" <?php if($cff_locale_val == "km_KH") echo 'selected="selected"' ?> ><?php _e('Khmer'); ?></option>
252 <option value="ko_KR" <?php if($cff_locale_val == "ko_KR") echo 'selected="selected"' ?> ><?php _e('Korean'); ?></option>
253 <option value="ku_TR" <?php if($cff_locale_val == "ku_TR") echo 'selected="selected"' ?> ><?php _e('Kurdish'); ?></option>
254 <option value="la_VA" <?php if($cff_locale_val == "la_VA") echo 'selected="selected"' ?> ><?php _e('Latin'); ?></option>
255 <option value="lt_LT" <?php if($cff_locale_val == "lt_LT") echo 'selected="selected"' ?> ><?php _e('Lithuanian'); ?></option>
256 <option value="lv_LV" <?php if($cff_locale_val == "lv_LV") echo 'selected="selected"' ?> ><?php _e('Latvian'); ?></option>
257 <option value="mk_MK" <?php if($cff_locale_val == "mk_MK") echo 'selected="selected"' ?> ><?php _e('Macedonian'); ?></option>
258 <option value="ml_IN" <?php if($cff_locale_val == "ml_IN") echo 'selected="selected"' ?> ><?php _e('Malayalam'); ?></option>
259 <option value="ms_MY" <?php if($cff_locale_val == "ms_MY") echo 'selected="selected"' ?> ><?php _e('Malay'); ?></option>
260 <option value="nb_NO" <?php if($cff_locale_val == "nb_NO") echo 'selected="selected"' ?> ><?php _e('Norwegian (bokmal)'); ?></option>
261 <option value="ne_NP" <?php if($cff_locale_val == "ne_NP") echo 'selected="selected"' ?> ><?php _e('Nepali'); ?></option>
262 <option value="nl_NL" <?php if($cff_locale_val == "nl_NL") echo 'selected="selected"' ?> ><?php _e('Dutch'); ?></option>
263 <option value="nn_NO" <?php if($cff_locale_val == "nn_NO") echo 'selected="selected"' ?> ><?php _e('Norwegian (nynorsk)'); ?></option>
264 <option value="pa_IN" <?php if($cff_locale_val == "pa_IN") echo 'selected="selected"' ?> ><?php _e('Punjabi'); ?></option>
265 <option value="pl_PL" <?php if($cff_locale_val == "pl_PL") echo 'selected="selected"' ?> ><?php _e('Polish'); ?></option>
266 <option value="ps_AF" <?php if($cff_locale_val == "ps_AF") echo 'selected="selected"' ?> ><?php _e('Pashto'); ?></option>
267 <option value="pt_BR" <?php if($cff_locale_val == "pt_BR") echo 'selected="selected"' ?> ><?php _e('Portuguese (Brazil)'); ?></option>
268 <option value="pt_PT" <?php if($cff_locale_val == "pt_PT") echo 'selected="selected"' ?> ><?php _e('Portuguese (Portugal)'); ?></option>
269 <option value="ro_RO" <?php if($cff_locale_val == "ro_RO") echo 'selected="selected"' ?> ><?php _e('Romanian'); ?></option>
270 <option value="ru_RU" <?php if($cff_locale_val == "ru_RU") echo 'selected="selected"' ?> ><?php _e('Russian'); ?></option>
271 <option value="sk_SK" <?php if($cff_locale_val == "sk_SK") echo 'selected="selected"' ?> ><?php _e('Slovak'); ?></option>
272 <option value="sl_SI" <?php if($cff_locale_val == "sl_SI") echo 'selected="selected"' ?> ><?php _e('Slovenian'); ?></option>
273 <option value="sq_AL" <?php if($cff_locale_val == "sq_AL") echo 'selected="selected"' ?> ><?php _e('Albanian'); ?></option>
274 <option value="sr_RS" <?php if($cff_locale_val == "sr_RS") echo 'selected="selected"' ?> ><?php _e('Serbian'); ?></option>
275 <option value="sv_SE" <?php if($cff_locale_val == "sv_SE") echo 'selected="selected"' ?> ><?php _e('Swedish'); ?></option>
276 <option value="sw_KE" <?php if($cff_locale_val == "sw_KE") echo 'selected="selected"' ?> ><?php _e('Swahili'); ?></option>
277 <option value="ta_IN" <?php if($cff_locale_val == "ta_IN") echo 'selected="selected"' ?> ><?php _e('Tamil'); ?></option>
278 <option value="te_IN" <?php if($cff_locale_val == "te_IN") echo 'selected="selected"' ?> ><?php _e('Telugu'); ?></option>
279 <option value="th_TH" <?php if($cff_locale_val == "th_TH") echo 'selected="selected"' ?> ><?php _e('Thai'); ?></option>
280 <option value="tl_PH" <?php if($cff_locale_val == "tl_PH") echo 'selected="selected"' ?> ><?php _e('Filipino'); ?></option>
281 <option value="tr_TR" <?php if($cff_locale_val == "tr_TR") echo 'selected="selected"' ?> ><?php _e('Turkish'); ?></option>
282 <option value="uk_UA" <?php if($cff_locale_val == "uk_UA") echo 'selected="selected"' ?> ><?php _e('Ukrainian'); ?></option>
283 <option value="vi_VN" <?php if($cff_locale_val == "vi_VN") echo 'selected="selected"' ?> ><?php _e('Vietnamese'); ?></option>
284 <option value="zh_CN" <?php if($cff_locale_val == "zh_CN") echo 'selected="selected"' ?> ><?php _e('Simplified Chinese (China)'); ?></option>
285 <option value="zh_HK" <?php if($cff_locale_val == "zh_HK") echo 'selected="selected"' ?> ><?php _e('Traditional Chinese (Hong Kong)'); ?></option>
286 <option value="zh_TW" <?php if($cff_locale_val == "zh_TW") echo 'selected="selected"' ?> ><?php _e('Traditional Chinese (Taiwan)'); ?></option>
287 </select>
288 <i style="color: #666; font-size: 11px;"><?php _e('Select a language'); ?></i>
289 </td>
290 </tr>
291
292 </tbody>
293 </table>
294 <?php submit_button(); ?>
295 </form>
296
297 <p class="admin-notice"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank">Users of this free plugin can now get <b><u>10% off</u></b> The Custom Facebook Feed Pro. Just use the coupon code <b><u>FREEUSER</u></b></a></p>
298
299 <hr />
300 <h3><?php _e('Displaying your Feed'); ?></h3>
301 <p><?php _e('Copy and paste this shortcode directly into the page, post or widget where you\'d like the feed to show up:'); ?></p>
302 <input type="text" value="[custom-facebook-feed]" size="22" readonly="readonly" onclick="this.focus();this.select()" id="system-info-textarea" name="edd-sysinfo" title="<?php _e('To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac).'); ?>" />
303 <hr />
304 <h3><?php _e('Customizing your Feed'); ?></h3>
305 <p><?php _e("Use the <a href='admin.php?page=cff-style'>Layout &amp; Style</a> page to customize your feed. If you're displaying multiple feeds then you can override your settings directly in the shortcode like so:"); ?></p>
306 <p>[custom-facebook-feed <b><span style='color: green;'>id=some-other-page-id num=3 height=500px</span></b>]</p>
307 <p><a href="http://smashballoon.com/custom-facebook-feed/docs/shortcodes/" target="_blank"><?php _e('See a full list of shortcode options'); ?></a></p>
308 <hr />
309 <h3><?php _e('Plugin Support'); ?></h3>
310 <p>Having trouble getting the plugin to work? Try the links below:</p>
311 <ul>
312 <li>- <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/faq/general/" target="_blank">General Questions</a>'); ?></li>
313 <li>- <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/faq/setup/" target="_blank">Setting Up &amp; Displaying your Feed</a>'); ?></li>
314 <li>- <?php _e('<a href="http://smashballoon.com/custom-facebook-feed/faq/troubleshooting/" target="_blank">Troubleshooting &amp; Common Support Questions</a>'); ?></li>
315 </ul>
316
317 <p><?php _e('Still need help? <a href="http://smashballoon.com/custom-facebook-feed/support/" target="_blank">Request support</a>.'); ?></p>
318 <p>Smash Balloon is committed to making this plugin better. Please let us know if you have had any issues when using this plugin so that we can continue to improve it!</p>
319
320 <hr />
321 <a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
322 <hr />
323
324 <h4><?php _e('<u>System Info:</u>'); ?></h4>
325 <p>PHP Version: <b><?php echo PHP_VERSION . "\n"; ?></b></p>
326 <p>Web Server Info: <b><?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?></b></p>
327 <p>PHP allow_url_fopen: <b><?php echo ini_get( 'allow_url_fopen' ) ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>"; ?></b></p>
328 <p>PHP cURL: <b><?php echo is_callable('curl_init') ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
329 <p>JSON: <b><?php echo function_exists("json_decode") ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
330
331 <button class="button secondary-button" id="cff-api-test">Test connection to Facebook API</button>
332
333 <div id="cff-api-test-result">
334 <div class="cff-loader"></div>
335 <textarea readonly="readonly" onclick="this.focus();this.select()" title="To copy, click the field then press Ctrl + C (PC) or Cmd + C (Mac)."></textarea>
336 </div>
337
338
339 <?php
340 } //End Settings_Page
341 //Create Style page
342 function cff_style_page() {
343 //Declare variables for fields
344 $style_hidden_field_name = 'cff_style_submit_hidden';
345 $style_general_hidden_field_name = 'cff_style_general_submit_hidden';
346 $style_post_layout_hidden_field_name = 'cff_style_post_layout_submit_hidden';
347 $style_typography_hidden_field_name = 'cff_style_typography_submit_hidden';
348 $style_misc_hidden_field_name = 'cff_style_misc_submit_hidden';
349 $style_custom_text_hidden_field_name = 'cff_style_custom_text_submit_hidden';
350 $defaults = array(
351 //Post types
352 'cff_show_links_type' => true,
353 'cff_show_event_type' => true,
354 'cff_show_video_type' => true,
355 'cff_show_photos_type' => true,
356 'cff_show_status_type' => true,
357 //Layout
358 'cff_preset_layout' => 'thumb',
359 //Include
360 'cff_show_text' => true,
361 'cff_show_desc' => true,
362 'cff_show_shared_links' => true,
363 'cff_show_date' => true,
364 'cff_show_media' => true,
365 'cff_show_event_title' => true,
366 'cff_show_event_details' => true,
367 'cff_show_meta' => true,
368 'cff_show_link' => true,
369 'cff_show_like_box' => true,
370 //Typography
371 'cff_title_format' => 'p',
372 'cff_title_size' => 'inherit',
373 'cff_title_weight' => 'inherit',
374 'cff_title_color' => '',
375 'cff_body_size' => 'inherit',
376 'cff_body_weight' => 'inherit',
377 'cff_body_color' => '',
378 //Event title
379 'cff_event_title_format' => 'p',
380 'cff_event_title_size' => 'inherit',
381 'cff_event_title_weight' => 'inherit',
382 'cff_event_title_color' => '',
383 //Event date
384 'cff_event_date_size' => 'inherit',
385 'cff_event_date_weight' => 'inherit',
386 'cff_event_date_color' => '',
387 'cff_event_date_position' => 'below',
388 'cff_event_date_formatting' => '1',
389 'cff_event_date_custom' => '',
390 //Event details
391 'cff_event_details_size' => 'inherit',
392 'cff_event_details_weight' => 'inherit',
393 'cff_event_details_color' => '',
394 //Date
395 'cff_date_position' => 'below',
396 'cff_date_size' => 'inherit',
397 'cff_date_weight' => 'inherit',
398 'cff_date_color' => '',
399 'cff_date_formatting' => '1',
400 'cff_date_custom' => '',
401 'cff_date_before' => '',
402 'cff_date_after' => '',
403 'cff_timezone' => 'America/Chicago',
404
405 //Link to Facebook
406 'cff_link_size' => 'inherit',
407 'cff_link_weight' => 'inherit',
408 'cff_link_color' => '',
409 'cff_facebook_link_text' => 'View on Facebook',
410 'cff_view_link_text' => 'View Link',
411 'cff_link_to_timeline' => false,
412 //Meta
413 'cff_icon_style' => 'light',
414 'cff_meta_text_color' => '',
415 'cff_meta_bg_color' => '',
416 'cff_nocomments_text' => 'No comments yet',
417 'cff_hide_comments' => '',
418 //Misc
419 'cff_feed_width' => '',
420 'cff_feed_height' => '',
421 'cff_feed_padding' => '',
422 'cff_like_box_position' => 'bottom',
423 'cff_like_box_outside' => false,
424 'cff_likebox_width' => '300',
425 'cff_like_box_faces' => false,
426 'cff_like_box_border' => false,
427
428 'cff_bg_color' => '',
429 'cff_likebox_bg_color' => '',
430 'cff_like_box_text_color' => 'blue',
431 'cff_video_height' => '',
432 'cff_show_author' => true,
433 'cff_class' => '',
434 'cff_open_links' => true,
435 //New
436 'cff_custom_css' => '',
437 'cff_custom_js' => '',
438 'cff_title_link' => false,
439 'cff_event_title_link' => false,
440 'cff_video_action' => 'file',
441 'cff_sep_color' => '',
442 'cff_sep_size' => '1',
443
444 //Feed Header
445 'cff_show_header' => '',
446 'cff_header_outside' => false,
447 'cff_header_text' => '',
448 'cff_header_bg_color' => '',
449 'cff_header_padding' => '',
450 'cff_header_text_size' => '',
451 'cff_header_text_weight' => '',
452 'cff_header_text_color' => '',
453 'cff_header_icon' => '',
454 'cff_header_icon_color' => '',
455 'cff_header_icon_size' => '28',
456
457 //Translate - general
458 'cff_see_more_text' => 'See More',
459 'cff_see_less_text' => 'See Less',
460 'cff_facebook_link_text' => 'View on Facebook',
461
462 'cff_translate_photos_text' => 'photos',
463
464 //Translate - date
465 'cff_translate_second' => 'second',
466 'cff_translate_seconds' => 'seconds',
467 'cff_translate_minute' => 'minute',
468 'cff_translate_minutes' => 'minutes',
469 'cff_translate_hour' => 'hour',
470 'cff_translate_hours' => 'hours',
471 'cff_translate_day' => 'day',
472 'cff_translate_days' => 'days',
473 'cff_translate_week' => 'week',
474 'cff_translate_weeks' => 'weeks',
475 'cff_translate_month' => 'month',
476 'cff_translate_months' => 'months',
477 'cff_translate_year' => 'year',
478 'cff_translate_years' => 'years',
479 'cff_translate_ago' => 'ago'
480 );
481 //Save layout option in an array
482 $options = wp_parse_args(get_option('cff_style_settings'), $defaults);
483 add_option( 'cff_style_settings', $options );
484
485 //Set the page variables
486 //Post types
487 $cff_show_links_type = $options[ 'cff_show_links_type' ];
488 $cff_show_event_type = $options[ 'cff_show_event_type' ];
489 $cff_show_video_type = $options[ 'cff_show_video_type' ];
490 $cff_show_photos_type = $options[ 'cff_show_photos_type' ];
491 $cff_show_status_type = $options[ 'cff_show_status_type' ];
492 //Layout
493 $cff_preset_layout = $options[ 'cff_preset_layout' ];
494 //Include
495 $cff_show_text = $options[ 'cff_show_text' ];
496 $cff_show_desc = $options[ 'cff_show_desc' ];
497 $cff_show_shared_links = $options[ 'cff_show_shared_links' ];
498 $cff_show_date = $options[ 'cff_show_date' ];
499 $cff_show_media = $options[ 'cff_show_media' ];
500 $cff_show_event_title = $options[ 'cff_show_event_title' ];
501 $cff_show_event_details = $options[ 'cff_show_event_details' ];
502 $cff_show_meta = $options[ 'cff_show_meta' ];
503 $cff_show_link = $options[ 'cff_show_link' ];
504 $cff_show_like_box = $options[ 'cff_show_like_box' ];
505 //Typography
506 $cff_see_more_text = $options[ 'cff_see_more_text' ];
507 $cff_see_less_text = $options[ 'cff_see_less_text' ];
508 $cff_title_format = $options[ 'cff_title_format' ];
509 $cff_title_size = $options[ 'cff_title_size' ];
510 $cff_title_weight = $options[ 'cff_title_weight' ];
511 $cff_title_color = $options[ 'cff_title_color' ];
512 $cff_body_size = $options[ 'cff_body_size' ];
513 $cff_body_weight = $options[ 'cff_body_weight' ];
514 $cff_body_color = $options[ 'cff_body_color' ];
515 //Event title
516 $cff_event_title_format = $options[ 'cff_event_title_format' ];
517 $cff_event_title_size = $options[ 'cff_event_title_size' ];
518 $cff_event_title_weight = $options[ 'cff_event_title_weight' ];
519 $cff_event_title_color = $options[ 'cff_event_title_color' ];
520 //Event date
521 $cff_event_date_size = $options[ 'cff_event_date_size' ];
522 $cff_event_date_weight = $options[ 'cff_event_date_weight' ];
523 $cff_event_date_color = $options[ 'cff_event_date_color' ];
524 $cff_event_date_position = $options[ 'cff_event_date_position' ];
525 $cff_event_date_formatting = $options[ 'cff_event_date_formatting' ];
526 $cff_event_date_custom = $options[ 'cff_event_date_custom' ];
527 //Event details
528 $cff_event_details_size = $options[ 'cff_event_details_size' ];
529 $cff_event_details_weight = $options[ 'cff_event_details_weight' ];
530 $cff_event_details_color = $options[ 'cff_event_details_color' ];
531 //Date
532 $cff_date_position = $options[ 'cff_date_position' ];
533 $cff_date_size = $options[ 'cff_date_size' ];
534 $cff_date_weight = $options[ 'cff_date_weight' ];
535 $cff_date_color = $options[ 'cff_date_color' ];
536 $cff_date_formatting = $options[ 'cff_date_formatting' ];
537 $cff_date_custom = $options[ 'cff_date_custom' ];
538 $cff_date_before = $options[ 'cff_date_before' ];
539 $cff_date_after = $options[ 'cff_date_after' ];
540 $cff_timezone = $options[ 'cff_timezone' ];
541
542 //Date translate
543 $cff_translate_second = $options[ 'cff_translate_second' ];
544 $cff_translate_seconds = $options[ 'cff_translate_seconds' ];
545 $cff_translate_minute = $options[ 'cff_translate_minute' ];
546 $cff_translate_minutes = $options[ 'cff_translate_minutes' ];
547 $cff_translate_hour = $options[ 'cff_translate_hour' ];
548 $cff_translate_hours = $options[ 'cff_translate_hours' ];
549 $cff_translate_day = $options[ 'cff_translate_day' ];
550 $cff_translate_days = $options[ 'cff_translate_days' ];
551 $cff_translate_week = $options[ 'cff_translate_week' ];
552 $cff_translate_weeks = $options[ 'cff_translate_weeks' ];
553 $cff_translate_month = $options[ 'cff_translate_month' ];
554 $cff_translate_months = $options[ 'cff_translate_months' ];
555 $cff_translate_year = $options[ 'cff_translate_year' ];
556 $cff_translate_years = $options[ 'cff_translate_years' ];
557 $cff_translate_ago = $options[ 'cff_translate_ago' ];
558 //Photos translate
559 $cff_translate_photos_text = $options[ 'cff_translate_photos_text' ];
560
561 //View on Facebook link
562 $cff_link_size = $options[ 'cff_link_size' ];
563 $cff_link_weight = $options[ 'cff_link_weight' ];
564 $cff_link_color = $options[ 'cff_link_color' ];
565 $cff_facebook_link_text = $options[ 'cff_facebook_link_text' ];
566 $cff_view_link_text = $options[ 'cff_view_link_text' ];
567 $cff_link_to_timeline = $options[ 'cff_link_to_timeline' ];
568 //Meta
569 $cff_icon_style = $options[ 'cff_icon_style' ];
570 $cff_meta_text_color = $options[ 'cff_meta_text_color' ];
571 $cff_meta_bg_color = $options[ 'cff_meta_bg_color' ];
572 $cff_nocomments_text = $options[ 'cff_nocomments_text' ];
573 $cff_hide_comments = $options[ 'cff_hide_comments' ];
574 //Misc
575 $cff_feed_width = $options[ 'cff_feed_width' ];
576 $cff_feed_height = $options[ 'cff_feed_height' ];
577 $cff_feed_padding = $options[ 'cff_feed_padding' ];
578 $cff_like_box_position = $options[ 'cff_like_box_position' ];
579 $cff_like_box_outside = $options[ 'cff_like_box_outside' ];
580 $cff_likebox_width = $options[ 'cff_likebox_width' ];
581 $cff_like_box_faces = $options[ 'cff_like_box_faces' ];
582 $cff_like_box_border = $options[ 'cff_like_box_border' ];
583
584 $cff_show_media = $options[ 'cff_show_media' ];
585 $cff_bg_color = $options[ 'cff_bg_color' ];
586 $cff_likebox_bg_color = $options[ 'cff_likebox_bg_color' ];
587 $cff_like_box_text_color = $options[ 'cff_like_box_text_color' ];
588 $cff_video_height = $options[ 'cff_video_height' ];
589 $cff_show_author = $options[ 'cff_show_author' ];
590 $cff_class = $options[ 'cff_class' ];
591 $cff_open_links = $options[ 'cff_open_links' ];
592
593 //Page Header
594 $cff_show_header = $options[ 'cff_show_header' ];
595 $cff_header_outside = $options[ 'cff_header_outside' ];
596 $cff_header_text = $options[ 'cff_header_text' ];
597 $cff_header_bg_color = $options[ 'cff_header_bg_color' ];
598 $cff_header_padding = $options[ 'cff_header_padding' ];
599 $cff_header_text_size = $options[ 'cff_header_text_size' ];
600 $cff_header_text_weight = $options[ 'cff_header_text_weight' ];
601 $cff_header_text_color = $options[ 'cff_header_text_color' ];
602 $cff_header_icon = $options[ 'cff_header_icon' ];
603 $cff_header_icon_color = $options[ 'cff_header_icon_color' ];
604 $cff_header_icon_size = $options[ 'cff_header_icon_size' ];
605
606 //New
607 $cff_custom_css = $options[ 'cff_custom_css' ];
608 $cff_custom_js = $options[ 'cff_custom_js' ];
609 $cff_title_link = $options[ 'cff_title_link' ];
610 $cff_event_title_link = $options[ 'cff_event_title_link' ];
611 $cff_video_action = $options[ 'cff_video_action' ];
612 $cff_sep_color = $options[ 'cff_sep_color' ];
613 $cff_sep_size = $options[ 'cff_sep_size' ];
614
615 // Texts lengths
616 $cff_title_length = 'cff_title_length';
617 $cff_body_length = 'cff_body_length';
618 // Read in existing option value from database
619 $cff_title_length_val = get_option( $cff_title_length );
620 $cff_body_length_val = get_option( $cff_body_length );
621 // See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
622 if( isset($_POST[ $style_hidden_field_name ]) && $_POST[ $style_hidden_field_name ] == 'Y' ) {
623 //Update the General options
624 if( isset($_POST[ $style_general_hidden_field_name ]) && $_POST[ $style_general_hidden_field_name ] == 'Y' ) {
625 //General
626 if (isset($_POST[ 'cff_feed_width' ]) ) $cff_feed_width = $_POST[ 'cff_feed_width' ];
627 if (isset($_POST[ 'cff_feed_height' ]) ) $cff_feed_height = $_POST[ 'cff_feed_height' ];
628 if (isset($_POST[ 'cff_feed_padding' ]) ) $cff_feed_padding = $_POST[ 'cff_feed_padding' ];
629 if (isset($_POST[ 'cff_bg_color' ]) ) $cff_bg_color = $_POST[ 'cff_bg_color' ];
630 (isset($_POST[ 'cff_show_author' ]) ) ? $cff_show_author = $_POST[ 'cff_show_author' ] : $cff_show_author = '';
631 if (isset($_POST[ 'cff_class' ]) ) $cff_class = $_POST[ 'cff_class' ];
632 //Post types
633 if (isset($_POST[ 'cff_show_links_type' ]) ) $cff_show_links_type = $_POST[ 'cff_show_links_type' ];
634 if (isset($_POST[ 'cff_show_event_type' ]) ) $cff_show_event_type = $_POST[ 'cff_show_event_type' ];
635 if (isset($_POST[ 'cff_show_video_type' ]) ) $cff_show_video_type = $_POST[ 'cff_show_video_type' ];
636 if (isset($_POST[ 'cff_show_photos_type' ]) ) $cff_show_photos_type = $_POST[ 'cff_show_photos_type' ];
637 if (isset($_POST[ 'cff_show_status_type' ]) ) $cff_show_status_type = $_POST[ 'cff_show_status_type' ];
638 //General
639 $options[ 'cff_feed_width' ] = $cff_feed_width;
640 $options[ 'cff_feed_height' ] = $cff_feed_height;
641 $options[ 'cff_feed_padding' ] = $cff_feed_padding;
642 $options[ 'cff_bg_color' ] = $cff_bg_color;
643 $options[ 'cff_show_author' ] = $cff_show_author;
644 $options[ 'cff_class' ] = $cff_class;
645 //Post types
646 $options[ 'cff_show_links_type' ] = $cff_show_links_type;
647 $options[ 'cff_show_event_type' ] = $cff_show_event_type;
648 $options[ 'cff_show_video_type' ] = $cff_show_video_type;
649 $options[ 'cff_show_photos_type' ] = $cff_show_photos_type;
650 $options[ 'cff_show_status_type' ] = $cff_show_status_type;
651 }
652 //Update the Post Layout options
653 if( isset($_POST[ $style_post_layout_hidden_field_name ]) && $_POST[ $style_post_layout_hidden_field_name ] == 'Y' ) {
654 //Layout
655 if (isset($_POST[ 'cff_preset_layout' ]) ) $cff_preset_layout = $_POST[ 'cff_preset_layout' ];
656 //Include
657 (isset($_POST[ 'cff_show_text' ]) ) ? $cff_show_text = $_POST[ 'cff_show_text' ] : $cff_show_text = '';
658 (isset($_POST[ 'cff_show_desc' ]) ) ? $cff_show_desc = $_POST[ 'cff_show_desc' ] : $cff_show_desc = '';
659 (isset($_POST[ 'cff_show_shared_links' ]) ) ? $cff_show_shared_links = $_POST[ 'cff_show_shared_links' ] : $cff_show_shared_links = '';
660 (isset($_POST[ 'cff_show_date' ]) ) ? $cff_show_date = $_POST[ 'cff_show_date' ] : $cff_show_date = '';
661 (isset($_POST[ 'cff_show_media' ]) ) ? $cff_show_media = $_POST[ 'cff_show_media' ] : $cff_show_media = '';
662 (isset($_POST[ 'cff_show_event_title' ]) ) ? $cff_show_event_title = $_POST[ 'cff_show_event_title' ] : $cff_show_event_title = '';
663 (isset($_POST[ 'cff_show_event_details' ]) ) ? $cff_show_event_details = $_POST[ 'cff_show_event_details' ] : $cff_show_event_details = '';
664 (isset($_POST[ 'cff_show_meta' ]) ) ? $cff_show_meta = $_POST[ 'cff_show_meta' ] : $cff_show_meta = '';
665 (isset($_POST[ 'cff_show_link' ]) ) ? $cff_show_link = $_POST[ 'cff_show_link' ] : $cff_show_link = '';
666 //Layout
667 $options[ 'cff_preset_layout' ] = $cff_preset_layout;
668 //Include
669 $options[ 'cff_show_text' ] = $cff_show_text;
670 $options[ 'cff_show_desc' ] = $cff_show_desc;
671 $options[ 'cff_show_shared_links' ] = $cff_show_shared_links;
672 $options[ 'cff_show_date' ] = $cff_show_date;
673 $options[ 'cff_show_media' ] = $cff_show_media;
674 $options[ 'cff_show_event_title' ] = $cff_show_event_title;
675 $options[ 'cff_show_event_details' ] = $cff_show_event_details;
676 $options[ 'cff_show_meta' ] = $cff_show_meta;
677 $options[ 'cff_show_link' ] = $cff_show_link;
678 }
679 //Update the Typography options
680 if( isset($_POST[ $style_typography_hidden_field_name ]) && $_POST[ $style_typography_hidden_field_name ] == 'Y' ) {
681 //Character limits
682 if (isset($_POST[ 'cff_title_length' ]) ) $cff_title_length_val = $_POST[ $cff_title_length ];
683 if (isset($_POST[ 'cff_body_length' ]) ) $cff_body_length_val = $_POST[ $cff_body_length ];
684 //Typography
685 if (isset($_POST[ 'cff_title_format' ]) ) $cff_title_format = $_POST[ 'cff_title_format' ];
686 if (isset($_POST[ 'cff_title_size' ]) ) $cff_title_size = $_POST[ 'cff_title_size' ];
687 if (isset($_POST[ 'cff_title_weight' ]) ) $cff_title_weight = $_POST[ 'cff_title_weight' ];
688 if (isset($_POST[ 'cff_title_color' ]) ) $cff_title_color = $_POST[ 'cff_title_color' ];
689 (isset($_POST[ 'cff_title_link' ]) ) ? $cff_title_link = $_POST[ 'cff_title_link' ] : $cff_title_link = '';
690 $cff_body_size = $_POST[ 'cff_body_size' ];
691 if (isset($_POST[ 'cff_body_weight' ]) ) $cff_body_weight = $_POST[ 'cff_body_weight' ];
692 if (isset($_POST[ 'cff_body_color' ]) ) $cff_body_color = $_POST[ 'cff_body_color' ];
693 //Event title
694 if (isset($_POST[ 'cff_event_title_format' ]) ) $cff_event_title_format = $_POST[ 'cff_event_title_format' ];
695 if (isset($_POST[ 'cff_event_title_size' ]) ) $cff_event_title_size = $_POST[ 'cff_event_title_size' ];
696 if (isset($_POST[ 'cff_event_title_weight' ]) ) $cff_event_title_weight = $_POST[ 'cff_event_title_weight' ];
697 if (isset($_POST[ 'cff_event_title_color' ]) ) $cff_event_title_color = $_POST[ 'cff_event_title_color' ];
698 (isset($_POST[ 'cff_event_title_link' ]) ) ? $cff_event_title_link = $_POST[ 'cff_event_title_link' ] : $cff_event_title_link = '';
699 //Event date
700 if (isset($_POST[ 'cff_event_date_size' ]) ) $cff_event_date_size = $_POST[ 'cff_event_date_size' ];
701 if (isset($_POST[ 'cff_event_date_weight' ]) ) $cff_event_date_weight = $_POST[ 'cff_event_date_weight' ];
702 if (isset($_POST[ 'cff_event_date_color' ]) ) $cff_event_date_color = $_POST[ 'cff_event_date_color' ];
703 if (isset($_POST[ 'cff_event_date_position' ]) ) $cff_event_date_position = $_POST[ 'cff_event_date_position' ];
704 if (isset($_POST[ 'cff_event_date_formatting' ]) ) $cff_event_date_formatting = $_POST[ 'cff_event_date_formatting' ];
705 if (isset($_POST[ 'cff_event_date_custom' ]) ) $cff_event_date_custom = $_POST[ 'cff_event_date_custom' ];
706 //Event details
707 if (isset($_POST[ 'cff_event_details_size' ]) ) $cff_event_details_size = $_POST[ 'cff_event_details_size' ];
708 if (isset($_POST[ 'cff_event_details_weight' ]) ) $cff_event_details_weight = $_POST[ 'cff_event_details_weight' ];
709 if (isset($_POST[ 'cff_event_details_color' ]) ) $cff_event_details_color = $_POST[ 'cff_event_details_color' ];
710 //Date
711 if (isset($_POST[ 'cff_date_position' ]) ) $cff_date_position = $_POST[ 'cff_date_position' ];
712 if (isset($_POST[ 'cff_date_size' ]) ) $cff_date_size = $_POST[ 'cff_date_size' ];
713 if (isset($_POST[ 'cff_date_weight' ]) ) $cff_date_weight = $_POST[ 'cff_date_weight' ];
714 if (isset($_POST[ 'cff_date_color' ]) ) $cff_date_color = $_POST[ 'cff_date_color' ];
715 if (isset($_POST[ 'cff_date_formatting' ]) ) $cff_date_formatting = $_POST[ 'cff_date_formatting' ];
716 if (isset($_POST[ 'cff_date_custom' ]) ) $cff_date_custom = $_POST[ 'cff_date_custom' ];
717 if (isset($_POST[ 'cff_date_before' ]) ) $cff_date_before = $_POST[ 'cff_date_before' ];
718 if (isset($_POST[ 'cff_date_after' ]) ) $cff_date_after = $_POST[ 'cff_date_after' ];
719 if (isset($_POST[ 'cff_timezone' ]) ) $cff_timezone = $_POST[ 'cff_timezone' ];
720
721 //Date translate
722 if (isset($_POST[ 'cff_translate_second' ]) ) $cff_translate_second = $_POST[ 'cff_translate_second' ];
723 if (isset($_POST[ 'cff_translate_seconds' ]) ) $cff_translate_seconds = $_POST[ 'cff_translate_seconds' ];
724 if (isset($_POST[ 'cff_translate_minute' ]) ) $cff_translate_minute = $_POST[ 'cff_translate_minute' ];
725 if (isset($_POST[ 'cff_translate_minutes' ]) ) $cff_translate_minutes = $_POST[ 'cff_translate_minutes' ];
726 if (isset($_POST[ 'cff_translate_hour' ]) ) $cff_translate_hour = $_POST[ 'cff_translate_hour' ];
727 if (isset($_POST[ 'cff_translate_hours' ]) ) $cff_translate_hours = $_POST[ 'cff_translate_hours' ];
728 if (isset($_POST[ 'cff_translate_day' ]) ) $cff_translate_day = $_POST[ 'cff_translate_day' ];
729 if (isset($_POST[ 'cff_translate_days' ]) ) $cff_translate_days = $_POST[ 'cff_translate_days' ];
730 if (isset($_POST[ 'cff_translate_week' ]) ) $cff_translate_week = $_POST[ 'cff_translate_week' ];
731 if (isset($_POST[ 'cff_translate_weeks' ]) ) $cff_translate_weeks = $_POST[ 'cff_translate_weeks' ];
732 if (isset($_POST[ 'cff_translate_month' ]) ) $cff_translate_month = $_POST[ 'cff_translate_month' ];
733 if (isset($_POST[ 'cff_translate_months' ]) ) $cff_translate_months = $_POST[ 'cff_translate_months' ];
734 if (isset($_POST[ 'cff_translate_year' ]) ) $cff_translate_year = $_POST[ 'cff_translate_year' ];
735 if (isset($_POST[ 'cff_translate_years' ]) ) $cff_translate_years = $_POST[ 'cff_translate_years' ];
736 if (isset($_POST[ 'cff_translate_ago' ]) ) $cff_translate_ago = $_POST[ 'cff_translate_ago' ];
737
738 //View on Facebook link
739 if (isset($_POST[ 'cff_link_size' ]) ) $cff_link_size = $_POST[ 'cff_link_size' ];
740 if (isset($_POST[ 'cff_link_weight' ]) ) $cff_link_weight = $_POST[ 'cff_link_weight' ];
741 if (isset($_POST[ 'cff_link_color' ]) ) $cff_link_color = $_POST[ 'cff_link_color' ];
742 if (isset($_POST[ 'cff_facebook_link_text' ]) ) $cff_facebook_link_text = $_POST[ 'cff_facebook_link_text' ];
743 if (isset($_POST[ 'cff_view_link_text' ]) ) $cff_view_link_text = $_POST[ 'cff_view_link_text' ];
744 if (isset($_POST[ 'cff_link_to_timeline' ]) ) $cff_link_to_timeline = $_POST[ 'cff_link_to_timeline' ];
745 //Character limits
746 update_option( $cff_title_length, $cff_title_length_val );
747 update_option( $cff_body_length, $cff_body_length_val );
748 //Typography
749 $options[ 'cff_title_format' ] = $cff_title_format;
750 $options[ 'cff_title_size' ] = $cff_title_size;
751 $options[ 'cff_title_weight' ] = $cff_title_weight;
752 $options[ 'cff_title_color' ] = $cff_title_color;
753 $options[ 'cff_title_link' ] = $cff_title_link;
754 $options[ 'cff_body_size' ] = $cff_body_size;
755 $options[ 'cff_body_weight' ] = $cff_body_weight;
756 $options[ 'cff_body_color' ] = $cff_body_color;
757 //Event title
758 $options[ 'cff_event_title_format' ] = $cff_event_title_format;
759 $options[ 'cff_event_title_size' ] = $cff_event_title_size;
760 $options[ 'cff_event_title_weight' ] = $cff_event_title_weight;
761 $options[ 'cff_event_title_color' ] = $cff_event_title_color;
762 $options[ 'cff_event_title_link' ] = $cff_event_title_link;
763 //Event date
764 $options[ 'cff_event_date_size' ] = $cff_event_date_size;
765 $options[ 'cff_event_date_weight' ] = $cff_event_date_weight;
766 $options[ 'cff_event_date_color' ] = $cff_event_date_color;
767 $options[ 'cff_event_date_position' ] = $cff_event_date_position;
768 $options[ 'cff_event_date_formatting' ] = $cff_event_date_formatting;
769 $options[ 'cff_event_date_custom' ] = $cff_event_date_custom;
770 //Event details
771 $options[ 'cff_event_details_size' ] = $cff_event_details_size;
772 $options[ 'cff_event_details_weight' ] = $cff_event_details_weight;
773 $options[ 'cff_event_details_color' ] = $cff_event_details_color;
774 //Date
775 $options[ 'cff_date_position' ] = $cff_date_position;
776 $options[ 'cff_date_size' ] = $cff_date_size;
777 $options[ 'cff_date_weight' ] = $cff_date_weight;
778 $options[ 'cff_date_color' ] = $cff_date_color;
779 $options[ 'cff_date_formatting' ] = $cff_date_formatting;
780 $options[ 'cff_date_custom' ] = $cff_date_custom;
781 $options[ 'cff_date_before' ] = $cff_date_before;
782 $options[ 'cff_date_after' ] = $cff_date_after;
783 $options[ 'cff_timezone' ] = $cff_timezone;
784
785 //Date translate
786 $options[ 'cff_translate_second' ] = $cff_translate_second;
787 $options[ 'cff_translate_seconds' ] = $cff_translate_seconds;
788 $options[ 'cff_translate_minute' ] = $cff_translate_minute;
789 $options[ 'cff_translate_minutes' ] = $cff_translate_minutes;
790 $options[ 'cff_translate_hour' ] = $cff_translate_hour;
791 $options[ 'cff_translate_hours' ] = $cff_translate_hours;
792 $options[ 'cff_translate_day' ] = $cff_translate_day;
793 $options[ 'cff_translate_days' ] = $cff_translate_days;
794 $options[ 'cff_translate_week' ] = $cff_translate_week;
795 $options[ 'cff_translate_weeks' ] = $cff_translate_weeks;
796 $options[ 'cff_translate_month' ] = $cff_translate_month;
797 $options[ 'cff_translate_months' ] = $cff_translate_months;
798 $options[ 'cff_translate_year' ] = $cff_translate_year;
799 $options[ 'cff_translate_years' ] = $cff_translate_years;
800 $options[ 'cff_translate_ago' ] = $cff_translate_ago;
801
802 //View on Facebook link
803 $options[ 'cff_link_size' ] = $cff_link_size;
804 $options[ 'cff_link_weight' ] = $cff_link_weight;
805 $options[ 'cff_link_color' ] = $cff_link_color;
806 $options[ 'cff_facebook_link_text' ] = $cff_facebook_link_text;
807 $options[ 'cff_view_link_text' ] = $cff_view_link_text;
808 $options[ 'cff_link_to_timeline' ] = $cff_link_to_timeline;
809 }
810 //Update the Misc options
811 if( isset($_POST[ $style_misc_hidden_field_name ]) && $_POST[ $style_misc_hidden_field_name ] == 'Y' ) {
812 //Meta
813 if (isset($_POST[ 'cff_icon_style' ])) $cff_icon_style = $_POST[ 'cff_icon_style' ];
814 if (isset($_POST[ 'cff_meta_text_color' ])) $cff_meta_text_color = $_POST[ 'cff_meta_text_color' ];
815 if (isset($_POST[ 'cff_meta_bg_color' ])) $cff_meta_bg_color = $_POST[ 'cff_meta_bg_color' ];
816 if (isset($_POST[ 'cff_nocomments_text' ])) $cff_nocomments_text = $_POST[ 'cff_nocomments_text' ];
817 if (isset($_POST[ 'cff_hide_comments' ])) $cff_hide_comments = $_POST[ 'cff_hide_comments' ];
818 //Custom CSS
819 if (isset($_POST[ 'cff_custom_css' ])) $cff_custom_css = $_POST[ 'cff_custom_css' ];
820 if (isset($_POST[ 'cff_custom_js' ])) $cff_custom_js = $_POST[ 'cff_custom_js' ];
821 //Misc
822 (isset($_POST[ 'cff_show_like_box' ])) ? $cff_show_like_box = $_POST[ 'cff_show_like_box' ] : $cff_show_like_box = '';
823 if (isset($_POST[ 'cff_like_box_position' ])) $cff_like_box_position = $_POST[ 'cff_like_box_position' ];
824 (isset($_POST[ 'cff_like_box_outside' ])) ? $cff_like_box_outside = $_POST[ 'cff_like_box_outside' ] : $cff_like_box_outside = '';
825 if (isset($_POST[ 'cff_likebox_bg_color' ])) $cff_likebox_bg_color = $_POST[ 'cff_likebox_bg_color' ];
826 if (isset($_POST[ 'cff_like_box_text_color' ])) $cff_like_box_text_color = $_POST[ 'cff_like_box_text_color' ];
827
828 if (isset($_POST[ 'cff_likebox_width' ])) $cff_likebox_width = $_POST[ 'cff_likebox_width' ];
829 (isset($_POST[ 'cff_like_box_faces' ])) ? $cff_like_box_faces = $_POST[ 'cff_like_box_faces' ] : $cff_like_box_faces = '';
830 (isset($_POST[ 'cff_like_box_border' ])) ? $cff_like_box_border = $_POST[ 'cff_like_box_border' ] : $cff_like_box_border = '';
831
832 //Page Header
833 (isset($_POST[ 'cff_show_header' ])) ? $cff_show_header = $_POST[ 'cff_show_header' ] : $cff_show_header = '';
834 (isset($_POST[ 'cff_header_outside' ])) ? $cff_header_outside = $_POST[ 'cff_header_outside' ] : $cff_header_outside = '';
835 if (isset($_POST[ 'cff_header_text' ])) $cff_header_text = $_POST[ 'cff_header_text' ];
836 if (isset($_POST[ 'cff_header_bg_color' ])) $cff_header_bg_color = $_POST[ 'cff_header_bg_color' ];
837 if (isset($_POST[ 'cff_header_padding' ])) $cff_header_padding = $_POST[ 'cff_header_padding' ];
838 if (isset($_POST[ 'cff_header_text_size' ])) $cff_header_text_size = $_POST[ 'cff_header_text_size' ];
839 if (isset($_POST[ 'cff_header_text_weight' ])) $cff_header_text_weight = $_POST[ 'cff_header_text_weight' ];
840 if (isset($_POST[ 'cff_header_text_color' ])) $cff_header_text_color = $_POST[ 'cff_header_text_color' ];
841 if (isset($_POST[ 'cff_header_icon' ])) $cff_header_icon = $_POST[ 'cff_header_icon' ];
842 if (isset($_POST[ 'cff_header_icon_color' ])) $cff_header_icon_color = $_POST[ 'cff_header_icon_color' ];
843 if (isset($_POST[ 'cff_header_icon_size' ])) $cff_header_icon_size = $_POST[ 'cff_header_icon_size' ];
844
845 if (isset($_POST[ 'cff_video_height' ])) $cff_video_height = $_POST[ 'cff_video_height' ];
846 if (isset($_POST[ 'cff_video_action' ])) $cff_video_action = $_POST[ 'cff_video_action' ];
847 if (isset($_POST[ 'cff_sep_color' ])) $cff_sep_color = $_POST[ 'cff_sep_color' ];
848 if (isset($_POST[ 'cff_sep_size' ])) $cff_sep_size = $_POST[ 'cff_sep_size' ];
849 if (isset($_POST[ 'cff_open_links' ])) $cff_open_links = $_POST[ 'cff_open_links' ];
850 //Meta
851 $options[ 'cff_icon_style' ] = $cff_icon_style;
852 $options[ 'cff_meta_text_color' ] = $cff_meta_text_color;
853 $options[ 'cff_meta_bg_color' ] = $cff_meta_bg_color;
854 $options[ 'cff_nocomments_text' ] = $cff_nocomments_text;
855 $options[ 'cff_hide_comments' ] = $cff_hide_comments;
856 //Custom CSS
857 $options[ 'cff_custom_css' ] = $cff_custom_css;
858 $options[ 'cff_custom_js' ] = $cff_custom_js;
859 //Misc
860 $options[ 'cff_show_like_box' ] = $cff_show_like_box;
861 $options[ 'cff_like_box_position' ] = $cff_like_box_position;
862 $options[ 'cff_like_box_outside' ] = $cff_like_box_outside;
863 $options[ 'cff_likebox_bg_color' ] = $cff_likebox_bg_color;
864 $options[ 'cff_like_box_text_color' ] = $cff_like_box_text_color;
865
866 $options[ 'cff_likebox_width' ] = $cff_likebox_width;
867 $options[ 'cff_like_box_faces' ] = $cff_like_box_faces;
868 $options[ 'cff_like_box_border' ] = $cff_like_box_border;
869
870 //Page Header
871 $options[ 'cff_show_header' ] = $cff_show_header;
872 $options[ 'cff_header_outside' ] = $cff_header_outside;
873 $options[ 'cff_header_text' ] = $cff_header_text;
874 $options[ 'cff_header_bg_color' ] = $cff_header_bg_color;
875 $options[ 'cff_header_padding' ] = $cff_header_padding;
876 $options[ 'cff_header_text_size' ] = $cff_header_text_size;
877 $options[ 'cff_header_text_weight' ] = $cff_header_text_weight;
878 $options[ 'cff_header_text_color' ] = $cff_header_text_color;
879 $options[ 'cff_header_icon' ] = $cff_header_icon;
880 $options[ 'cff_header_icon_color' ] = $cff_header_icon_color;
881 $options[ 'cff_header_icon_size' ] = $cff_header_icon_size;
882
883 $options[ 'cff_video_height' ] = $cff_video_height;
884 $options[ 'cff_video_action' ] = $cff_video_action;
885 $options[ 'cff_sep_color' ] = $cff_sep_color;
886 $options[ 'cff_sep_size' ] = $cff_sep_size;
887 $options[ 'cff_open_links' ] = $cff_open_links;
888 }
889 //Update the Custom Text / Translate options
890 if( isset($_POST[ $style_custom_text_hidden_field_name ]) && $_POST[ $style_custom_text_hidden_field_name ] == 'Y' ) {
891
892 //Translate
893 if (isset($_POST[ 'cff_see_more_text' ])) $cff_see_more_text = $_POST[ 'cff_see_more_text' ];
894 if (isset($_POST[ 'cff_see_less_text' ])) $cff_see_less_text = $_POST[ 'cff_see_less_text' ];
895 if (isset($_POST[ 'cff_facebook_link_text' ])) $cff_facebook_link_text = $_POST[ 'cff_facebook_link_text' ];
896
897 //Social translate
898 if (isset($_POST[ 'cff_translate_photos_text' ])) $cff_translate_photos_text = $_POST[ 'cff_translate_photos_text' ];
899
900 //Date translate
901 if (isset($_POST[ 'cff_translate_second' ])) $cff_translate_second = $_POST[ 'cff_translate_second' ];
902 if (isset($_POST[ 'cff_translate_seconds' ])) $cff_translate_seconds = $_POST[ 'cff_translate_seconds' ];
903 if (isset($_POST[ 'cff_translate_minute' ])) $cff_translate_minute = $_POST[ 'cff_translate_minute' ];
904 if (isset($_POST[ 'cff_translate_minutes' ])) $cff_translate_minutes = $_POST[ 'cff_translate_minutes' ];
905 if (isset($_POST[ 'cff_translate_hour' ])) $cff_translate_hour = $_POST[ 'cff_translate_hour' ];
906 if (isset($_POST[ 'cff_translate_hours' ])) $cff_translate_hours = $_POST[ 'cff_translate_hours' ];
907 if (isset($_POST[ 'cff_translate_day' ])) $cff_translate_day = $_POST[ 'cff_translate_day' ];
908 if (isset($_POST[ 'cff_translate_days' ])) $cff_translate_days = $_POST[ 'cff_translate_days' ];
909 if (isset($_POST[ 'cff_translate_week' ])) $cff_translate_week = $_POST[ 'cff_translate_week' ];
910 if (isset($_POST[ 'cff_translate_weeks' ])) $cff_translate_weeks = $_POST[ 'cff_translate_weeks' ];
911 if (isset($_POST[ 'cff_translate_month' ])) $cff_translate_month = $_POST[ 'cff_translate_month' ];
912 if (isset($_POST[ 'cff_translate_months' ])) $cff_translate_months = $_POST[ 'cff_translate_months' ];
913 if (isset($_POST[ 'cff_translate_year' ])) $cff_translate_year = $_POST[ 'cff_translate_year' ];
914 if (isset($_POST[ 'cff_translate_years' ])) $cff_translate_years = $_POST[ 'cff_translate_years' ];
915 if (isset($_POST[ 'cff_translate_ago' ])) $cff_translate_ago = $_POST[ 'cff_translate_ago' ];
916
917 //Translate
918 $options[ 'cff_see_more_text' ] = $cff_see_more_text;
919 $options[ 'cff_see_less_text' ] = $cff_see_less_text;
920 $options[ 'cff_facebook_link_text' ] = $cff_facebook_link_text;
921 //Social translate
922 $options[ 'cff_translate_photos_text' ] = $cff_translate_photos_text;
923
924 //Date translate
925 $options[ 'cff_translate_second' ] = $cff_translate_second;
926 $options[ 'cff_translate_seconds' ] = $cff_translate_seconds;
927 $options[ 'cff_translate_minute' ] = $cff_translate_minute;
928 $options[ 'cff_translate_minutes' ] = $cff_translate_minutes;
929 $options[ 'cff_translate_hour' ] = $cff_translate_hour;
930 $options[ 'cff_translate_hours' ] = $cff_translate_hours;
931 $options[ 'cff_translate_day' ] = $cff_translate_day;
932 $options[ 'cff_translate_days' ] = $cff_translate_days;
933 $options[ 'cff_translate_week' ] = $cff_translate_week;
934 $options[ 'cff_translate_weeks' ] = $cff_translate_weeks;
935 $options[ 'cff_translate_month' ] = $cff_translate_month;
936 $options[ 'cff_translate_months' ] = $cff_translate_months;
937 $options[ 'cff_translate_year' ] = $cff_translate_year;
938 $options[ 'cff_translate_years' ] = $cff_translate_years;
939 $options[ 'cff_translate_ago' ] = $cff_translate_ago;
940
941 }
942 //Update the array
943 update_option( 'cff_style_settings', $options );
944 // Put an settings updated message on the screen
945 ?>
946 <div class="updated"><p><strong><?php _e('Settings saved.', 'custom-facebook-feed' ); ?></strong></p></div>
947 <?php } ?>
948
949 <div id="cff-admin" class="wrap">
950 <div id="header">
951 <h1><?php _e('Layout & Style'); ?></h1>
952 </div>
953 <form name="form1" method="post" action="">
954 <input type="hidden" name="<?php echo $style_hidden_field_name; ?>" value="Y">
955 <?php
956 $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general';
957 ?>
958 <h2 class="nav-tab-wrapper">
959 <a href="?page=cff-style&tab=general" class="nav-tab <?php echo $active_tab == 'general' ? 'nav-tab-active' : ''; ?>"><?php _e('General'); ?></a>
960 <a href="?page=cff-style&tab=post_layout" class="nav-tab <?php echo $active_tab == 'post_layout' ? 'nav-tab-active' : ''; ?>"><?php _e('Post Layout'); ?></a>
961 <a href="?page=cff-style&tab=typography" class="nav-tab <?php echo $active_tab == 'typography' ? 'nav-tab-active' : ''; ?>"><?php _e('Typography'); ?></a>
962 <a href="?page=cff-style&tab=misc" class="nav-tab <?php echo $active_tab == 'misc' ? 'nav-tab-active' : ''; ?>"><?php _e('Misc'); ?></a>
963 <a href="?page=cff-style&tab=custom_text" class="nav-tab <?php echo $active_tab == 'custom_text' ? 'nav-tab-active' : ''; ?>"><?php _e('Custom Text / Translate'); ?></a>
964 </h2>
965 <?php if( $active_tab == 'general' ) { //Start General tab ?>
966 <input type="hidden" name="<?php echo $style_general_hidden_field_name; ?>" value="Y">
967 <br />
968 <table class="form-table">
969 <tbody>
970 <h3><?php _e('General'); ?></h3>
971 <tr valign="top">
972 <th class="bump-left" scope="row"><label><?php _e('Feed Width'); ?></label></th>
973 <td>
974 <input name="cff_feed_width" type="text" value="<?php esc_attr_e( $cff_feed_width ); ?>" size="6" />
975 <span>Eg. 500px, 50%, 10em. <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Default is 100%'); ?></i></span>
976 </td>
977 </tr>
978 <tr valign="top">
979 <th class="bump-left" scope="row"><label><?php _e('Feed Height'); ?></label></th>
980 <td>
981 <input name="cff_feed_height" type="text" value="<?php esc_attr_e( $cff_feed_height ); ?>" size="6" />
982 <span>Eg. 500px, 50em. <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Leave empty to set no maximum height. If the feed exceeds this height then a scroll bar will be used.'); ?></i></span>
983 </td>
984 </tr>
985 <th class="bump-left" scope="row"><label><?php _e('Feed Padding'); ?></label></th>
986 <td>
987 <input name="cff_feed_padding" type="text" value="<?php esc_attr_e( $cff_feed_padding ); ?>" size="6" />
988 <span>Eg. 20px, 5%. <i style="color: #666; font-size: 11px; margin-left: 5px;"><?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.'); ?></i></span>
989 </td>
990 </tr>
991 <tr valign="top">
992 <th class="bump-left" scope="row"><label><?php _e('Feed Background Color'); ?></label></th>
993 <td>
994 <label for="cff_bg_color">#</label>
995 <input name="cff_bg_color" type="text" value="<?php esc_attr_e( $cff_bg_color ); ?>" size="10" placeholder="Eg. ED9A00" />
996 <span><a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a></span>
997 </td>
998 </tr>
999 <tr valign="top">
1000 <th class="bump-left" scope="row"><label><?php _e('Show name and picture of author'); ?></label></th>
1001 <td>
1002 <input name="cff_show_author" type="checkbox" id="cff_show_author" <?php if($cff_show_author == true) echo "checked"; ?> />
1003 <label for="cff_show_status_type">Yes</label>
1004 <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('This will show the thumbnail picture and name of the post author at the top of each post'); ?></i>
1005
1006 </td>
1007 </tr>
1008 <tr valign="top">
1009 <th class="bump-left" scope="row"><label><?php _e('Add CSS class to feed'); ?></label></th>
1010 <td>
1011 <input name="cff_class" type="text" value="<?php esc_attr_e( $cff_class ); ?>" size="25" />
1012 <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('To add multiple classes separate each with a space, Eg. classone classtwo classthree'); ?></i>
1013 </td>
1014 </tr>
1015 </tbody>
1016 </table>
1017
1018 <hr />
1019 <table class="form-table">
1020 <tbody>
1021 <h3><?php _e('Post Types'); ?></h3>
1022 <tr valign="top">
1023 <th scope="row"><?php _e('Only show these types of posts:'); ?><br />
1024 <i style="color: #666; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable post types, photos, videos and more'); ?></a></i></th>
1025 <td>
1026 <div>
1027 <input name="cff_show_status_type" type="checkbox" id="cff_show_status_type" disabled checked />
1028 <label for="cff_show_status_type"><?php _e('Statuses'); ?></label>
1029 </div>
1030 <div>
1031 <input type="checkbox" name="cff_show_event_type" id="cff_show_event_type" disabled checked />
1032 <label for="cff_show_event_type"><?php _e('Events'); ?></label>
1033 </div>
1034 <div>
1035 <input type="checkbox" name="cff_show_photos_type" id="cff_show_photos_type" disabled checked />
1036 <label for="cff_show_photos_type"><?php _e('Photos'); ?></label>
1037 </div>
1038 <div>
1039 <input type="checkbox" name="cff_show_video_type" id="cff_show_video_type" disabled checked />
1040 <label for="cff_show_video_type"><?php _e('Videos'); ?></label>
1041 </div>
1042 <div>
1043 <input type="checkbox" name="cff_show_links_type" id="cff_show_links_type" disabled checked />
1044 <label for="cff_show_links_type"><?php _e('Links'); ?></label>
1045 </div>
1046 </td>
1047 </tr>
1048 </tbody>
1049 </table>
1050 <?php submit_button(); ?>
1051
1052 <a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
1053 <?php } //End General tab ?>
1054 <?php if( $active_tab == 'post_layout' ) { //Start Post Layout tab ?>
1055 <input type="hidden" name="<?php echo $style_post_layout_hidden_field_name; ?>" value="Y">
1056 <br />
1057 <h3><?php _e('Post Layout'); ?></h3>
1058 <table class="form-table">
1059 <tbody>
1060 <tr>
1061 <td><p><?php _e('Choose a layout from the 3 below:'); ?></p></td>
1062 <td>
1063 <select name="cff_preset_layout" disabled>
1064 <option value="thumb"><?php _e('Thumbnail'); ?></option>
1065 <option value="half"><?php _e('Half-width'); ?></option>
1066 <option value="full"><?php _e('Full-width'); ?></option>
1067 </select>
1068 <i style="color: #666; font-size: 11px; margin-left: 5px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable post layouts'); ?></a></i>
1069 </td>
1070 </tr>
1071 <tr valign="top">
1072 <th scope="row"><?php _e('Thumbnail:'); ?></th>
1073 <td>
1074 <img src="<?php echo plugins_url( 'img/layout-thumb.png' , __FILE__ ) ?>" alt="Thumbnail Layout" width="400px" style="border: 1px solid #ccc;" />
1075 </td>
1076 </tr>
1077 <tr valign="top">
1078 <th scope="row"><?php _e('Half-width:'); ?></th>
1079 <td>
1080 <img src="<?php echo plugins_url( 'img/layout-half.png' , __FILE__ ) ?>" alt="Half Width Layout" width="400px" style="border: 1px solid #ccc;" />
1081 </td>
1082 </tr>
1083 <tr valign="top">
1084 <th scope="row"><?php _e('Full-width:'); ?></th>
1085 <td>
1086 <img src="<?php echo plugins_url( 'img/layout-full.png' , __FILE__ ) ?>" alt="Full Width Layout" width="400px" style="border: 1px solid #ccc;" />
1087 </td>
1088 </tr>
1089 </tbody>
1090 </table>
1091 <hr />
1092 <h3><?php _e('Show/Hide'); ?></h3>
1093 <table class="form-table">
1094 <tbody>
1095 <tr valign="top">
1096 <th scope="row"><?php _e('Include the following in posts: <i style="font-size: 11px;">(when applicable)</i>'); ?>
1097 <br /><i style="color: #666; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable all of these options'); ?></a></i></th>
1098 <td>
1099 <div>
1100 <input name="cff_show_text" type="checkbox" id="cff_show_text" <?php if($cff_show_text == true) echo "checked"; ?> />
1101 <label for="cff_show_text"><?php _e('Post text'); ?></label>
1102 </div>
1103 <div>
1104 <input type="checkbox" name="cff_show_date" id="cff_show_date" <?php if($cff_show_date == true) echo 'checked="checked"' ?> />
1105 <label for="cff_show_date"><?php _e('Date'); ?></label>
1106 </div>
1107 <div>
1108 <input type="checkbox" id="cff_show_media" disabled />
1109 <label for="cff_show_media"><?php _e('Photos/videos'); ?></label>
1110 </div>
1111 <div>
1112 <input type="checkbox" name="cff_show_shared_links" id="cff_show_shared_links" <?php if($cff_show_shared_links == true) echo 'checked="checked"' ?> />
1113 <label for="cff_show_shared_links"><?php _e('Shared links'); ?></label>
1114 </div>
1115 <div>
1116 <input type="checkbox" name="cff_show_desc" id="cff_show_desc" <?php if($cff_show_desc == true) echo 'checked="checked"' ?> />
1117 <label for="cff_show_desc"><?php _e('Link, photo and video descriptions'); ?></label>
1118 </div>
1119 <div>
1120 <input type="checkbox" name="cff_show_event_title" id="cff_show_event_title" <?php if($cff_show_event_title == true) echo 'checked="checked"' ?> />
1121 <label for="cff_show_event_title"><?php _e('Event title'); ?></label>
1122 </div>
1123 <div>
1124 <input type="checkbox" name="cff_show_event_details" id="cff_show_event_details" <?php if($cff_show_event_details == true) echo 'checked="checked"' ?> />
1125 <label for="cff_show_event_details"><?php _e('Event details'); ?></label>
1126 </div>
1127 <div>
1128 <input type="checkbox" id="cff_show_meta" disabled />
1129 <label for="cff_show_meta"><?php _e('Like/shares/comments'); ?></label>
1130 </div>
1131 <div>
1132 <input type="checkbox" name="cff_show_link" id="cff_show_link" <?php if($cff_show_link == true) echo 'checked="checked"' ?> />
1133 <label for="cff_show_link"><?php _e('View on Facebook'); ?></label>
1134 </div>
1135 </td>
1136 </tr>
1137 </tbody>
1138 </table>
1139
1140 <?php submit_button(); ?>
1141 <a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
1142 <?php } //End Post Layout tab ?>
1143 <?php if( $active_tab == 'typography' ) { //Start Typography tab ?>
1144 <input type="hidden" name="<?php echo $style_typography_hidden_field_name; ?>" value="Y">
1145 <br />
1146 <h3><?php _e('Typography'); ?></h3>
1147 <p><i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('"Inherit" means that the text will inherit the styles from your theme.'); ?></i></p>
1148 <div id="poststuff" class="metabox-holder">
1149 <div class="meta-box-sortables ui-sortable">
1150 <div id="adminform" class="postbox" style="display: block;">
1151 <div class="handlediv" title="Click to toggle"><br></div>
1152 <h3 class="hndle"><span><?php _e('Text Character Limits'); ?></span></h3>
1153 <div class="inside">
1154 <table class="form-table">
1155 <tbody>
1156 <tr valign="top">
1157 <th scope="row"><label class="bump-left"><?php _e('Maximum Post Text Length'); ?></label></th>
1158 <td>
1159 <input name="cff_title_length" type="text" value="<?php esc_attr_e( $cff_title_length_val ); ?>" size="4" /> <span><?php _e('Characters.'); ?></span> <span>Eg. 200</span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('If the post text exceeds this length then a "See More" button will be added. Leave empty to set no maximum length.'); ?></i>
1160 </td>
1161 </tr>
1162 <tr valign="top">
1163 <th scope="row"><label class="bump-left"><?php _e('Maximum Description Length'); ?></label></th>
1164 <td>
1165 <input name="cff_body_length" type="text" value="<?php esc_attr_e( $cff_body_length_val ); ?>" size="4" /> <span><?php _e('Characters.'); ?></span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Leave empty to set no maximum length'); ?></i>
1166 </td>
1167 </tr>
1168 </tbody>
1169 </table>
1170 </div>
1171 </div>
1172 <div id="adminform" class="postbox" style="display: block;">
1173 <div class="handlediv" title="Click to toggle"><br></div>
1174 <h3 class="hndle"><span><?php _e('Post Text'); ?></span></h3>
1175 <div class="inside">
1176 <table class="form-table">
1177 <tbody>
1178 <tr>
1179 <th><label for="cff_title_format" class="bump-left"><?php _e('Format'); ?></label></th>
1180 <td>
1181 <select name="cff_title_format">
1182 <option value="p" <?php if($cff_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
1183 <option value="h3" <?php if($cff_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
1184 <option value="h4" <?php if($cff_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
1185 <option value="h5" <?php if($cff_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
1186 <option value="h6" <?php if($cff_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
1187 </select>
1188 </td>
1189 </tr>
1190 <tr>
1191 <th><label for="cff_title_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
1192 <td>
1193 <select name="cff_title_size">
1194 <option value="inherit" <?php if($cff_title_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1195 <option value="10" <?php if($cff_title_size == "10") echo 'selected="selected"' ?> >10px</option>
1196 <option value="11" <?php if($cff_title_size == "11") echo 'selected="selected"' ?> >11px</option>
1197 <option value="12" <?php if($cff_title_size == "12") echo 'selected="selected"' ?> >12px</option>
1198 <option value="14" <?php if($cff_title_size == "14") echo 'selected="selected"' ?> >14px</option>
1199 <option value="16" <?php if($cff_title_size == "16") echo 'selected="selected"' ?> >16px</option>
1200 <option value="18" <?php if($cff_title_size == "18") echo 'selected="selected"' ?> >18px</option>
1201 <option value="20" <?php if($cff_title_size == "20") echo 'selected="selected"' ?> >20px</option>
1202 <option value="24" <?php if($cff_title_size == "24") echo 'selected="selected"' ?> >24px</option>
1203 <option value="28" <?php if($cff_title_size == "28") echo 'selected="selected"' ?> >28px</option>
1204 <option value="32" <?php if($cff_title_size == "32") echo 'selected="selected"' ?> >32px</option>
1205 <option value="36" <?php if($cff_title_size == "36") echo 'selected="selected"' ?> >36px</option>
1206 <option value="42" <?php if($cff_title_size == "42") echo 'selected="selected"' ?> >42px</option>
1207 <option value="48" <?php if($cff_title_size == "48") echo 'selected="selected"' ?> >48px</option>
1208 <option value="60" <?php if($cff_title_size == "54") echo 'selected="selected"' ?> >54px</option>
1209 <option value="60" <?php if($cff_title_size == "60") echo 'selected="selected"' ?> >60px</option>
1210 </select>
1211 </td>
1212 </tr>
1213 <tr>
1214 <th><label for="cff_title_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
1215 <td>
1216 <select name="cff_title_weight">
1217 <option value="inherit" <?php if($cff_title_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1218 <option value="normal" <?php if($cff_title_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
1219 <option value="bold" <?php if($cff_title_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
1220 </select>
1221 </td>
1222 </tr>
1223 <tr>
1224 <th><label for="cff_title_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
1225 <td>
1226 #<input name="cff_title_color" type="text" value="<?php esc_attr_e( $cff_title_color ); ?>" size="10" placeholder="Eg. ED9A00" />
1227 <span><a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a></span>
1228 </td>
1229 </tr>
1230 <tr>
1231 <th><label for="cff_title_link" class="bump-left"><?php _e('Link text to Facebook post?'); ?></label></th>
1232 <td><input type="checkbox" name="cff_title_link" id="cff_title_link" <?php if($cff_title_link == true) echo 'checked="checked"' ?> />&nbsp;Yes</td>
1233 </tr>
1234
1235 </tbody>
1236 </table>
1237 </div>
1238 </div>
1239 <div id="adminform" class="postbox" style="display: block;">
1240 <div class="handlediv" title="Click to toggle"><br></div>
1241 <h3 class="hndle"><span><?php _e('Link, Photo and Video Description'); ?></span></h3>
1242 <div class="inside">
1243 <table class="form-table">
1244 <tbody>
1245
1246 <tr>
1247 <th><label for="cff_body_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
1248 <td>
1249 <select name="cff_body_size">
1250 <option value="inherit" <?php if($cff_body_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1251 <option value="10" <?php if($cff_body_size == "10") echo 'selected="selected"' ?> >10px</option>
1252 <option value="11" <?php if($cff_body_size == "11") echo 'selected="selected"' ?> >11px</option>
1253 <option value="12" <?php if($cff_body_size == "12") echo 'selected="selected"' ?> >12px</option>
1254 <option value="14" <?php if($cff_body_size == "14") echo 'selected="selected"' ?> >14px</option>
1255 <option value="16" <?php if($cff_body_size == "16") echo 'selected="selected"' ?> >16px</option>
1256 <option value="18" <?php if($cff_body_size == "18") echo 'selected="selected"' ?> >18px</option>
1257 <option value="20" <?php if($cff_body_size == "20") echo 'selected="selected"' ?> >20px</option>
1258 <option value="24" <?php if($cff_body_size == "24") echo 'selected="selected"' ?> >24px</option>
1259 <option value="28" <?php if($cff_body_size == "28") echo 'selected="selected"' ?> >28px</option>
1260 <option value="32" <?php if($cff_body_size == "32") echo 'selected="selected"' ?> >32px</option>
1261 <option value="36" <?php if($cff_body_size == "36") echo 'selected="selected"' ?> >36px</option>
1262 <option value="42" <?php if($cff_body_size == "42") echo 'selected="selected"' ?> >42px</option>
1263 <option value="48" <?php if($cff_body_size == "48") echo 'selected="selected"' ?> >48px</option>
1264 <option value="60" <?php if($cff_body_size == "54") echo 'selected="selected"' ?> >54px</option>
1265 <option value="60" <?php if($cff_body_size == "60") echo 'selected="selected"' ?> >60px</option>
1266 </select>
1267 </td>
1268 </tr>
1269 <tr>
1270 <th><label for="cff_body_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
1271 <td>
1272 <select name="cff_body_weight">
1273 <option value="inherit" <?php if($cff_body_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1274 <option value="normal" <?php if($cff_body_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
1275 <option value="bold" <?php if($cff_body_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
1276 </select>
1277 </td>
1278 </tr>
1279 <tr>
1280 <th><label for="cff_body_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
1281
1282 <td>
1283 #<input name="cff_body_color" type="text" value="<?php esc_attr_e( $cff_body_color ); ?>" size="10" placeholder="Eg. ED9A00" />
1284 <a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
1285 </td>
1286 </tr>
1287 </tbody>
1288 </table>
1289 </div>
1290 </div>
1291 <div style="margin-top: -15px;">
1292 <?php submit_button(); ?>
1293 </div>
1294 <div id="adminform" class="postbox" style="display: block;">
1295 <div class="handlediv" title="Click to toggle"><br></div>
1296 <h3 class="hndle"><span><?php _e('Date'); ?></span></h3>
1297 <div class="inside">
1298 <table class="form-table">
1299 <tbody>
1300 <tr>
1301 <th><label for="cff_date_position" class="bump-left"><?php _e('Position'); ?></label></th>
1302 <td>
1303 <select name="cff_date_position">
1304 <option value="below" <?php if($cff_date_position == "below") echo 'selected="selected"' ?> >Below Text</option>
1305 <option value="above" <?php if($cff_date_position == "above") echo 'selected="selected"' ?> >Above Text</option>
1306 </select>
1307 </td>
1308 </tr>
1309 <tr>
1310 <th><label for="cff_date_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
1311 <td>
1312 <select name="cff_date_size">
1313 <option value="inherit" <?php if($cff_date_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1314 <option value="10" <?php if($cff_date_size == "10") echo 'selected="selected"' ?> >10px</option>
1315 <option value="11" <?php if($cff_date_size == "11") echo 'selected="selected"' ?> >11px</option>
1316 <option value="12" <?php if($cff_date_size == "12") echo 'selected="selected"' ?> >12px</option>
1317 <option value="14" <?php if($cff_date_size == "14") echo 'selected="selected"' ?> >14px</option>
1318 <option value="16" <?php if($cff_date_size == "16") echo 'selected="selected"' ?> >16px</option>
1319 <option value="18" <?php if($cff_date_size == "18") echo 'selected="selected"' ?> >18px</option>
1320 <option value="20" <?php if($cff_date_size == "20") echo 'selected="selected"' ?> >20px</option>
1321 <option value="24" <?php if($cff_date_size == "24") echo 'selected="selected"' ?> >24px</option>
1322 <option value="28" <?php if($cff_date_size == "28") echo 'selected="selected"' ?> >28px</option>
1323 <option value="32" <?php if($cff_date_size == "32") echo 'selected="selected"' ?> >32px</option>
1324 <option value="36" <?php if($cff_date_size == "36") echo 'selected="selected"' ?> >36px</option>
1325 <option value="42" <?php if($cff_date_size == "42") echo 'selected="selected"' ?> >42px</option>
1326 <option value="48" <?php if($cff_date_size == "48") echo 'selected="selected"' ?> >48px</option>
1327 <option value="60" <?php if($cff_date_size == "54") echo 'selected="selected"' ?> >54px</option>
1328 <option value="60" <?php if($cff_date_size == "60") echo 'selected="selected"' ?> >60px</option>
1329 </select>
1330 </td>
1331 </tr>
1332 <tr>
1333 <th><label for="cff_date_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
1334 <td>
1335 <select name="cff_date_weight">
1336 <option value="inherit" <?php if($cff_date_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1337 <option value="normal" <?php if($cff_date_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
1338 <option value="bold" <?php if($cff_date_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
1339 </select>
1340 </td>
1341 </tr>
1342 <tr>
1343 <th><label for="cff_date_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
1344 <td>
1345 #<input name="cff_date_color" type="text" value="<?php esc_attr_e( $cff_date_color ); ?>" size="10" placeholder="Eg. ED9A00" />
1346 <a href="http://www.colorpicker.com/" target="_blank">Color Picker</a>
1347 </td>
1348 </tr>
1349
1350 <tr>
1351 <th><label for="cff_date_formatting" class="bump-left"><?php _e('Date formatting'); ?></label></th>
1352 <td>
1353 <select name="cff_date_formatting" id="cff-date-formatting">
1354 <?php $original = strtotime('2013-07-25T17:30:00+0000'); ?>
1355 <option value="1" <?php if($cff_date_formatting == "1") echo 'selected="selected"' ?> ><?php _e('2 days ago'); ?></option>
1356 <option value="2" <?php if($cff_date_formatting == "2") echo 'selected="selected"' ?> ><?php echo date('F jS, g:i a', $original); ?></option>
1357 <option value="3" <?php if($cff_date_formatting == "3") echo 'selected="selected"' ?> ><?php echo date('F jS', $original); ?></option>
1358 <option value="4" <?php if($cff_date_formatting == "4") echo 'selected="selected"' ?> ><?php echo date('D F jS', $original); ?></option>
1359 <option value="5" <?php if($cff_date_formatting == "5") echo 'selected="selected"' ?> ><?php echo date('l F jS', $original); ?></option>
1360 <option value="6" <?php if($cff_date_formatting == "6") echo 'selected="selected"' ?> ><?php echo date('D M jS, Y', $original); ?></option>
1361 <option value="7" <?php if($cff_date_formatting == "7") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y', $original); ?></option>
1362 <option value="8" <?php if($cff_date_formatting == "8") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y - g:i a', $original); ?></option>
1363 <option value="9" <?php if($cff_date_formatting == "9") echo 'selected="selected"' ?> ><?php echo date("l M jS, 'y", $original); ?></option>
1364 <option value="10" <?php if($cff_date_formatting == "10") echo 'selected="selected"' ?> ><?php echo date('m.d.y', $original); ?></option>
1365 <option value="11" <?php if($cff_date_formatting == "11") echo 'selected="selected"' ?> ><?php echo date('m/d/y', $original); ?></option>
1366 <option value="12" <?php if($cff_date_formatting == "12") echo 'selected="selected"' ?> ><?php echo date('d.m.y', $original); ?></option>
1367 <option value="13" <?php if($cff_date_formatting == "13") echo 'selected="selected"' ?> ><?php echo date('d/m/y', $original); ?></option>
1368 </select>
1369
1370 <a class="cff-tooltip-link" href="JavaScript:void(0);" id="cff-translate-date"><?php _e('Translate this'); ?></a>
1371 <div class="cff-tooltip">
1372 <div class="cff-tooltip-table">
1373 <p style="margin-bottom: 15px;"><?php _e('Translate the text below into the language you would like to use:'); ?></p>
1374
1375
1376 <label for="cff_translate_second"><?php _e("second"); ?></label>
1377 <input name="cff_translate_second" type="text" value="<?php esc_attr_e( $cff_translate_second ); ?>" size="20" />
1378 <br />
1379 <label for="cff_translate_seconds"><?php _e("seconds"); ?></label>
1380 <input name="cff_translate_seconds" type="text" value="<?php esc_attr_e( $cff_translate_second ); ?>" size="20" />
1381 <br />
1382 <label for="cff_translate_minute"><?php _e("minute"); ?></label>
1383 <input name="cff_translate_minute" type="text" value="<?php esc_attr_e( $cff_translate_minute ); ?>" size="20" />
1384 <br />
1385 <label for="cff_translate_minutes"><?php _e("minutes"); ?></label>
1386 <input name="cff_translate_minutes" type="text" value="<?php esc_attr_e( $cff_translate_minutes ); ?>" size="20" />
1387 <br />
1388 <label for="cff_translate_hour"><?php _e("hour"); ?></label>
1389 <input name="cff_translate_hour" type="text" value="<?php esc_attr_e( $cff_translate_hour ); ?>" size="20" />
1390 <br />
1391 <label for="cff_translate_hours"><?php _e("hours"); ?></label>
1392 <input name="cff_translate_hours" type="text" value="<?php esc_attr_e( $cff_translate_hours ); ?>" size="20" />
1393 <br />
1394 <label for="cff_translate_day"><?php _e("day"); ?></label>
1395 <input name="cff_translate_day" type="text" value="<?php esc_attr_e( $cff_translate_day ); ?>" size="20" />
1396 <br />
1397 <label for="cff_translate_days"><?php _e("days"); ?></label>
1398 <input name="cff_translate_days" type="text" value="<?php esc_attr_e( $cff_translate_days ); ?>" size="20" />
1399 <br />
1400 <label for="cff_translate_week"><?php _e("week"); ?></label>
1401 <input name="cff_translate_week" type="text" value="<?php esc_attr_e( $cff_translate_week ); ?>" size="20" />
1402 <br />
1403 <label for="cff_translate_weeks"><?php _e("weeks"); ?></label>
1404 <input name="cff_translate_weeks" type="text" value="<?php esc_attr_e( $cff_translate_weeks ); ?>" size="20" />
1405 <br />
1406 <label for="cff_translate_month"><?php _e("month"); ?></label>
1407 <input name="cff_translate_month" type="text" value="<?php esc_attr_e( $cff_translate_month ); ?>" size="20" />
1408 <br />
1409 <label for="cff_translate_months"><?php _e("months"); ?></label>
1410 <input name="cff_translate_months" type="text" value="<?php esc_attr_e( $cff_translate_months ); ?>" size="20" />
1411 <br />
1412 <label for="cff_translate_year"><?php _e("year"); ?></label>
1413 <input name="cff_translate_year" type="text" value="<?php esc_attr_e( $cff_translate_year ); ?>" size="20" />
1414 <br />
1415 <label for="cff_translate_years"><?php _e("years"); ?></label>
1416 <input name="cff_translate_years" type="text" value="<?php esc_attr_e( $cff_translate_years ); ?>" size="20" />
1417 <br />
1418 <label for="cff_translate_ago"><?php _e("ago"); ?></label>
1419 <input name="cff_translate_ago" type="text" value="<?php esc_attr_e( $cff_translate_ago ); ?>" size="20" />
1420 </div>
1421 </div>
1422
1423 </td>
1424 </tr>
1425
1426 <tr>
1427 <th><label for="cff_timezone" class="bump-left"><?php _e('Timezone'); ?></label></th>
1428 <td>
1429 <select name="cff_timezone" style="width: 300px;">
1430 <option value="Pacific/Midway" <?php if($cff_timezone == "Pacific/Midway") echo 'selected="selected"' ?> ><?php _e('(GMT-11:00) Midway Island, Samoa'); ?></option>
1431 <option value="America/Adak" <?php if($cff_timezone == "America/Adak") echo 'selected="selected"' ?> ><?php _e('(GMT-10:00) Hawaii-Aleutian'); ?></option>
1432 <option value="Etc/GMT+10" <?php if($cff_timezone == "Etc/GMT+10") echo 'selected="selected"' ?> ><?php _e('(GMT-10:00) Hawaii'); ?></option>
1433 <option value="Pacific/Marquesas" <?php if($cff_timezone == "Pacific/Marquesas") echo 'selected="selected"' ?> ><?php _e('(GMT-09:30) Marquesas Islands'); ?></option>
1434 <option value="Pacific/Gambier" <?php if($cff_timezone == "Pacific/Gambier") echo 'selected="selected"' ?> ><?php _e('(GMT-09:00) Gambier Islands'); ?></option>
1435 <option value="America/Anchorage" <?php if($cff_timezone == "America/Anchorage") echo 'selected="selected"' ?> ><?php _e('(GMT-09:00) Alaska'); ?></option>
1436 <option value="America/Ensenada" <?php if($cff_timezone == "America/Ensenada") echo 'selected="selected"' ?> ><?php _e('(GMT-08:00) Tijuana, Baja California'); ?></option>
1437 <option value="Etc/GMT+8" <?php if($cff_timezone == "Etc/GMT+8") echo 'selected="selected"' ?> ><?php _e('(GMT-08:00) Pitcairn Islands'); ?></option>
1438 <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>
1439 <option value="America/Denver" <?php if($cff_timezone == "America/Denver") echo 'selected="selected"' ?> ><?php _e('(GMT-07:00) Mountain Time (US & Canada)'); ?></option>
1440 <option value="America/Chihuahua" <?php if($cff_timezone == "America/Chihuahua") echo 'selected="selected"' ?> ><?php _e('(GMT-07:00) Chihuahua, La Paz, Mazatlan'); ?></option>
1441 <option value="America/Dawson_Creek" <?php if($cff_timezone == "America/Dawson_Creek") echo 'selected="selected"' ?> ><?php _e('(GMT-07:00) Arizona'); ?></option>
1442 <option value="America/Belize" <?php if($cff_timezone == "America/Belize") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Saskatchewan, Central America'); ?></option>
1443 <option value="America/Cancun" <?php if($cff_timezone == "America/Cancun") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Guadalajara, Mexico City, Monterrey'); ?></option>
1444 <option value="Chile/EasterIsland" <?php if($cff_timezone == "Chile/EasterIsland") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Easter Island'); ?></option>
1445 <option value="America/Chicago" <?php if($cff_timezone == "America/Chicago") echo 'selected="selected"' ?> ><?php _e('(GMT-06:00) Central Time (US & Canada)'); ?></option>
1446 <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>
1447 <option value="America/Havana" <?php if($cff_timezone == "America/Havana") echo 'selected="selected"' ?> ><?php _e('(GMT-05:00) Cuba'); ?></option>
1448 <option value="America/Bogota" <?php if($cff_timezone == "America/Bogota") echo 'selected="selected"' ?> ><?php _e('(GMT-05:00) Bogota, Lima, Quito, Rio Branco'); ?></option>
1449 <option value="America/Caracas" <?php if($cff_timezone == "America/Caracas") echo 'selected="selected"' ?> ><?php _e('(GMT-04:30) Caracas'); ?></option>
1450 <option value="America/Santiago" <?php if($cff_timezone == "America/Santiago") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Santiago'); ?></option>
1451 <option value="America/La_Paz" <?php if($cff_timezone == "America/La_Paz") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) La Paz'); ?></option>
1452 <option value="Atlantic/Stanley" <?php if($cff_timezone == "Atlantic/Stanley") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Faukland Islands'); ?></option>
1453 <option value="America/Campo_Grande" <?php if($cff_timezone == "America/Campo_Grande") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Brazil'); ?></option>
1454 <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>
1455 <option value="America/Glace_Bay" <?php if($cff_timezone == "America/Glace_Bay") echo 'selected="selected"' ?> ><?php _e('(GMT-04:00) Atlantic Time (Canada)'); ?></option>
1456 <option value="America/St_Johns" <?php if($cff_timezone == "America/St_Johns") echo 'selected="selected"' ?> ><?php _e('(GMT-03:30) Newfoundland'); ?></option>
1457 <option value="America/Araguaina" <?php if($cff_timezone == "America/Araguaina") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) UTC-3'); ?></option>
1458 <option value="America/Montevideo" <?php if($cff_timezone == "America/Montevideo") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Montevideo'); ?></option>
1459 <option value="America/Miquelon" <?php if($cff_timezone == "America/Miquelon") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Miquelon, St. Pierre'); ?></option>
1460 <option value="America/Godthab" <?php if($cff_timezone == "America/Godthab") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Greenland'); ?></option>
1461 <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>
1462 <option value="America/Sao_Paulo" <?php if($cff_timezone == "America/Sao_Paulo") echo 'selected="selected"' ?> ><?php _e('(GMT-03:00) Brasilia'); ?></option>
1463 <option value="America/Noronha" <?php if($cff_timezone == "America/Noronha") echo 'selected="selected"' ?> ><?php _e('(GMT-02:00) Mid-Atlantic'); ?></option>
1464 <option value="Atlantic/Cape_Verde" <?php if($cff_timezone == "Atlantic/Cape_Verde") echo 'selected="selected"' ?> ><?php _e('(GMT-01:00) Cape Verde Is.'); ?></option>
1465 <option value="Atlantic/Azores" <?php if($cff_timezone == "Atlantic/Azores") echo 'selected="selected"' ?> ><?php _e('(GMT-01:00) Azores'); ?></option>
1466 <option value="Europe/Belfast" <?php if($cff_timezone == "Europe/Belfast") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : Belfast'); ?></option>
1467 <option value="Europe/Dublin" <?php if($cff_timezone == "Europe/Dublin") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : Dublin'); ?></option>
1468 <option value="Europe/Lisbon" <?php if($cff_timezone == "Europe/Lisbon") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : Lisbon'); ?></option>
1469 <option value="Europe/London" <?php if($cff_timezone == "Europe/London") echo 'selected="selected"' ?> ><?php _e('(GMT) Greenwich Mean Time : London'); ?></option>
1470 <option value="Africa/Abidjan" <?php if($cff_timezone == "Africa/Abidjan") echo 'selected="selected"' ?> ><?php _e('(GMT) Monrovia, Reykjavik'); ?></option>
1471 <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>
1472 <option value="Europe/Belgrade" <?php if($cff_timezone == "Europe/Belgrade") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague'); ?></option>
1473 <option value="Europe/Brussels" <?php if($cff_timezone == "Europe/Brussels") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) Brussels, Copenhagen, Madrid, Paris'); ?></option>
1474 <option value="Africa/Algiers" <?php if($cff_timezone == "Africa/Algiers") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) West Central Africa'); ?></option>
1475 <option value="Africa/Windhoek" <?php if($cff_timezone == "Africa/Windhoek") echo 'selected="selected"' ?> ><?php _e('(GMT+01:00) Windhoek'); ?></option>
1476 <option value="Asia/Beirut" <?php if($cff_timezone == "Asia/Beirut") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Beirut'); ?></option>
1477 <option value="Africa/Cairo" <?php if($cff_timezone == "Africa/Cairo") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Cairo'); ?></option>
1478 <option value="Asia/Gaza" <?php if($cff_timezone == "Asia/Gaza") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Gaza'); ?></option>
1479 <option value="Africa/Blantyre" <?php if($cff_timezone == "Africa/Blantyre") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Harare, Pretoria'); ?></option>
1480 <option value="Asia/Jerusalem" <?php if($cff_timezone == "Asia/Jerusalem") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Jerusalem'); ?></option>
1481 <option value="Europe/Minsk" <?php if($cff_timezone == "Europe/Minsk") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Minsk'); ?></option>
1482 <option value="Asia/Damascus" <?php if($cff_timezone == "Asia/Damascus") echo 'selected="selected"' ?> ><?php _e('(GMT+02:00) Syria'); ?></option>
1483 <option value="Europe/Moscow" <?php if($cff_timezone == "Europe/Moscow") echo 'selected="selected"' ?> ><?php _e('(GMT+03:00) Moscow, St. Petersburg, Volgograd'); ?></option>
1484 <option value="Africa/Addis_Ababa" <?php if($cff_timezone == "Africa/Addis_Ababa") echo 'selected="selected"' ?> ><?php _e('(GMT+03:00) Nairobi'); ?></option>
1485 <option value="Asia/Tehran" <?php if($cff_timezone == "Asia/Tehran") echo 'selected="selected"' ?> ><?php _e('(GMT+03:30) Tehran'); ?></option>
1486 <option value="Asia/Dubai" <?php if($cff_timezone == "Asia/Dubai") echo 'selected="selected"' ?> ><?php _e('(GMT+04:00) Abu Dhabi, Muscat'); ?></option>
1487 <option value="Asia/Yerevan" <?php if($cff_timezone == "Asia/Yerevan") echo 'selected="selected"' ?> ><?php _e('(GMT+04:00) Yerevan'); ?></option>
1488 <option value="Asia/Kabul" <?php if($cff_timezone == "Asia/Kabul") echo 'selected="selected"' ?> ><?php _e('(GMT+04:30) Kabul'); ?></option>
1489 <option value="Asia/Yekaterinburg" <?php if($cff_timezone == "Asia/Yekaterinburg") echo 'selected="selected"' ?> ><?php _e('(GMT+05:00) Ekaterinburg'); ?></option>
1490 <option value="Asia/Tashkent" <?php if($cff_timezone == "Asia/Tashkent") echo 'selected="selected"' ?> ><?php _e('(GMT+05:00) Tashkent'); ?></option>
1491 <option value="Asia/Kolkata" <?php if($cff_timezone == "Asia/Kolkata") echo 'selected="selected"' ?> ><?php _e('(GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi'); ?></option>
1492 <option value="Asia/Katmandu" <?php if($cff_timezone == "Asia/Katmandu") echo 'selected="selected"' ?> ><?php _e('(GMT+05:45) Kathmandu'); ?></option>
1493 <option value="Asia/Dhaka" <?php if($cff_timezone == "Asia/Dhaka") echo 'selected="selected"' ?> ><?php _e('(GMT+06:00) Astana, Dhaka'); ?></option>
1494 <option value="Asia/Novosibirsk" <?php if($cff_timezone == "Asia/Novosibirsk") echo 'selected="selected"' ?> ><?php _e('(GMT+06:00) Novosibirsk'); ?></option>
1495 <option value="Asia/Rangoon" <?php if($cff_timezone == "Asia/Rangoon") echo 'selected="selected"' ?> ><?php _e('(GMT+06:30) Yangon (Rangoon)'); ?></option>
1496 <option value="Asia/Bangkok" <?php if($cff_timezone == "Asia/Bangkok") echo 'selected="selected"' ?> ><?php _e('(GMT+07:00) Bangkok, Hanoi, Jakarta'); ?></option>
1497 <option value="Asia/Krasnoyarsk" <?php if($cff_timezone == "Asia/Krasnoyarsk") echo 'selected="selected"' ?> ><?php _e('(GMT+07:00) Krasnoyarsk'); ?></option>
1498 <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>
1499 <option value="Asia/Irkutsk" <?php if($cff_timezone == "Asia/Irkutsk") echo 'selected="selected"' ?> ><?php _e('(GMT+08:00) Irkutsk, Ulaan Bataar'); ?></option>
1500 <option value="Australia/Perth" <?php if($cff_timezone == "Australia/Perth") echo 'selected="selected"' ?> ><?php _e('(GMT+08:00) Perth'); ?></option>
1501 <option value="Australia/Eucla" <?php if($cff_timezone == "Australia/Eucla") echo 'selected="selected"' ?> ><?php _e('(GMT+08:45) Eucla'); ?></option>
1502 <option value="Asia/Tokyo" <?php if($cff_timezone == "Asia/Tokyo") echo 'selected="selected"' ?> ><?php _e('(GMT+09:00) Osaka, Sapporo, Tokyo'); ?></option>
1503 <option value="Asia/Seoul" <?php if($cff_timezone == "Asia/Seoul") echo 'selected="selected"' ?> ><?php _e('(GMT+09:00) Seoul'); ?></option>
1504 <option value="Asia/Yakutsk" <?php if($cff_timezone == "Asia/Yakutsk") echo 'selected="selected"' ?> ><?php _e('(GMT+09:00) Yakutsk'); ?></option>
1505 <option value="Australia/Adelaide" <?php if($cff_timezone == "Australia/Adelaide") echo 'selected="selected"' ?> ><?php _e('(GMT+09:30) Adelaide'); ?></option>
1506 <option value="Australia/Darwin" <?php if($cff_timezone == "Australia/Darwin") echo 'selected="selected"' ?> ><?php _e('(GMT+09:30) Darwin'); ?></option>
1507 <option value="Australia/Brisbane" <?php if($cff_timezone == "Australia/Brisbane") echo 'selected="selected"' ?> ><?php _e('(GMT+10:00) Brisbane'); ?></option>
1508 <option value="Australia/Hobart" <?php if($cff_timezone == "Australia/Hobart") echo 'selected="selected"' ?> ><?php _e('(GMT+10:00) Hobart'); ?></option>
1509 <option value="Asia/Vladivostok" <?php if($cff_timezone == "Asia/Vladivostok") echo 'selected="selected"' ?> ><?php _e('(GMT+10:00) Vladivostok'); ?></option>
1510 <option value="Australia/Lord_Howe" <?php if($cff_timezone == "Australia/Lord_Howe") echo 'selected="selected"' ?> ><?php _e('(GMT+10:30) Lord Howe Island'); ?></option>
1511 <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>
1512 <option value="Asia/Magadan" <?php if($cff_timezone == "Asia/Magadan") echo 'selected="selected"' ?> ><?php _e('(GMT+11:00) Magadan'); ?></option>
1513 <option value="Pacific/Norfolk" <?php if($cff_timezone == "Pacific/Norfolk") echo 'selected="selected"' ?> ><?php _e('(GMT+11:30) Norfolk Island'); ?></option>
1514 <option value="Asia/Anadyr" <?php if($cff_timezone == "Asia/Anadyr") echo 'selected="selected"' ?> ><?php _e('(GMT+12:00) Anadyr, Kamchatka'); ?></option>
1515 <option value="Pacific/Auckland" <?php if($cff_timezone == "Pacific/Auckland") echo 'selected="selected"' ?> ><?php _e('(GMT+12:00) Auckland, Wellington'); ?></option>
1516 <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>
1517 <option value="Pacific/Chatham" <?php if($cff_timezone == "Pacific/Chatham") echo 'selected="selected"' ?> ><?php _e('(GMT+12:45) Chatham Islands'); ?></option>
1518 <option value="Pacific/Tongatapu" <?php if($cff_timezone == "Pacific/Tongatapu") echo 'selected="selected"' ?> ><?php _e('(GMT+13:00) Nuku\'alofa'); ?></option>
1519 <option value="Pacific/Kiritimati" <?php if($cff_timezone == "Pacific/Kiritimati") echo 'selected="selected"' ?> ><?php _e('(GMT+14:00) Kiritimati'); ?></option>
1520 </select>
1521 </td>
1522 </tr>
1523
1524 <tr>
1525 <th><label for="cff_date_custom" class="bump-left"><?php _e('Custom format'); ?></label></th>
1526 <td>
1527 <input name="cff_date_custom" type="text" value="<?php esc_attr_e( $cff_date_custom ); ?>" size="10" placeholder="Eg. F j, Y" />
1528 <a href="http://smashballoon.com/custom-facebook-feed/docs/date/" target="_blank"><?php _e('Examples'); ?></a>
1529 </td>
1530 </tr>
1531 <tr>
1532 <th><label for="cff_date_before" class="bump-left"><?php _e('Text before date'); ?></label></th>
1533 <td><input name="cff_date_before" type="text" value="<?php esc_attr_e( $cff_date_before ); ?>" size="20" placeholder="Eg. Posted" /></td>
1534 </tr>
1535 <tr>
1536 <th><label for="cff_date_after" class="bump-left"><?php _e('Text after date'); ?></label></th>
1537 <td><input name="cff_date_after" type="text" value="<?php esc_attr_e( $cff_date_after ); ?>" size="20" placeholder="Eg. by ___" /></td>
1538 </tr>
1539 </tbody>
1540 </table>
1541 </div>
1542 </div>
1543 <div id="adminform" class="postbox" style="display: block;">
1544 <div class="handlediv" title="Click to toggle"><br></div>
1545 <h3 class="hndle"><span><?php _e('Event Title'); ?></span></h3>
1546 <div class="inside">
1547 <table class="form-table">
1548 <tbody>
1549
1550 <tr>
1551 <th><label for="cff_event_title_format" class="bump-left"><?php _e('Format'); ?></label></th>
1552 <td>
1553 <select name="cff_event_title_format">
1554 <option value="p" <?php if($cff_event_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
1555 <option value="h3" <?php if($cff_event_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
1556 <option value="h4" <?php if($cff_event_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
1557 <option value="h5" <?php if($cff_event_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
1558 <option value="h6" <?php if($cff_event_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
1559 </select>
1560 </td>
1561 </tr>
1562
1563 <tr>
1564 <th><label for="cff_event_title_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
1565 <td>
1566 <select name="cff_event_title_size">
1567 <option value="inherit" <?php if($cff_event_title_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1568 <option value="10" <?php if($cff_event_title_size == "10") echo 'selected="selected"' ?> >10px</option>
1569 <option value="11" <?php if($cff_event_title_size == "11") echo 'selected="selected"' ?> >11px</option>
1570 <option value="12" <?php if($cff_event_title_size == "12") echo 'selected="selected"' ?> >12px</option>
1571 <option value="14" <?php if($cff_event_title_size == "14") echo 'selected="selected"' ?> >14px</option>
1572 <option value="16" <?php if($cff_event_title_size == "16") echo 'selected="selected"' ?> >16px</option>
1573 <option value="18" <?php if($cff_event_title_size == "18") echo 'selected="selected"' ?> >18px</option>
1574 <option value="20" <?php if($cff_event_title_size == "20") echo 'selected="selected"' ?> >20px</option>
1575 <option value="24" <?php if($cff_event_title_size == "24") echo 'selected="selected"' ?> >24px</option>
1576 <option value="28" <?php if($cff_event_title_size == "28") echo 'selected="selected"' ?> >28px</option>
1577 <option value="32" <?php if($cff_event_title_size == "32") echo 'selected="selected"' ?> >32px</option>
1578 <option value="36" <?php if($cff_event_title_size == "36") echo 'selected="selected"' ?> >36px</option>
1579 <option value="42" <?php if($cff_event_title_size == "42") echo 'selected="selected"' ?> >42px</option>
1580 <option value="48" <?php if($cff_event_title_size == "48") echo 'selected="selected"' ?> >48px</option>
1581 <option value="60" <?php if($cff_event_title_size == "54") echo 'selected="selected"' ?> >54px</option>
1582 <option value="60" <?php if($cff_event_title_size == "60") echo 'selected="selected"' ?> >60px</option>
1583 </select>
1584 </td>
1585 </tr>
1586 <tr>
1587 <th><label for="cff_event_title_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
1588 <td>
1589 <select name="cff_event_title_weight">
1590 <option value="inherit" <?php if($cff_event_title_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1591 <option value="normal" <?php if($cff_event_title_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
1592 <option value="bold" <?php if($cff_event_title_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
1593 </select>
1594 </td>
1595 </tr>
1596 <tr>
1597 <th><label for="cff_event_title_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
1598 <td>
1599 <input name="cff_event_title_color" type="text" value="<?php esc_attr_e( $cff_event_title_color ); ?>" size="10" placeholder="Eg. ED9A00" />
1600 <a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
1601 </td>
1602 </tr>
1603 <tr>
1604 <th><label for="cff_title_link" class="bump-left"><?php _e('Link title to Facebook event page?'); ?></label></th>
1605 <td><input type="checkbox" name="cff_event_title_link" id="cff_event_title_link" <?php if($cff_event_title_link == true) echo 'checked="checked"' ?> />&nbsp;Yes</td>
1606 </tr>
1607 </tbody>
1608 </table>
1609 </div>
1610 </div>
1611 <div style="margin-top: -15px;">
1612 <?php submit_button(); ?>
1613 </div>
1614 <div id="adminform" class="postbox" style="display: block;">
1615 <div class="handlediv" title="Click to toggle"><br></div>
1616 <h3 class="hndle"><span><?php _e('Event Date'); ?></span></h3>
1617 <div class="inside">
1618 <table class="form-table">
1619 <tbody>
1620
1621 <tr>
1622 <th><label for="cff_event_date_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
1623 <td>
1624 <select name="cff_event_date_size">
1625 <option value="inherit" <?php if($cff_event_date_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1626 <option value="10" <?php if($cff_event_date_size == "10") echo 'selected="selected"' ?> >10px</option>
1627 <option value="11" <?php if($cff_event_date_size == "11") echo 'selected="selected"' ?> >11px</option>
1628 <option value="12" <?php if($cff_event_date_size == "12") echo 'selected="selected"' ?> >12px</option>
1629 <option value="14" <?php if($cff_event_date_size == "14") echo 'selected="selected"' ?> >14px</option>
1630 <option value="16" <?php if($cff_event_date_size == "16") echo 'selected="selected"' ?> >16px</option>
1631 <option value="18" <?php if($cff_event_date_size == "18") echo 'selected="selected"' ?> >18px</option>
1632 <option value="20" <?php if($cff_event_date_size == "20") echo 'selected="selected"' ?> >20px</option>
1633 <option value="24" <?php if($cff_event_date_size == "24") echo 'selected="selected"' ?> >24px</option>
1634 <option value="28" <?php if($cff_event_date_size == "28") echo 'selected="selected"' ?> >28px</option>
1635 <option value="32" <?php if($cff_event_date_size == "32") echo 'selected="selected"' ?> >32px</option>
1636 <option value="36" <?php if($cff_event_date_size == "36") echo 'selected="selected"' ?> >36px</option>
1637 <option value="42" <?php if($cff_event_date_size == "42") echo 'selected="selected"' ?> >42px</option>
1638 <option value="48" <?php if($cff_event_date_size == "48") echo 'selected="selected"' ?> >48px</option>
1639 <option value="60" <?php if($cff_event_date_size == "54") echo 'selected="selected"' ?> >54px</option>
1640 <option value="60" <?php if($cff_event_date_size == "60") echo 'selected="selected"' ?> >60px</option>
1641 </select>
1642 </td>
1643 </tr>
1644 <tr>
1645 <th><label for="cff_event_date_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
1646 <td>
1647 <select name="cff_event_date_weight">
1648 <option value="inherit" <?php if($cff_event_date_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1649 <option value="normal" <?php if($cff_event_date_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
1650 <option value="bold" <?php if($cff_event_date_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
1651 </select>
1652 </td>
1653 </tr>
1654 <tr>
1655 <th><label for="cff_event_date_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
1656 <td>
1657 #<input name="cff_event_date_color" type="text" value="<?php esc_attr_e( $cff_event_date_color ); ?>" size="10" placeholder="Eg. ED9A00" />
1658 <a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
1659 </td>
1660 </tr>
1661 <tr valign="top">
1662 <th scope="row"><label class="bump-left"><?php _e('Date Position'); ?></label></th>
1663 <td>
1664 <select name="cff_event_date_position">
1665 <option value="below" <?php if($cff_event_date_position == "below") echo 'selected="selected"' ?> ><?php _e('Below event title'); ?></option>
1666 <option value="above" <?php if($cff_event_date_position == "above") echo 'selected="selected"' ?> ><?php _e('Above event title'); ?></option>
1667 </select>
1668 </td>
1669 </tr>
1670 <tr>
1671 <th><label for="cff_event_date_formatting" class="bump-left"><?php _e('Event date formatting'); ?></label></th>
1672 <td>
1673 <select name="cff_event_date_formatting">
1674 <?php $original = strtotime('2013-07-25T17:30:00+0000'); ?>
1675 <option value="1" <?php if($cff_event_date_formatting == "1") echo 'selected="selected"' ?> ><?php echo date('F j, Y, g:ia', $original); ?></option>
1676 <option value="2" <?php if($cff_event_date_formatting == "2") echo 'selected="selected"' ?> ><?php echo date('F jS, g:ia', $original); ?></option>
1677 <option value="3" <?php if($cff_event_date_formatting == "3") echo 'selected="selected"' ?> ><?php echo date('g:ia - F jS', $original); ?></option>
1678 <option value="4" <?php if($cff_event_date_formatting == "4") echo 'selected="selected"' ?> ><?php echo date('g:ia, F jS', $original); ?></option>
1679 <option value="5" <?php if($cff_event_date_formatting == "5") echo 'selected="selected"' ?> ><?php echo date('l F jS - g:ia', $original); ?></option>
1680 <option value="6" <?php if($cff_event_date_formatting == "6") echo 'selected="selected"' ?> ><?php echo date('D M jS, Y, g:iA', $original); ?></option>
1681 <option value="7" <?php if($cff_event_date_formatting == "7") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y, g:iA', $original); ?></option>
1682 <option value="8" <?php if($cff_event_date_formatting == "8") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y - g:ia', $original); ?></option>
1683 <option value="9" <?php if($cff_event_date_formatting == "9") echo 'selected="selected"' ?> ><?php echo date("l M jS, 'y", $original); ?></option>
1684 <option value="10" <?php if($cff_event_date_formatting == "10") echo 'selected="selected"' ?> ><?php echo date('m.d.y - g:iA', $original); ?></option>
1685 <option value="11" <?php if($cff_event_date_formatting == "11") echo 'selected="selected"' ?> ><?php echo date('m/d/y, g:ia', $original); ?></option>
1686 <option value="12" <?php if($cff_event_date_formatting == "12") echo 'selected="selected"' ?> ><?php echo date('d.m.y - g:iA', $original); ?></option>
1687 <option value="13" <?php if($cff_event_date_formatting == "13") echo 'selected="selected"' ?> ><?php echo date('d/m/y, g:ia', $original); ?></option>
1688 </select>
1689 </td>
1690 </tr>
1691 <tr>
1692 <th><label for="cff_event_date_custom" class="bump-left"><?php _e('Custom event date format'); ?></label></th>
1693 <td>
1694 <input name="cff_event_date_custom" type="text" value="<?php esc_attr_e( $cff_event_date_custom ); ?>" size="10" placeholder="Eg. F j, Y - g:ia" />
1695 <a href="http://smashballoon.com/custom-facebook-feed/docs/date/" target="_blank"><?php _e('Examples'); ?></a>
1696 </td>
1697 </tr>
1698 </tbody>
1699 </table>
1700 </div>
1701 </div>
1702 <div id="adminform" class="postbox" style="display: block;">
1703 <div class="handlediv" title="Click to toggle"><br></div>
1704 <h3 class="hndle"><span><?php _e('Event Details'); ?></span></h3>
1705 <div class="inside">
1706 <table class="form-table">
1707 <tbody>
1708
1709 <tr>
1710 <th><label for="cff_event_details_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
1711 <td>
1712 <select name="cff_event_details_size">
1713 <option value="inherit" <?php if($cff_event_details_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1714 <option value="10" <?php if($cff_event_details_size == "10") echo 'selected="selected"' ?> >10px</option>
1715 <option value="11" <?php if($cff_event_details_size == "11") echo 'selected="selected"' ?> >11px</option>
1716 <option value="12" <?php if($cff_event_details_size == "12") echo 'selected="selected"' ?> >12px</option>
1717 <option value="14" <?php if($cff_event_details_size == "14") echo 'selected="selected"' ?> >14px</option>
1718 <option value="16" <?php if($cff_event_details_size == "16") echo 'selected="selected"' ?> >16px</option>
1719 <option value="18" <?php if($cff_event_details_size == "18") echo 'selected="selected"' ?> >18px</option>
1720 <option value="20" <?php if($cff_event_details_size == "20") echo 'selected="selected"' ?> >20px</option>
1721 <option value="24" <?php if($cff_event_details_size == "24") echo 'selected="selected"' ?> >24px</option>
1722 <option value="28" <?php if($cff_event_details_size == "28") echo 'selected="selected"' ?> >28px</option>
1723 <option value="32" <?php if($cff_event_details_size == "32") echo 'selected="selected"' ?> >32px</option>
1724 <option value="36" <?php if($cff_event_details_size == "36") echo 'selected="selected"' ?> >36px</option>
1725 <option value="42" <?php if($cff_event_details_size == "42") echo 'selected="selected"' ?> >42px</option>
1726 <option value="48" <?php if($cff_event_details_size == "48") echo 'selected="selected"' ?> >48px</option>
1727 <option value="60" <?php if($cff_event_details_size == "54") echo 'selected="selected"' ?> >54px</option>
1728 <option value="60" <?php if($cff_event_details_size == "60") echo 'selected="selected"' ?> >60px</option>
1729 </select>
1730 </td>
1731 </tr>
1732 <tr>
1733 <th><label for="cff_event_details_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
1734 <td>
1735 <select name="cff_event_details_weight">
1736 <option value="inherit" <?php if($cff_event_details_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1737 <option value="normal" <?php if($cff_event_details_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
1738 <option value="bold" <?php if($cff_event_details_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
1739 </select>
1740 </td>
1741 </tr>
1742 <tr>
1743 <th><label for="cff_event_details_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
1744 <td>
1745 #<input name="cff_event_details_color" type="text" value="<?php esc_attr_e( $cff_event_details_color ); ?>" size="10" placeholder="Eg. ED9A00" />
1746 <a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
1747 </td>
1748 </tr>
1749 </tbody>
1750 </table>
1751 </div>
1752 </div>
1753 <div id="adminform" class="postbox" style="display: block;">
1754 <div class="handlediv" title="Click to toggle"><br></div>
1755 <h3 class="hndle"><span><?php _e('Link to Facebook'); ?></span></h3>
1756 <div class="inside">
1757 <table class="form-table">
1758 <tbody>
1759
1760 <tr>
1761 <th><label for="cff_link_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
1762 <td>
1763 <select name="cff_link_size">
1764 <option value="inherit" <?php if($cff_link_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1765 <option value="10" <?php if($cff_link_size == "10") echo 'selected="selected"' ?> >10px</option>
1766 <option value="11" <?php if($cff_link_size == "11") echo 'selected="selected"' ?> >11px</option>
1767 <option value="12" <?php if($cff_link_size == "12") echo 'selected="selected"' ?> >12px</option>
1768 <option value="14" <?php if($cff_link_size == "14") echo 'selected="selected"' ?> >14px</option>
1769 <option value="16" <?php if($cff_link_size == "16") echo 'selected="selected"' ?> >16px</option>
1770 <option value="18" <?php if($cff_link_size == "18") echo 'selected="selected"' ?> >18px</option>
1771 <option value="20" <?php if($cff_link_size == "20") echo 'selected="selected"' ?> >20px</option>
1772 <option value="24" <?php if($cff_link_size == "24") echo 'selected="selected"' ?> >24px</option>
1773 <option value="28" <?php if($cff_link_size == "28") echo 'selected="selected"' ?> >28px</option>
1774 <option value="32" <?php if($cff_link_size == "32") echo 'selected="selected"' ?> >32px</option>
1775 <option value="36" <?php if($cff_link_size == "36") echo 'selected="selected"' ?> >36px</option>
1776 <option value="42" <?php if($cff_link_size == "42") echo 'selected="selected"' ?> >42px</option>
1777 <option value="48" <?php if($cff_link_size == "48") echo 'selected="selected"' ?> >48px</option>
1778 <option value="60" <?php if($cff_link_size == "54") echo 'selected="selected"' ?> >54px</option>
1779 <option value="60" <?php if($cff_link_size == "60") echo 'selected="selected"' ?> >60px</option>
1780 </select>
1781 </td>
1782 </tr>
1783 <tr>
1784 <th><label for="cff_link_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
1785 <td>
1786 <select name="cff_link_weight">
1787 <option value="inherit" <?php if($cff_link_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1788 <option value="normal" <?php if($cff_link_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
1789 <option value="bold" <?php if($cff_link_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
1790 </select>
1791 </td>
1792 </tr>
1793 <tr>
1794 <th><label for="cff_link_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
1795 <td>
1796 <input name="cff_link_color" type="text" value="<?php esc_attr_e( $cff_link_color ); ?>" size="10" placeholder="Eg. ED9A00" />
1797 <a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
1798 </td>
1799 </tr>
1800 <tr>
1801 <th><label for="cff_facebook_link_text" class="bump-left"><?php _e('Custom "View on Facebook" text'); ?></label></th>
1802 <td>
1803 <input name="cff_facebook_link_text" type="text" value="<?php esc_attr_e( $cff_facebook_link_text ); ?>" size="20" />
1804 <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Use different text in place of the default "View on Facebook" link'); ?></i>
1805 </td>
1806 </tr>
1807
1808 </tbody>
1809 </table>
1810 </div>
1811 </div>
1812 </div>
1813 </div>
1814 <div style="margin-top: -15px;">
1815 <?php submit_button(); ?>
1816 </div>
1817 <a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
1818
1819 <?php } //End Typography tab ?>
1820 <?php if( $active_tab == 'misc' ) { //Start Misc tab ?>
1821 <input type="hidden" name="<?php echo $style_misc_hidden_field_name; ?>" value="Y">
1822 <br />
1823 <h3><?php _e('Likes, Shares and Comments'); ?></h3><i style="color: #666; font-size: 11px;"><a href="http://smashballoon.com/custom-facebook-feed/" target="_blank"><?php _e('Upgrade to Pro to enable likes, shares and comments'); ?></a></i>
1824
1825 <hr />
1826 <h3><?php _e('Custom CSS'); ?></h3>
1827 <table class="form-table">
1828 <tbody>
1829 <tr valign="top">
1830 <td>
1831 <?php _e('Enter your own custom CSS in the box below'); ?>
1832 </td>
1833 </tr>
1834 <tr valign="top">
1835 <td>
1836 <textarea name="cff_custom_css" id="cff_custom_css" style="width: 70%;" rows="7"><?php esc_attr_e( $cff_custom_css ); ?></textarea>
1837 </td>
1838 </tr>
1839 </tbody>
1840 </table>
1841 <h3><?php _e('Custom JavaScript'); ?></h3>
1842 <table class="form-table">
1843 <tbody>
1844 <tr valign="top">
1845 <td>
1846 <?php _e('Enter your own custom JavaScript/jQuery in the box below'); ?>
1847 </td>
1848 </tr>
1849 <tr valign="top">
1850 <td>
1851 <textarea name="cff_custom_js" id="cff_custom_js" style="width: 70%;" rows="7"><?php esc_attr_e( stripslashes($cff_custom_js) ); ?></textarea>
1852 </td>
1853 </tr>
1854 </tbody>
1855 </table>
1856 <?php submit_button(); ?>
1857 <hr />
1858 <h3><?php _e('Like Box'); ?></h3>
1859 <table class="form-table">
1860 <tbody>
1861 <tr valign="top">
1862 <th class="bump-left" scope="row"><label><?php _e('Show the Like Box'); ?></label></th>
1863 <td>
1864 <input type="checkbox" name="cff_show_like_box" id="cff_show_like_box" <?php if($cff_show_like_box == true) echo 'checked="checked"' ?> />
1865 </td>
1866 </tr>
1867 <tr valign="top">
1868 <th class="bump-left" scope="row"><label><?php _e('Like Box Position'); ?></label></th>
1869 <td>
1870 <select name="cff_like_box_position">
1871 <option value="bottom" <?php if($cff_like_box_position == "bottom") echo 'selected="selected"' ?> ><?php _e('Bottom'); ?></option>
1872 <option value="top" <?php if($cff_like_box_position == "top") echo 'selected="selected"' ?> ><?php _e('Top'); ?></option>
1873 </select>
1874 </td>
1875 </tr>
1876 <tr valign="top">
1877 <th class="bump-left" scope="row"><label><?php _e('Display outside the scrollable area'); ?></label></th>
1878 <td>
1879 <input type="checkbox" name="cff_like_box_outside" id="cff_like_box_outside" <?php if($cff_like_box_outside == true) echo 'checked="checked"' ?> />
1880 <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('(Only applicable if you have set a height on the feed)'); ?></i>
1881 </td>
1882 </tr>
1883 <tr valign="top">
1884 <th class="bump-left" scope="row"><label><?php _e('Like Box Background Color'); ?></label></th>
1885 <td>
1886 <label for="cff_likebox_bg_color">#</label>
1887 <input name="cff_likebox_bg_color" type="text" value="<?php esc_attr_e( $cff_likebox_bg_color ); ?>" size="10" />
1888 <span>Eg. ED9A00</span>&nbsp;&nbsp;<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
1889 </td>
1890 </tr>
1891 <tr valign="top">
1892 <th class="bump-left" scope="row"><label><?php _e('Color of page name'); ?></label></th>
1893 <td>
1894 <select name="cff_like_box_text_color">
1895 <option value="blue" <?php if($cff_like_box_text_color == "blue") echo 'selected="selected"' ?> ><?php _e('Blue'); ?></option>
1896 <option value="white" <?php if($cff_like_box_text_color == "white") echo 'selected="selected"' ?> ><?php _e('White'); ?></option>
1897 </select>
1898 <a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('Why only these 2 colors?'); ?></a>
1899 <p class="cff-tooltip"><?php _e("The styling of the Facebook Like box widget is restricted by Facebook. This means that the only two text colors available are blue and white, intended for either a light of dark color scheme respectively."); ?></p>
1900 </td>
1901 </tr>
1902 <tr valign="top">
1903 <th class="bump-left" scope="row"><label for="cff_likebox_width"><?php _e('Custom Like Box Width'); ?></label></th>
1904 <td>
1905 <input name="cff_likebox_width" type="text" value="<?php esc_attr_e( $cff_likebox_width ); ?>" size="6" />
1906 <span><span>Eg. 50%, 300px</span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Default is 100%'); ?></i></span>
1907 </td>
1908 </tr>
1909 <tr valign="top">
1910 <th class="bump-left" scope="row"><label><?php _e('Show faces of fans'); ?></label></th>
1911 <td>
1912 <input type="checkbox" name="cff_like_box_faces" id="cff_like_box_faces" <?php if($cff_like_box_faces == true) echo 'checked="checked"' ?> />
1913 <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Show thumbnail photos of fans who like your page'); ?></i>
1914 </td>
1915 </tr>
1916 <tr valign="top">
1917 <th class="bump-left" scope="row"><label><?php _e('Show the Like Box border'); ?></label></th>
1918 <td>
1919 <input type="checkbox" name="cff_like_box_border" id="cff_like_box_outside" <?php if($cff_like_box_border == true) echo 'checked="checked"' ?> />
1920 <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Only applicable if you are showing faces of fans'); ?></i>
1921 </td>
1922 </tr>
1923 </tbody>
1924 </table>
1925
1926
1927 <hr />
1928 <h3 id="cff-header"><?php _e('Feed Header'); ?></h3>
1929 <table class="form-table">
1930 <tbody>
1931 <tr valign="top">
1932 <th class="bump-left" scope="row"><label><?php _e('Show Feed Header'); ?></label></th>
1933 <td>
1934 <input type="checkbox" name="cff_show_header" id="cff_show_header" <?php if($cff_show_header == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes'); ?>
1935 <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('This will show a header at the top of your feed'); ?></i>
1936 </td>
1937 </tr>
1938 <tr valign="top">
1939 <th class="bump-left" scope="row"><label><?php _e('Display outside the scrollable area'); ?></label></th>
1940 <td>
1941 <input type="checkbox" name="cff_header_outside" id="cff_header_outside" <?php if($cff_header_outside == true) echo 'checked="checked"' ?> />&nbsp;<?php _e('Yes'); ?>
1942 <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Only applicable if you have set a height on the feed'); ?></i>
1943 </td>
1944 </tr>
1945 </tr>
1946 <th class="bump-left" scope="row"><label><?php _e('Text'); ?></label></th>
1947 <td>
1948 <input name="cff_header_text" type="text" value="<?php esc_attr_e( $cff_header_text ); ?>" size="30" />
1949 <span>Eg. Facebook Feed, Events, News..</span>
1950 </td>
1951 </tr>
1952 <tr valign="top">
1953 <th class="bump-left" scope="row"><label><?php _e('Background Color'); ?></label></th>
1954 <td>
1955 <label for="cff_header_bg_color">#</label>
1956 <input name="cff_header_bg_color" type="text" value="<?php esc_attr_e( $cff_header_bg_color ); ?>" size="10" />
1957 <span>Eg. ED9A00</span>&nbsp;&nbsp;<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
1958 </td>
1959 </tr>
1960 </tr>
1961 <th class="bump-left" scope="row"><label><?php _e('Padding'); ?></label></th>
1962 <td>
1963 <input name="cff_header_padding" type="text" value="<?php esc_attr_e( $cff_header_padding ); ?>" size="6" />
1964 <span>Eg. 20px, 5%. <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('This is the amount of padding/spacing that goes around the header.'); ?></i></span>
1965 </td>
1966 </tr>
1967 <tr>
1968 <th class="bump-left" scope="row"><label><?php _e('Text Size'); ?></label></th>
1969 <td>
1970 <select name="cff_header_text_size">
1971 <option value="inherit" <?php if($cff_header_text_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1972 <option value="10" <?php if($cff_header_text_size == "10") echo 'selected="selected"' ?> >10px</option>
1973 <option value="11" <?php if($cff_header_text_size == "11") echo 'selected="selected"' ?> >11px</option>
1974 <option value="12" <?php if($cff_header_text_size == "12") echo 'selected="selected"' ?> >12px</option>
1975 <option value="14" <?php if($cff_header_text_size == "14") echo 'selected="selected"' ?> >14px</option>
1976 <option value="16" <?php if($cff_header_text_size == "16") echo 'selected="selected"' ?> >16px</option>
1977 <option value="18" <?php if($cff_header_text_size == "18") echo 'selected="selected"' ?> >18px</option>
1978 <option value="20" <?php if($cff_header_text_size == "20") echo 'selected="selected"' ?> >20px</option>
1979 <option value="24" <?php if($cff_header_text_size == "24") echo 'selected="selected"' ?> >24px</option>
1980 <option value="28" <?php if($cff_header_text_size == "28") echo 'selected="selected"' ?> >28px</option>
1981 <option value="32" <?php if($cff_header_text_size == "32") echo 'selected="selected"' ?> >32px</option>
1982 <option value="36" <?php if($cff_header_text_size == "36") echo 'selected="selected"' ?> >36px</option>
1983 <option value="42" <?php if($cff_header_text_size == "42") echo 'selected="selected"' ?> >42px</option>
1984 <option value="48" <?php if($cff_header_text_size == "48") echo 'selected="selected"' ?> >48px</option>
1985 <option value="54" <?php if($cff_header_text_size == "54") echo 'selected="selected"' ?> >54px</option>
1986 <option value="60" <?php if($cff_header_text_size == "60") echo 'selected="selected"' ?> >60px</option>
1987 </select>
1988 </td>
1989 </tr>
1990 <tr>
1991 <th class="bump-left" scope="row"><label><?php _e('Text Weight'); ?></label></th>
1992 <td>
1993 <select name="cff_header_text_weight">
1994 <option value="inherit" <?php if($cff_header_text_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
1995 <option value="normal" <?php if($cff_header_text_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
1996 <option value="bold" <?php if($cff_header_text_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
1997 </select>
1998 </td>
1999 </tr>
2000 <tr>
2001 <th class="bump-left" scope="row"><label><?php _e('Text Color'); ?></label></th>
2002 <td>
2003 #<input name="cff_header_text_color" type="text" value="<?php esc_attr_e( $cff_header_text_color ); ?>" size="10" placeholder="Eg. ED9A00" />
2004 <span><a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a></span>
2005 </td>
2006 </tr>
2007 <tr>
2008 <th class="bump-left" scope="row"><label><?php _e('Icon Type'); ?></label></th>
2009 <td>
2010 <select name="cff_header_icon" id="cff-header-icon">
2011 <option value="facebook-square" <?php if($cff_header_icon == "facebook-square") echo 'selected="selected"' ?> >Facebook 1</option>
2012 <option value="facebook" <?php if($cff_header_icon == "facebook") echo 'selected="selected"' ?> >Facebook 2</option>
2013 <option value="calendar" <?php if($cff_header_icon == "calendar") echo 'selected="selected"' ?> >Events 1</option>
2014 <option value="calendar-o" <?php if($cff_header_icon == "calendar-o") echo 'selected="selected"' ?> >Events 2</option>
2015 <option value="picture-o" <?php if($cff_header_icon == "picture-o") echo 'selected="selected"' ?> >Photos</option>
2016 <option value="users" <?php if($cff_header_icon == "users") echo 'selected="selected"' ?> >People</option>
2017 <option value="thumbs-o-up" <?php if($cff_header_icon == "thumbs-o-up") echo 'selected="selected"' ?> >Thumbs Up 1</option>
2018 <option value="thumbs-up" <?php if($cff_header_icon == "thumbs-up") echo 'selected="selected"' ?> >Thumbs Up 2</option>
2019 <option value="comment-o" <?php if($cff_header_icon == "comment-o") echo 'selected="selected"' ?> >Speech Bubble 1</option>
2020 <option value="comment" <?php if($cff_header_icon == "comment") echo 'selected="selected"' ?> >Speech Bubble 2</option>
2021 <option value="ticket" <?php if($cff_header_icon == "ticket") echo 'selected="selected"' ?> >Ticket</option>
2022 <option value="list-alt" <?php if($cff_header_icon == "list-alt") echo 'selected="selected"' ?> >News List</option>
2023 <option value="file" <?php if($cff_header_icon == "file") echo 'selected="selected"' ?> >File 1</option>
2024 <option value="file-o" <?php if($cff_header_icon == "file-o") echo 'selected="selected"' ?> >File 2</option>
2025 <option value="file-text" <?php if($cff_header_icon == "file-text") echo 'selected="selected"' ?> >File 3</option>
2026 <option value="file-text-o" <?php if($cff_header_icon == "file-text-o") echo 'selected="selected"' ?> >File 4</option>
2027 <option value="youtube-play" <?php if($cff_header_icon == "youtube-play") echo 'selected="selected"' ?> >Video</option>
2028 <option value="youtube" <?php if($cff_header_icon == "youtube") echo 'selected="selected"' ?> >YouTube</option>
2029 <option value="vimeo-square" <?php if($cff_header_icon == "vimeo-square") echo 'selected="selected"' ?> >Vimeo</option>
2030 </select>
2031
2032 <i id="cff-header-icon-example" class="fa fa-facebook-square"></i>
2033 </td>
2034 </tr>
2035 <tr>
2036 <th class="bump-left" scope="row"><label><?php _e('Icon Color'); ?></label></th>
2037 <td>
2038 #<input name="cff_header_icon_color" id="cff-header-icon-color" type="text" value="<?php esc_attr_e( $cff_header_icon_color ); ?>" size="10" placeholder="Eg. ED9A00" />
2039 <span><a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a></span>
2040 </td>
2041 </tr>
2042 <tr>
2043 <th class="bump-left" scope="row"><label><?php _e('Icon Size'); ?></label></th>
2044 <td>
2045 <select name="cff_header_icon_size" id="cff-header-icon-size">
2046 <option value="10" <?php if($cff_header_icon_size == "10") echo 'selected="selected"' ?> >10px</option>
2047 <option value="11" <?php if($cff_header_icon_size == "11") echo 'selected="selected"' ?> >11px</option>
2048 <option value="12" <?php if($cff_header_icon_size == "12") echo 'selected="selected"' ?> >12px</option>
2049 <option value="14" <?php if($cff_header_icon_size == "14") echo 'selected="selected"' ?> >14px</option>
2050 <option value="16" <?php if($cff_header_icon_size == "16") echo 'selected="selected"' ?> >16px</option>
2051 <option value="18" <?php if($cff_header_icon_size == "18") echo 'selected="selected"' ?> >18px</option>
2052 <option value="20" <?php if($cff_header_icon_size == "20") echo 'selected="selected"' ?> >20px</option>
2053 <option value="24" <?php if($cff_header_icon_size == "24") echo 'selected="selected"' ?> >24px</option>
2054 <option value="28" <?php if($cff_header_icon_size == "28") echo 'selected="selected"' ?> >28px</option>
2055 <option value="32" <?php if($cff_header_icon_size == "32") echo 'selected="selected"' ?> >32px</option>
2056 <option value="36" <?php if($cff_header_icon_size == "36") echo 'selected="selected"' ?> >36px</option>
2057 <option value="42" <?php if($cff_header_icon_size == "42") echo 'selected="selected"' ?> >42px</option>
2058 <option value="48" <?php if($cff_header_icon_size == "48") echo 'selected="selected"' ?> >48px</option>
2059 <option value="54" <?php if($cff_header_icon_size == "54") echo 'selected="selected"' ?> >54px</option>
2060 <option value="60" <?php if($cff_header_icon_size == "60") echo 'selected="selected"' ?> >60px</option>
2061 </select>
2062 </td>
2063 </tr>
2064
2065 </tbody>
2066 </table>
2067
2068
2069 <hr />
2070 <h3><?php _e('Separating Line'); ?></h3>
2071 <table class="form-table">
2072 <tbody>
2073 <tr valign="top">
2074 <th class="bump-left" scope="row"><label><?php _e('Separating Line Color'); ?></label></th>
2075 <td>
2076 <label for="cff_sep_color">#</label>
2077 <input name="cff_sep_color" type="text" value="<?php esc_attr_e( $cff_sep_color ); ?>" size="10" />
2078 <span>Eg. ED9A00</span>&nbsp;&nbsp;<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
2079 </td>
2080 </tr>
2081 <tr valign="top">
2082 <th class="bump-left" scope="row"><label><?php _e('Separating Line Thickness'); ?></label></th>
2083 <td>
2084 <input name="cff_sep_size" type="text" value="<?php esc_attr_e( $cff_sep_size ); ?>" size="1" /><span>px</span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('(Leave empty to hide)'); ?></i>
2085 </td>
2086 </tr>
2087 </tbody>
2088 </table>
2089 <?php submit_button(); ?>
2090 <a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
2091 <?php } //End Misc tab ?>
2092
2093
2094 <?php if( $active_tab == 'custom_text' ) { //Start Post Layout tab ?>
2095 <input type="hidden" name="<?php echo $style_custom_text_hidden_field_name; ?>" value="Y">
2096 <br />
2097 <h3><?php _e('Custom Text / Translate'); ?></h3>
2098 <p><?php _e('Enter custom text for the words below, or translate it into the language you would like to use.'); ?></p>
2099 <table class="form-table cff-translate-table" style="width: 100%; max-width: 940px;">
2100 <tbody>
2101
2102 <thead>
2103 <tr>
2104 <th><?php _e('Original Text'); ?></th>
2105 <th><?php _e('Custom Text / Translation'); ?></th>
2106 <th><?php _e('Context'); ?></th>
2107 </tr>
2108 </thead>
2109
2110 <tr class="cff-table-header"><th colspan="3"><?php _e('Post Text'); ?></th></tr>
2111 <tr>
2112 <td><label for="cff_see_more_text" class="bump-left"><?php _e('See More'); ?></label></td>
2113 <td><input name="cff_see_more_text" type="text" value="<?php esc_attr_e( $cff_see_more_text ); ?>" /></td>
2114 <td class="cff-context"><?php _e('Used when truncating the post text'); ?></td>
2115 </tr>
2116
2117 <tr>
2118 <td><label for="cff_see_less_text" class="bump-left"><?php _e('See Less'); ?></label></td>
2119 <td><input name="cff_see_less_text" type="text" value="<?php esc_attr_e( $cff_see_less_text ); ?>" /></td>
2120 <td class="cff-context"><?php _e('Used when truncating the post text'); ?></td>
2121 </tr>
2122
2123 <tr>
2124 <td><label for="cff_translate_photos_text" class="bump-left"><?php _e('photos'); ?></label></td>
2125 <td><input name="cff_translate_photos_text" type="text" value="<?php esc_attr_e( $cff_translate_photos_text ); ?>" /></td>
2126 <td class="cff-context"><?php _e('Added to the end of an album name. Eg. (6 photos)'); ?></td>
2127 </tr>
2128
2129 <tr class="cff-table-header"><th colspan="3"><?php _e('Link to Facebook'); ?></th></tr>
2130 <tr>
2131 <td><label for="cff_facebook_link_text" class="bump-left"><?php _e('View on Facebook'); ?></label></td>
2132 <td><input name="cff_facebook_link_text" type="text" value="<?php esc_attr_e( $cff_facebook_link_text ); ?>" /></td>
2133 <td class="cff-context"><?php _e('Links to the post on Facebook'); ?></td>
2134 </tr>
2135
2136
2137 <tr class="cff-table-header"><th colspan="3"><?php _e('Date'); ?></th></tr>
2138 <tr>
2139 <td><label for="cff_photos_text" class="bump-left"><?php _e('"Posted _ hours ago" text'); ?></label></td>
2140 <td class="cff-translate-date">
2141
2142 <label for="cff_translate_second"><?php _e("second"); ?></label>
2143 <input name="cff_translate_second" type="text" value="<?php esc_attr_e( $cff_translate_second ); ?>" size="20" />
2144 <br />
2145 <label for="cff_translate_seconds"><?php _e("seconds"); ?></label>
2146 <input name="cff_translate_seconds" type="text" value="<?php esc_attr_e( $cff_translate_second ); ?>" size="20" />
2147 <br />
2148 <label for="cff_translate_minute"><?php _e("minute"); ?></label>
2149 <input name="cff_translate_minute" type="text" value="<?php esc_attr_e( $cff_translate_minute ); ?>" size="20" />
2150 <br />
2151 <label for="cff_translate_minutes"><?php _e("minutes"); ?></label>
2152 <input name="cff_translate_minutes" type="text" value="<?php esc_attr_e( $cff_translate_minutes ); ?>" size="20" />
2153 <br />
2154 <label for="cff_translate_hour"><?php _e("hour"); ?></label>
2155 <input name="cff_translate_hour" type="text" value="<?php esc_attr_e( $cff_translate_hour ); ?>" size="20" />
2156 <br />
2157 <label for="cff_translate_hours"><?php _e("hours"); ?></label>
2158 <input name="cff_translate_hours" type="text" value="<?php esc_attr_e( $cff_translate_hours ); ?>" size="20" />
2159 <br />
2160 <label for="cff_translate_day"><?php _e("day"); ?></label>
2161 <input name="cff_translate_day" type="text" value="<?php esc_attr_e( $cff_translate_day ); ?>" size="20" />
2162 <br />
2163 <label for="cff_translate_days"><?php _e("days"); ?></label>
2164 <input name="cff_translate_days" type="text" value="<?php esc_attr_e( $cff_translate_days ); ?>" size="20" />
2165 <br />
2166 <label for="cff_translate_week"><?php _e("week"); ?></label>
2167 <input name="cff_translate_week" type="text" value="<?php esc_attr_e( $cff_translate_week ); ?>" size="20" />
2168 <br />
2169 <label for="cff_translate_weeks"><?php _e("weeks"); ?></label>
2170 <input name="cff_translate_weeks" type="text" value="<?php esc_attr_e( $cff_translate_weeks ); ?>" size="20" />
2171 <br />
2172 <label for="cff_translate_month"><?php _e("month"); ?></label>
2173 <input name="cff_translate_month" type="text" value="<?php esc_attr_e( $cff_translate_month ); ?>" size="20" />
2174 <br />
2175 <label for="cff_translate_months"><?php _e("months"); ?></label>
2176 <input name="cff_translate_months" type="text" value="<?php esc_attr_e( $cff_translate_months ); ?>" size="20" />
2177 <br />
2178 <label for="cff_translate_year"><?php _e("year"); ?></label>
2179 <input name="cff_translate_year" type="text" value="<?php esc_attr_e( $cff_translate_year ); ?>" size="20" />
2180 <br />
2181 <label for="cff_translate_years"><?php _e("years"); ?></label>
2182 <input name="cff_translate_years" type="text" value="<?php esc_attr_e( $cff_translate_years ); ?>" size="20" />
2183 <br />
2184 <label for="cff_translate_ago"><?php _e("ago"); ?></label>
2185 <input name="cff_translate_ago" type="text" value="<?php esc_attr_e( $cff_translate_ago ); ?>" size="20" />
2186 </td>
2187 <td class="cff-context"><?php _e('Used to translate the "Posted _ days ago" date text'); ?></td>
2188 </tr>
2189
2190 </tbody>
2191 </table>
2192
2193 <?php submit_button(); ?>
2194 <?php } //End Post Layout tab ?>
2195
2196 </form>
2197 <?php
2198 } //End Style_Page
2199 //Enqueue admin styles
2200 function cff_admin_style() {
2201 wp_register_style( 'custom_wp_admin_css', plugin_dir_url( __FILE__ ) . 'css/cff-admin-style.css', false, '1.0.0' );
2202 wp_enqueue_style( 'custom_wp_admin_css' );
2203 wp_enqueue_style( 'cff-font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css', array(), '4.0.3' );
2204 }
2205 add_action( 'admin_enqueue_scripts', 'cff_admin_style' );
2206 //Enqueue admin scripts
2207 function cff_admin_scripts() {
2208 wp_enqueue_script( 'cff_admin_script', plugin_dir_url( __FILE__ ) . 'js/cff-admin-scripts.js' );
2209 if( !wp_script_is('jquery-ui-draggable') ) {
2210 wp_enqueue_script(
2211 array(
2212 'jquery',
2213 'jquery-ui-core',
2214 'jquery-ui-draggable'
2215 )
2216 );
2217 }
2218 wp_enqueue_script( 'hoverIntent' );
2219 }
2220 add_action( 'admin_enqueue_scripts', 'cff_admin_scripts' );
2221 ?>