Version Description
- New: Added localization support. Full support for various languages coming soon
- New: Added CSS classes to different post types to allow for different styling based on post type
- New: Option to link statuses to either the status post itself or the directly to the page/timeline
- New: Added option to add thumbnail faces of fans to the Like box and define a width
- Tweak: Added separate classes to 'View on Facebook' and 'View Link' links so that they can be targeted with CSS
- Tweak: Prefixed every CSS class to prevent styling conflicts with theme stylesheets. Please note that if you used custom CSS to style parts of the feed that the CSS classes are now prefixed with 'cff-' to prevent theme conflicts. Eg. '.more' is now '.cff-more'.
Download this release
Release Info
Developer | smashballoon |
Plugin | Custom Facebook Feed |
Version | 1.6.4 |
Comparing to | |
See all releases |
Code changes from version 1.6.3 to 1.6.4
- README.txt +21 -6
- css/cff-style.css +17 -16
- custom-facebook-feed-admin.php +1539 -1425
- custom-facebook-feed.php +60 -36
- img/pro.png +0 -0
- js/cff-scripts.js +6 -6
README.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: smashballoon
|
3 |
Tags: facebook, custom, customizable, feed, events, seo, search engine, responsive, mobile, shortcode, social, status, posts
|
4 |
Requires at least: 3.0
|
5 |
-
Tested up to: 3.
|
6 |
-
Stable tag: 1.6.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -11,7 +11,13 @@ The Custom Facebook Feed allows you to display a completely customizable Faceboo
|
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
Display a **completely customizable**, **responsive** and **search engine crawlable** version of your Facebook feed on your website. Completely match the look and feel of the site!
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
= Features =
|
17 |
|
@@ -32,8 +38,9 @@ Display a **completely customizable**, **responsive** and **search engine crawla
|
|
32 |
* Use the shortcode options to style multiple Facebook feeds in completely different ways
|
33 |
* Select the number of Facebook posts to display
|
34 |
* Set a maximum character length for both the text and descriptions of your Facebook posts
|
|
|
35 |
|
36 |
-
To display photos, videos, the number of likes, shares and comments for each Facebook post, multiple layout options and more then [upgrade to the Pro version](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro"). Try out the [Pro demo](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo").
|
37 |
|
38 |
== Installation ==
|
39 |
|
@@ -67,11 +74,11 @@ Yep. You set your default Facebook page ID in the plugin's settings but then you
|
|
67 |
|
68 |
= Can I show photos and videos in my Custom Facebook feed? =
|
69 |
|
70 |
-
This free plugin only allows you to display textual updates from your Facebook feed. To display photos and videos in your feed you need to upgrade to the
|
71 |
|
72 |
= Can I show the comments associated with each Facebook post? =
|
73 |
|
74 |
-
For this feature please upgrade to the [
|
75 |
|
76 |
= Is the content of my Custom Facebook Feed crawlable by search engines? =
|
77 |
|
@@ -95,6 +102,14 @@ You can embed your Facebook feed directly into a template file by using the Word
|
|
95 |
|
96 |
== Changelog ==
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
= 1.6.3 =
|
99 |
* New: Added support for Facebook 'Offers'
|
100 |
* Fix: Fixed an issue with the 'others' shortcode option not working correctly
|
2 |
Contributors: smashballoon
|
3 |
Tags: facebook, custom, customizable, feed, events, seo, search engine, responsive, mobile, shortcode, social, status, posts
|
4 |
Requires at least: 3.0
|
5 |
+
Tested up to: 3.7.1
|
6 |
+
Stable tag: 1.6.4
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
Display a **completely customizable**, **responsive** and **search engine crawlable** version of your Facebook feed on your website. Completely match the look and feel of the site with tons of customization options!
|
15 |
+
|
16 |
+
*"The perfect plugin with amazing support! What else do you want? Get it!"* - [JoeJeffries](http://wordpress.org/support/topic/you-dont-already-have-this)
|
17 |
+
|
18 |
+
*"Loving the Facebook feed plugin from @smashballoon. It's gonna transform my work's website! Great customer service too :)"* - [Grace Snow](https://twitter.com/GraceSnow/statuses/365915197149429760)
|
19 |
+
|
20 |
+
*"I tried a few other Facebook plugins but this was by far the simplest and easiest to use. The others were quite confusing or didn't let you change even the simplest things. This plugin lets you change literally every part of it. Didn't have any issues setting it up at all and it's working great. Keep up the good work!"* [Ben Donald](http://wordpress.org/support/topic/simple-to-set-up-and-looks-great)
|
21 |
|
22 |
= Features =
|
23 |
|
38 |
* Use the shortcode options to style multiple Facebook feeds in completely different ways
|
39 |
* Select the number of Facebook posts to display
|
40 |
* Set a maximum character length for both the text and descriptions of your Facebook posts
|
41 |
+
* Localization support
|
42 |
|
43 |
+
To display photos, videos, the number of likes, shares and comments for each Facebook post, multiple layout options, post filtering by type or #hashtag/string and more then [upgrade to the Pro version](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro"). Try out the [Pro demo](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo").
|
44 |
|
45 |
== Installation ==
|
46 |
|
74 |
|
75 |
= Can I show photos and videos in my Custom Facebook feed? =
|
76 |
|
77 |
+
This free plugin only allows you to display textual updates from your Facebook feed. To display photos and videos in your feed you need to upgrade to the Pro version of the plugin. Try out a demo of the Pro version on the [Custom Facebook Feed website](http://smashballoon.com/custom-facebook-feed/demo "Custom Facebook Feed Demo"), and find out more about the Pro version [here](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro").
|
78 |
|
79 |
= Can I show the comments associated with each Facebook post? =
|
80 |
|
81 |
+
For this feature please upgrade to the [Pro version of the plugin](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed Pro).
|
82 |
|
83 |
= Is the content of my Custom Facebook Feed crawlable by search engines? =
|
84 |
|
102 |
|
103 |
== Changelog ==
|
104 |
|
105 |
+
= 1.6.4 =
|
106 |
+
* New: Added localization support. Full support for various languages coming soon
|
107 |
+
* New: Added CSS classes to different post types to allow for different styling based on post type
|
108 |
+
* New: Option to link statuses to either the status post itself or the directly to the page/timeline
|
109 |
+
* New: Added option to add thumbnail faces of fans to the Like box and define a width
|
110 |
+
* Tweak: Added separate classes to 'View on Facebook' and 'View Link' links so that they can be targeted with CSS
|
111 |
+
* Tweak: Prefixed every CSS class to prevent styling conflicts with theme stylesheets. Please note that if you used custom CSS to style parts of the feed that the CSS classes are now prefixed with 'cff-' to prevent theme conflicts. Eg. '.more' is now '.cff-more'.
|
112 |
+
|
113 |
= 1.6.3 =
|
114 |
* New: Added support for Facebook 'Offers'
|
115 |
* Fix: Fixed an issue with the 'others' shortcode option not working correctly
|
css/cff-style.css
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
/*** TYPOGRAPHY ***/
|
26 |
/******************/
|
27 |
/*See more/less links*/
|
28 |
-
#cff .less{
|
29 |
display: none;
|
30 |
}
|
31 |
/* Links */
|
@@ -82,7 +82,7 @@
|
|
82 |
/*************/
|
83 |
/*** MEDIA ***/
|
84 |
/*************/
|
85 |
-
#cff .break-word{
|
86 |
word-break: break-all;
|
87 |
}
|
88 |
/* Link */
|
@@ -94,51 +94,52 @@
|
|
94 |
font-weight: normal;
|
95 |
}
|
96 |
/*Link image*/
|
97 |
-
#cff .link{
|
98 |
float: left;
|
99 |
clear: both;
|
100 |
max-width: 20%;
|
101 |
margin-top: 10px;
|
102 |
}
|
103 |
-
#cff .link img{
|
104 |
max-width: 100%;
|
105 |
}
|
106 |
/*Link text*/
|
107 |
-
#cff .text-link{
|
108 |
float: left;
|
109 |
clear: none;
|
110 |
width: 72%;
|
111 |
margin-left: 3%;
|
112 |
padding: 5px 0 10px 0;
|
113 |
}
|
114 |
-
#cff .text-link.no-image{
|
115 |
width: 100%;
|
116 |
margin-left: 0;
|
117 |
}
|
118 |
/* Feed events */
|
119 |
-
#cff .details{
|
120 |
float: left;
|
121 |
clear: none;
|
122 |
width: 100%;
|
123 |
padding: 10px 0 0 0;
|
124 |
}
|
125 |
-
#cff .details h5{
|
126 |
margin: 0 0 5px 0;
|
127 |
font-size: 16px;
|
128 |
}
|
129 |
-
#cff .details p{
|
130 |
font-size: 14px;
|
131 |
}
|
132 |
-
#cff .details .info{
|
133 |
padding: 10px 0 0 0;
|
134 |
line-height: 1.2;
|
135 |
}
|
136 |
-
#cff .details .where,
|
137 |
-
#cff .details .when{
|
138 |
/*font-weight: bold;*/
|
139 |
}
|
140 |
/* View on Facebook / View Link text */
|
141 |
-
#cff .cff-viewpost
|
|
|
142 |
float: right;
|
143 |
clear: none;
|
144 |
padding-top: 12px;
|
@@ -154,10 +155,10 @@
|
|
154 |
margin-left: -10px;
|
155 |
}
|
156 |
/*Like box is not inside of #cff*/
|
157 |
-
.cff-likebox.top.outside{
|
158 |
margin-bottom: 10px;
|
159 |
}
|
160 |
-
.cff-likebox.bottom.outside{
|
161 |
margin-top: 10px;
|
162 |
}
|
163 |
/* Clear fix */
|
@@ -175,7 +176,7 @@
|
|
175 |
/*********************/
|
176 |
/*** STYLE OPTIONS ***/
|
177 |
/*********************/
|
178 |
-
#cff.fixed-height{
|
179 |
overflow: hidden;
|
180 |
overflow-y: auto;
|
181 |
padding: 5px 10px;
|
25 |
/*** TYPOGRAPHY ***/
|
26 |
/******************/
|
27 |
/*See more/less links*/
|
28 |
+
#cff .cff-less{
|
29 |
display: none;
|
30 |
}
|
31 |
/* Links */
|
82 |
/*************/
|
83 |
/*** MEDIA ***/
|
84 |
/*************/
|
85 |
+
#cff .cff-break-word{
|
86 |
word-break: break-all;
|
87 |
}
|
88 |
/* Link */
|
94 |
font-weight: normal;
|
95 |
}
|
96 |
/*Link image*/
|
97 |
+
#cff .cff-link{
|
98 |
float: left;
|
99 |
clear: both;
|
100 |
max-width: 20%;
|
101 |
margin-top: 10px;
|
102 |
}
|
103 |
+
#cff .cff-link img{
|
104 |
max-width: 100%;
|
105 |
}
|
106 |
/*Link text*/
|
107 |
+
#cff .cff-text-link{
|
108 |
float: left;
|
109 |
clear: none;
|
110 |
width: 72%;
|
111 |
margin-left: 3%;
|
112 |
padding: 5px 0 10px 0;
|
113 |
}
|
114 |
+
#cff .cff-text-link.cff-no-image{
|
115 |
width: 100%;
|
116 |
margin-left: 0;
|
117 |
}
|
118 |
/* Feed events */
|
119 |
+
#cff .cff-details{
|
120 |
float: left;
|
121 |
clear: none;
|
122 |
width: 100%;
|
123 |
padding: 10px 0 0 0;
|
124 |
}
|
125 |
+
#cff .cff-details h5{
|
126 |
margin: 0 0 5px 0;
|
127 |
font-size: 16px;
|
128 |
}
|
129 |
+
#cff .cff-details p{
|
130 |
font-size: 14px;
|
131 |
}
|
132 |
+
#cff .cff-details .cff-info{
|
133 |
padding: 10px 0 0 0;
|
134 |
line-height: 1.2;
|
135 |
}
|
136 |
+
#cff .cff-details .cff-where,
|
137 |
+
#cff .cff-details .cff-when{
|
138 |
/*font-weight: bold;*/
|
139 |
}
|
140 |
/* View on Facebook / View Link text */
|
141 |
+
#cff .cff-viewpost-link,
|
142 |
+
#cff .cff-viewpost-facebook{
|
143 |
float: right;
|
144 |
clear: none;
|
145 |
padding-top: 12px;
|
155 |
margin-left: -10px;
|
156 |
}
|
157 |
/*Like box is not inside of #cff*/
|
158 |
+
.cff-likebox.cff-top.cff-outside{
|
159 |
margin-bottom: 10px;
|
160 |
}
|
161 |
+
.cff-likebox.cff-bottom.cff-outside{
|
162 |
margin-top: 10px;
|
163 |
}
|
164 |
/* Clear fix */
|
176 |
/*********************/
|
177 |
/*** STYLE OPTIONS ***/
|
178 |
/*********************/
|
179 |
+
#cff.cff-fixed-height{
|
180 |
overflow: hidden;
|
181 |
overflow-y: auto;
|
182 |
padding: 5px 10px;
|
custom-facebook-feed-admin.php
CHANGED
@@ -1,1426 +1,1540 @@
|
|
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 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
$
|
37 |
-
$
|
38 |
-
$
|
39 |
-
$
|
40 |
-
$
|
41 |
-
$
|
42 |
-
$
|
43 |
-
$
|
44 |
-
// Read in existing option value from database
|
45 |
-
$access_token_val = get_option( $access_token );
|
46 |
-
$page_id_val = get_option( $page_id );
|
47 |
-
$num_show_val = get_option( $num_show, '5' );
|
48 |
-
$cff_post_limit_val = get_option( $cff_post_limit );
|
49 |
-
$cff_show_others_val = get_option( $cff_show_others );
|
50 |
-
$cff_cache_time_val = get_option( $cff_cache_time, '1' );
|
51 |
-
$cff_cache_time_unit_val = get_option( $cff_cache_time_unit, 'hours' );
|
52 |
-
|
53 |
-
if
|
54 |
-
|
55 |
-
|
56 |
-
$
|
57 |
-
$
|
58 |
-
$
|
59 |
-
$
|
60 |
-
$
|
61 |
-
$
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
update_option( $
|
66 |
-
update_option( $
|
67 |
-
update_option( $
|
68 |
-
update_option( $
|
69 |
-
update_option( $
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
$wpdb
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
<
|
107 |
-
<
|
108 |
-
<
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
<
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
<
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
<
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
<
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
<
|
132 |
-
|
133 |
-
<
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
<
|
139 |
-
|
140 |
-
<
|
141 |
-
<
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
<
|
147 |
-
|
148 |
-
<
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
<
|
154 |
-
|
155 |
-
<
|
156 |
-
|
157 |
-
<option value="
|
158 |
-
<option value="
|
159 |
-
|
160 |
-
|
161 |
-
<
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
<?php
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
'
|
257 |
-
|
258 |
-
|
259 |
-
'
|
260 |
-
|
261 |
-
'
|
262 |
-
'
|
263 |
-
'
|
264 |
-
'
|
265 |
-
|
266 |
-
|
267 |
-
'
|
268 |
-
|
269 |
-
'
|
270 |
-
|
271 |
-
'
|
272 |
-
|
273 |
-
'
|
274 |
-
'
|
275 |
-
'
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
$
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
$
|
385 |
-
|
386 |
-
$
|
387 |
-
$
|
388 |
-
//
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
$
|
486 |
-
$
|
487 |
-
$
|
488 |
-
|
489 |
-
$
|
490 |
-
$
|
491 |
-
|
492 |
-
$
|
493 |
-
$
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
$options[ '
|
499 |
-
|
500 |
-
$options[ '
|
501 |
-
$options[ '
|
502 |
-
$options[ '
|
503 |
-
$options[ '
|
504 |
-
|
505 |
-
$options[ '
|
506 |
-
$options[ '
|
507 |
-
$options[ '
|
508 |
-
|
509 |
-
$options[ '
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
$
|
517 |
-
$
|
518 |
-
$
|
519 |
-
$
|
520 |
-
$
|
521 |
-
|
522 |
-
$
|
523 |
-
$
|
524 |
-
$
|
525 |
-
//
|
526 |
-
$options[ '
|
527 |
-
|
528 |
-
$options[ '
|
529 |
-
$options[ '
|
530 |
-
$options[ '
|
531 |
-
$options[ '
|
532 |
-
$options[ '
|
533 |
-
$options[ '
|
534 |
-
|
535 |
-
$options[ '
|
536 |
-
$options[ '
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
$
|
545 |
-
|
546 |
-
$
|
547 |
-
$
|
548 |
-
$
|
549 |
-
|
550 |
-
$
|
551 |
-
|
552 |
-
$
|
553 |
-
$
|
554 |
-
|
555 |
-
$
|
556 |
-
$
|
557 |
-
$
|
558 |
-
$
|
559 |
-
$
|
560 |
-
|
561 |
-
|
562 |
-
$
|
563 |
-
$
|
564 |
-
$
|
565 |
-
$
|
566 |
-
$
|
567 |
-
//
|
568 |
-
$
|
569 |
-
|
570 |
-
$
|
571 |
-
|
572 |
-
$
|
573 |
-
$
|
574 |
-
$
|
575 |
-
$
|
576 |
-
$
|
577 |
-
$
|
578 |
-
$
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
$
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
<?php
|
692 |
-
<?php
|
693 |
-
|
694 |
-
|
695 |
-
<
|
696 |
-
|
697 |
-
<
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
<
|
717 |
-
|
718 |
-
<
|
719 |
-
</td>
|
720 |
-
</tr>
|
721 |
-
|
722 |
-
<
|
723 |
-
|
724 |
-
<
|
725 |
-
</td>
|
726 |
-
</tr>
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
<
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
<
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
<
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
<
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
<
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
<
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
</
|
824 |
-
</
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
<
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
<
|
908 |
-
<
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
<
|
915 |
-
<
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
</
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
<
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
<tr>
|
997 |
-
<th><label for="
|
998 |
-
<td>
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
<?php $
|
1009 |
-
<option value="
|
1010 |
-
<option value="
|
1011 |
-
<option value="
|
1012 |
-
<option value="
|
1013 |
-
<option value="
|
1014 |
-
<option value="
|
1015 |
-
<option value="
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
<div id="adminform" class="postbox" style="display: block;">
|
1045 |
-
<div class="handlediv" title="Click to toggle"><br></div>
|
1046 |
-
<h3 class="hndle"><span><?php _e('
|
1047 |
-
<div class="inside">
|
1048 |
-
<table class="form-table">
|
1049 |
-
<tbody>
|
1050 |
-
|
1051 |
-
|
1052 |
-
<
|
1053 |
-
|
1054 |
-
|
1055 |
-
<option value="
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
<option value="
|
1069 |
-
<option value="
|
1070 |
-
<option value="
|
1071 |
-
<option value="
|
1072 |
-
<option value="
|
1073 |
-
<option value="
|
1074 |
-
<option value="
|
1075 |
-
<option value="
|
1076 |
-
<option value="
|
1077 |
-
<option value="
|
1078 |
-
<option value="
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
<
|
1124 |
-
|
1125 |
-
<
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
<
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
<option value="
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
<option value="
|
1167 |
-
<option value="
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
<?php $
|
1176 |
-
<option value="
|
1177 |
-
<option value="
|
1178 |
-
<option value="
|
1179 |
-
<option value="
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
<option value="
|
1188 |
-
<option value="
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
<
|
1195 |
-
|
1196 |
-
<
|
1197 |
-
|
1198 |
-
|
1199 |
-
</
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
|
1221 |
-
|
1222 |
-
<option value="
|
1223 |
-
<option value="
|
1224 |
-
<option value="
|
1225 |
-
<option value="
|
1226 |
-
<option value="
|
1227 |
-
<option value="
|
1228 |
-
<option value="
|
1229 |
-
<option value="
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
<option value="
|
1238 |
-
|
1239 |
-
|
1240 |
-
|
1241 |
-
|
1242 |
-
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
|
1247 |
-
|
1248 |
-
|
1249 |
-
|
1250 |
-
</
|
1251 |
-
|
1252 |
-
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
<option value="
|
1273 |
-
<option value="
|
1274 |
-
<option value="
|
1275 |
-
<option value="
|
1276 |
-
<option value="
|
1277 |
-
<option value="
|
1278 |
-
<option value="
|
1279 |
-
<option value="
|
1280 |
-
<option value="
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
|
1346 |
-
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
<
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
<
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1426 |
?>
|
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 |
+
$num_show = 'cff_num_show';
|
39 |
+
$cff_post_limit = 'cff_post_limit';
|
40 |
+
$cff_show_others = 'cff_show_others';
|
41 |
+
$cff_cache_time = 'cff_cache_time';
|
42 |
+
$cff_cache_time_unit = 'cff_cache_time_unit';
|
43 |
+
$cff_locale = 'cff_locale';
|
44 |
+
// Read in existing option value from database
|
45 |
+
$access_token_val = get_option( $access_token );
|
46 |
+
$page_id_val = get_option( $page_id );
|
47 |
+
$num_show_val = get_option( $num_show, '5' );
|
48 |
+
$cff_post_limit_val = get_option( $cff_post_limit );
|
49 |
+
$cff_show_others_val = get_option( $cff_show_others );
|
50 |
+
$cff_cache_time_val = get_option( $cff_cache_time, '1' );
|
51 |
+
$cff_cache_time_unit_val = get_option( $cff_cache_time_unit, 'hours' );
|
52 |
+
$cff_locale_val = get_option( $cff_locale, 'en_US' );
|
53 |
+
// See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
|
54 |
+
if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) {
|
55 |
+
// Read their posted value
|
56 |
+
$access_token_val = $_POST[ $access_token ];
|
57 |
+
$page_id_val = $_POST[ $page_id ];
|
58 |
+
$num_show_val = $_POST[ $num_show ];
|
59 |
+
$cff_post_limit_val = $_POST[ $cff_post_limit ];
|
60 |
+
$cff_show_others_val = $_POST[ $cff_show_others ];
|
61 |
+
$cff_cache_time_val = $_POST[ $cff_cache_time ];
|
62 |
+
$cff_cache_time_unit_val = $_POST[ $cff_cache_time_unit ];
|
63 |
+
$cff_locale_val = $_POST[ $cff_locale ];
|
64 |
+
// Save the posted value in the database
|
65 |
+
update_option( $access_token, $access_token_val );
|
66 |
+
update_option( $page_id, $page_id_val );
|
67 |
+
update_option( $num_show, $num_show_val );
|
68 |
+
update_option( $cff_post_limit, $cff_post_limit_val );
|
69 |
+
update_option( $cff_show_others, $cff_show_others_val );
|
70 |
+
update_option( $cff_cache_time, $cff_cache_time_val );
|
71 |
+
update_option( $cff_cache_time_unit, $cff_cache_time_unit_val );
|
72 |
+
update_option( $cff_locale, $cff_locale_val );
|
73 |
+
|
74 |
+
//Delete the transient for the main page ID
|
75 |
+
delete_transient( 'cff_posts_json_' .$page_id_val );
|
76 |
+
delete_transient( 'cff_feed_json_' .$page_id_val );
|
77 |
+
delete_transient( 'cff_events_json_' . $page_id_val );
|
78 |
+
//Delete ALL transients
|
79 |
+
global $wpdb;
|
80 |
+
$table_name = $wpdb->prefix . "options";
|
81 |
+
$wpdb->query( "
|
82 |
+
DELETE
|
83 |
+
FROM $table_name
|
84 |
+
WHERE `option_name` LIKE ('%cff\_posts\_json\_%')
|
85 |
+
" );
|
86 |
+
$wpdb->query( "
|
87 |
+
DELETE
|
88 |
+
FROM $table_name
|
89 |
+
WHERE `option_name` LIKE ('%cff\_feed\_json\_%')
|
90 |
+
" );
|
91 |
+
$wpdb->query( "
|
92 |
+
DELETE
|
93 |
+
FROM $table_name
|
94 |
+
WHERE `option_name` LIKE ('%cff\_events\_json\_%')
|
95 |
+
" );
|
96 |
+
// Put an settings updated message on the screen
|
97 |
+
?>
|
98 |
+
<div class="updated"><p><strong><?php _e('Settings saved.', 'custom-facebook-feed' ); ?></strong></p></div>
|
99 |
+
<?php } ?>
|
100 |
+
|
101 |
+
<div id="cff-admin" class="wrap">
|
102 |
+
<div id="header">
|
103 |
+
<h1><?php _e('Custom Facebook Feed Settings'); ?></h1>
|
104 |
+
</div>
|
105 |
+
<form name="form1" method="post" action="">
|
106 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
107 |
+
<br />
|
108 |
+
<h3><?php _e('Configuration'); ?></h3>
|
109 |
+
<table class="form-table">
|
110 |
+
<tbody>
|
111 |
+
<tr valign="top">
|
112 |
+
<th scope="row"><?php _e('Access Token'); ?></th>
|
113 |
+
<td>
|
114 |
+
<input name="cff_access_token" type="text" value="<?php esc_attr_e( $access_token_val ); ?>" size="60" />
|
115 |
+
<!--<a href="#" id="verify-token" class="button-secondary"><?php _e('Verify Access Token'); ?></a>-->
|
116 |
+
<a class="tooltip-link" href="JavaScript:void(0);"><?php _e('How to get an Access Token'); ?></a>
|
117 |
+
<br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123|ABC2fvp5h9tJe4-5-AbC123</i>
|
118 |
+
<p class="tooltip"><?php _e("In order to use the plugin, Facebook requires you to obtain an access token to access their data. Don't worry though, this is really easy to do. Just follow the step-by-step instructions at the following link: <a href='http://smashballoon.com/custom-facebook-feed/access-token/' target='_blank'>How to get a Facebook Access Token</a>"); ?>.</p>
|
119 |
+
</td>
|
120 |
+
</tr>
|
121 |
+
<tr valign="top">
|
122 |
+
<th scope="row"><?php _e('Facebook Page ID'); ?></th>
|
123 |
+
<td>
|
124 |
+
<input name="cff_page_id" type="text" value="<?php esc_attr_e( $page_id_val ); ?>" size="60" />
|
125 |
+
<a class="tooltip-link" href="JavaScript:void(0);"><?php _e('What\'s my Page ID?'); ?></a>
|
126 |
+
<br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123 or smashballoon</i>
|
127 |
+
<p class="tooltip"><?php _e('If you have a Facebook page with a URL like this:'); ?> <code>https://www.facebook.com/your_page_name</code> <?php _e('then the Page ID is just'); ?> <b>your_page_name</b>. <?php _e('If your page URL is structured like this:'); ?> <code>https://www.facebook.com/pages/your_page_name/123654123654123</code> <?php _e('then the Page ID is actually the number at the end, so in this case'); ?> <b>123654123654123</b>.</p>
|
128 |
+
</td>
|
129 |
+
</tr>
|
130 |
+
<tr valign="top">
|
131 |
+
<th scope="row"><?php _e('Number of posts to display'); ?></th>
|
132 |
+
<td>
|
133 |
+
<input name="cff_num_show" type="text" value="<?php esc_attr_e( $num_show_val ); ?>" size="4" />
|
134 |
+
<i style="color: #666; font-size: 11px;">Eg. 5</i>
|
135 |
+
</td>
|
136 |
+
</tr>
|
137 |
+
<tr valign="top">
|
138 |
+
<th scope="row"><?php _e('Alter the post limit'); ?></th>
|
139 |
+
<td>
|
140 |
+
<input name="cff_post_limit" type="text" value="<?php esc_attr_e( $cff_post_limit_val ); ?>" size="4" />
|
141 |
+
<i style="color: #666; font-size: 11px;">Eg. 50</i> <a class="tooltip-link bump-left" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
|
142 |
+
<p class="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.'); ?></p>
|
143 |
+
</td>
|
144 |
+
</tr>
|
145 |
+
<tr valign="top">
|
146 |
+
<th scope="row"><?php _e('Show posts by others on my page'); ?></th>
|
147 |
+
<td>
|
148 |
+
<input name="cff_show_others" type="checkbox" id="cff_show_others" <?php if($cff_show_others_val == true) echo "checked"; ?> />
|
149 |
+
<i style="color: #666; font-size: 11px;"><?php _e('By default only posts by the page owner will be shown. Check this box to also show posts by others.'); ?></i>
|
150 |
+
</td>
|
151 |
+
</tr>
|
152 |
+
<tr valign="top">
|
153 |
+
<th scope="row"><?php _e('Check for new Facebook posts every'); ?></th>
|
154 |
+
<td>
|
155 |
+
<input name="cff_cache_time" type="text" value="<?php esc_attr_e( $cff_cache_time_val ); ?>" size="4" />
|
156 |
+
<select name="cff_cache_time_unit">
|
157 |
+
<option value="minutes" <?php if($cff_cache_time_unit_val == "minutes") echo 'selected="selected"' ?> ><?php _e('Minutes'); ?></option>
|
158 |
+
<option value="hours" <?php if($cff_cache_time_unit_val == "hours") echo 'selected="selected"' ?> ><?php _e('Hours'); ?></option>
|
159 |
+
<option value="days" <?php if($cff_cache_time_unit_val == "days") echo 'selected="selected"' ?> ><?php _e('Days'); ?></option>
|
160 |
+
</select>
|
161 |
+
<a class="tooltip-link bump-left" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
|
162 |
+
<p class="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>
|
163 |
+
</td>
|
164 |
+
</tr>
|
165 |
+
|
166 |
+
<tr valign="top">
|
167 |
+
<th scope="row"><?php _e('Localization'); ?></th>
|
168 |
+
<td>
|
169 |
+
<select name="cff_locale">
|
170 |
+
<option value="af_ZA" <?php if($cff_locale_val == "af_ZA") echo 'selected="selected"' ?> ><?php _e('Afrikaans'); ?></option>
|
171 |
+
<option value="ar_AR" <?php if($cff_locale_val == "ar_AR") echo 'selected="selected"' ?> ><?php _e('Arabic'); ?></option>
|
172 |
+
<option value="az_AZ" <?php if($cff_locale_val == "az_AZ") echo 'selected="selected"' ?> ><?php _e('Azerbaijani'); ?></option>
|
173 |
+
<option value="be_BY" <?php if($cff_locale_val == "be_BY") echo 'selected="selected"' ?> ><?php _e('Belarusian'); ?></option>
|
174 |
+
<option value="bg_BG" <?php if($cff_locale_val == "bg_BG") echo 'selected="selected"' ?> ><?php _e('Bulgarian'); ?></option>
|
175 |
+
<option value="bn_IN" <?php if($cff_locale_val == "bn_IN") echo 'selected="selected"' ?> ><?php _e('Bengali'); ?></option>
|
176 |
+
<option value="bs_BA" <?php if($cff_locale_val == "bs_BA") echo 'selected="selected"' ?> ><?php _e('Bosnian'); ?></option>
|
177 |
+
<option value="ca_ES" <?php if($cff_locale_val == "ca_ES") echo 'selected="selected"' ?> ><?php _e('Catalan'); ?></option>
|
178 |
+
<option value="cs_CZ" <?php if($cff_locale_val == "cs_CZ") echo 'selected="selected"' ?> ><?php _e('Czech'); ?></option>
|
179 |
+
<option value="cy_GB" <?php if($cff_locale_val == "cy_GB") echo 'selected="selected"' ?> ><?php _e('Welsh'); ?></option>
|
180 |
+
<option value="da_DK" <?php if($cff_locale_val == "da_DK") echo 'selected="selected"' ?> ><?php _e('Danish'); ?></option>
|
181 |
+
<option value="de_DE" <?php if($cff_locale_val == "de_DE") echo 'selected="selected"' ?> ><?php _e('German'); ?></option>
|
182 |
+
<option value="el_GR" <?php if($cff_locale_val == "el_GR") echo 'selected="selected"' ?> ><?php _e('Greek'); ?></option>
|
183 |
+
<option value="en_GB" <?php if($cff_locale_val == "en_GB") echo 'selected="selected"' ?> ><?php _e('English (UK)'); ?></option>
|
184 |
+
<option value="en_PI" <?php if($cff_locale_val == "en_PI") echo 'selected="selected"' ?> ><?php _e('English (Pirate)'); ?></option>
|
185 |
+
<option value="en_UD" <?php if($cff_locale_val == "en_UD") echo 'selected="selected"' ?> ><?php _e('English (Upside Down)'); ?></option>
|
186 |
+
<option value="en_US" <?php if($cff_locale_val == "en_US") echo 'selected="selected"' ?> ><?php _e('English (US)'); ?></option>
|
187 |
+
<option value="eo_EO" <?php if($cff_locale_val == "eo_EO") echo 'selected="selected"' ?> ><?php _e('Esperanto'); ?></option>
|
188 |
+
<option value="es_ES" <?php if($cff_locale_val == "es_ES") echo 'selected="selected"' ?> ><?php _e('Spanish (Spain)'); ?></option>
|
189 |
+
<option value="es_LA" <?php if($cff_locale_val == "es_LA") echo 'selected="selected"' ?> ><?php _e('Spanish'); ?></option>
|
190 |
+
<option value="et_EE" <?php if($cff_locale_val == "et_EE") echo 'selected="selected"' ?> ><?php _e('Estonian'); ?></option>
|
191 |
+
<option value="eu_ES" <?php if($cff_locale_val == "eu_ES") echo 'selected="selected"' ?> ><?php _e('Basque'); ?></option>
|
192 |
+
<option value="fa_IR" <?php if($cff_locale_val == "fa_IR") echo 'selected="selected"' ?> ><?php _e('Persian'); ?></option>
|
193 |
+
<option value="fb_LT" <?php if($cff_locale_val == "fb_LT") echo 'selected="selected"' ?> ><?php _e('Leet Speak'); ?></option>
|
194 |
+
<option value="fi_FI" <?php if($cff_locale_val == "fi_FI") echo 'selected="selected"' ?> ><?php _e('Finnish'); ?></option>
|
195 |
+
<option value="fo_FO" <?php if($cff_locale_val == "fo_FO") echo 'selected="selected"' ?> ><?php _e('Faroese'); ?></option>
|
196 |
+
<option value="fr_CA" <?php if($cff_locale_val == "fr_CA") echo 'selected="selected"' ?> ><?php _e('French (Canada)'); ?></option>
|
197 |
+
<option value="fr_FR" <?php if($cff_locale_val == "fr_FR") echo 'selected="selected"' ?> ><?php _e('French (France)'); ?></option>
|
198 |
+
<option value="fy_NL" <?php if($cff_locale_val == "fy_NL") echo 'selected="selected"' ?> ><?php _e('Frisian'); ?></option>
|
199 |
+
<option value="ga_IE" <?php if($cff_locale_val == "ga_IE") echo 'selected="selected"' ?> ><?php _e('Irish'); ?></option>
|
200 |
+
<option value="gl_ES" <?php if($cff_locale_val == "gl_ES") echo 'selected="selected"' ?> ><?php _e('Galician'); ?></option>
|
201 |
+
<option value="he_IL" <?php if($cff_locale_val == "he_IL") echo 'selected="selected"' ?> ><?php _e('Hebrew'); ?></option>
|
202 |
+
<option value="hi_IN" <?php if($cff_locale_val == "hi_IN") echo 'selected="selected"' ?> ><?php _e('Hindi'); ?></option>
|
203 |
+
<option value="hr_HR" <?php if($cff_locale_val == "hr_HR") echo 'selected="selected"' ?> ><?php _e('Croatian'); ?></option>
|
204 |
+
<option value="hu_HU" <?php if($cff_locale_val == "hu_HU") echo 'selected="selected"' ?> ><?php _e('Hungarian'); ?></option>
|
205 |
+
<option value="hy_AM" <?php if($cff_locale_val == "hy_AM") echo 'selected="selected"' ?> ><?php _e('Armenian'); ?></option>
|
206 |
+
<option value="id_ID" <?php if($cff_locale_val == "id_ID") echo 'selected="selected"' ?> ><?php _e('Indonesian'); ?></option>
|
207 |
+
<option value="is_IS" <?php if($cff_locale_val == "is_IS") echo 'selected="selected"' ?> ><?php _e('Icelandic'); ?></option>
|
208 |
+
<option value="it_IT" <?php if($cff_locale_val == "it_IT") echo 'selected="selected"' ?> ><?php _e('Italian'); ?></option>
|
209 |
+
<option value="ja_JP" <?php if($cff_locale_val == "ja_JP") echo 'selected="selected"' ?> ><?php _e('Japanese'); ?></option>
|
210 |
+
<option value="ka_GE" <?php if($cff_locale_val == "ka_GE") echo 'selected="selected"' ?> ><?php _e('Georgian'); ?></option>
|
211 |
+
<option value="km_KH" <?php if($cff_locale_val == "km_KH") echo 'selected="selected"' ?> ><?php _e('Khmer'); ?></option>
|
212 |
+
<option value="ko_KR" <?php if($cff_locale_val == "ko_KR") echo 'selected="selected"' ?> ><?php _e('Korean'); ?></option>
|
213 |
+
<option value="ku_TR" <?php if($cff_locale_val == "ku_TR") echo 'selected="selected"' ?> ><?php _e('Kurdish'); ?></option>
|
214 |
+
<option value="la_VA" <?php if($cff_locale_val == "la_VA") echo 'selected="selected"' ?> ><?php _e('Latin'); ?></option>
|
215 |
+
<option value="lt_LT" <?php if($cff_locale_val == "lt_LT") echo 'selected="selected"' ?> ><?php _e('Lithuanian'); ?></option>
|
216 |
+
<option value="lv_LV" <?php if($cff_locale_val == "lv_LV") echo 'selected="selected"' ?> ><?php _e('Latvian'); ?></option>
|
217 |
+
<option value="mk_MK" <?php if($cff_locale_val == "mk_MK") echo 'selected="selected"' ?> ><?php _e('Macedonian'); ?></option>
|
218 |
+
<option value="ml_IN" <?php if($cff_locale_val == "ml_IN") echo 'selected="selected"' ?> ><?php _e('Malayalam'); ?></option>
|
219 |
+
<option value="ms_MY" <?php if($cff_locale_val == "ms_MY") echo 'selected="selected"' ?> ><?php _e('Malay'); ?></option>
|
220 |
+
<option value="nb_NO" <?php if($cff_locale_val == "nb_NO") echo 'selected="selected"' ?> ><?php _e('Norwegian (bokmal)'); ?></option>
|
221 |
+
<option value="ne_NP" <?php if($cff_locale_val == "ne_NP") echo 'selected="selected"' ?> ><?php _e('Nepali'); ?></option>
|
222 |
+
<option value="nl_NL" <?php if($cff_locale_val == "nl_NL") echo 'selected="selected"' ?> ><?php _e('Dutch'); ?></option>
|
223 |
+
<option value="nn_NO" <?php if($cff_locale_val == "nn_NO") echo 'selected="selected"' ?> ><?php _e('Norwegian (nynorsk)'); ?></option>
|
224 |
+
<option value="pa_IN" <?php if($cff_locale_val == "pa_IN") echo 'selected="selected"' ?> ><?php _e('Punjabi'); ?></option>
|
225 |
+
<option value="pl_PL" <?php if($cff_locale_val == "pl_PL") echo 'selected="selected"' ?> ><?php _e('Polish'); ?></option>
|
226 |
+
<option value="ps_AF" <?php if($cff_locale_val == "ps_AF") echo 'selected="selected"' ?> ><?php _e('Pashto'); ?></option>
|
227 |
+
<option value="pt_BR" <?php if($cff_locale_val == "pt_BR") echo 'selected="selected"' ?> ><?php _e('Portuguese (Brazil)'); ?></option>
|
228 |
+
<option value="pt_PT" <?php if($cff_locale_val == "pt_PT") echo 'selected="selected"' ?> ><?php _e('Portuguese (Portugal)'); ?></option>
|
229 |
+
<option value="ro_RO" <?php if($cff_locale_val == "ro_RO") echo 'selected="selected"' ?> ><?php _e('Romanian'); ?></option>
|
230 |
+
<option value="ru_RU" <?php if($cff_locale_val == "ru_RU") echo 'selected="selected"' ?> ><?php _e('Russian'); ?></option>
|
231 |
+
<option value="sk_SK" <?php if($cff_locale_val == "sk_SK") echo 'selected="selected"' ?> ><?php _e('Slovak'); ?></option>
|
232 |
+
<option value="sl_SI" <?php if($cff_locale_val == "sl_SI") echo 'selected="selected"' ?> ><?php _e('Slovenian'); ?></option>
|
233 |
+
<option value="sq_AL" <?php if($cff_locale_val == "sq_AL") echo 'selected="selected"' ?> ><?php _e('Albanian'); ?></option>
|
234 |
+
<option value="sr_RS" <?php if($cff_locale_val == "sr_RS") echo 'selected="selected"' ?> ><?php _e('Serbian'); ?></option>
|
235 |
+
<option value="sv_SE" <?php if($cff_locale_val == "sv_SE") echo 'selected="selected"' ?> ><?php _e('Swedish'); ?></option>
|
236 |
+
<option value="sw_KE" <?php if($cff_locale_val == "sw_KE") echo 'selected="selected"' ?> ><?php _e('Swahili'); ?></option>
|
237 |
+
<option value="ta_IN" <?php if($cff_locale_val == "ta_IN") echo 'selected="selected"' ?> ><?php _e('Tamil'); ?></option>
|
238 |
+
<option value="te_IN" <?php if($cff_locale_val == "te_IN") echo 'selected="selected"' ?> ><?php _e('Telugu'); ?></option>
|
239 |
+
<option value="th_TH" <?php if($cff_locale_val == "th_TH") echo 'selected="selected"' ?> ><?php _e('Thai'); ?></option>
|
240 |
+
<option value="tl_PH" <?php if($cff_locale_val == "tl_PH") echo 'selected="selected"' ?> ><?php _e('Filipino'); ?></option>
|
241 |
+
<option value="tr_TR" <?php if($cff_locale_val == "tr_TR") echo 'selected="selected"' ?> ><?php _e('Turkish'); ?></option>
|
242 |
+
<option value="uk_UA" <?php if($cff_locale_val == "uk_UA") echo 'selected="selected"' ?> ><?php _e('Ukrainian'); ?></option>
|
243 |
+
<option value="vi_VN" <?php if($cff_locale_val == "vi_VN") echo 'selected="selected"' ?> ><?php _e('Vietnamese'); ?></option>
|
244 |
+
<option value="zh_CN" <?php if($cff_locale_val == "zh_CN") echo 'selected="selected"' ?> ><?php _e('Simplified Chinese (China)'); ?></option>
|
245 |
+
<option value="zh_HK" <?php if($cff_locale_val == "zh_HK") echo 'selected="selected"' ?> ><?php _e('Traditional Chinese (Hong Kong)'); ?></option>
|
246 |
+
<option value="zh_TW" <?php if($cff_locale_val == "zh_TW") echo 'selected="selected"' ?> ><?php _e('Traditional Chinese (Taiwan)'); ?></option>
|
247 |
+
</select>
|
248 |
+
<i style="color: #666; font-size: 11px;"><?php _e('Select a language'); ?></i>
|
249 |
+
</td>
|
250 |
+
</tr>
|
251 |
+
|
252 |
+
</tbody>
|
253 |
+
</table>
|
254 |
+
<?php submit_button(); ?>
|
255 |
+
</form>
|
256 |
+
<h3><?php _e('Support'); ?></h3>
|
257 |
+
<p>Having trouble getting the plugin to work? Try visiting the <a href="http://smashballoon.com/custom-facebook-feed/troubleshooting/" target="_blank" />Troubleshooting</a> page, <a href="http://smashballoon.com/custom-facebook-feed/faq/" target="_blank" />FAQ</a> page, or contact <a href="http://smashballoon.com/custom-facebook-feed/support" target="_blank">support</a>.<br />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>
|
258 |
+
<hr />
|
259 |
+
<h3><?php _e('Displaying your Feed'); ?></h3>
|
260 |
+
<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>
|
261 |
+
<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).'); ?>" />
|
262 |
+
<p><?php _e('If you wish, you can override the settings above directly in the shortcode like so:'); ?></p>
|
263 |
+
<p>[custom-facebook-feed <b><span style='color: purple;'>id=Put_Your_Facebook_Page_ID_Here</span> <span style='color: green;'>num=3</span> <span style='color: blue;'>layout=thumb</span></b>]</p>
|
264 |
+
<p><a href="http://smashballoon.com/custom-facebook-feed/docs/shortcodes/" target="_blank"><?php _e('Click here'); ?></a> <?php _e('for a full list of shortcode options'); ?></p>
|
265 |
+
<hr />
|
266 |
+
|
267 |
+
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
|
268 |
+
<hr />
|
269 |
+
<h4><?php _e('<u>System Info:</u>'); ?></h4>
|
270 |
+
<p>PHP Version: <b><?php echo PHP_VERSION . "\n"; ?></b></p>
|
271 |
+
<p>Web Server Info: <b><?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?></b></p>
|
272 |
+
<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>
|
273 |
+
<p>PHP cURL: <b><?php echo is_callable('curl_init') ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
|
274 |
+
<p>JSON: <b><?php echo function_exists("json_decode") ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
|
275 |
+
<i style="color: #666; font-size: 11px;"><?php _e('(If any of the items above are listed as'); ?> <span style='color: red;'>No</span> <?php _e('then please include this in your support request)'); ?></i>
|
276 |
+
|
277 |
+
|
278 |
+
<?php
|
279 |
+
} //End Settings_Page
|
280 |
+
//Create Style page
|
281 |
+
function cff_style_page() {
|
282 |
+
//Declare variables for fields
|
283 |
+
$style_hidden_field_name = 'cff_style_submit_hidden';
|
284 |
+
$style_general_hidden_field_name = 'cff_style_general_submit_hidden';
|
285 |
+
$style_post_layout_hidden_field_name = 'cff_style_post_layout_submit_hidden';
|
286 |
+
$style_typography_hidden_field_name = 'cff_style_typography_submit_hidden';
|
287 |
+
$style_misc_hidden_field_name = 'cff_style_misc_submit_hidden';
|
288 |
+
$defaults = array(
|
289 |
+
//Post types
|
290 |
+
'cff_show_links_type' => true,
|
291 |
+
'cff_show_event_type' => true,
|
292 |
+
'cff_show_video_type' => true,
|
293 |
+
'cff_show_photos_type' => true,
|
294 |
+
'cff_show_status_type' => true,
|
295 |
+
//Layout
|
296 |
+
'cff_preset_layout' => 'thumb',
|
297 |
+
//Include
|
298 |
+
'cff_show_text' => true,
|
299 |
+
'cff_show_desc' => true,
|
300 |
+
'cff_show_shared_links' => true,
|
301 |
+
'cff_show_date' => true,
|
302 |
+
'cff_show_media' => true,
|
303 |
+
'cff_show_event_title' => true,
|
304 |
+
'cff_show_event_details' => true,
|
305 |
+
'cff_show_meta' => true,
|
306 |
+
'cff_show_link' => true,
|
307 |
+
'cff_show_like_box' => true,
|
308 |
+
//Typography
|
309 |
+
'cff_see_more_text' => 'See More',
|
310 |
+
'cff_see_less_text' => 'See Less',
|
311 |
+
'cff_title_format' => 'p',
|
312 |
+
'cff_title_size' => 'inherit',
|
313 |
+
'cff_title_weight' => 'inherit',
|
314 |
+
'cff_title_color' => '',
|
315 |
+
'cff_body_size' => 'inherit',
|
316 |
+
'cff_body_weight' => 'inherit',
|
317 |
+
'cff_body_color' => '',
|
318 |
+
//Event title
|
319 |
+
'cff_event_title_format' => 'p',
|
320 |
+
'cff_event_title_size' => 'inherit',
|
321 |
+
'cff_event_title_weight' => 'inherit',
|
322 |
+
'cff_event_title_color' => '',
|
323 |
+
//Event date
|
324 |
+
'cff_event_date_size' => 'inherit',
|
325 |
+
'cff_event_date_weight' => 'inherit',
|
326 |
+
'cff_event_date_color' => '',
|
327 |
+
'cff_event_date_position' => 'below',
|
328 |
+
'cff_event_date_formatting' => '1',
|
329 |
+
'cff_event_date_custom' => '',
|
330 |
+
//Event details
|
331 |
+
'cff_event_details_size' => 'inherit',
|
332 |
+
'cff_event_details_weight' => 'inherit',
|
333 |
+
'cff_event_details_color' => '',
|
334 |
+
//Date
|
335 |
+
'cff_date_position' => 'below',
|
336 |
+
'cff_date_size' => 'inherit',
|
337 |
+
'cff_date_weight' => 'inherit',
|
338 |
+
'cff_date_color' => '',
|
339 |
+
'cff_date_formatting' => '1',
|
340 |
+
'cff_date_custom' => '',
|
341 |
+
'cff_date_before' => '',
|
342 |
+
'cff_date_after' => '',
|
343 |
+
//Link to Facebook
|
344 |
+
'cff_link_size' => 'inherit',
|
345 |
+
'cff_link_weight' => 'inherit',
|
346 |
+
'cff_link_color' => '',
|
347 |
+
'cff_facebook_link_text' => 'View on Facebook',
|
348 |
+
'cff_view_link_text' => 'View Link',
|
349 |
+
'cff_link_to_timeline' => false,
|
350 |
+
//Meta
|
351 |
+
'cff_icon_style' => 'light',
|
352 |
+
'cff_meta_text_color' => '',
|
353 |
+
'cff_meta_bg_color' => '',
|
354 |
+
'cff_nocomments_text' => 'No comments yet',
|
355 |
+
'cff_hide_comments' => '',
|
356 |
+
//Misc
|
357 |
+
'cff_feed_width' => '',
|
358 |
+
'cff_feed_height' => '',
|
359 |
+
'cff_feed_padding' => '',
|
360 |
+
'cff_like_box_position' => 'bottom',
|
361 |
+
'cff_like_box_outside' => false,
|
362 |
+
'cff_likebox_width' => '300',
|
363 |
+
'cff_like_box_faces' => false,
|
364 |
+
|
365 |
+
'cff_bg_color' => '',
|
366 |
+
'cff_likebox_bg_color' => '',
|
367 |
+
'cff_video_height' => '',
|
368 |
+
'cff_show_author' => false,
|
369 |
+
'cff_class' => '',
|
370 |
+
//New
|
371 |
+
'cff_custom_css' => '',
|
372 |
+
'cff_title_link' => false,
|
373 |
+
'cff_event_title_link' => false,
|
374 |
+
'cff_video_action' => 'file',
|
375 |
+
'cff_sep_color' => '',
|
376 |
+
'cff_sep_size' => '1'
|
377 |
+
);
|
378 |
+
//Save layout option in an array
|
379 |
+
add_option( 'cff_style_settings', $options );
|
380 |
+
$options = wp_parse_args(get_option('cff_style_settings'), $defaults);
|
381 |
+
//Set the page variables
|
382 |
+
//Post types
|
383 |
+
$cff_show_links_type = $options[ 'cff_show_links_type' ];
|
384 |
+
$cff_show_event_type = $options[ 'cff_show_event_type' ];
|
385 |
+
$cff_show_video_type = $options[ 'cff_show_video_type' ];
|
386 |
+
$cff_show_photos_type = $options[ 'cff_show_photos_type' ];
|
387 |
+
$cff_show_status_type = $options[ 'cff_show_status_type' ];
|
388 |
+
//Layout
|
389 |
+
$cff_preset_layout = $options[ 'cff_preset_layout' ];
|
390 |
+
//Include
|
391 |
+
$cff_show_text = $options[ 'cff_show_text' ];
|
392 |
+
$cff_show_desc = $options[ 'cff_show_desc' ];
|
393 |
+
$cff_show_shared_links = $options[ 'cff_show_shared_links' ];
|
394 |
+
$cff_show_date = $options[ 'cff_show_date' ];
|
395 |
+
$cff_show_media = $options[ 'cff_show_media' ];
|
396 |
+
$cff_show_event_title = $options[ 'cff_show_event_title' ];
|
397 |
+
$cff_show_event_details = $options[ 'cff_show_event_details' ];
|
398 |
+
$cff_show_meta = $options[ 'cff_show_meta' ];
|
399 |
+
$cff_show_link = $options[ 'cff_show_link' ];
|
400 |
+
$cff_show_like_box = $options[ 'cff_show_like_box' ];
|
401 |
+
//Typography
|
402 |
+
$cff_see_more_text = $options[ 'cff_see_more_text' ];
|
403 |
+
$cff_see_less_text = $options[ 'cff_see_less_text' ];
|
404 |
+
$cff_title_format = $options[ 'cff_title_format' ];
|
405 |
+
$cff_title_size = $options[ 'cff_title_size' ];
|
406 |
+
$cff_title_weight = $options[ 'cff_title_weight' ];
|
407 |
+
$cff_title_color = $options[ 'cff_title_color' ];
|
408 |
+
$cff_body_size = $options[ 'cff_body_size' ];
|
409 |
+
$cff_body_weight = $options[ 'cff_body_weight' ];
|
410 |
+
$cff_body_color = $options[ 'cff_body_color' ];
|
411 |
+
//Event title
|
412 |
+
$cff_event_title_format = $options[ 'cff_event_title_format' ];
|
413 |
+
$cff_event_title_size = $options[ 'cff_event_title_size' ];
|
414 |
+
$cff_event_title_weight = $options[ 'cff_event_title_weight' ];
|
415 |
+
$cff_event_title_color = $options[ 'cff_event_title_color' ];
|
416 |
+
//Event date
|
417 |
+
$cff_event_date_size = $options[ 'cff_event_date_size' ];
|
418 |
+
$cff_event_date_weight = $options[ 'cff_event_date_weight' ];
|
419 |
+
$cff_event_date_color = $options[ 'cff_event_date_color' ];
|
420 |
+
$cff_event_date_position = $options[ 'cff_event_date_position' ];
|
421 |
+
$cff_event_date_formatting = $options[ 'cff_event_date_formatting' ];
|
422 |
+
$cff_event_date_custom = $options[ 'cff_event_date_custom' ];
|
423 |
+
//Event details
|
424 |
+
$cff_event_details_size = $options[ 'cff_event_details_size' ];
|
425 |
+
$cff_event_details_weight = $options[ 'cff_event_details_weight' ];
|
426 |
+
$cff_event_details_color = $options[ 'cff_event_details_color' ];
|
427 |
+
//Date
|
428 |
+
$cff_date_position = $options[ 'cff_date_position' ];
|
429 |
+
$cff_date_size = $options[ 'cff_date_size' ];
|
430 |
+
$cff_date_weight = $options[ 'cff_date_weight' ];
|
431 |
+
$cff_date_color = $options[ 'cff_date_color' ];
|
432 |
+
$cff_date_formatting = $options[ 'cff_date_formatting' ];
|
433 |
+
$cff_date_custom = $options[ 'cff_date_custom' ];
|
434 |
+
$cff_date_before = $options[ 'cff_date_before' ];
|
435 |
+
$cff_date_after = $options[ 'cff_date_after' ];
|
436 |
+
//View on Facebook link
|
437 |
+
$cff_link_size = $options[ 'cff_link_size' ];
|
438 |
+
$cff_link_weight = $options[ 'cff_link_weight' ];
|
439 |
+
$cff_link_color = $options[ 'cff_link_color' ];
|
440 |
+
$cff_facebook_link_text = $options[ 'cff_facebook_link_text' ];
|
441 |
+
$cff_view_link_text = $options[ 'cff_view_link_text' ];
|
442 |
+
$cff_link_to_timeline = $options[ 'cff_link_to_timeline' ];
|
443 |
+
//Meta
|
444 |
+
$cff_icon_style = $options[ 'cff_icon_style' ];
|
445 |
+
$cff_meta_text_color = $options[ 'cff_meta_text_color' ];
|
446 |
+
$cff_meta_bg_color = $options[ 'cff_meta_bg_color' ];
|
447 |
+
$cff_nocomments_text = $options[ 'cff_nocomments_text' ];
|
448 |
+
$cff_hide_comments = $options[ 'cff_hide_comments' ];
|
449 |
+
//Misc
|
450 |
+
$cff_feed_width = $options[ 'cff_feed_width' ];
|
451 |
+
$cff_feed_height = $options[ 'cff_feed_height' ];
|
452 |
+
$cff_feed_padding = $options[ 'cff_feed_padding' ];
|
453 |
+
$cff_like_box_position = $options[ 'cff_like_box_position' ];
|
454 |
+
$cff_like_box_outside = $options[ 'cff_like_box_outside' ];
|
455 |
+
$cff_likebox_width = $options[ 'cff_likebox_width' ];
|
456 |
+
$cff_like_box_faces = $options[ 'cff_like_box_faces' ];
|
457 |
+
|
458 |
+
$cff_show_media = $options[ 'cff_show_media' ];
|
459 |
+
$cff_open_links = $options[ 'cff_open_links' ];
|
460 |
+
$cff_bg_color = $options[ 'cff_bg_color' ];
|
461 |
+
$cff_likebox_bg_color = $options[ 'cff_likebox_bg_color' ];
|
462 |
+
$cff_video_height = $options[ 'cff_video_height' ];
|
463 |
+
$cff_show_author = $options[ 'cff_show_author' ];
|
464 |
+
$cff_class = $options[ 'cff_class' ];
|
465 |
+
|
466 |
+
//New
|
467 |
+
$cff_custom_css = $options[ 'cff_custom_css' ];
|
468 |
+
$cff_title_link = $options[ 'cff_title_link' ];
|
469 |
+
$cff_event_title_link = $options[ 'cff_event_title_link' ];
|
470 |
+
$cff_video_action = $options[ 'cff_video_action' ];
|
471 |
+
$cff_sep_color = $options[ 'cff_sep_color' ];
|
472 |
+
$cff_sep_size = $options[ 'cff_sep_size' ];
|
473 |
+
|
474 |
+
// Texts lengths
|
475 |
+
$cff_title_length = 'cff_title_length';
|
476 |
+
$cff_body_length = 'cff_body_length';
|
477 |
+
// Read in existing option value from database
|
478 |
+
$cff_title_length_val = get_option( $cff_title_length );
|
479 |
+
$cff_body_length_val = get_option( $cff_body_length );
|
480 |
+
// See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
|
481 |
+
if( isset($_POST[ $style_hidden_field_name ]) && $_POST[ $style_hidden_field_name ] == 'Y' ) {
|
482 |
+
//Update the General options
|
483 |
+
if( isset($_POST[ $style_general_hidden_field_name ]) && $_POST[ $style_general_hidden_field_name ] == 'Y' ) {
|
484 |
+
//General
|
485 |
+
$cff_feed_width = $_POST[ 'cff_feed_width' ];
|
486 |
+
$cff_feed_height = $_POST[ 'cff_feed_height' ];
|
487 |
+
$cff_feed_padding = $_POST[ 'cff_feed_padding' ];
|
488 |
+
$cff_bg_color = $_POST[ 'cff_bg_color' ];
|
489 |
+
$cff_show_author = $_POST[ 'cff_show_author' ];
|
490 |
+
$cff_class = $_POST[ 'cff_class' ];
|
491 |
+
//Post types
|
492 |
+
$cff_show_links_type = $_POST[ 'cff_show_links_type' ];
|
493 |
+
$cff_show_event_type = $_POST[ 'cff_show_event_type' ];
|
494 |
+
$cff_show_video_type = $_POST[ 'cff_show_video_type' ];
|
495 |
+
$cff_show_photos_type = $_POST[ 'cff_show_photos_type' ];
|
496 |
+
$cff_show_status_type = $_POST[ 'cff_show_status_type' ];
|
497 |
+
//General
|
498 |
+
$options[ 'cff_feed_width' ] = $cff_feed_width;
|
499 |
+
$options[ 'cff_feed_height' ] = $cff_feed_height;
|
500 |
+
$options[ 'cff_feed_padding' ] = $cff_feed_padding;
|
501 |
+
$options[ 'cff_bg_color' ] = $cff_bg_color;
|
502 |
+
$options[ 'cff_show_author' ] = $cff_show_author;
|
503 |
+
$options[ 'cff_class' ] = $cff_class;
|
504 |
+
//Post types
|
505 |
+
$options[ 'cff_show_links_type' ] = $cff_show_links_type;
|
506 |
+
$options[ 'cff_show_event_type' ] = $cff_show_event_type;
|
507 |
+
$options[ 'cff_show_video_type' ] = $cff_show_video_type;
|
508 |
+
$options[ 'cff_show_photos_type' ] = $cff_show_photos_type;
|
509 |
+
$options[ 'cff_show_status_type' ] = $cff_show_status_type;
|
510 |
+
}
|
511 |
+
//Update the Post Layout options
|
512 |
+
if( isset($_POST[ $style_post_layout_hidden_field_name ]) && $_POST[ $style_post_layout_hidden_field_name ] == 'Y' ) {
|
513 |
+
//Layout
|
514 |
+
$cff_preset_layout = $_POST[ 'cff_preset_layout' ];
|
515 |
+
//Include
|
516 |
+
$cff_show_text = $_POST[ 'cff_show_text' ];
|
517 |
+
$cff_show_desc = $_POST[ 'cff_show_desc' ];
|
518 |
+
$cff_show_shared_links = $_POST[ 'cff_show_shared_links' ];
|
519 |
+
$cff_show_date = $_POST[ 'cff_show_date' ];
|
520 |
+
$cff_show_media = $_POST[ 'cff_show_media' ];
|
521 |
+
$cff_show_event_title = $_POST[ 'cff_show_event_title' ];
|
522 |
+
$cff_show_event_details = $_POST[ 'cff_show_event_details' ];
|
523 |
+
$cff_show_meta = $_POST[ 'cff_show_meta' ];
|
524 |
+
$cff_show_link = $_POST[ 'cff_show_link' ];
|
525 |
+
//Layout
|
526 |
+
$options[ 'cff_preset_layout' ] = $cff_preset_layout;
|
527 |
+
//Include
|
528 |
+
$options[ 'cff_show_text' ] = $cff_show_text;
|
529 |
+
$options[ 'cff_show_desc' ] = $cff_show_desc;
|
530 |
+
$options[ 'cff_show_shared_links' ] = $cff_show_shared_links;
|
531 |
+
$options[ 'cff_show_date' ] = $cff_show_date;
|
532 |
+
$options[ 'cff_show_media' ] = $cff_show_media;
|
533 |
+
$options[ 'cff_show_event_title' ] = $cff_show_event_title;
|
534 |
+
$options[ 'cff_show_event_details' ] = $cff_show_event_details;
|
535 |
+
$options[ 'cff_show_meta' ] = $cff_show_meta;
|
536 |
+
$options[ 'cff_show_link' ] = $cff_show_link;
|
537 |
+
}
|
538 |
+
//Update the Post Layout options
|
539 |
+
if( isset($_POST[ $style_typography_hidden_field_name ]) && $_POST[ $style_typography_hidden_field_name ] == 'Y' ) {
|
540 |
+
//Character limits
|
541 |
+
$cff_title_length_val = $_POST[ $cff_title_length ];
|
542 |
+
$cff_body_length_val = $_POST[ $cff_body_length ];
|
543 |
+
$cff_see_more_text = $_POST[ 'cff_see_more_text' ];
|
544 |
+
$cff_see_less_text = $_POST[ 'cff_see_less_text' ];
|
545 |
+
//Typography
|
546 |
+
$cff_title_format = $_POST[ 'cff_title_format' ];
|
547 |
+
$cff_title_size = $_POST[ 'cff_title_size' ];
|
548 |
+
$cff_title_weight = $_POST[ 'cff_title_weight' ];
|
549 |
+
$cff_title_color = $_POST[ 'cff_title_color' ];
|
550 |
+
$cff_title_link = $_POST[ 'cff_title_link' ];
|
551 |
+
$cff_body_size = $_POST[ 'cff_body_size' ];
|
552 |
+
$cff_body_weight = $_POST[ 'cff_body_weight' ];
|
553 |
+
$cff_body_color = $_POST[ 'cff_body_color' ];
|
554 |
+
//Event title
|
555 |
+
$cff_event_title_format = $_POST[ 'cff_event_title_format' ];
|
556 |
+
$cff_event_title_size = $_POST[ 'cff_event_title_size' ];
|
557 |
+
$cff_event_title_weight = $_POST[ 'cff_event_title_weight' ];
|
558 |
+
$cff_event_title_color = $_POST[ 'cff_event_title_color' ];
|
559 |
+
$cff_event_title_link = $_POST[ 'cff_event_title_link' ];
|
560 |
+
//Event date
|
561 |
+
$cff_event_date_size = $_POST[ 'cff_event_date_size' ];
|
562 |
+
$cff_event_date_weight = $_POST[ 'cff_event_date_weight' ];
|
563 |
+
$cff_event_date_color = $_POST[ 'cff_event_date_color' ];
|
564 |
+
$cff_event_date_position = $_POST[ 'cff_event_date_position' ];
|
565 |
+
$cff_event_date_formatting = $_POST[ 'cff_event_date_formatting' ];
|
566 |
+
$cff_event_date_custom = $_POST[ 'cff_event_date_custom' ];
|
567 |
+
//Event details
|
568 |
+
$cff_event_details_size = $_POST[ 'cff_event_details_size' ];
|
569 |
+
$cff_event_details_weight = $_POST[ 'cff_event_details_weight' ];
|
570 |
+
$cff_event_details_color = $_POST[ 'cff_event_details_color' ];
|
571 |
+
//Date
|
572 |
+
$cff_date_position = $_POST[ 'cff_date_position' ];
|
573 |
+
$cff_date_size = $_POST[ 'cff_date_size' ];
|
574 |
+
$cff_date_weight = $_POST[ 'cff_date_weight' ];
|
575 |
+
$cff_date_color = $_POST[ 'cff_date_color' ];
|
576 |
+
$cff_date_formatting = $_POST[ 'cff_date_formatting' ];
|
577 |
+
$cff_date_custom = $_POST[ 'cff_date_custom' ];
|
578 |
+
$cff_date_before = $_POST[ 'cff_date_before' ];
|
579 |
+
$cff_date_after = $_POST[ 'cff_date_after' ];
|
580 |
+
//View on Facebook link
|
581 |
+
$cff_link_size = $_POST[ 'cff_link_size' ];
|
582 |
+
$cff_link_weight = $_POST[ 'cff_link_weight' ];
|
583 |
+
$cff_link_color = $_POST[ 'cff_link_color' ];
|
584 |
+
$cff_facebook_link_text = $_POST[ 'cff_facebook_link_text' ];
|
585 |
+
$cff_view_link_text = $_POST[ 'cff_view_link_text' ];
|
586 |
+
$cff_link_to_timeline = $_POST[ 'cff_link_to_timeline' ];
|
587 |
+
//Character limits
|
588 |
+
update_option( $cff_title_length, $cff_title_length_val );
|
589 |
+
update_option( $cff_body_length, $cff_body_length_val );
|
590 |
+
$options[ 'cff_see_more_text' ] = $cff_see_more_text;
|
591 |
+
$options[ 'cff_see_less_text' ] = $cff_see_less_text;
|
592 |
+
//Typography
|
593 |
+
$options[ 'cff_title_format' ] = $cff_title_format;
|
594 |
+
$options[ 'cff_title_size' ] = $cff_title_size;
|
595 |
+
$options[ 'cff_title_weight' ] = $cff_title_weight;
|
596 |
+
$options[ 'cff_title_color' ] = $cff_title_color;
|
597 |
+
$options[ 'cff_title_link' ] = $cff_title_link;
|
598 |
+
$options[ 'cff_body_size' ] = $cff_body_size;
|
599 |
+
$options[ 'cff_body_weight' ] = $cff_body_weight;
|
600 |
+
$options[ 'cff_body_color' ] = $cff_body_color;
|
601 |
+
//Event title
|
602 |
+
$options[ 'cff_event_title_format' ] = $cff_event_title_format;
|
603 |
+
$options[ 'cff_event_title_size' ] = $cff_event_title_size;
|
604 |
+
$options[ 'cff_event_title_weight' ] = $cff_event_title_weight;
|
605 |
+
$options[ 'cff_event_title_color' ] = $cff_event_title_color;
|
606 |
+
$options[ 'cff_event_title_link' ] = $cff_event_title_link;
|
607 |
+
//Event date
|
608 |
+
$options[ 'cff_event_date_size' ] = $cff_event_date_size;
|
609 |
+
$options[ 'cff_event_date_weight' ] = $cff_event_date_weight;
|
610 |
+
$options[ 'cff_event_date_color' ] = $cff_event_date_color;
|
611 |
+
$options[ 'cff_event_date_position' ] = $cff_event_date_position;
|
612 |
+
$options[ 'cff_event_date_formatting' ] = $cff_event_date_formatting;
|
613 |
+
$options[ 'cff_event_date_custom' ] = $cff_event_date_custom;
|
614 |
+
//Event details
|
615 |
+
$options[ 'cff_event_details_size' ] = $cff_event_details_size;
|
616 |
+
$options[ 'cff_event_details_weight' ] = $cff_event_details_weight;
|
617 |
+
$options[ 'cff_event_details_color' ] = $cff_event_details_color;
|
618 |
+
//Date
|
619 |
+
$options[ 'cff_date_position' ] = $cff_date_position;
|
620 |
+
$options[ 'cff_date_size' ] = $cff_date_size;
|
621 |
+
$options[ 'cff_date_weight' ] = $cff_date_weight;
|
622 |
+
$options[ 'cff_date_color' ] = $cff_date_color;
|
623 |
+
$options[ 'cff_date_formatting' ] = $cff_date_formatting;
|
624 |
+
$options[ 'cff_date_custom' ] = $cff_date_custom;
|
625 |
+
$options[ 'cff_date_before' ] = $cff_date_before;
|
626 |
+
$options[ 'cff_date_after' ] = $cff_date_after;
|
627 |
+
//View on Facebook link
|
628 |
+
$options[ 'cff_link_size' ] = $cff_link_size;
|
629 |
+
$options[ 'cff_link_weight' ] = $cff_link_weight;
|
630 |
+
$options[ 'cff_link_color' ] = $cff_link_color;
|
631 |
+
$options[ 'cff_facebook_link_text' ] = $cff_facebook_link_text;
|
632 |
+
$options[ 'cff_view_link_text' ] = $cff_view_link_text;
|
633 |
+
$options[ 'cff_link_to_timeline' ] = $cff_link_to_timeline;
|
634 |
+
}
|
635 |
+
//Update the Post Layout options
|
636 |
+
if( isset($_POST[ $style_misc_hidden_field_name ]) && $_POST[ $style_misc_hidden_field_name ] == 'Y' ) {
|
637 |
+
//Meta
|
638 |
+
$cff_icon_style = $_POST[ 'cff_icon_style' ];
|
639 |
+
$cff_meta_text_color = $_POST[ 'cff_meta_text_color' ];
|
640 |
+
$cff_meta_bg_color = $_POST[ 'cff_meta_bg_color' ];
|
641 |
+
$cff_nocomments_text = $_POST[ 'cff_nocomments_text' ];
|
642 |
+
$cff_hide_comments = $_POST[ 'cff_hide_comments' ];
|
643 |
+
//Custom CSS
|
644 |
+
$cff_custom_css = $_POST[ 'cff_custom_css' ];
|
645 |
+
//Misc
|
646 |
+
$cff_show_like_box = $_POST[ 'cff_show_like_box' ];
|
647 |
+
$cff_like_box_position = $_POST[ 'cff_like_box_position' ];
|
648 |
+
$cff_like_box_outside = $_POST[ 'cff_like_box_outside' ];
|
649 |
+
$cff_likebox_bg_color = $_POST[ 'cff_likebox_bg_color' ];
|
650 |
+
$cff_likebox_width = $_POST[ 'cff_likebox_width' ];
|
651 |
+
$cff_like_box_faces = $_POST[ 'cff_like_box_faces' ];
|
652 |
+
$cff_video_height = $_POST[ 'cff_video_height' ];
|
653 |
+
$cff_video_action = $_POST[ 'cff_video_action' ];
|
654 |
+
$cff_sep_color = $_POST[ 'cff_sep_color' ];
|
655 |
+
$cff_sep_size = $_POST[ 'cff_sep_size' ];
|
656 |
+
$cff_open_links = $_POST[ 'cff_open_links' ];
|
657 |
+
//Meta
|
658 |
+
$options[ 'cff_icon_style' ] = $cff_icon_style;
|
659 |
+
$options[ 'cff_meta_text_color' ] = $cff_meta_text_color;
|
660 |
+
$options[ 'cff_meta_bg_color' ] = $cff_meta_bg_color;
|
661 |
+
$options[ 'cff_nocomments_text' ] = $cff_nocomments_text;
|
662 |
+
$options[ 'cff_hide_comments' ] = $cff_hide_comments;
|
663 |
+
//Custom CSS
|
664 |
+
$options[ 'cff_custom_css' ] = $cff_custom_css;
|
665 |
+
//Misc
|
666 |
+
$options[ 'cff_show_like_box' ] = $cff_show_like_box;
|
667 |
+
$options[ 'cff_like_box_position' ] = $cff_like_box_position;
|
668 |
+
$options[ 'cff_like_box_outside' ] = $cff_like_box_outside;
|
669 |
+
$options[ 'cff_likebox_bg_color' ] = $cff_likebox_bg_color;
|
670 |
+
$options[ 'cff_likebox_width' ] = $cff_likebox_width;
|
671 |
+
$options[ 'cff_like_box_faces' ] = $cff_like_box_faces;
|
672 |
+
|
673 |
+
$options[ 'cff_video_height' ] = $cff_video_height;
|
674 |
+
$options[ 'cff_video_action' ] = $cff_video_action;
|
675 |
+
$options[ 'cff_sep_color' ] = $cff_sep_color;
|
676 |
+
$options[ 'cff_sep_size' ] = $cff_sep_size;
|
677 |
+
$options[ 'cff_open_links' ] = $cff_open_links;
|
678 |
+
}
|
679 |
+
//Update the array
|
680 |
+
update_option( 'cff_style_settings', $options );
|
681 |
+
// Put an settings updated message on the screen
|
682 |
+
?>
|
683 |
+
<div class="updated"><p><strong><?php _e('Settings saved.', 'custom-facebook-feed' ); ?></strong></p></div>
|
684 |
+
<?php } ?>
|
685 |
+
|
686 |
+
<div id="cff-admin" class="wrap">
|
687 |
+
<div id="header">
|
688 |
+
<h1><?php _e('Layout & Style'); ?></h1>
|
689 |
+
</div>
|
690 |
+
<form name="form1" method="post" action="">
|
691 |
+
<input type="hidden" name="<?php echo $style_hidden_field_name; ?>" value="Y">
|
692 |
+
<?php
|
693 |
+
$active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general';
|
694 |
+
?>
|
695 |
+
<h2 class="nav-tab-wrapper">
|
696 |
+
<a href="?page=cff-style&tab=general" class="nav-tab <?php echo $active_tab == 'general' ? 'nav-tab-active' : ''; ?>"><?php _e('General'); ?></a>
|
697 |
+
<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>
|
698 |
+
<a href="?page=cff-style&tab=typography" class="nav-tab <?php echo $active_tab == 'typography' ? 'nav-tab-active' : ''; ?>"><?php _e('Typography'); ?></a>
|
699 |
+
<a href="?page=cff-style&tab=misc" class="nav-tab <?php echo $active_tab == 'misc' ? 'nav-tab-active' : ''; ?>"><?php _e('Misc'); ?></a>
|
700 |
+
</h2>
|
701 |
+
<?php if( $active_tab == 'general' ) { //Start General tab ?>
|
702 |
+
<input type="hidden" name="<?php echo $style_general_hidden_field_name; ?>" value="Y">
|
703 |
+
<br />
|
704 |
+
<table class="form-table">
|
705 |
+
<tbody>
|
706 |
+
<h3><?php _e('General'); ?></h3>
|
707 |
+
<tr valign="top">
|
708 |
+
<th scope="row"><?php _e('Feed Width'); ?></th>
|
709 |
+
<td>
|
710 |
+
<input name="cff_feed_width" type="text" value="<?php esc_attr_e( $cff_feed_width ); ?>" size="6" />
|
711 |
+
<span>Eg. 500px, 50%, 10em. <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Default is 100%'); ?></i></span>
|
712 |
+
</td>
|
713 |
+
</tr>
|
714 |
+
<tr valign="top">
|
715 |
+
<th scope="row"><?php _e('Feed Height'); ?></th>
|
716 |
+
<td>
|
717 |
+
<input name="cff_feed_height" type="text" value="<?php esc_attr_e( $cff_feed_height ); ?>" size="6" />
|
718 |
+
<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>
|
719 |
+
</td>
|
720 |
+
</tr>
|
721 |
+
<th scope="row"><?php _e('Feed Padding'); ?></th>
|
722 |
+
<td>
|
723 |
+
<input name="cff_feed_padding" type="text" value="<?php esc_attr_e( $cff_feed_padding ); ?>" size="6" />
|
724 |
+
<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>
|
725 |
+
</td>
|
726 |
+
</tr>
|
727 |
+
<tr valign="top">
|
728 |
+
<th scope="row"><?php _e('Feed Background Color'); ?></th>
|
729 |
+
<td>
|
730 |
+
<label for="cff_bg_color">#</label>
|
731 |
+
<input name="cff_bg_color" type="text" value="<?php esc_attr_e( $cff_bg_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
732 |
+
<span><a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a></span>
|
733 |
+
</td>
|
734 |
+
</tr>
|
735 |
+
<tr valign="top">
|
736 |
+
<th scope="row"><?php _e('Show name and picture of author'); ?></th>
|
737 |
+
<td>
|
738 |
+
<input name="cff_show_author" type="checkbox" id="cff_show_author" <?php if($cff_show_author == true) echo "checked"; ?> />
|
739 |
+
<label for="cff_show_status_type">Yes</label>
|
740 |
+
<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>
|
741 |
+
|
742 |
+
</td>
|
743 |
+
</tr>
|
744 |
+
<tr valign="top">
|
745 |
+
<th scope="row"><?php _e('Add CSS class to feed'); ?></th>
|
746 |
+
<td>
|
747 |
+
<input name="cff_class" type="text" value="<?php esc_attr_e( $cff_class ); ?>" size="25" />
|
748 |
+
<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>
|
749 |
+
</td>
|
750 |
+
</tr>
|
751 |
+
</tbody>
|
752 |
+
</table>
|
753 |
+
|
754 |
+
<hr />
|
755 |
+
<table class="form-table">
|
756 |
+
<tbody>
|
757 |
+
<h3><?php _e('Post Types'); ?></h3>
|
758 |
+
<tr valign="top">
|
759 |
+
<th scope="row"><?php _e('Only show these types of posts:'); ?><br />
|
760 |
+
<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>
|
761 |
+
<td>
|
762 |
+
<div>
|
763 |
+
<input name="cff_show_status_type" type="checkbox" id="cff_show_status_type" disabled checked />
|
764 |
+
<label for="cff_show_status_type"><?php _e('Statuses'); ?></label>
|
765 |
+
</div>
|
766 |
+
<div>
|
767 |
+
<input type="checkbox" name="cff_show_event_type" id="cff_show_event_type" disabled checked />
|
768 |
+
<label for="cff_show_event_type"><?php _e('Events'); ?></label>
|
769 |
+
</div>
|
770 |
+
<div>
|
771 |
+
<input type="checkbox" name="cff_show_photos_type" id="cff_show_photos_type" disabled checked />
|
772 |
+
<label for="cff_show_photos_type"><?php _e('Photos'); ?></label>
|
773 |
+
</div>
|
774 |
+
<div>
|
775 |
+
<input type="checkbox" name="cff_show_video_type" id="cff_show_video_type" disabled checked />
|
776 |
+
<label for="cff_show_video_type"><?php _e('Videos'); ?></label>
|
777 |
+
</div>
|
778 |
+
<div>
|
779 |
+
<input type="checkbox" name="cff_show_links_type" id="cff_show_links_type" disabled checked />
|
780 |
+
<label for="cff_show_links_type"><?php _e('Links'); ?></label>
|
781 |
+
</div>
|
782 |
+
</td>
|
783 |
+
</tr>
|
784 |
+
</tbody>
|
785 |
+
</table>
|
786 |
+
<?php submit_button(); ?>
|
787 |
+
|
788 |
+
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
|
789 |
+
<?php } //End General tab ?>
|
790 |
+
<?php if( $active_tab == 'post_layout' ) { //Start Post Layout tab ?>
|
791 |
+
<input type="hidden" name="<?php echo $style_post_layout_hidden_field_name; ?>" value="Y">
|
792 |
+
<br />
|
793 |
+
<h3><?php _e('Post Layout'); ?></h3>
|
794 |
+
<table class="form-table">
|
795 |
+
<tbody>
|
796 |
+
<tr>
|
797 |
+
<td><p><?php _e('Choose a layout from the 3 below:'); ?></p></td>
|
798 |
+
<td>
|
799 |
+
<select name="cff_preset_layout" disabled>
|
800 |
+
<option value="thumb"><?php _e('Thumbnail'); ?></option>
|
801 |
+
<option value="half"><?php _e('Half-width'); ?></option>
|
802 |
+
<option value="full"><?php _e('Full-width'); ?></option>
|
803 |
+
</select>
|
804 |
+
<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>
|
805 |
+
</td>
|
806 |
+
</tr>
|
807 |
+
<tr valign="top">
|
808 |
+
<th scope="row"><?php _e('Thumbnail:'); ?></th>
|
809 |
+
<td>
|
810 |
+
<img src="<?php echo plugins_url( 'img/layout-thumb.png' , __FILE__ ) ?>" alt="Thumbnail Layout" width="400px" style="border: 1px solid #ccc;" />
|
811 |
+
</td>
|
812 |
+
</tr>
|
813 |
+
<tr valign="top">
|
814 |
+
<th scope="row"><?php _e('Half-width:'); ?></th>
|
815 |
+
<td>
|
816 |
+
<img src="<?php echo plugins_url( 'img/layout-half.png' , __FILE__ ) ?>" alt="Half Width Layout" width="400px" style="border: 1px solid #ccc;" />
|
817 |
+
</td>
|
818 |
+
</tr>
|
819 |
+
<tr valign="top">
|
820 |
+
<th scope="row"><?php _e('Full-width:'); ?></th>
|
821 |
+
<td>
|
822 |
+
<img src="<?php echo plugins_url( 'img/layout-full.png' , __FILE__ ) ?>" alt="Full Width Layout" width="400px" style="border: 1px solid #ccc;" />
|
823 |
+
</td>
|
824 |
+
</tr>
|
825 |
+
</tbody>
|
826 |
+
</table>
|
827 |
+
<hr />
|
828 |
+
<h3><?php _e('Show/Hide'); ?></h3>
|
829 |
+
<table class="form-table">
|
830 |
+
<tbody>
|
831 |
+
<tr valign="top">
|
832 |
+
<th scope="row"><?php _e('Include the following in posts:'); ?><br /><?php _e('(when applicable)'); ?>
|
833 |
+
<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>
|
834 |
+
<td>
|
835 |
+
<div>
|
836 |
+
<input name="cff_show_text" type="checkbox" id="cff_show_text" <?php if($cff_show_text == true) echo "checked"; ?> />
|
837 |
+
<label for="cff_show_text"><?php _e('Post text'); ?></label>
|
838 |
+
</div>
|
839 |
+
<div>
|
840 |
+
<input type="checkbox" name="cff_show_date" id="cff_show_date" <?php if($cff_show_date == true) echo 'checked="checked"' ?> />
|
841 |
+
<label for="cff_show_date"><?php _e('Date'); ?></label>
|
842 |
+
</div>
|
843 |
+
<div>
|
844 |
+
<input type="checkbox" id="cff_show_media" disabled />
|
845 |
+
<label for="cff_show_media"><?php _e('Photos/videos'); ?></label>
|
846 |
+
</div>
|
847 |
+
<div>
|
848 |
+
<input type="checkbox" name="cff_show_shared_links" id="cff_show_shared_links" <?php if($cff_show_shared_links == true) echo 'checked="checked"' ?> />
|
849 |
+
<label for="cff_show_shared_links"><?php _e('Shared links'); ?></label>
|
850 |
+
</div>
|
851 |
+
<div>
|
852 |
+
<input type="checkbox" name="cff_show_desc" id="cff_show_desc" <?php if($cff_show_desc == true) echo 'checked="checked"' ?> />
|
853 |
+
<label for="cff_show_desc"><?php _e('Link, photo and video descriptions'); ?></label>
|
854 |
+
</div>
|
855 |
+
<div>
|
856 |
+
<input type="checkbox" name="cff_show_event_title" id="cff_show_event_title" <?php if($cff_show_event_title == true) echo 'checked="checked"' ?> />
|
857 |
+
<label for="cff_show_event_title"><?php _e('Event title'); ?></label>
|
858 |
+
</div>
|
859 |
+
<div>
|
860 |
+
<input type="checkbox" name="cff_show_event_details" id="cff_show_event_details" <?php if($cff_show_event_details == true) echo 'checked="checked"' ?> />
|
861 |
+
<label for="cff_show_event_details"><?php _e('Event details'); ?></label>
|
862 |
+
</div>
|
863 |
+
<div>
|
864 |
+
<input type="checkbox" id="cff_show_meta" disabled />
|
865 |
+
<label for="cff_show_meta"><?php _e('Like/shares/comments'); ?></label>
|
866 |
+
</div>
|
867 |
+
<div>
|
868 |
+
<input type="checkbox" name="cff_show_link" id="cff_show_link" <?php if($cff_show_link == true) echo 'checked="checked"' ?> />
|
869 |
+
<label for="cff_show_link"><?php _e('View on Facebook/View Link'); ?></label>
|
870 |
+
</div>
|
871 |
+
</td>
|
872 |
+
</tr>
|
873 |
+
</tbody>
|
874 |
+
</table>
|
875 |
+
|
876 |
+
<?php submit_button(); ?>
|
877 |
+
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
|
878 |
+
<?php } //End Post Layout tab ?>
|
879 |
+
<?php if( $active_tab == 'typography' ) { //Start Typography tab ?>
|
880 |
+
<input type="hidden" name="<?php echo $style_typography_hidden_field_name; ?>" value="Y">
|
881 |
+
<br />
|
882 |
+
<h3><?php _e('Typography'); ?></h3>
|
883 |
+
<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>
|
884 |
+
<div id="poststuff" class="metabox-holder">
|
885 |
+
<div class="meta-box-sortables ui-sortable">
|
886 |
+
<div id="adminform" class="postbox" style="display: block;">
|
887 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
888 |
+
<h3 class="hndle"><span><?php _e('Text Character Limits'); ?></span></h3>
|
889 |
+
<div class="inside">
|
890 |
+
<table class="form-table">
|
891 |
+
<tbody>
|
892 |
+
<tr valign="top">
|
893 |
+
<th scope="row"><label class="bump-left"><?php _e('Maximum Post Text Length'); ?></label></th>
|
894 |
+
<td>
|
895 |
+
<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>
|
896 |
+
</td>
|
897 |
+
</tr>
|
898 |
+
<tr valign="top">
|
899 |
+
<th scope="row"><label class="bump-left"><?php _e('Maximum Description Length'); ?></label></th>
|
900 |
+
<td>
|
901 |
+
<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>
|
902 |
+
</td>
|
903 |
+
</tr>
|
904 |
+
<tr>
|
905 |
+
<th><label for="cff_see_more_text" class="bump-left"><?php _e('Custom "See More" text'); ?></label></th>
|
906 |
+
<td>
|
907 |
+
<input name="cff_see_more_text" type="text" value="<?php esc_attr_e( $cff_see_more_text ); ?>" size="20" />
|
908 |
+
<i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Use different text in place of the default "See More" text'); ?></i>
|
909 |
+
</td>
|
910 |
+
</tr>
|
911 |
+
<tr>
|
912 |
+
<th><label for="cff_see_less_text" class="bump-left"><?php _e('Custom "See Less" text'); ?></label></th>
|
913 |
+
<td>
|
914 |
+
<input name="cff_see_less_text" type="text" value="<?php esc_attr_e( $cff_see_less_text ); ?>" size="20" />
|
915 |
+
<i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Use different text in place of the default "See Less" text'); ?></i>
|
916 |
+
</td>
|
917 |
+
</tr>
|
918 |
+
</tbody>
|
919 |
+
</table>
|
920 |
+
</div>
|
921 |
+
</div>
|
922 |
+
<div id="adminform" class="postbox" style="display: block;">
|
923 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
924 |
+
<h3 class="hndle"><span><?php _e('Post Text'); ?></span></h3>
|
925 |
+
<div class="inside">
|
926 |
+
<table class="form-table">
|
927 |
+
<tbody>
|
928 |
+
<tr>
|
929 |
+
<th><label for="cff_title_format" class="bump-left"><?php _e('Format'); ?></label></th>
|
930 |
+
<td>
|
931 |
+
<select name="cff_title_format">
|
932 |
+
<option value="p" <?php if($cff_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
|
933 |
+
<option value="h3" <?php if($cff_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
|
934 |
+
<option value="h4" <?php if($cff_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
|
935 |
+
<option value="h5" <?php if($cff_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
|
936 |
+
<option value="h6" <?php if($cff_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
|
937 |
+
</select>
|
938 |
+
</td>
|
939 |
+
</tr>
|
940 |
+
<tr>
|
941 |
+
<th><label for="cff_title_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
942 |
+
<td>
|
943 |
+
<select name="cff_title_size">
|
944 |
+
<option value="inherit" <?php if($cff_title_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
945 |
+
<option value="10" <?php if($cff_title_size == "10") echo 'selected="selected"' ?> >10px</option>
|
946 |
+
<option value="11" <?php if($cff_title_size == "11") echo 'selected="selected"' ?> >11px</option>
|
947 |
+
<option value="12" <?php if($cff_title_size == "12") echo 'selected="selected"' ?> >12px</option>
|
948 |
+
<option value="14" <?php if($cff_title_size == "14") echo 'selected="selected"' ?> >14px</option>
|
949 |
+
<option value="16" <?php if($cff_title_size == "16") echo 'selected="selected"' ?> >16px</option>
|
950 |
+
<option value="18" <?php if($cff_title_size == "18") echo 'selected="selected"' ?> >18px</option>
|
951 |
+
<option value="20" <?php if($cff_title_size == "20") echo 'selected="selected"' ?> >20px</option>
|
952 |
+
<option value="24" <?php if($cff_title_size == "24") echo 'selected="selected"' ?> >24px</option>
|
953 |
+
<option value="28" <?php if($cff_title_size == "28") echo 'selected="selected"' ?> >28px</option>
|
954 |
+
<option value="32" <?php if($cff_title_size == "32") echo 'selected="selected"' ?> >32px</option>
|
955 |
+
<option value="36" <?php if($cff_title_size == "36") echo 'selected="selected"' ?> >36px</option>
|
956 |
+
<option value="42" <?php if($cff_title_size == "42") echo 'selected="selected"' ?> >42px</option>
|
957 |
+
<option value="48" <?php if($cff_title_size == "48") echo 'selected="selected"' ?> >48px</option>
|
958 |
+
<option value="60" <?php if($cff_title_size == "54") echo 'selected="selected"' ?> >54px</option>
|
959 |
+
<option value="60" <?php if($cff_title_size == "60") echo 'selected="selected"' ?> >60px</option>
|
960 |
+
</select>
|
961 |
+
</td>
|
962 |
+
</tr>
|
963 |
+
<tr>
|
964 |
+
<th><label for="cff_title_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
965 |
+
<td>
|
966 |
+
<select name="cff_title_weight">
|
967 |
+
<option value="inherit" <?php if($cff_title_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
968 |
+
<option value="normal" <?php if($cff_title_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
969 |
+
<option value="bold" <?php if($cff_title_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
970 |
+
</select>
|
971 |
+
</td>
|
972 |
+
</tr>
|
973 |
+
<tr>
|
974 |
+
<th><label for="cff_title_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
975 |
+
<td>
|
976 |
+
#<input name="cff_title_color" type="text" value="<?php esc_attr_e( $cff_title_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
977 |
+
<span><a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a></span>
|
978 |
+
</td>
|
979 |
+
</tr>
|
980 |
+
<tr>
|
981 |
+
<th><label for="cff_title_link" class="bump-left"><?php _e('Link text to Facebook post?'); ?></label></th>
|
982 |
+
<td><input type="checkbox" name="cff_title_link" id="cff_title_link" <?php if($cff_title_link == true) echo 'checked="checked"' ?> /> Yes</td>
|
983 |
+
</tr>
|
984 |
+
|
985 |
+
</tbody>
|
986 |
+
</table>
|
987 |
+
</div>
|
988 |
+
</div>
|
989 |
+
<div id="adminform" class="postbox" style="display: block;">
|
990 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
991 |
+
<h3 class="hndle"><span><?php _e('Link, Photo and Video Description'); ?></span></h3>
|
992 |
+
<div class="inside">
|
993 |
+
<table class="form-table">
|
994 |
+
<tbody>
|
995 |
+
|
996 |
+
<tr>
|
997 |
+
<th><label for="cff_body_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
998 |
+
<td>
|
999 |
+
<select name="cff_body_size">
|
1000 |
+
<option value="inherit" <?php if($cff_body_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1001 |
+
<option value="10" <?php if($cff_body_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1002 |
+
<option value="11" <?php if($cff_body_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1003 |
+
<option value="12" <?php if($cff_body_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1004 |
+
<option value="14" <?php if($cff_body_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1005 |
+
<option value="16" <?php if($cff_body_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1006 |
+
<option value="18" <?php if($cff_body_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1007 |
+
<option value="20" <?php if($cff_body_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1008 |
+
<option value="24" <?php if($cff_body_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1009 |
+
<option value="28" <?php if($cff_body_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1010 |
+
<option value="32" <?php if($cff_body_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1011 |
+
<option value="36" <?php if($cff_body_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1012 |
+
<option value="42" <?php if($cff_body_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1013 |
+
<option value="48" <?php if($cff_body_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1014 |
+
<option value="60" <?php if($cff_body_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1015 |
+
<option value="60" <?php if($cff_body_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1016 |
+
</select>
|
1017 |
+
</td>
|
1018 |
+
</tr>
|
1019 |
+
<tr>
|
1020 |
+
<th><label for="cff_body_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
1021 |
+
<td>
|
1022 |
+
<select name="cff_body_weight">
|
1023 |
+
<option value="inherit" <?php if($cff_body_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1024 |
+
<option value="normal" <?php if($cff_body_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
1025 |
+
<option value="bold" <?php if($cff_body_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
1026 |
+
</select>
|
1027 |
+
</td>
|
1028 |
+
</tr>
|
1029 |
+
<tr>
|
1030 |
+
<th><label for="cff_body_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
1031 |
+
|
1032 |
+
<td>
|
1033 |
+
#<input name="cff_body_color" type="text" value="<?php esc_attr_e( $cff_body_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
1034 |
+
<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1035 |
+
</td>
|
1036 |
+
</tr>
|
1037 |
+
</tbody>
|
1038 |
+
</table>
|
1039 |
+
</div>
|
1040 |
+
</div>
|
1041 |
+
<div style="margin-top: -15px;">
|
1042 |
+
<?php submit_button(); ?>
|
1043 |
+
</div>
|
1044 |
+
<div id="adminform" class="postbox" style="display: block;">
|
1045 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
1046 |
+
<h3 class="hndle"><span><?php _e('Date'); ?></span></h3>
|
1047 |
+
<div class="inside">
|
1048 |
+
<table class="form-table">
|
1049 |
+
<tbody>
|
1050 |
+
<tr>
|
1051 |
+
<th><label for="cff_date_position" class="bump-left"><?php _e('Position'); ?></label></th>
|
1052 |
+
<td>
|
1053 |
+
<select name="cff_date_position">
|
1054 |
+
<option value="below" <?php if($cff_date_position == "below") echo 'selected="selected"' ?> >Below Text</option>
|
1055 |
+
<option value="above" <?php if($cff_date_position == "above") echo 'selected="selected"' ?> >Above Text</option>
|
1056 |
+
</select>
|
1057 |
+
</td>
|
1058 |
+
</tr>
|
1059 |
+
<tr>
|
1060 |
+
<th><label for="cff_date_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
1061 |
+
<td>
|
1062 |
+
<select name="cff_date_size">
|
1063 |
+
<option value="inherit" <?php if($cff_date_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1064 |
+
<option value="10" <?php if($cff_date_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1065 |
+
<option value="11" <?php if($cff_date_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1066 |
+
<option value="12" <?php if($cff_date_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1067 |
+
<option value="14" <?php if($cff_date_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1068 |
+
<option value="16" <?php if($cff_date_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1069 |
+
<option value="18" <?php if($cff_date_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1070 |
+
<option value="20" <?php if($cff_date_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1071 |
+
<option value="24" <?php if($cff_date_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1072 |
+
<option value="28" <?php if($cff_date_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1073 |
+
<option value="32" <?php if($cff_date_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1074 |
+
<option value="36" <?php if($cff_date_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1075 |
+
<option value="42" <?php if($cff_date_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1076 |
+
<option value="48" <?php if($cff_date_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1077 |
+
<option value="60" <?php if($cff_date_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1078 |
+
<option value="60" <?php if($cff_date_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1079 |
+
</select>
|
1080 |
+
</td>
|
1081 |
+
</tr>
|
1082 |
+
<tr>
|
1083 |
+
<th><label for="cff_date_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
1084 |
+
<td>
|
1085 |
+
<select name="cff_date_weight">
|
1086 |
+
<option value="inherit" <?php if($cff_date_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1087 |
+
<option value="normal" <?php if($cff_date_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
1088 |
+
<option value="bold" <?php if($cff_date_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
1089 |
+
</select>
|
1090 |
+
</td>
|
1091 |
+
</tr>
|
1092 |
+
<tr>
|
1093 |
+
<th><label for="cff_date_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
1094 |
+
<td>
|
1095 |
+
#<input name="cff_date_color" type="text" value="<?php esc_attr_e( $cff_date_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
1096 |
+
<a href="http://www.colorpicker.com/" target="_blank">Color Picker</a>
|
1097 |
+
</td>
|
1098 |
+
</tr>
|
1099 |
+
|
1100 |
+
<tr>
|
1101 |
+
<th><label for="cff_date_formatting" class="bump-left"><?php _e('Date formatting'); ?></label></th>
|
1102 |
+
<td>
|
1103 |
+
<select name="cff_date_formatting">
|
1104 |
+
<?php $original = strtotime('2013-07-25T17:30:00+0000'); ?>
|
1105 |
+
<option value="1" <?php if($cff_date_formatting == "1") echo 'selected="selected"' ?> ><?php _e('Posted 2 days ago'); ?></option>
|
1106 |
+
<option value="2" <?php if($cff_date_formatting == "2") echo 'selected="selected"' ?> ><?php echo date('F jS, g:i a', $original); ?></option>
|
1107 |
+
<option value="3" <?php if($cff_date_formatting == "3") echo 'selected="selected"' ?> ><?php echo date('F jS', $original); ?></option>
|
1108 |
+
<option value="4" <?php if($cff_date_formatting == "4") echo 'selected="selected"' ?> ><?php echo date('D F jS', $original); ?></option>
|
1109 |
+
<option value="5" <?php if($cff_date_formatting == "5") echo 'selected="selected"' ?> ><?php echo date('l F jS', $original); ?></option>
|
1110 |
+
<option value="6" <?php if($cff_date_formatting == "6") echo 'selected="selected"' ?> ><?php echo date('D M jS, Y', $original); ?></option>
|
1111 |
+
<option value="7" <?php if($cff_date_formatting == "7") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y', $original); ?></option>
|
1112 |
+
<option value="8" <?php if($cff_date_formatting == "8") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y - g:i a', $original); ?></option>
|
1113 |
+
<option value="9" <?php if($cff_date_formatting == "9") echo 'selected="selected"' ?> ><?php echo date("l M jS, 'y", $original); ?></option>
|
1114 |
+
<option value="10" <?php if($cff_date_formatting == "10") echo 'selected="selected"' ?> ><?php echo date('m.d.y', $original); ?></option>
|
1115 |
+
<option value="11" <?php if($cff_date_formatting == "11") echo 'selected="selected"' ?> ><?php echo date('m/d/y', $original); ?></option>
|
1116 |
+
<option value="12" <?php if($cff_date_formatting == "12") echo 'selected="selected"' ?> ><?php echo date('d.m.y', $original); ?></option>
|
1117 |
+
<option value="13" <?php if($cff_date_formatting == "13") echo 'selected="selected"' ?> ><?php echo date('d/m/y', $original); ?></option>
|
1118 |
+
</select>
|
1119 |
+
</td>
|
1120 |
+
</tr>
|
1121 |
+
<tr>
|
1122 |
+
<th><label for="cff_date_custom" class="bump-left"><?php _e('Custom format'); ?></label></th>
|
1123 |
+
<td>
|
1124 |
+
<input name="cff_date_custom" type="text" value="<?php esc_attr_e( $cff_date_custom ); ?>" size="10" placeholder="Eg. F j, Y" />
|
1125 |
+
<i style="color: #666; font-size: 11px;">(<a href="http://smashballoon.com/custom-facebook-feed/docs/date/" target="_blank"><?php _e('Examples'); ?></a>)</i>
|
1126 |
+
</td>
|
1127 |
+
</tr>
|
1128 |
+
<tr>
|
1129 |
+
<th><label for="cff_date_before" class="bump-left"><?php _e('Text before date'); ?></label></th>
|
1130 |
+
<td><input name="cff_date_before" type="text" value="<?php esc_attr_e( $cff_date_before ); ?>" size="10" placeholder="Eg. Posted" /></td>
|
1131 |
+
</tr>
|
1132 |
+
<tr>
|
1133 |
+
<th><label for="cff_date_after" class="bump-left"><?php _e('Text after date'); ?></label></th>
|
1134 |
+
<td><input name="cff_date_after" type="text" value="<?php esc_attr_e( $cff_date_after ); ?>" size="10" placeholder="Eg. ago" /></td>
|
1135 |
+
</tr>
|
1136 |
+
</tbody>
|
1137 |
+
</table>
|
1138 |
+
</div>
|
1139 |
+
</div>
|
1140 |
+
<div id="adminform" class="postbox" style="display: block;">
|
1141 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
1142 |
+
<h3 class="hndle"><span><?php _e('Event Title'); ?></span></h3>
|
1143 |
+
<div class="inside">
|
1144 |
+
<table class="form-table">
|
1145 |
+
<tbody>
|
1146 |
+
|
1147 |
+
<tr>
|
1148 |
+
<th><label for="cff_event_title_format" class="bump-left"><?php _e('Format'); ?></label></th>
|
1149 |
+
<td>
|
1150 |
+
<select name="cff_event_title_format">
|
1151 |
+
<option value="p" <?php if($cff_event_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
|
1152 |
+
<option value="h3" <?php if($cff_event_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
|
1153 |
+
<option value="h4" <?php if($cff_event_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
|
1154 |
+
<option value="h5" <?php if($cff_event_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
|
1155 |
+
<option value="h6" <?php if($cff_event_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
|
1156 |
+
</select>
|
1157 |
+
</td>
|
1158 |
+
</tr>
|
1159 |
+
|
1160 |
+
<tr>
|
1161 |
+
<th><label for="cff_event_title_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
1162 |
+
<td>
|
1163 |
+
<select name="cff_event_title_size">
|
1164 |
+
<option value="inherit" <?php if($cff_event_title_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1165 |
+
<option value="10" <?php if($cff_event_title_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1166 |
+
<option value="11" <?php if($cff_event_title_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1167 |
+
<option value="12" <?php if($cff_event_title_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1168 |
+
<option value="14" <?php if($cff_event_title_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1169 |
+
<option value="16" <?php if($cff_event_title_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1170 |
+
<option value="18" <?php if($cff_event_title_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1171 |
+
<option value="20" <?php if($cff_event_title_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1172 |
+
<option value="24" <?php if($cff_event_title_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1173 |
+
<option value="28" <?php if($cff_event_title_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1174 |
+
<option value="32" <?php if($cff_event_title_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1175 |
+
<option value="36" <?php if($cff_event_title_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1176 |
+
<option value="42" <?php if($cff_event_title_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1177 |
+
<option value="48" <?php if($cff_event_title_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1178 |
+
<option value="60" <?php if($cff_event_title_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1179 |
+
<option value="60" <?php if($cff_event_title_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1180 |
+
</select>
|
1181 |
+
</td>
|
1182 |
+
</tr>
|
1183 |
+
<tr>
|
1184 |
+
<th><label for="cff_event_title_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
1185 |
+
<td>
|
1186 |
+
<select name="cff_event_title_weight">
|
1187 |
+
<option value="inherit" <?php if($cff_event_title_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1188 |
+
<option value="normal" <?php if($cff_event_title_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
1189 |
+
<option value="bold" <?php if($cff_event_title_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
1190 |
+
</select>
|
1191 |
+
</td>
|
1192 |
+
</tr>
|
1193 |
+
<tr>
|
1194 |
+
<th><label for="cff_event_title_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
1195 |
+
<td>
|
1196 |
+
<input name="cff_event_title_color" type="text" value="<?php esc_attr_e( $cff_event_title_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
1197 |
+
<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1198 |
+
</td>
|
1199 |
+
</tr>
|
1200 |
+
<tr>
|
1201 |
+
<th><label for="cff_title_link" class="bump-left"><?php _e('Link title to Facebook event page?'); ?></label></th>
|
1202 |
+
<td><input type="checkbox" name="cff_event_title_link" id="cff_event_title_link" <?php if($cff_event_title_link == true) echo 'checked="checked"' ?> /> Yes</td>
|
1203 |
+
</tr>
|
1204 |
+
</tbody>
|
1205 |
+
</table>
|
1206 |
+
</div>
|
1207 |
+
</div>
|
1208 |
+
<div style="margin-top: -15px;">
|
1209 |
+
<?php submit_button(); ?>
|
1210 |
+
</div>
|
1211 |
+
<div id="adminform" class="postbox" style="display: block;">
|
1212 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
1213 |
+
<h3 class="hndle"><span><?php _e('Event Date'); ?></span></h3>
|
1214 |
+
<div class="inside">
|
1215 |
+
<table class="form-table">
|
1216 |
+
<tbody>
|
1217 |
+
|
1218 |
+
<tr>
|
1219 |
+
<th><label for="cff_event_date_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
1220 |
+
<td>
|
1221 |
+
<select name="cff_event_date_size">
|
1222 |
+
<option value="inherit" <?php if($cff_event_date_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1223 |
+
<option value="10" <?php if($cff_event_date_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1224 |
+
<option value="11" <?php if($cff_event_date_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1225 |
+
<option value="12" <?php if($cff_event_date_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1226 |
+
<option value="14" <?php if($cff_event_date_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1227 |
+
<option value="16" <?php if($cff_event_date_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1228 |
+
<option value="18" <?php if($cff_event_date_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1229 |
+
<option value="20" <?php if($cff_event_date_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1230 |
+
<option value="24" <?php if($cff_event_date_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1231 |
+
<option value="28" <?php if($cff_event_date_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1232 |
+
<option value="32" <?php if($cff_event_date_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1233 |
+
<option value="36" <?php if($cff_event_date_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1234 |
+
<option value="42" <?php if($cff_event_date_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1235 |
+
<option value="48" <?php if($cff_event_date_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1236 |
+
<option value="60" <?php if($cff_event_date_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1237 |
+
<option value="60" <?php if($cff_event_date_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1238 |
+
</select>
|
1239 |
+
</td>
|
1240 |
+
</tr>
|
1241 |
+
<tr>
|
1242 |
+
<th><label for="cff_event_date_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
1243 |
+
<td>
|
1244 |
+
<select name="cff_event_date_weight">
|
1245 |
+
<option value="inherit" <?php if($cff_event_date_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1246 |
+
<option value="normal" <?php if($cff_event_date_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
1247 |
+
<option value="bold" <?php if($cff_event_date_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
1248 |
+
</select>
|
1249 |
+
</td>
|
1250 |
+
</tr>
|
1251 |
+
<tr>
|
1252 |
+
<th><label for="cff_event_date_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
1253 |
+
<td>
|
1254 |
+
#<input name="cff_event_date_color" type="text" value="<?php esc_attr_e( $cff_event_date_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
1255 |
+
<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1256 |
+
</td>
|
1257 |
+
</tr>
|
1258 |
+
<tr valign="top">
|
1259 |
+
<th scope="row"><label class="bump-left"><?php _e('Date Position'); ?></label></th>
|
1260 |
+
<td>
|
1261 |
+
<select name="cff_event_date_position">
|
1262 |
+
<option value="below" <?php if($cff_event_date_position == "below") echo 'selected="selected"' ?> ><?php _e('Below event title'); ?></option>
|
1263 |
+
<option value="above" <?php if($cff_event_date_position == "above") echo 'selected="selected"' ?> ><?php _e('Above event title'); ?></option>
|
1264 |
+
</select>
|
1265 |
+
</td>
|
1266 |
+
</tr>
|
1267 |
+
<tr>
|
1268 |
+
<th><label for="cff_event_date_formatting" class="bump-left"><?php _e('Event date formatting'); ?></label></th>
|
1269 |
+
<td>
|
1270 |
+
<select name="cff_event_date_formatting">
|
1271 |
+
<?php $original = strtotime('2013-07-25T17:30:00+0000'); ?>
|
1272 |
+
<option value="1" <?php if($cff_event_date_formatting == "1") echo 'selected="selected"' ?> ><?php echo date('F j, Y, g:ia', $original); ?></option>
|
1273 |
+
<option value="2" <?php if($cff_event_date_formatting == "2") echo 'selected="selected"' ?> ><?php echo date('F jS, g:ia', $original); ?></option>
|
1274 |
+
<option value="3" <?php if($cff_event_date_formatting == "3") echo 'selected="selected"' ?> ><?php echo date('g:ia - F jS', $original); ?></option>
|
1275 |
+
<option value="4" <?php if($cff_event_date_formatting == "4") echo 'selected="selected"' ?> ><?php echo date('g:ia, F jS', $original); ?></option>
|
1276 |
+
<option value="5" <?php if($cff_event_date_formatting == "5") echo 'selected="selected"' ?> ><?php echo date('l F jS - g:ia', $original); ?></option>
|
1277 |
+
<option value="6" <?php if($cff_event_date_formatting == "6") echo 'selected="selected"' ?> ><?php echo date('D M jS, Y, g:iA', $original); ?></option>
|
1278 |
+
<option value="7" <?php if($cff_event_date_formatting == "7") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y, g:iA', $original); ?></option>
|
1279 |
+
<option value="8" <?php if($cff_event_date_formatting == "8") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y - g:ia', $original); ?></option>
|
1280 |
+
<option value="9" <?php if($cff_event_date_formatting == "9") echo 'selected="selected"' ?> ><?php echo date("l M jS, 'y", $original); ?></option>
|
1281 |
+
<option value="10" <?php if($cff_event_date_formatting == "10") echo 'selected="selected"' ?> ><?php echo date('m.d.y - g:iA', $original); ?></option>
|
1282 |
+
<option value="11" <?php if($cff_event_date_formatting == "11") echo 'selected="selected"' ?> ><?php echo date('m/d/y, g:ia', $original); ?></option>
|
1283 |
+
<option value="12" <?php if($cff_event_date_formatting == "12") echo 'selected="selected"' ?> ><?php echo date('d.m.y - g:iA', $original); ?></option>
|
1284 |
+
<option value="13" <?php if($cff_event_date_formatting == "13") echo 'selected="selected"' ?> ><?php echo date('d/m/y, g:ia', $original); ?></option>
|
1285 |
+
</select>
|
1286 |
+
</td>
|
1287 |
+
</tr>
|
1288 |
+
<tr>
|
1289 |
+
<th><label for="cff_event_date_custom" class="bump-left"><?php _e('Custom event date format'); ?></label></th>
|
1290 |
+
<td>
|
1291 |
+
<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" />
|
1292 |
+
<i style="color: #666; font-size: 11px;">(<a href="http://smashballoon.com/custom-facebook-feed/docs/date/" target="_blank"><?php _e('Examples'); ?></a>)</i>
|
1293 |
+
</td>
|
1294 |
+
</tr>
|
1295 |
+
</tbody>
|
1296 |
+
</table>
|
1297 |
+
</div>
|
1298 |
+
</div>
|
1299 |
+
<div id="adminform" class="postbox" style="display: block;">
|
1300 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
1301 |
+
<h3 class="hndle"><span><?php _e('Event Details'); ?></span></h3>
|
1302 |
+
<div class="inside">
|
1303 |
+
<table class="form-table">
|
1304 |
+
<tbody>
|
1305 |
+
|
1306 |
+
<tr>
|
1307 |
+
<th><label for="cff_event_details_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
1308 |
+
<td>
|
1309 |
+
<select name="cff_event_details_size">
|
1310 |
+
<option value="inherit" <?php if($cff_event_details_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1311 |
+
<option value="10" <?php if($cff_event_details_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1312 |
+
<option value="11" <?php if($cff_event_details_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1313 |
+
<option value="12" <?php if($cff_event_details_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1314 |
+
<option value="14" <?php if($cff_event_details_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1315 |
+
<option value="16" <?php if($cff_event_details_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1316 |
+
<option value="18" <?php if($cff_event_details_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1317 |
+
<option value="20" <?php if($cff_event_details_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1318 |
+
<option value="24" <?php if($cff_event_details_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1319 |
+
<option value="28" <?php if($cff_event_details_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1320 |
+
<option value="32" <?php if($cff_event_details_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1321 |
+
<option value="36" <?php if($cff_event_details_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1322 |
+
<option value="42" <?php if($cff_event_details_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1323 |
+
<option value="48" <?php if($cff_event_details_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1324 |
+
<option value="60" <?php if($cff_event_details_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1325 |
+
<option value="60" <?php if($cff_event_details_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1326 |
+
</select>
|
1327 |
+
</td>
|
1328 |
+
</tr>
|
1329 |
+
<tr>
|
1330 |
+
<th><label for="cff_event_details_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
1331 |
+
<td>
|
1332 |
+
<select name="cff_event_details_weight">
|
1333 |
+
<option value="inherit" <?php if($cff_event_details_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1334 |
+
<option value="normal" <?php if($cff_event_details_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
1335 |
+
<option value="bold" <?php if($cff_event_details_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
1336 |
+
</select>
|
1337 |
+
</td>
|
1338 |
+
</tr>
|
1339 |
+
<tr>
|
1340 |
+
<th><label for="cff_event_details_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
1341 |
+
<td>
|
1342 |
+
#<input name="cff_event_details_color" type="text" value="<?php esc_attr_e( $cff_event_details_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
1343 |
+
<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1344 |
+
</td>
|
1345 |
+
</tr>
|
1346 |
+
</tbody>
|
1347 |
+
</table>
|
1348 |
+
</div>
|
1349 |
+
</div>
|
1350 |
+
<div id="adminform" class="postbox" style="display: block;">
|
1351 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
1352 |
+
<h3 class="hndle"><span><?php _e('Link to Facebook'); ?></span></h3>
|
1353 |
+
<div class="inside">
|
1354 |
+
<table class="form-table">
|
1355 |
+
<tbody>
|
1356 |
+
|
1357 |
+
<tr>
|
1358 |
+
<th><label for="cff_link_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
1359 |
+
<td>
|
1360 |
+
<select name="cff_link_size">
|
1361 |
+
<option value="inherit" <?php if($cff_link_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1362 |
+
<option value="10" <?php if($cff_link_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1363 |
+
<option value="11" <?php if($cff_link_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1364 |
+
<option value="12" <?php if($cff_link_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1365 |
+
<option value="14" <?php if($cff_link_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1366 |
+
<option value="16" <?php if($cff_link_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1367 |
+
<option value="18" <?php if($cff_link_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1368 |
+
<option value="20" <?php if($cff_link_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1369 |
+
<option value="24" <?php if($cff_link_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1370 |
+
<option value="28" <?php if($cff_link_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1371 |
+
<option value="32" <?php if($cff_link_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1372 |
+
<option value="36" <?php if($cff_link_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1373 |
+
<option value="42" <?php if($cff_link_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1374 |
+
<option value="48" <?php if($cff_link_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1375 |
+
<option value="60" <?php if($cff_link_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1376 |
+
<option value="60" <?php if($cff_link_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1377 |
+
</select>
|
1378 |
+
</td>
|
1379 |
+
</tr>
|
1380 |
+
<tr>
|
1381 |
+
<th><label for="cff_link_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
1382 |
+
<td>
|
1383 |
+
<select name="cff_link_weight">
|
1384 |
+
<option value="inherit" <?php if($cff_link_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1385 |
+
<option value="normal" <?php if($cff_link_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
1386 |
+
<option value="bold" <?php if($cff_link_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
1387 |
+
</select>
|
1388 |
+
</td>
|
1389 |
+
</tr>
|
1390 |
+
<tr>
|
1391 |
+
<th><label for="cff_link_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
1392 |
+
<td>
|
1393 |
+
<input name="cff_link_color" type="text" value="<?php esc_attr_e( $cff_link_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
1394 |
+
<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1395 |
+
</td>
|
1396 |
+
</tr>
|
1397 |
+
<tr>
|
1398 |
+
<th><label for="cff_facebook_link_text" class="bump-left"><?php _e('Custom "View on Facebook" text'); ?></label></th>
|
1399 |
+
<td>
|
1400 |
+
<input name="cff_facebook_link_text" type="text" value="<?php esc_attr_e( $cff_facebook_link_text ); ?>" size="20" />
|
1401 |
+
<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>
|
1402 |
+
</td>
|
1403 |
+
</tr>
|
1404 |
+
<tr>
|
1405 |
+
<th><label for="cff_view_link_text" class="bump-left"><?php _e('Custom "View Link" text'); ?></label></th>
|
1406 |
+
<td>
|
1407 |
+
<input name="cff_view_link_text" type="text" value="<?php esc_attr_e( $cff_view_link_text ); ?>" size="20" />
|
1408 |
+
<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>
|
1409 |
+
</td>
|
1410 |
+
</tr>
|
1411 |
+
<tr>
|
1412 |
+
<th><label for="cff_link_to_timeline" class="bump-left"><?php _e('Link statuses to your page'); ?></label></th>
|
1413 |
+
<td>
|
1414 |
+
<input type="checkbox" name="cff_link_to_timeline" id="cff_link_to_timeline" <?php if($cff_link_to_timeline == true) echo 'checked="checked"' ?> /> Yes
|
1415 |
+
<i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e("Check this if you'd like to link statuses to your Facebook timeline/page instead of to their individual posts on Facebook"); ?></i>
|
1416 |
+
</td>
|
1417 |
+
</tr>
|
1418 |
+
|
1419 |
+
</tbody>
|
1420 |
+
</table>
|
1421 |
+
</div>
|
1422 |
+
</div>
|
1423 |
+
</div>
|
1424 |
+
</div>
|
1425 |
+
<div style="margin-top: -15px;">
|
1426 |
+
<?php submit_button(); ?>
|
1427 |
+
</div>
|
1428 |
+
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
|
1429 |
+
|
1430 |
+
<?php } //End Typography tab ?>
|
1431 |
+
<?php if( $active_tab == 'misc' ) { //Start Misc tab ?>
|
1432 |
+
<input type="hidden" name="<?php echo $style_misc_hidden_field_name; ?>" value="Y">
|
1433 |
+
<br />
|
1434 |
+
<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>
|
1435 |
+
|
1436 |
+
<hr />
|
1437 |
+
<h3><?php _e('Custom CSS'); ?></h3>
|
1438 |
+
<table class="form-table">
|
1439 |
+
<tbody>
|
1440 |
+
<tr valign="top">
|
1441 |
+
<td>
|
1442 |
+
<?php _e('Enter your own custom CSS in the box below'); ?>
|
1443 |
+
</td>
|
1444 |
+
</tr>
|
1445 |
+
<tr valign="top">
|
1446 |
+
<td>
|
1447 |
+
<textarea name="cff_custom_css" id="cff_custom_css" style="width: 70%;" rows="7"><?php esc_attr_e( $cff_custom_css ); ?></textarea>
|
1448 |
+
</td>
|
1449 |
+
</tr>
|
1450 |
+
</tbody>
|
1451 |
+
</table>
|
1452 |
+
<hr />
|
1453 |
+
<h3><?php _e('Misc'); ?></h3>
|
1454 |
+
<table class="form-table">
|
1455 |
+
<tbody>
|
1456 |
+
<tr><td><b style="font-size: 14px;"><?php _e('Like Box'); ?></b></td></tr>
|
1457 |
+
<tr valign="top">
|
1458 |
+
<th scope="row"><label class="bump-left"><?php _e('Show the Like Box'); ?></label></th>
|
1459 |
+
<td>
|
1460 |
+
<input type="checkbox" name="cff_show_like_box" id="cff_show_like_box" <?php if($cff_show_like_box == true) echo 'checked="checked"' ?> />
|
1461 |
+
</td>
|
1462 |
+
</tr>
|
1463 |
+
<tr valign="top">
|
1464 |
+
<th scope="row"><label class="bump-left"><?php _e('Like Box Position'); ?></label></th>
|
1465 |
+
<td>
|
1466 |
+
<select name="cff_like_box_position">
|
1467 |
+
<option value="bottom" <?php if($cff_like_box_position == "bottom") echo 'selected="selected"' ?> ><?php _e('Bottom'); ?></option>
|
1468 |
+
<option value="top" <?php if($cff_like_box_position == "top") echo 'selected="selected"' ?> ><?php _e('Top'); ?></option>
|
1469 |
+
</select>
|
1470 |
+
</td>
|
1471 |
+
</tr>
|
1472 |
+
<tr valign="top">
|
1473 |
+
<th scope="row"><label class="bump-left"><?php _e('Display outside the scrollable area'); ?></label></th>
|
1474 |
+
<td>
|
1475 |
+
<input type="checkbox" name="cff_like_box_outside" id="cff_like_box_outside" <?php if($cff_like_box_outside == true) echo 'checked="checked"' ?> />
|
1476 |
+
<i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('(Only applicable if you have set a height on the feed)'); ?></i>
|
1477 |
+
</td>
|
1478 |
+
</tr>
|
1479 |
+
<tr valign="top">
|
1480 |
+
<th scope="row"><label class="bump-left"><?php _e('Like Box Background Color'); ?></label></th>
|
1481 |
+
<td>
|
1482 |
+
<label for="cff_likebox_bg_color">#</label>
|
1483 |
+
<input name="cff_likebox_bg_color" type="text" value="<?php esc_attr_e( $cff_likebox_bg_color ); ?>" size="10" />
|
1484 |
+
<span>Eg. ED9A00</span> <a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1485 |
+
</td>
|
1486 |
+
</tr>
|
1487 |
+
<tr valign="top">
|
1488 |
+
<th scope="row"><label for="cff_likebox_width" class="bump-left"><?php _e('Like Box Width'); ?></label></th>
|
1489 |
+
<td>
|
1490 |
+
<input name="cff_likebox_width" type="text" value="<?php esc_attr_e( $cff_likebox_width ); ?>" size="6" />
|
1491 |
+
<span>px <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Default is 300'); ?></i></span>
|
1492 |
+
</td>
|
1493 |
+
</tr>
|
1494 |
+
<tr valign="top">
|
1495 |
+
<th scope="row"><label class="bump-left"><?php _e('Show faces in Like Box'); ?></label></th>
|
1496 |
+
<td>
|
1497 |
+
<input type="checkbox" name="cff_like_box_faces" id="cff_like_box_faces" <?php if($cff_like_box_faces == true) echo 'checked="checked"' ?> />
|
1498 |
+
<i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Show thumbnail photos of fans who like your page'); ?></i>
|
1499 |
+
</td>
|
1500 |
+
</tr>
|
1501 |
+
|
1502 |
+
<tr><td><b style="font-size: 14px;"><?php _e('Separating Line'); ?></b></td></tr>
|
1503 |
+
<tr valign="top">
|
1504 |
+
<th scope="row"><label class="bump-left"><?php _e('Separating Line Color'); ?></label></th>
|
1505 |
+
<td>
|
1506 |
+
<label for="cff_sep_color">#</label>
|
1507 |
+
<input name="cff_sep_color" type="text" value="<?php esc_attr_e( $cff_sep_color ); ?>" size="10" />
|
1508 |
+
<span>Eg. ED9A00</span> <a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1509 |
+
</td>
|
1510 |
+
</tr>
|
1511 |
+
<tr valign="top">
|
1512 |
+
<th scope="row"><label class="bump-left"><?php _e('Separating Line Thickness'); ?></label></th>
|
1513 |
+
<td>
|
1514 |
+
<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>
|
1515 |
+
</td>
|
1516 |
+
</tr>
|
1517 |
+
</tbody>
|
1518 |
+
</table>
|
1519 |
+
<?php submit_button(); ?>
|
1520 |
+
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
|
1521 |
+
<?php } //End Misc tab ?>
|
1522 |
+
</form>
|
1523 |
+
<?php
|
1524 |
+
} //End Style_Page
|
1525 |
+
//Enqueue admin styles
|
1526 |
+
function cff_admin_style() {
|
1527 |
+
wp_register_style( 'custom_wp_admin_css', plugin_dir_url( __FILE__ ) . 'css/cff-admin-style.css', false, '1.0.0' );
|
1528 |
+
wp_enqueue_style( 'custom_wp_admin_css' );
|
1529 |
+
}
|
1530 |
+
add_action( 'admin_enqueue_scripts', 'cff_admin_style' );
|
1531 |
+
//Enqueue admin scripts
|
1532 |
+
function cff_admin_scripts() {
|
1533 |
+
wp_enqueue_script( 'cff_admin_script', plugin_dir_url( __FILE__ ) . 'js/cff-admin-scripts.js' );
|
1534 |
+
if( !wp_script_is('jquery-ui') ) {
|
1535 |
+
wp_enqueue_script( 'jquery-ui' , 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js' );
|
1536 |
+
}
|
1537 |
+
wp_enqueue_script( 'hoverIntent' );
|
1538 |
+
}
|
1539 |
+
add_action( 'admin_enqueue_scripts', 'cff_admin_scripts' );
|
1540 |
?>
|
custom-facebook-feed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Custom Facebook Feed
|
4 |
Plugin URI: http://smashballoon.com/custom-facebook-feed
|
5 |
Description: Add a completely customizable Facebook feed to your WordPress site
|
6 |
-
Version: 1.6.
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
@@ -56,6 +56,7 @@ function display_cff($atts) {
|
|
56 |
'others' => get_option('cff_show_others'),
|
57 |
'cachetime' => get_option('cff_cache_time'),
|
58 |
'cacheunit' => get_option('cff_cache_time_unit'),
|
|
|
59 |
'width' => $options[ 'cff_feed_width' ],
|
60 |
'height' => $options[ 'cff_feed_height' ],
|
61 |
'padding' => $options[ 'cff_feed_padding' ],
|
@@ -105,6 +106,8 @@ function display_cff($atts) {
|
|
105 |
'linkcolor' => $options[ 'cff_link_color' ],
|
106 |
'facebooklinktext' => $options[ 'cff_facebook_link_text' ],
|
107 |
'viewlinktext' => $options[ 'cff_view_link_text' ],
|
|
|
|
|
108 |
'iconstyle' => $options[ 'cff_icon_style' ],
|
109 |
'socialtextcolor' => $options[ 'cff_meta_text_color' ],
|
110 |
'socialbgcolor' => $options[ 'cff_meta_bg_color' ],
|
@@ -114,6 +117,9 @@ function display_cff($atts) {
|
|
114 |
'likeboxpos' => $options[ 'cff_like_box_position' ],
|
115 |
'likeboxoutside' => $options[ 'cff_like_box_outside' ],
|
116 |
'likeboxcolor' => $options[ 'cff_likebox_bg_color' ],
|
|
|
|
|
|
|
117 |
'videoheight' => $options[ 'cff_video_height' ],
|
118 |
'videoaction' => $options[ 'cff_video_action' ],
|
119 |
'sepcolor' => $options[ 'cff_sep_color' ],
|
@@ -126,6 +132,8 @@ function display_cff($atts) {
|
|
126 |
$cff_bg_color = $atts[ 'bgcolor' ];
|
127 |
$cff_show_author = $atts[ 'showauthor' ];
|
128 |
$cff_cache_time = $atts[ 'cachetime' ];
|
|
|
|
|
129 |
if (!isset($cff_cache_time)) $cff_cache_time = 0;
|
130 |
$cff_cache_time_unit = $atts[ 'cacheunit' ];
|
131 |
$cff_class = $atts['class'];
|
@@ -263,6 +271,7 @@ function display_cff($atts) {
|
|
263 |
$cff_link_styles .= '"';
|
264 |
$cff_facebook_link_text = $atts[ 'facebooklinktext' ];
|
265 |
$cff_view_link_text = $atts[ 'viewlinktext' ];
|
|
|
266 |
/********** MISC **********/
|
267 |
//Like Box styles
|
268 |
$cff_likebox_bg_color = $atts[ 'likeboxcolor' ];
|
@@ -324,11 +333,18 @@ function display_cff($atts) {
|
|
324 |
if($cff_cache_time_unit == 'hours') $cff_cache_time_unit = 60*60;
|
325 |
if($cff_cache_time_unit == 'days') $cff_cache_time_unit = 60*60*24;
|
326 |
$cache_seconds = $cff_cache_time * $cff_cache_time_unit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
//Set like box variable
|
328 |
$like_box = '<div class="cff-likebox';
|
329 |
-
if ($cff_like_box_outside) $like_box .= ' outside';
|
330 |
-
$like_box .= ($cff_like_box_position == 'top') ? ' top' : ' bottom';
|
331 |
-
$like_box .= '"' . $cff_likebox_styles . '><script src="http://connect.facebook.net/
|
332 |
//***START FEED***
|
333 |
$content = '';
|
334 |
//Add like box to the outside of the top of feed
|
@@ -336,10 +352,10 @@ function display_cff($atts) {
|
|
336 |
//Create CFF container HTML
|
337 |
$content .= '<div id="cff" rel="'.$title_limit.'" class="';
|
338 |
if( !empty($cff_class) ) $content .= $cff_class . ' ';
|
339 |
-
if ( !empty($cff_feed_height) ) $content .= 'fixed-height ';
|
340 |
-
if ( $cff_thumb_layout ) $content .= 'thumb-layout ';
|
341 |
// if ( $cff_media_medium ) $content .= 'medium-image ';
|
342 |
-
if ( $cff_half_layout ) $content .= 'half-layout ';
|
343 |
$content .= '" ' . $cff_feed_styles . '>';
|
344 |
//Add like box to the inside of the top of feed
|
345 |
if ($cff_like_box_position == 'top' && $cff_show_like_box && !$cff_like_box_outside) $content .= $like_box;
|
@@ -349,20 +365,23 @@ function display_cff($atts) {
|
|
349 |
|
350 |
//ALL POSTS
|
351 |
if (!$cff_events_only){
|
|
|
|
|
|
|
352 |
//Don't use caching if the cache time is set to zero
|
353 |
if ($cff_cache_time != 0){
|
354 |
// Get any existing copy of our transient data
|
355 |
$transient_name = 'cff_'. $graph_query .'_json_' . $page_id;
|
356 |
if ( false === ( $posts_json = get_transient( $transient_name ) ) || $posts_json === null ) {
|
357 |
//Get the contents of the Facebook page
|
358 |
-
$posts_json = cff_fetchUrl(
|
359 |
//Cache the JSON
|
360 |
set_transient( $transient_name, $posts_json, $cache_seconds );
|
361 |
} else {
|
362 |
$posts_json = get_transient( $transient_name );
|
363 |
}
|
364 |
} else {
|
365 |
-
$posts_json = cff_fetchUrl(
|
366 |
}
|
367 |
|
368 |
//Interpret data with JSON
|
@@ -428,8 +447,18 @@ function display_cff($atts) {
|
|
428 |
if ( $shared_album ) {
|
429 |
$link = str_replace('photo.php?','media/set/?',$link);
|
430 |
}
|
431 |
-
|
432 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
//POST AUTHOR
|
434 |
$cff_author = '<a class="cff-author" href="http://facebook.com/' . $news->from->id . '" '.$target.' title="'.$news->from->name.' on Facebook">';
|
435 |
$cff_author .= '<img src="http://graph.facebook.com/' . $news->from->id . '/picture">';
|
@@ -437,7 +466,7 @@ function display_cff($atts) {
|
|
437 |
$cff_author .= '</a>';
|
438 |
//POST TEXT
|
439 |
$cff_post_text = '<' . $cff_title_format . ' class="cff-post-text" ' . $cff_title_styles . '>';
|
440 |
-
$cff_post_text .= '<span class="text">';
|
441 |
if ($cff_title_link) $cff_post_text .= '<a class="cff-post-text-link" href="'.$link.'" '.$target.'>';
|
442 |
if (!empty($news->story)) $post_text = $news->story;
|
443 |
if (!empty($news->message)) $post_text = $news->message;
|
@@ -454,7 +483,7 @@ function display_cff($atts) {
|
|
454 |
if ($cff_title_link) $cff_post_text .= '</a>';
|
455 |
$cff_post_text .= '</span>';
|
456 |
//'See More' link
|
457 |
-
$cff_post_text .= '<span class="cff-expand">... <a href="#"><span class="more">' . $cff_see_more_text . '</span><span class="less">' . $cff_see_less_text . '</span></a></span>';
|
458 |
$cff_post_text .= '</' . $cff_title_format . '>';
|
459 |
//DESCRIPTION
|
460 |
$cff_description = '';
|
@@ -472,8 +501,8 @@ function display_cff($atts) {
|
|
472 |
if ($news->type == 'link') {
|
473 |
//Display link name and description
|
474 |
if (!empty($news->description)) {
|
475 |
-
$cff_shared_link .= '<p class="text-link ';
|
476 |
-
$cff_shared_link .= 'no-image';
|
477 |
$cff_shared_link .= '"><a href="'.$link.'" '.$target.'>'. '<b>' . $news->name . '</b></a></p>';
|
478 |
}
|
479 |
}
|
@@ -507,7 +536,7 @@ function display_cff($atts) {
|
|
507 |
if (!empty($event_time)) $cff_event_date = '<p class="cff-date" '.$cff_event_date_styles.'>' . cff_eventdate(strtotime($event_time), $cff_event_date_formatting, $cff_event_date_custom) . '</p>';
|
508 |
//EVENT
|
509 |
//Display the event details
|
510 |
-
$cff_event .= '<div class="details">';
|
511 |
//show event date above title
|
512 |
if ($cff_event_date_position == 'above') $cff_event .= $cff_event_date;
|
513 |
//Show event title
|
@@ -521,14 +550,14 @@ function display_cff($atts) {
|
|
521 |
//Show event details
|
522 |
if ($cff_show_event_details){
|
523 |
//Location
|
524 |
-
if (!empty($event_object->location)) $cff_event .= '<p class="where" ' . $cff_event_details_styles . '>' . $event_object->location . '</p>';
|
525 |
//Description
|
526 |
if (!empty($event_object->description)){
|
527 |
$description = $event_object->description;
|
528 |
if (!empty($body_limit)) {
|
529 |
if (strlen($description) > $body_limit) $description = substr($description, 0, $body_limit) . '...';
|
530 |
}
|
531 |
-
$cff_event .= '<p class="info" ' . $cff_event_details_styles . '>' . cff_make_clickable($description) . '</p>';
|
532 |
}
|
533 |
}
|
534 |
$cff_event .= '</div>';
|
@@ -539,6 +568,7 @@ function display_cff($atts) {
|
|
539 |
//Display the link to the Facebook post or external link
|
540 |
$cff_link = '';
|
541 |
//Default link
|
|
|
542 |
if ($cff_facebook_link_text == '') $cff_facebook_link_text = 'View on Facebook';
|
543 |
$link_text = $cff_facebook_link_text;
|
544 |
if (!empty($news->link)) {
|
@@ -548,28 +578,15 @@ function display_cff($atts) {
|
|
548 |
if ($cff_view_link_text == '') $cff_view_link_text = 'View Link';
|
549 |
$link_text = $cff_view_link_text;
|
550 |
}
|
|
|
551 |
}
|
552 |
if ($cff_post_type == 'offer') $link_text = 'View Offer';
|
553 |
-
$cff_link = '<a class="
|
554 |
//Compile the meta and link if included
|
555 |
if ($cff_show_meta) $cff_meta_total .= $cff_meta;
|
556 |
if ($cff_show_link) $cff_meta_total .= $cff_link;
|
557 |
$cff_meta_total .= '</div>';
|
558 |
$cff_comments = '';
|
559 |
-
if ( !($comment_count == 0 && $cff_hide_comments) ) {
|
560 |
-
//Create the comments box
|
561 |
-
$cff_comments .= '<div class="comments-box" ' . $cff_meta_styles . '>';
|
562 |
-
//Get the comments
|
563 |
-
if (!empty($news->comments->data)){
|
564 |
-
foreach ($news->comments->data as $comment_item ) {
|
565 |
-
$comment = $comment_item->message;
|
566 |
-
$cff_comments .= '<p><a href="http://facebook.com/'. $comment_item->from->id .'" class="name" '.$target.' ' . $cff_meta_styles . '>' . $comment_item->from->name . '</a>' . cff_make_clickable($comment) . '<span class="time">'. cff_timeSince(strtotime($comment_item->created_time)) . '</span></p>';
|
567 |
-
}
|
568 |
-
} else {
|
569 |
-
$cff_comments .= '<p>' . $cff_nocomments_text . '</p>';
|
570 |
-
}
|
571 |
-
$cff_comments .= '</div>';
|
572 |
-
}
|
573 |
//Compile comments if meta is included
|
574 |
if ($cff_show_meta) $cff_meta_total .= $cff_comments;
|
575 |
//**************************//
|
@@ -577,7 +594,13 @@ function display_cff($atts) {
|
|
577 |
//**************************//
|
578 |
//Start the container
|
579 |
$content .= '<div class="cff-item ';
|
580 |
-
if ($
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
$content .= '" id="'. $news->id .'" ' . $cff_item_styles . '>';
|
582 |
|
583 |
//POST AUTHOR
|
@@ -681,7 +704,7 @@ function cff_auto_link_text_callback($matches) {
|
|
681 |
} else {
|
682 |
$url_short = $url_full;
|
683 |
}
|
684 |
-
return "<a class='break-word' rel=\"nofollow\" href=\"$url_full\">$url_full</a>";
|
685 |
}
|
686 |
//Make links into span instead when the post text is made clickable
|
687 |
function cff_wrap_span($text) {
|
@@ -723,7 +746,7 @@ function cff_wrap_span_callback($matches) {
|
|
723 |
} else {
|
724 |
$url_short = $url_full;
|
725 |
}
|
726 |
-
return "<span class='break-word'>$url_short</span>";
|
727 |
}
|
728 |
//2013-04-28T21:06:56+0000
|
729 |
//Time stamp function - used for posts
|
@@ -935,6 +958,7 @@ function cff_uninstall()
|
|
935 |
delete_option( 'cff_show_others' );
|
936 |
delete_option('cff_cache_time');
|
937 |
delete_option('cff_cache_time_unit');
|
|
|
938 |
//Style & Layout
|
939 |
delete_option( 'cff_title_length' );
|
940 |
delete_option( 'cff_body_length' );
|
3 |
Plugin Name: Custom Facebook Feed
|
4 |
Plugin URI: http://smashballoon.com/custom-facebook-feed
|
5 |
Description: Add a completely customizable Facebook feed to your WordPress site
|
6 |
+
Version: 1.6.4
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
56 |
'others' => get_option('cff_show_others'),
|
57 |
'cachetime' => get_option('cff_cache_time'),
|
58 |
'cacheunit' => get_option('cff_cache_time_unit'),
|
59 |
+
'locale' => get_option('cff_locale'),
|
60 |
'width' => $options[ 'cff_feed_width' ],
|
61 |
'height' => $options[ 'cff_feed_height' ],
|
62 |
'padding' => $options[ 'cff_feed_padding' ],
|
106 |
'linkcolor' => $options[ 'cff_link_color' ],
|
107 |
'facebooklinktext' => $options[ 'cff_facebook_link_text' ],
|
108 |
'viewlinktext' => $options[ 'cff_view_link_text' ],
|
109 |
+
'linktotimeline' => $options[ 'cff_link_to_timeline' ],
|
110 |
+
//Social
|
111 |
'iconstyle' => $options[ 'cff_icon_style' ],
|
112 |
'socialtextcolor' => $options[ 'cff_meta_text_color' ],
|
113 |
'socialbgcolor' => $options[ 'cff_meta_bg_color' ],
|
117 |
'likeboxpos' => $options[ 'cff_like_box_position' ],
|
118 |
'likeboxoutside' => $options[ 'cff_like_box_outside' ],
|
119 |
'likeboxcolor' => $options[ 'cff_likebox_bg_color' ],
|
120 |
+
'likeboxwidth' => $options[ 'cff_likebox_width' ],
|
121 |
+
'likeboxfaces' => $options[ 'cff_like_box_faces' ],
|
122 |
+
|
123 |
'videoheight' => $options[ 'cff_video_height' ],
|
124 |
'videoaction' => $options[ 'cff_video_action' ],
|
125 |
'sepcolor' => $options[ 'cff_sep_color' ],
|
132 |
$cff_bg_color = $atts[ 'bgcolor' ];
|
133 |
$cff_show_author = $atts[ 'showauthor' ];
|
134 |
$cff_cache_time = $atts[ 'cachetime' ];
|
135 |
+
$cff_locale = $atts[ 'locale' ];
|
136 |
+
if ( empty($cff_locale) || !isset($cff_locale) || $cff_locale == '' ) $cff_locale = 'en_US';
|
137 |
if (!isset($cff_cache_time)) $cff_cache_time = 0;
|
138 |
$cff_cache_time_unit = $atts[ 'cacheunit' ];
|
139 |
$cff_class = $atts['class'];
|
271 |
$cff_link_styles .= '"';
|
272 |
$cff_facebook_link_text = $atts[ 'facebooklinktext' ];
|
273 |
$cff_view_link_text = $atts[ 'viewlinktext' ];
|
274 |
+
$cff_link_to_timeline = $atts[ 'linktotimeline' ];
|
275 |
/********** MISC **********/
|
276 |
//Like Box styles
|
277 |
$cff_likebox_bg_color = $atts[ 'likeboxcolor' ];
|
333 |
if($cff_cache_time_unit == 'hours') $cff_cache_time_unit = 60*60;
|
334 |
if($cff_cache_time_unit == 'days') $cff_cache_time_unit = 60*60*24;
|
335 |
$cache_seconds = $cff_cache_time * $cff_cache_time_unit;
|
336 |
+
|
337 |
+
//Get like box vars
|
338 |
+
$cff_likebox_width = $atts[ 'likeboxwidth' ];
|
339 |
+
if ( !isset($cff_likebox_width) || empty($cff_likebox_width) || $cff_likebox_width == '' ) $cff_likebox_width = 300;
|
340 |
+
$cff_like_box_faces = $atts[ 'likeboxfaces' ];
|
341 |
+
if ( !isset($cff_like_box_faces) || empty($cff_like_box_faces) ) $cff_like_box_faces = 'false';
|
342 |
+
|
343 |
//Set like box variable
|
344 |
$like_box = '<div class="cff-likebox';
|
345 |
+
if ($cff_like_box_outside) $like_box .= ' cff-outside';
|
346 |
+
$like_box .= ($cff_like_box_position == 'top') ? ' cff-top' : ' cff-bottom';
|
347 |
+
$like_box .= '"' . $cff_likebox_styles . '><script src="http://connect.facebook.net/' . $cff_locale . '/all.js#xfbml=1"></script><fb:like-box href="http://www.facebook.com/' . $page_id . '" width="'.$cff_likebox_width.'" show_faces="'.$cff_like_box_faces.'" stream="false" header="false"></fb:like-box></div>';
|
348 |
//***START FEED***
|
349 |
$content = '';
|
350 |
//Add like box to the outside of the top of feed
|
352 |
//Create CFF container HTML
|
353 |
$content .= '<div id="cff" rel="'.$title_limit.'" class="';
|
354 |
if( !empty($cff_class) ) $content .= $cff_class . ' ';
|
355 |
+
if ( !empty($cff_feed_height) ) $content .= 'cff-fixed-height ';
|
356 |
+
if ( $cff_thumb_layout ) $content .= 'cff-thumb-layout ';
|
357 |
// if ( $cff_media_medium ) $content .= 'medium-image ';
|
358 |
+
if ( $cff_half_layout ) $content .= 'cff-half-layout ';
|
359 |
$content .= '" ' . $cff_feed_styles . '>';
|
360 |
//Add like box to the inside of the top of feed
|
361 |
if ($cff_like_box_position == 'top' && $cff_show_like_box && !$cff_like_box_outside) $content .= $like_box;
|
365 |
|
366 |
//ALL POSTS
|
367 |
if (!$cff_events_only){
|
368 |
+
|
369 |
+
$cff_posts_json_url = 'https://graph.facebook.com/' . $page_id . '/' . $graph_query . '?access_token=' . $access_token . '&limit=' . $cff_post_limit . '&locale=' . $cff_locale;
|
370 |
+
|
371 |
//Don't use caching if the cache time is set to zero
|
372 |
if ($cff_cache_time != 0){
|
373 |
// Get any existing copy of our transient data
|
374 |
$transient_name = 'cff_'. $graph_query .'_json_' . $page_id;
|
375 |
if ( false === ( $posts_json = get_transient( $transient_name ) ) || $posts_json === null ) {
|
376 |
//Get the contents of the Facebook page
|
377 |
+
$posts_json = cff_fetchUrl($cff_posts_json_url);
|
378 |
//Cache the JSON
|
379 |
set_transient( $transient_name, $posts_json, $cache_seconds );
|
380 |
} else {
|
381 |
$posts_json = get_transient( $transient_name );
|
382 |
}
|
383 |
} else {
|
384 |
+
$posts_json = cff_fetchUrl($cff_posts_json_url);
|
385 |
}
|
386 |
|
387 |
//Interpret data with JSON
|
447 |
if ( $shared_album ) {
|
448 |
$link = str_replace('photo.php?','media/set/?',$link);
|
449 |
}
|
450 |
+
|
451 |
+
//If there's no link provided then link to either the Facebook page or the individual status
|
452 |
+
if (empty($news->link)) {
|
453 |
+
if ($cff_link_to_timeline == true){
|
454 |
+
//Link to page
|
455 |
+
$link = 'http://facebook.com/' . $page_id;
|
456 |
+
} else {
|
457 |
+
//Link to status
|
458 |
+
$link = "https://www.facebook.com/" . $page_id . "/posts/" . $PostID[1];
|
459 |
+
}
|
460 |
+
}
|
461 |
+
|
462 |
//POST AUTHOR
|
463 |
$cff_author = '<a class="cff-author" href="http://facebook.com/' . $news->from->id . '" '.$target.' title="'.$news->from->name.' on Facebook">';
|
464 |
$cff_author .= '<img src="http://graph.facebook.com/' . $news->from->id . '/picture">';
|
466 |
$cff_author .= '</a>';
|
467 |
//POST TEXT
|
468 |
$cff_post_text = '<' . $cff_title_format . ' class="cff-post-text" ' . $cff_title_styles . '>';
|
469 |
+
$cff_post_text .= '<span class="cff-text">';
|
470 |
if ($cff_title_link) $cff_post_text .= '<a class="cff-post-text-link" href="'.$link.'" '.$target.'>';
|
471 |
if (!empty($news->story)) $post_text = $news->story;
|
472 |
if (!empty($news->message)) $post_text = $news->message;
|
483 |
if ($cff_title_link) $cff_post_text .= '</a>';
|
484 |
$cff_post_text .= '</span>';
|
485 |
//'See More' link
|
486 |
+
$cff_post_text .= '<span class="cff-expand">... <a href="#"><span class="cff-more">' . $cff_see_more_text . '</span><span class="cff-less">' . $cff_see_less_text . '</span></a></span>';
|
487 |
$cff_post_text .= '</' . $cff_title_format . '>';
|
488 |
//DESCRIPTION
|
489 |
$cff_description = '';
|
501 |
if ($news->type == 'link') {
|
502 |
//Display link name and description
|
503 |
if (!empty($news->description)) {
|
504 |
+
$cff_shared_link .= '<p class="cff-text-link ';
|
505 |
+
$cff_shared_link .= 'cff-no-image';
|
506 |
$cff_shared_link .= '"><a href="'.$link.'" '.$target.'>'. '<b>' . $news->name . '</b></a></p>';
|
507 |
}
|
508 |
}
|
536 |
if (!empty($event_time)) $cff_event_date = '<p class="cff-date" '.$cff_event_date_styles.'>' . cff_eventdate(strtotime($event_time), $cff_event_date_formatting, $cff_event_date_custom) . '</p>';
|
537 |
//EVENT
|
538 |
//Display the event details
|
539 |
+
$cff_event .= '<div class="cff-details">';
|
540 |
//show event date above title
|
541 |
if ($cff_event_date_position == 'above') $cff_event .= $cff_event_date;
|
542 |
//Show event title
|
550 |
//Show event details
|
551 |
if ($cff_show_event_details){
|
552 |
//Location
|
553 |
+
if (!empty($event_object->location)) $cff_event .= '<p class="cff-where" ' . $cff_event_details_styles . '>' . $event_object->location . '</p>';
|
554 |
//Description
|
555 |
if (!empty($event_object->description)){
|
556 |
$description = $event_object->description;
|
557 |
if (!empty($body_limit)) {
|
558 |
if (strlen($description) > $body_limit) $description = substr($description, 0, $body_limit) . '...';
|
559 |
}
|
560 |
+
$cff_event .= '<p class="cff-info" ' . $cff_event_details_styles . '>' . cff_make_clickable($description) . '</p>';
|
561 |
}
|
562 |
}
|
563 |
$cff_event .= '</div>';
|
568 |
//Display the link to the Facebook post or external link
|
569 |
$cff_link = '';
|
570 |
//Default link
|
571 |
+
$cff_viewpost_class = 'cff-viewpost-facebook';
|
572 |
if ($cff_facebook_link_text == '') $cff_facebook_link_text = 'View on Facebook';
|
573 |
$link_text = $cff_facebook_link_text;
|
574 |
if (!empty($news->link)) {
|
578 |
if ($cff_view_link_text == '') $cff_view_link_text = 'View Link';
|
579 |
$link_text = $cff_view_link_text;
|
580 |
}
|
581 |
+
$cff_viewpost_class = 'cff-viewpost-link';
|
582 |
}
|
583 |
if ($cff_post_type == 'offer') $link_text = 'View Offer';
|
584 |
+
$cff_link = '<a class="' . $cff_viewpost_class . '" href="' . $link . '" title="' . $link_text . '" ' . $target . ' ' . $cff_link_styles . '>' . $link_text . '</a>';
|
585 |
//Compile the meta and link if included
|
586 |
if ($cff_show_meta) $cff_meta_total .= $cff_meta;
|
587 |
if ($cff_show_link) $cff_meta_total .= $cff_link;
|
588 |
$cff_meta_total .= '</div>';
|
589 |
$cff_comments = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
590 |
//Compile comments if meta is included
|
591 |
if ($cff_show_meta) $cff_meta_total .= $cff_comments;
|
592 |
//**************************//
|
594 |
//**************************//
|
595 |
//Start the container
|
596 |
$content .= '<div class="cff-item ';
|
597 |
+
if ($cff_post_type == 'link') $content .= 'cff-link-item';
|
598 |
+
if ($cff_post_type == 'event') $content .= 'cff-timeline-event';
|
599 |
+
if ($cff_post_type == 'photo') $content .= 'cff-photo-post';
|
600 |
+
if ($cff_post_type == 'video') $content .= 'cff-video-post';
|
601 |
+
if ($cff_post_type == 'swf') $content .= 'cff-swf-post';
|
602 |
+
if ($cff_post_type == 'status') $content .= 'cff-status-post';
|
603 |
+
if ($cff_post_type == 'offer') $content .= 'cff-offer-post';
|
604 |
$content .= '" id="'. $news->id .'" ' . $cff_item_styles . '>';
|
605 |
|
606 |
//POST AUTHOR
|
704 |
} else {
|
705 |
$url_short = $url_full;
|
706 |
}
|
707 |
+
return "<a class='cff-break-word' rel=\"nofollow\" href=\"$url_full\">$url_full</a>";
|
708 |
}
|
709 |
//Make links into span instead when the post text is made clickable
|
710 |
function cff_wrap_span($text) {
|
746 |
} else {
|
747 |
$url_short = $url_full;
|
748 |
}
|
749 |
+
return "<span class='cff-break-word'>$url_short</span>";
|
750 |
}
|
751 |
//2013-04-28T21:06:56+0000
|
752 |
//Time stamp function - used for posts
|
958 |
delete_option( 'cff_show_others' );
|
959 |
delete_option('cff_cache_time');
|
960 |
delete_option('cff_cache_time_unit');
|
961 |
+
delete_option( 'cff_locale' );
|
962 |
//Style & Layout
|
963 |
delete_option( 'cff_title_length' );
|
964 |
delete_option( 'cff_body_length' );
|
img/pro.png
CHANGED
Binary file
|
js/cff-scripts.js
CHANGED
@@ -11,18 +11,18 @@ jQuery(document).ready(function() {
|
|
11 |
$self.find('.cff-author').eq(1).unwrap('p');
|
12 |
$self.find('.cff-author').eq(1).remove();
|
13 |
}
|
14 |
-
if( $self.find('#cff .link').parent('p').length ){
|
15 |
-
$self.find('#cff .link').unwrap('p');
|
16 |
}
|
17 |
|
18 |
//Expand post
|
19 |
var expanded = false,
|
20 |
-
$post_text = $self.find('.cff-post-text .text'),
|
21 |
text_limit = $self.closest('#cff').attr('rel');
|
22 |
if (typeof text_limit === 'undefined' || text_limit == '') text_limit = 99999;
|
23 |
|
24 |
//If the text is linked then use the text within the link
|
25 |
-
if ( $post_text.find('a.cff-post-text-link').length ) $post_text = $self.find('.cff-post-text .text a');
|
26 |
var full_text = $post_text.html();
|
27 |
if(full_text == undefined) full_text = '';
|
28 |
var short_text = full_text.substring(0,text_limit);
|
@@ -35,8 +35,8 @@ jQuery(document).ready(function() {
|
|
35 |
$self.find('.cff-expand a').click(function(e){
|
36 |
e.preventDefault();
|
37 |
var $expand = jQuery(this),
|
38 |
-
$more = $expand.find('.more'),
|
39 |
-
$less = $expand.find('.less');
|
40 |
if (expanded == false){
|
41 |
$post_text.html( full_text );
|
42 |
expanded = true;
|
11 |
$self.find('.cff-author').eq(1).unwrap('p');
|
12 |
$self.find('.cff-author').eq(1).remove();
|
13 |
}
|
14 |
+
if( $self.find('#cff .cff-link').parent('p').length ){
|
15 |
+
$self.find('#cff .cff-link').unwrap('p');
|
16 |
}
|
17 |
|
18 |
//Expand post
|
19 |
var expanded = false,
|
20 |
+
$post_text = $self.find('.cff-post-text .cff-text'),
|
21 |
text_limit = $self.closest('#cff').attr('rel');
|
22 |
if (typeof text_limit === 'undefined' || text_limit == '') text_limit = 99999;
|
23 |
|
24 |
//If the text is linked then use the text within the link
|
25 |
+
if ( $post_text.find('a.cff-post-text-link').length ) $post_text = $self.find('.cff-post-text .cff-text a');
|
26 |
var full_text = $post_text.html();
|
27 |
if(full_text == undefined) full_text = '';
|
28 |
var short_text = full_text.substring(0,text_limit);
|
35 |
$self.find('.cff-expand a').click(function(e){
|
36 |
e.preventDefault();
|
37 |
var $expand = jQuery(this),
|
38 |
+
$more = $expand.find('.cff-more'),
|
39 |
+
$less = $expand.find('.cff-less');
|
40 |
if (expanded == false){
|
41 |
$post_text.html( full_text );
|
42 |
expanded = true;
|