Version Description
- New: Added support for Facebook 'Offers'
- Fix: Fixed an issue with the 'others' shortcode option not working correctly
- Fix: Prefixed the 'clear' class to prevent conflicts
Download this release
Release Info
Developer | smashballoon |
Plugin | Custom Facebook Feed |
Version | 1.6.3 |
Comparing to | |
See all releases |
Code changes from version 1.6.2 to 1.6.3
- README.txt +47 -42
- css/cff-style.css +3 -4
- custom-facebook-feed-admin.php +1425 -1417
- custom-facebook-feed.php +36 -23
- js/cff-scripts.js +15 -11
README.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== Custom Facebook Feed ===
|
2 |
Contributors: smashballoon
|
3 |
-
Tags: facebook, custom, customizable, feed, events, seo, search engine, responsive, mobile, shortcode, social, status
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.6.1
|
6 |
-
Stable tag: 1.6.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -15,23 +15,23 @@ Display a **completely customizable**, **responsive** and **search engine crawla
|
|
15 |
|
16 |
= Features =
|
17 |
|
18 |
-
* **Completely Customizable** - By default the Facebook feed will adopt the style of your website, but can be completely customized to look however you like - with tons of styling
|
19 |
* Facebook feed content is **crawlable by search engines** adding SEO value to your site - other Facebook plugins embed the feed using iframes which are not crawlable
|
20 |
* Completely **responsive** and mobile optimized - layout looks great on any screen size and in any container width
|
21 |
* Display **feeds from multiple different Facebook pages** and use the shortcode to embed them into a page, post or widget anywhere on your site
|
22 |
* Show **events** from your Facebook feed with name, date/time, location and description
|
23 |
* Add your own **custom CSS**
|
24 |
-
* **Caching** means that posts load lightning fast. Set your own caching time - check for new posts every few seconds, minutes, hours or days. You decide.
|
25 |
-
* Show and hide certain parts of each post
|
26 |
* Choose to show the Facebook profile picture and name above each post
|
27 |
-
* Select whether to display posts by just the page owner, or everyone who posts on your Facebook page
|
28 |
* Control the width, height, padding and background color of your Facebook feed
|
29 |
* Customize the size, weight and color of text
|
30 |
* Select from a range of date formats or enter your own
|
31 |
* Use your own custom link text in place of the defaults
|
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
|
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 |
|
@@ -73,13 +73,13 @@ This free plugin only allows you to display textual updates from your Facebook f
|
|
73 |
|
74 |
For this feature please upgrade to the [PRO version of the plugin](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed PRO").
|
75 |
|
76 |
-
= Is the content of my
|
77 |
|
78 |
-
It sure is. Unlike other Facebook plugins which use iframes to embed your feed into your page once it's loaded, the Custom Facebook Feed uses PHP to embed your Facebook feed content directly into your page. This adds dynamic, search engine crawlable content to your site.
|
79 |
|
80 |
-
= How do I embed the
|
81 |
|
82 |
-
You can embed
|
83 |
|
84 |
== Screenshots ==
|
85 |
|
@@ -87,25 +87,30 @@ You can embed the feed directly into a template file by using the WordPress do_s
|
|
87 |
2. Completely customize the way your Facebook feed looks to perfectly match your site
|
88 |
3. Use custom CSS to customize every part of the Facebook feed
|
89 |
4. Display Facebook events
|
90 |
-
5. Configuring the plugin
|
91 |
-
6. Layout & Style page
|
92 |
-
7. Layout & Style page
|
93 |
-
8.
|
94 |
9. It's super easy to display your Facebook feed in any page or post
|
95 |
|
96 |
== Changelog ==
|
97 |
|
|
|
|
|
|
|
|
|
|
|
98 |
= 1.6.2 =
|
99 |
-
* New: Post caching now temporarily stores your post data in your WordPress database to allow for super quick load times
|
100 |
-
* New: Define your own caching time. Check for new posts every few seconds, minutes, hours or days. You decide.
|
101 |
* New: Define your own custom text for the 'See More' and 'See Less' buttons
|
102 |
-
* New: Add your own CSS class to your
|
103 |
* New: Define a post limit which is higher or lower than the default 25
|
104 |
-
* New: Include the Like box inside or outside of the feed's container
|
105 |
-
* New: Customize the event date independently
|
106 |
* New: Improved layout of admin pages for easier navigation and customization
|
107 |
* Fix: Provided a fix for the Facebook API duplicate post bug
|
108 |
-
* Fix: Fixed bug which ocurred when multiple feeds are displayed on the same page with different text lengths defined
|
109 |
|
110 |
= 1.5.2 =
|
111 |
* Fix: Fixed JavaScript error in previous update
|
@@ -114,7 +119,7 @@ You can embed the feed directly into a template file by using the WordPress do_s
|
|
114 |
* New: Added a 'See More' link to expand any text which is longer than the character limit defined
|
115 |
* New: Choose to show Facebook posts by other people in your feed
|
116 |
* New: Option to show the post author's Facebook profile picture and name above each post
|
117 |
-
* New: Added options to customize and format the post date
|
118 |
* New: Add your own text before and after the date and in place of the 'View on Facebook' and 'View Link' text links
|
119 |
* New: Specify the format of the Facebook Event date
|
120 |
* Tweak: Default date format is less specific and better mimics Facebook's - credit Mark Bebbington
|
@@ -127,8 +132,8 @@ You can embed the feed directly into a template file by using the WordPress do_s
|
|
127 |
|
128 |
= 1.4.7 =
|
129 |
* Tweak: Added links to statuses which link to the Facebook page
|
130 |
-
* Tweak: Added classes to event date, location and description to allow custom styling
|
131 |
-
* Tweak: Removed 'Where' and 'When' text from events and made bold instead
|
132 |
|
133 |
= 1.4.6 =
|
134 |
* Fix: Fixed 'num' option in shortcode
|
@@ -144,52 +149,52 @@ You can embed the feed directly into a template file by using the WordPress do_s
|
|
144 |
* Some minor modifications
|
145 |
|
146 |
= 1.4.1 =
|
147 |
-
* Fix: Set all parts of the feed to display by default on activation
|
148 |
|
149 |
= 1.4.0 =
|
150 |
* Major Update!
|
151 |
-
* New: Loads of new customization options for your
|
152 |
-
* New: Define feed width, height, padding and background color
|
153 |
-
* New: Change the font-size, font-weight and color of the post text, description, date, links and event details
|
154 |
-
* New: Choose whether to show or hide certain parts of the posts
|
155 |
-
* New: Select whether the Like box is shown at the top of bottom of the feed
|
156 |
-
* New: Choose Like box background color
|
157 |
|
158 |
= 1.3.6 =
|
159 |
* Minor modifications
|
160 |
|
161 |
= 1.3.5 =
|
162 |
-
* New: Shared events now display event details (name, location, date/time, description) directly in the feed
|
163 |
|
164 |
= 1.3.4 =
|
165 |
-
* New: Email addresses within the post text are now hyperlinked
|
166 |
* Fix: Links beginning with 'www' are now also hyperlinked
|
167 |
|
168 |
= 1.3.3 =
|
169 |
-
* New: Added support for events - display the event details (name, location, date/time, description) directly in the feed
|
170 |
-
* Fix: Links within the post text are now hyperlinked
|
171 |
-
* Tweak: Added additional methods for retrieving feed data
|
172 |
|
173 |
= 1.3.2 =
|
174 |
* Fix: Now using the built-in WordPress HTTP API to get retrieve the Facebook data
|
175 |
|
176 |
= 1.3.1 =
|
177 |
-
* Fix: Fixed issue with certain statuses not displaying correctly
|
178 |
|
179 |
= 1.3.0 =
|
180 |
-
* Tweak: If 'Number of Posts to show' is not set then default to 10
|
181 |
|
182 |
= 1.2.9 =
|
183 |
* Fix: Now using cURL instead of file_get_contents to prevent issues with php.ini configuration on some web servers
|
184 |
|
185 |
= 1.2.8 =
|
186 |
-
* Fix: Fixed bug in specifying the number of posts to display
|
187 |
|
188 |
= 1.2.7 =
|
189 |
-
* Tweak: Prevented likes and comments by the page author showing up in the feed
|
190 |
|
191 |
= 1.2.6 =
|
192 |
-
* Tweak: Added help link to settings page
|
193 |
|
194 |
= 1.2.5 =
|
195 |
* Fix: Added clear fix
|
@@ -198,7 +203,7 @@ You can embed the feed directly into a template file by using the WordPress do_s
|
|
198 |
* Fix: Minor bug fixes
|
199 |
|
200 |
= 1.2 =
|
201 |
-
* New: Added the ability to define a maximum length for both the post
|
202 |
|
203 |
= 1.0 =
|
204 |
* Launch!
|
1 |
=== Custom Facebook Feed ===
|
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.1
|
6 |
+
Stable tag: 1.6.3
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
15 |
|
16 |
= Features =
|
17 |
|
18 |
+
* **Completely Customizable** - By default the Facebook feed will adopt the style of your website, but can be completely customized to look however you like - with tons of styling and customization options!
|
19 |
* Facebook feed content is **crawlable by search engines** adding SEO value to your site - other Facebook plugins embed the feed using iframes which are not crawlable
|
20 |
* Completely **responsive** and mobile optimized - layout looks great on any screen size and in any container width
|
21 |
* Display **feeds from multiple different Facebook pages** and use the shortcode to embed them into a page, post or widget anywhere on your site
|
22 |
* Show **events** from your Facebook feed with name, date/time, location and description
|
23 |
* Add your own **custom CSS**
|
24 |
+
* **Caching** means that your Facebook posts load lightning fast. Set your own caching time - check for new posts on Facebook every few seconds, minutes, hours or days. You decide.
|
25 |
+
* Show and hide certain parts of each Facebook post
|
26 |
* Choose to show the Facebook profile picture and name above each post
|
27 |
+
* Select whether to display Facebook posts by just the page owner, or everyone who posts on your Facebook page
|
28 |
* Control the width, height, padding and background color of your Facebook feed
|
29 |
* Customize the size, weight and color of text
|
30 |
* Select from a range of date formats or enter your own
|
31 |
* Use your own custom link text in place of the defaults
|
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 |
|
73 |
|
74 |
For this feature please upgrade to the [PRO version of the plugin](http://smashballoon.com/custom-facebook-feed/ "Custom Facebook Feed PRO").
|
75 |
|
76 |
+
= Is the content of my Custom Facebook Feed crawlable by search engines? =
|
77 |
|
78 |
+
It sure is. Unlike other Facebook plugins which use iframes to embed your Facebook feed into your page once it's loaded, the Custom Facebook Feed uses PHP to embed your Facebook feed content directly into your page. This adds dynamic, search engine crawlable content to your site.
|
79 |
|
80 |
+
= How do I embed the Custom Facebook Feed directly into a WordPress page template? =
|
81 |
|
82 |
+
You can embed your Facebook feed directly into a template file by using the WordPress do_shortcode function: do_shortcode('[custom-facebook-feed]'');
|
83 |
|
84 |
== Screenshots ==
|
85 |
|
87 |
2. Completely customize the way your Facebook feed looks to perfectly match your site
|
88 |
3. Use custom CSS to customize every part of the Facebook feed
|
89 |
4. Display Facebook events
|
90 |
+
5. Configuring the Custom Facebook Feed plugin
|
91 |
+
6. General options - Custom Facebook Feed Layout & Style page
|
92 |
+
7. Typography options - Custom Facebook Feed Layout & Style page
|
93 |
+
8. Misc options - Custom Facebook FeedLayout & Style page
|
94 |
9. It's super easy to display your Facebook feed in any page or post
|
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
|
101 |
+
* Fix: Prefixed the 'clear' class to prevent conflicts
|
102 |
+
|
103 |
= 1.6.2 =
|
104 |
+
* New: Post caching now temporarily stores your Facebook post data in your WordPress database to allow for super quick load times
|
105 |
+
* New: Define your own caching time. Check for new Facebook posts every few seconds, minutes, hours or days. You decide.
|
106 |
* New: Define your own custom text for the 'See More' and 'See Less' buttons
|
107 |
+
* New: Add your own CSS class to your Custom Facebook Feeds
|
108 |
* New: Define a post limit which is higher or lower than the default 25
|
109 |
+
* New: Include the Like box inside or outside of the Facebook feed's container
|
110 |
+
* New: Customize the Facebook event date independently
|
111 |
* New: Improved layout of admin pages for easier navigation and customization
|
112 |
* Fix: Provided a fix for the Facebook API duplicate post bug
|
113 |
+
* Fix: Fixed bug which ocurred when multiple Facebook feeds are displayed on the same page with different text lengths defined
|
114 |
|
115 |
= 1.5.2 =
|
116 |
* Fix: Fixed JavaScript error in previous update
|
119 |
* New: Added a 'See More' link to expand any text which is longer than the character limit defined
|
120 |
* New: Choose to show Facebook posts by other people in your feed
|
121 |
* New: Option to show the post author's Facebook profile picture and name above each post
|
122 |
+
* New: Added options to customize and format the Facebook post date
|
123 |
* New: Add your own text before and after the date and in place of the 'View on Facebook' and 'View Link' text links
|
124 |
* New: Specify the format of the Facebook Event date
|
125 |
* Tweak: Default date format is less specific and better mimics Facebook's - credit Mark Bebbington
|
132 |
|
133 |
= 1.4.7 =
|
134 |
* Tweak: Added links to statuses which link to the Facebook page
|
135 |
+
* Tweak: Added classes to Facebook event date, location and description to allow custom styling
|
136 |
+
* Tweak: Removed 'Where' and 'When' text from Facebook events and made bold instead
|
137 |
|
138 |
= 1.4.6 =
|
139 |
* Fix: Fixed 'num' option in shortcode
|
149 |
* Some minor modifications
|
150 |
|
151 |
= 1.4.1 =
|
152 |
+
* Fix: Set all parts of the Facebook feed to display by default on activation
|
153 |
|
154 |
= 1.4.0 =
|
155 |
* Major Update!
|
156 |
+
* New: Loads of new customization options for your Custom Facebook Feed
|
157 |
+
* New: Define Facebook feed width, height, padding and background color
|
158 |
+
* New: Change the font-size, font-weight and color of the Facebook post text, description, date, links and event details
|
159 |
+
* New: Choose whether to show or hide certain parts of the Facebook posts
|
160 |
+
* New: Select whether the Facebook Like box is shown at the top of bottom of the Facebook feed
|
161 |
+
* New: Choose Facebook Like box background color
|
162 |
|
163 |
= 1.3.6 =
|
164 |
* Minor modifications
|
165 |
|
166 |
= 1.3.5 =
|
167 |
+
* New: Shared Facebook events now display event details (name, location, date/time, description) directly in the Facebook feed
|
168 |
|
169 |
= 1.3.4 =
|
170 |
+
* New: Email addresses within the Facebook post text are now hyperlinked
|
171 |
* Fix: Links beginning with 'www' are now also hyperlinked
|
172 |
|
173 |
= 1.3.3 =
|
174 |
+
* New: Added support for Facebook events - display the Facebook event details (name, location, date/time, description) directly in the Facebook feed
|
175 |
+
* Fix: Links within the Facebook post text are now hyperlinked
|
176 |
+
* Tweak: Added additional methods for retrieving Facebook feed data
|
177 |
|
178 |
= 1.3.2 =
|
179 |
* Fix: Now using the built-in WordPress HTTP API to get retrieve the Facebook data
|
180 |
|
181 |
= 1.3.1 =
|
182 |
+
* Fix: Fixed issue with certain Facebook statuses not displaying correctly
|
183 |
|
184 |
= 1.3.0 =
|
185 |
+
* Tweak: If 'Number of Posts to show' is not set then default to 10 Facebook posts
|
186 |
|
187 |
= 1.2.9 =
|
188 |
* Fix: Now using cURL instead of file_get_contents to prevent issues with php.ini configuration on some web servers
|
189 |
|
190 |
= 1.2.8 =
|
191 |
+
* Fix: Fixed bug in specifying the number of Facebook posts to display
|
192 |
|
193 |
= 1.2.7 =
|
194 |
+
* Tweak: Prevented likes and comments by the page author showing up in the Facebook feed
|
195 |
|
196 |
= 1.2.6 =
|
197 |
+
* Tweak: Added help link to Custom Facebook Feed settings page
|
198 |
|
199 |
= 1.2.5 =
|
200 |
* Fix: Added clear fix
|
203 |
* Fix: Minor bug fixes
|
204 |
|
205 |
= 1.2 =
|
206 |
+
* New: Added the ability to define a maximum length for both the Facebook post text and description
|
207 |
|
208 |
= 1.0 =
|
209 |
* Launch!
|
css/cff-style.css
CHANGED
@@ -120,7 +120,7 @@
|
|
120 |
float: left;
|
121 |
clear: none;
|
122 |
width: 100%;
|
123 |
-
padding: 0 0
|
124 |
}
|
125 |
#cff .details h5{
|
126 |
margin: 0 0 5px 0;
|
@@ -137,7 +137,6 @@
|
|
137 |
#cff .details .when{
|
138 |
/*font-weight: bold;*/
|
139 |
}
|
140 |
-
|
141 |
/* View on Facebook / View Link text */
|
142 |
#cff .cff-viewpost{
|
143 |
float: right;
|
@@ -162,14 +161,14 @@
|
|
162 |
margin-top: 10px;
|
163 |
}
|
164 |
/* Clear fix */
|
165 |
-
.clear:after {
|
166 |
clear: both;
|
167 |
content: ".";
|
168 |
display: block;
|
169 |
height: 0;
|
170 |
visibility: hidden;
|
171 |
}
|
172 |
-
.clear {
|
173 |
display: inline-block;
|
174 |
display: block;
|
175 |
}
|
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;
|
137 |
#cff .details .when{
|
138 |
/*font-weight: bold;*/
|
139 |
}
|
|
|
140 |
/* View on Facebook / View Link text */
|
141 |
#cff .cff-viewpost{
|
142 |
float: right;
|
161 |
margin-top: 10px;
|
162 |
}
|
163 |
/* Clear fix */
|
164 |
+
.cff-clear:after {
|
165 |
clear: both;
|
166 |
content: ".";
|
167 |
display: block;
|
168 |
height: 0;
|
169 |
visibility: hidden;
|
170 |
}
|
171 |
+
.cff-clear {
|
172 |
display: inline-block;
|
173 |
display: block;
|
174 |
}
|
custom-facebook-feed-admin.php
CHANGED
@@ -1,1418 +1,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 |
-
|
33 |
-
//Create Settings page
|
34 |
-
function cff_settings_page() {
|
35 |
-
//Declare variables for fields
|
36 |
-
$hidden_field_name = 'cff_submit_hidden';
|
37 |
-
$access_token = 'cff_access_token';
|
38 |
-
$page_id = 'cff_page_id';
|
39 |
-
$num_show = 'cff_num_show';
|
40 |
-
$cff_post_limit = 'cff_post_limit';
|
41 |
-
$cff_show_others = 'cff_show_others';
|
42 |
-
$cff_cache_time = 'cff_cache_time';
|
43 |
-
$cff_cache_time_unit = 'cff_cache_time_unit';
|
44 |
-
// 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 |
-
// See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
|
53 |
-
if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) {
|
54 |
-
// Read their posted value
|
55 |
-
$access_token_val = $_POST[ $access_token ];
|
56 |
-
$page_id_val = $_POST[ $page_id ];
|
57 |
-
$num_show_val = $_POST[ $num_show ];
|
58 |
-
$cff_post_limit_val = $_POST[ $cff_post_limit ];
|
59 |
-
$cff_show_others_val = $_POST[ $cff_show_others ];
|
60 |
-
$cff_cache_time_val = $_POST[ $cff_cache_time ];
|
61 |
-
$cff_cache_time_unit_val = $_POST[ $cff_cache_time_unit ];
|
62 |
-
// Save the posted value in the database
|
63 |
-
update_option( $access_token, $access_token_val );
|
64 |
-
update_option( $page_id, $page_id_val );
|
65 |
-
update_option( $num_show, $num_show_val );
|
66 |
-
update_option( $cff_post_limit, $cff_post_limit_val );
|
67 |
-
update_option( $cff_show_others, $cff_show_others_val );
|
68 |
-
update_option( $cff_cache_time, $cff_cache_time_val );
|
69 |
-
update_option( $cff_cache_time_unit, $cff_cache_time_unit_val );
|
70 |
-
|
71 |
-
//Delete the transient for the main page ID
|
72 |
-
delete_transient( '
|
73 |
-
delete_transient( '
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
$wpdb
|
78 |
-
|
79 |
-
|
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 |
-
<i style="color: #666; font-size: 11px;">Eg.
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
<
|
131 |
-
|
132 |
-
<
|
133 |
-
<
|
134 |
-
</td>
|
135 |
-
</tr>
|
136 |
-
<tr valign="top">
|
137 |
-
<th scope="row"><?php _e('
|
138 |
-
<td>
|
139 |
-
<input name="
|
140 |
-
<i style="color: #666; font-size: 11px;"><?php _e('
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
<
|
146 |
-
|
147 |
-
<
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
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 |
-
|
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 |
-
$options[ '
|
407 |
-
$options[ '
|
408 |
-
$options[ '
|
409 |
-
$options[ '
|
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 |
-
$options[ '
|
435 |
-
|
436 |
-
$options[ '
|
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 |
-
$options[ '
|
498 |
-
$options[ '
|
499 |
-
|
500 |
-
|
501 |
-
$options[ '
|
502 |
-
$options[ '
|
503 |
-
$options[ '
|
504 |
-
$options[ '
|
505 |
-
$options[ '
|
506 |
-
|
507 |
-
$options[ '
|
508 |
-
|
509 |
-
$options[ '
|
510 |
-
$options[ '
|
511 |
-
$options[ '
|
512 |
-
$options[ '
|
513 |
-
|
514 |
-
|
515 |
-
$options[ '
|
516 |
-
$options[ '
|
517 |
-
|
518 |
-
$options[ '
|
519 |
-
$options[ '
|
520 |
-
$options[ '
|
521 |
-
|
522 |
-
$options[ '
|
523 |
-
$options[ '
|
524 |
-
$options[ '
|
525 |
-
|
526 |
-
|
527 |
-
$options[ '
|
528 |
-
$options[ '
|
529 |
-
$options[ '
|
530 |
-
$options[ '
|
531 |
-
$options[ '
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
$
|
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 |
-
$options[ '
|
563 |
-
$options[ '
|
564 |
-
$options[ '
|
565 |
-
$options[ '
|
566 |
-
$options[ '
|
567 |
-
|
568 |
-
$options[ '
|
569 |
-
|
570 |
-
$options[ '
|
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 |
-
<input name="
|
625 |
-
<span
|
626 |
-
</td>
|
627 |
-
</tr>
|
628 |
-
<tr valign="top">
|
629 |
-
<th scope="row"><?php _e('
|
630 |
-
<td>
|
631 |
-
<
|
632 |
-
<
|
633 |
-
<
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
<
|
639 |
-
|
640 |
-
<
|
641 |
-
<i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
<div>
|
664 |
-
<input
|
665 |
-
<label for="
|
666 |
-
</div>
|
667 |
-
<div>
|
668 |
-
<input type="checkbox" name="
|
669 |
-
<label for="
|
670 |
-
</div>
|
671 |
-
<div>
|
672 |
-
<input type="checkbox" name="
|
673 |
-
<label for="
|
674 |
-
</div>
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
|
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 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
<div>
|
738 |
-
<input type="checkbox" id="
|
739 |
-
<label for="
|
740 |
-
</div>
|
741 |
-
<div>
|
742 |
-
<input type="checkbox" name="
|
743 |
-
<label for="
|
744 |
-
</div>
|
745 |
-
<div>
|
746 |
-
<input type="checkbox"
|
747 |
-
<label for="
|
748 |
-
</div>
|
749 |
-
<div>
|
750 |
-
<input type="checkbox" name="
|
751 |
-
<label for="
|
752 |
-
</div>
|
753 |
-
<div>
|
754 |
-
<input type="checkbox" name="
|
755 |
-
<label for="
|
756 |
-
</div>
|
757 |
-
<div>
|
758 |
-
<input type="checkbox" id="
|
759 |
-
<label for="
|
760 |
-
</div>
|
761 |
-
<div>
|
762 |
-
<input type="checkbox" name="
|
763 |
-
<label for="
|
764 |
-
</div>
|
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 |
-
<option value="
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
<option value="
|
849 |
-
<option value="
|
850 |
-
<option value="
|
851 |
-
<option value="
|
852 |
-
<option value="
|
853 |
-
<option value="
|
854 |
-
<option value="
|
855 |
-
<option value="
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
<option value="
|
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 |
-
<option value="
|
905 |
-
<option value="
|
906 |
-
<option value="
|
907 |
-
<option value="
|
908 |
-
<option value="
|
909 |
-
<option value="
|
910 |
-
<option value="
|
911 |
-
<option value="
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
<option value="
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
</td>
|
932 |
-
</tr>
|
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 |
-
<option value="
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
<option value="
|
968 |
-
<option value="
|
969 |
-
<option value="
|
970 |
-
<option value="
|
971 |
-
<option value="
|
972 |
-
<option value="
|
973 |
-
<option value="
|
974 |
-
<option value="
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
<option value="
|
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 |
-
|
1009 |
-
<option value="
|
1010 |
-
<option value="
|
1011 |
-
<option value="
|
1012 |
-
<option value="
|
1013 |
-
<option value="
|
1014 |
-
|
1015 |
-
|
1016 |
-
|
1017 |
-
|
1018 |
-
|
1019 |
-
|
1020 |
-
|
1021 |
-
|
1022 |
-
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
<
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
</tr>
|
1032 |
-
|
1033 |
-
|
1034 |
-
|
1035 |
-
|
1036 |
-
|
1037 |
-
|
1038 |
-
|
1039 |
-
|
1040 |
-
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
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 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
<option value="
|
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 |
-
<option value="
|
1127 |
-
<option value="
|
1128 |
-
<option value="
|
1129 |
-
<option value="
|
1130 |
-
<option value="
|
1131 |
-
<option value="
|
1132 |
-
<option value="
|
1133 |
-
<option value="
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
<option value="
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
<
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
<
|
1165 |
-
|
1166 |
-
|
1167 |
-
<?php $
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
<option value="
|
1177 |
-
<option value="
|
1178 |
-
<option value="
|
1179 |
-
<option value="
|
1180 |
-
<option value="
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
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 |
-
<option value="
|
1215 |
-
<option value="
|
1216 |
-
<option value="
|
1217 |
-
<option value="
|
1218 |
-
<option value="
|
1219 |
-
<option value="
|
1220 |
-
<option value="
|
1221 |
-
<option value="
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
<option value="
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
|
1234 |
-
|
1235 |
-
|
1236 |
-
|
1237 |
-
|
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 |
-
<option value="
|
1266 |
-
<option value="
|
1267 |
-
<option value="
|
1268 |
-
<option value="
|
1269 |
-
<option value="
|
1270 |
-
<option value="
|
1271 |
-
<option value="
|
1272 |
-
<option value="
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
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 |
-
<input
|
1374 |
-
<
|
1375 |
-
</td>
|
1376 |
-
</tr>
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
<
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
<tr valign="top">
|
1388 |
-
<th scope="row"><label class="bump-left"><?php _e('Separating Line
|
1389 |
-
<td>
|
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 |
?>
|
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 |
+
//Create Settings page
|
34 |
+
function cff_settings_page() {
|
35 |
+
//Declare variables for fields
|
36 |
+
$hidden_field_name = 'cff_submit_hidden';
|
37 |
+
$access_token = 'cff_access_token';
|
38 |
+
$page_id = 'cff_page_id';
|
39 |
+
$num_show = 'cff_num_show';
|
40 |
+
$cff_post_limit = 'cff_post_limit';
|
41 |
+
$cff_show_others = 'cff_show_others';
|
42 |
+
$cff_cache_time = 'cff_cache_time';
|
43 |
+
$cff_cache_time_unit = 'cff_cache_time_unit';
|
44 |
+
// 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 |
+
// See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
|
53 |
+
if( isset($_POST[ $hidden_field_name ]) && $_POST[ $hidden_field_name ] == 'Y' ) {
|
54 |
+
// Read their posted value
|
55 |
+
$access_token_val = $_POST[ $access_token ];
|
56 |
+
$page_id_val = $_POST[ $page_id ];
|
57 |
+
$num_show_val = $_POST[ $num_show ];
|
58 |
+
$cff_post_limit_val = $_POST[ $cff_post_limit ];
|
59 |
+
$cff_show_others_val = $_POST[ $cff_show_others ];
|
60 |
+
$cff_cache_time_val = $_POST[ $cff_cache_time ];
|
61 |
+
$cff_cache_time_unit_val = $_POST[ $cff_cache_time_unit ];
|
62 |
+
// Save the posted value in the database
|
63 |
+
update_option( $access_token, $access_token_val );
|
64 |
+
update_option( $page_id, $page_id_val );
|
65 |
+
update_option( $num_show, $num_show_val );
|
66 |
+
update_option( $cff_post_limit, $cff_post_limit_val );
|
67 |
+
update_option( $cff_show_others, $cff_show_others_val );
|
68 |
+
update_option( $cff_cache_time, $cff_cache_time_val );
|
69 |
+
update_option( $cff_cache_time_unit, $cff_cache_time_unit_val );
|
70 |
+
|
71 |
+
//Delete the transient for the main page ID
|
72 |
+
delete_transient( 'cff_posts_json_' .$page_id_val );
|
73 |
+
delete_transient( 'cff_feed_json_' .$page_id_val );
|
74 |
+
delete_transient( 'cff_events_json_' . $page_id_val );
|
75 |
+
|
76 |
+
//Delete ALL transients
|
77 |
+
global $wpdb;
|
78 |
+
$table_name = $wpdb->prefix . "options";
|
79 |
+
$wpdb->query( "
|
80 |
+
DELETE
|
81 |
+
FROM $table_name
|
82 |
+
WHERE `option_name` LIKE ('%cff\_posts\_json\_%')
|
83 |
+
" );
|
84 |
+
$wpdb->query( "
|
85 |
+
DELETE
|
86 |
+
FROM $table_name
|
87 |
+
WHERE `option_name` LIKE ('%cff\_feed\_json\_%')
|
88 |
+
" );
|
89 |
+
$wpdb->query( "
|
90 |
+
DELETE
|
91 |
+
FROM $table_name
|
92 |
+
WHERE `option_name` LIKE ('%cff\_events\_json\_%')
|
93 |
+
" );
|
94 |
+
|
95 |
+
// Put an settings updated message on the screen
|
96 |
+
?>
|
97 |
+
<div class="updated"><p><strong><?php _e('Settings saved.', 'custom-facebook-feed' ); ?></strong></p></div>
|
98 |
+
<?php } ?>
|
99 |
+
|
100 |
+
<div id="cff-admin" class="wrap">
|
101 |
+
<div id="header">
|
102 |
+
<h1><?php _e('Custom Facebook Feed Settings'); ?></h1>
|
103 |
+
</div>
|
104 |
+
<form name="form1" method="post" action="">
|
105 |
+
<input type="hidden" name="<?php echo $hidden_field_name; ?>" value="Y">
|
106 |
+
<br />
|
107 |
+
<h3><?php _e('Configuration'); ?></h3>
|
108 |
+
<table class="form-table">
|
109 |
+
<tbody>
|
110 |
+
<tr valign="top">
|
111 |
+
<th scope="row"><?php _e('Access Token'); ?></th>
|
112 |
+
<td>
|
113 |
+
<input name="cff_access_token" type="text" value="<?php esc_attr_e( $access_token_val ); ?>" size="60" />
|
114 |
+
<!--<a href="#" id="verify-token" class="button-secondary"><?php _e('Verify Access Token'); ?></a>-->
|
115 |
+
<a class="tooltip-link" href="JavaScript:void(0);"><?php _e('How to get an Access Token'); ?></a>
|
116 |
+
<br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123|ABC2fvp5h9tJe4-5-AbC123</i>
|
117 |
+
<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>
|
118 |
+
</td>
|
119 |
+
</tr>
|
120 |
+
<tr valign="top">
|
121 |
+
<th scope="row"><?php _e('Facebook Page ID'); ?></th>
|
122 |
+
<td>
|
123 |
+
<input name="cff_page_id" type="text" value="<?php esc_attr_e( $page_id_val ); ?>" size="60" />
|
124 |
+
<a class="tooltip-link" href="JavaScript:void(0);"><?php _e('What\'s my Page ID?'); ?></a>
|
125 |
+
<br /><i style="color: #666; font-size: 11px;">Eg. 1234567890123 or smashballoon</i>
|
126 |
+
<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>
|
127 |
+
</td>
|
128 |
+
</tr>
|
129 |
+
<tr valign="top">
|
130 |
+
<th scope="row"><?php _e('Number of posts to display'); ?></th>
|
131 |
+
<td>
|
132 |
+
<input name="cff_num_show" type="text" value="<?php esc_attr_e( $num_show_val ); ?>" size="4" />
|
133 |
+
<i style="color: #666; font-size: 11px;">Eg. 5</i>
|
134 |
+
</td>
|
135 |
+
</tr>
|
136 |
+
<tr valign="top">
|
137 |
+
<th scope="row"><?php _e('Alter the post limit'); ?></th>
|
138 |
+
<td>
|
139 |
+
<input name="cff_post_limit" type="text" value="<?php esc_attr_e( $cff_post_limit_val ); ?>" size="4" />
|
140 |
+
<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>
|
141 |
+
<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>
|
142 |
+
</td>
|
143 |
+
</tr>
|
144 |
+
<tr valign="top">
|
145 |
+
<th scope="row"><?php _e('Show posts by others on my page'); ?></th>
|
146 |
+
<td>
|
147 |
+
<input name="cff_show_others" type="checkbox" id="cff_show_others" <?php if($cff_show_others_val == true) echo "checked"; ?> />
|
148 |
+
<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>
|
149 |
+
</td>
|
150 |
+
</tr>
|
151 |
+
<tr valign="top">
|
152 |
+
<th scope="row"><?php _e('Check for new Facebook posts every'); ?></th>
|
153 |
+
<td>
|
154 |
+
<input name="cff_cache_time" type="text" value="<?php esc_attr_e( $cff_cache_time_val ); ?>" size="4" />
|
155 |
+
<select name="cff_cache_time_unit">
|
156 |
+
<option value="minutes" <?php if($cff_cache_time_unit_val == "minutes") echo 'selected="selected"' ?> ><?php _e('Minutes'); ?></option>
|
157 |
+
<option value="hours" <?php if($cff_cache_time_unit_val == "hours") echo 'selected="selected"' ?> ><?php _e('Hours'); ?></option>
|
158 |
+
<option value="days" <?php if($cff_cache_time_unit_val == "days") echo 'selected="selected"' ?> ><?php _e('Days'); ?></option>
|
159 |
+
</select>
|
160 |
+
<a class="tooltip-link bump-left" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
|
161 |
+
<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>
|
162 |
+
</td>
|
163 |
+
</tr>
|
164 |
+
|
165 |
+
</tbody>
|
166 |
+
</table>
|
167 |
+
<?php submit_button(); ?>
|
168 |
+
</form>
|
169 |
+
<h3><?php _e('Support'); ?></h3>
|
170 |
+
<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>
|
171 |
+
<hr />
|
172 |
+
<h3><?php _e('Displaying your Feed'); ?></h3>
|
173 |
+
<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>
|
174 |
+
<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).'); ?>" />
|
175 |
+
<p><?php _e('If you wish, you can override the settings above directly in the shortcode like so:'); ?></p>
|
176 |
+
<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>
|
177 |
+
<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>
|
178 |
+
|
179 |
+
|
180 |
+
<hr />
|
181 |
+
|
182 |
+
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
|
183 |
+
|
184 |
+
<hr />
|
185 |
+
|
186 |
+
<h4><?php _e('<u>System Info:</u>'); ?></h4>
|
187 |
+
<p>PHP Version: <b><?php echo PHP_VERSION . "\n"; ?></b></p>
|
188 |
+
<p>Web Server Info: <b><?php echo $_SERVER['SERVER_SOFTWARE'] . "\n"; ?></b></p>
|
189 |
+
<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>
|
190 |
+
<p>PHP cURL: <b><?php echo is_callable('curl_init') ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
|
191 |
+
<p>JSON: <b><?php echo function_exists("json_decode") ? "<span style='color: green;'>Yes</span>" : "<span style='color: red;'>No</span>" ?></b></p>
|
192 |
+
<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>
|
193 |
+
|
194 |
+
|
195 |
+
<?php
|
196 |
+
} //End Settings_Page
|
197 |
+
//Create Style page
|
198 |
+
function cff_style_page() {
|
199 |
+
//Declare variables for fields
|
200 |
+
$style_hidden_field_name = 'cff_style_submit_hidden';
|
201 |
+
$style_general_hidden_field_name = 'cff_style_general_submit_hidden';
|
202 |
+
$style_post_layout_hidden_field_name = 'cff_style_post_layout_submit_hidden';
|
203 |
+
$style_typography_hidden_field_name = 'cff_style_typography_submit_hidden';
|
204 |
+
$style_misc_hidden_field_name = 'cff_style_misc_submit_hidden';
|
205 |
+
$defaults = array(
|
206 |
+
//Post types
|
207 |
+
'cff_show_links_type' => true,
|
208 |
+
'cff_show_event_type' => true,
|
209 |
+
'cff_show_video_type' => true,
|
210 |
+
'cff_show_photos_type' => true,
|
211 |
+
'cff_show_status_type' => true,
|
212 |
+
//Layout
|
213 |
+
'cff_preset_layout' => 'thumb',
|
214 |
+
//Include
|
215 |
+
'cff_show_text' => true,
|
216 |
+
'cff_show_desc' => true,
|
217 |
+
'cff_show_shared_links' => true,
|
218 |
+
'cff_show_date' => true,
|
219 |
+
'cff_show_media' => true,
|
220 |
+
'cff_show_event_title' => true,
|
221 |
+
'cff_show_event_details' => true,
|
222 |
+
'cff_show_meta' => true,
|
223 |
+
'cff_show_link' => true,
|
224 |
+
'cff_show_like_box' => true,
|
225 |
+
//Typography
|
226 |
+
'cff_see_more_text' => 'See More',
|
227 |
+
'cff_see_less_text' => 'See Less',
|
228 |
+
'cff_title_format' => 'p',
|
229 |
+
'cff_title_size' => 'inherit',
|
230 |
+
'cff_title_weight' => 'inherit',
|
231 |
+
'cff_title_color' => '',
|
232 |
+
'cff_body_size' => 'inherit',
|
233 |
+
'cff_body_weight' => 'inherit',
|
234 |
+
'cff_body_color' => '',
|
235 |
+
//Event title
|
236 |
+
'cff_event_title_format' => 'p',
|
237 |
+
'cff_event_title_size' => 'inherit',
|
238 |
+
'cff_event_title_weight' => 'inherit',
|
239 |
+
'cff_event_title_color' => '',
|
240 |
+
//Event date
|
241 |
+
'cff_event_date_size' => 'inherit',
|
242 |
+
'cff_event_date_weight' => 'inherit',
|
243 |
+
'cff_event_date_color' => '',
|
244 |
+
'cff_event_date_position' => 'below',
|
245 |
+
'cff_event_date_formatting' => '1',
|
246 |
+
'cff_event_date_custom' => '',
|
247 |
+
//Event details
|
248 |
+
'cff_event_details_size' => 'inherit',
|
249 |
+
'cff_event_details_weight' => 'inherit',
|
250 |
+
'cff_event_details_color' => '',
|
251 |
+
//Date
|
252 |
+
'cff_date_position' => 'below',
|
253 |
+
'cff_date_size' => 'inherit',
|
254 |
+
'cff_date_weight' => 'inherit',
|
255 |
+
'cff_date_color' => '',
|
256 |
+
'cff_date_formatting' => '1',
|
257 |
+
'cff_date_custom' => '',
|
258 |
+
'cff_date_before' => '',
|
259 |
+
'cff_date_after' => '',
|
260 |
+
//Link to Facebook
|
261 |
+
'cff_link_size' => 'inherit',
|
262 |
+
'cff_link_weight' => 'inherit',
|
263 |
+
'cff_link_color' => '',
|
264 |
+
'cff_facebook_link_text' => 'View on Facebook',
|
265 |
+
'cff_view_link_text' => 'View Link',
|
266 |
+
//Meta
|
267 |
+
'cff_icon_style' => 'light',
|
268 |
+
'cff_meta_text_color' => '',
|
269 |
+
'cff_meta_bg_color' => '',
|
270 |
+
'cff_nocomments_text' => 'No comments yet',
|
271 |
+
'cff_hide_comments' => '',
|
272 |
+
//Misc
|
273 |
+
'cff_feed_width' => '',
|
274 |
+
'cff_feed_height' => '',
|
275 |
+
'cff_feed_padding' => '',
|
276 |
+
'cff_like_box_position' => 'bottom',
|
277 |
+
'cff_like_box_outside' => false,
|
278 |
+
'cff_bg_color' => '',
|
279 |
+
'cff_likebox_bg_color' => '',
|
280 |
+
'cff_video_height' => '',
|
281 |
+
'cff_show_author' => false,
|
282 |
+
'cff_class' => '',
|
283 |
+
//New
|
284 |
+
'cff_custom_css' => '',
|
285 |
+
'cff_title_link' => false,
|
286 |
+
'cff_event_title_link' => false,
|
287 |
+
'cff_video_action' => 'file',
|
288 |
+
'cff_sep_color' => '',
|
289 |
+
'cff_sep_size' => '1'
|
290 |
+
);
|
291 |
+
//Save layout option in an array
|
292 |
+
add_option( 'cff_style_settings', $options );
|
293 |
+
$options = wp_parse_args(get_option('cff_style_settings'), $defaults);
|
294 |
+
//Set the page variables
|
295 |
+
//Post types
|
296 |
+
$cff_show_links_type = $options[ 'cff_show_links_type' ];
|
297 |
+
$cff_show_event_type = $options[ 'cff_show_event_type' ];
|
298 |
+
$cff_show_video_type = $options[ 'cff_show_video_type' ];
|
299 |
+
$cff_show_photos_type = $options[ 'cff_show_photos_type' ];
|
300 |
+
$cff_show_status_type = $options[ 'cff_show_status_type' ];
|
301 |
+
//Layout
|
302 |
+
$cff_preset_layout = $options[ 'cff_preset_layout' ];
|
303 |
+
//Include
|
304 |
+
$cff_show_text = $options[ 'cff_show_text' ];
|
305 |
+
$cff_show_desc = $options[ 'cff_show_desc' ];
|
306 |
+
$cff_show_shared_links = $options[ 'cff_show_shared_links' ];
|
307 |
+
$cff_show_date = $options[ 'cff_show_date' ];
|
308 |
+
$cff_show_media = $options[ 'cff_show_media' ];
|
309 |
+
$cff_show_event_title = $options[ 'cff_show_event_title' ];
|
310 |
+
$cff_show_event_details = $options[ 'cff_show_event_details' ];
|
311 |
+
$cff_show_meta = $options[ 'cff_show_meta' ];
|
312 |
+
$cff_show_link = $options[ 'cff_show_link' ];
|
313 |
+
$cff_show_like_box = $options[ 'cff_show_like_box' ];
|
314 |
+
//Typography
|
315 |
+
$cff_see_more_text = $options[ 'cff_see_more_text' ];
|
316 |
+
$cff_see_less_text = $options[ 'cff_see_less_text' ];
|
317 |
+
$cff_title_format = $options[ 'cff_title_format' ];
|
318 |
+
$cff_title_size = $options[ 'cff_title_size' ];
|
319 |
+
$cff_title_weight = $options[ 'cff_title_weight' ];
|
320 |
+
$cff_title_color = $options[ 'cff_title_color' ];
|
321 |
+
$cff_body_size = $options[ 'cff_body_size' ];
|
322 |
+
$cff_body_weight = $options[ 'cff_body_weight' ];
|
323 |
+
$cff_body_color = $options[ 'cff_body_color' ];
|
324 |
+
//Event title
|
325 |
+
$cff_event_title_format = $options[ 'cff_event_title_format' ];
|
326 |
+
$cff_event_title_size = $options[ 'cff_event_title_size' ];
|
327 |
+
$cff_event_title_weight = $options[ 'cff_event_title_weight' ];
|
328 |
+
$cff_event_title_color = $options[ 'cff_event_title_color' ];
|
329 |
+
//Event date
|
330 |
+
$cff_event_date_size = $options[ 'cff_event_date_size' ];
|
331 |
+
$cff_event_date_weight = $options[ 'cff_event_date_weight' ];
|
332 |
+
$cff_event_date_color = $options[ 'cff_event_date_color' ];
|
333 |
+
$cff_event_date_position = $options[ 'cff_event_date_position' ];
|
334 |
+
$cff_event_date_formatting = $options[ 'cff_event_date_formatting' ];
|
335 |
+
$cff_event_date_custom = $options[ 'cff_event_date_custom' ];
|
336 |
+
//Event details
|
337 |
+
$cff_event_details_size = $options[ 'cff_event_details_size' ];
|
338 |
+
$cff_event_details_weight = $options[ 'cff_event_details_weight' ];
|
339 |
+
$cff_event_details_color = $options[ 'cff_event_details_color' ];
|
340 |
+
//Date
|
341 |
+
$cff_date_position = $options[ 'cff_date_position' ];
|
342 |
+
$cff_date_size = $options[ 'cff_date_size' ];
|
343 |
+
$cff_date_weight = $options[ 'cff_date_weight' ];
|
344 |
+
$cff_date_color = $options[ 'cff_date_color' ];
|
345 |
+
$cff_date_formatting = $options[ 'cff_date_formatting' ];
|
346 |
+
$cff_date_custom = $options[ 'cff_date_custom' ];
|
347 |
+
$cff_date_before = $options[ 'cff_date_before' ];
|
348 |
+
$cff_date_after = $options[ 'cff_date_after' ];
|
349 |
+
//View on Facebook link
|
350 |
+
$cff_link_size = $options[ 'cff_link_size' ];
|
351 |
+
$cff_link_weight = $options[ 'cff_link_weight' ];
|
352 |
+
$cff_link_color = $options[ 'cff_link_color' ];
|
353 |
+
$cff_facebook_link_text = $options[ 'cff_facebook_link_text' ];
|
354 |
+
$cff_view_link_text = $options[ 'cff_view_link_text' ];
|
355 |
+
//Meta
|
356 |
+
$cff_icon_style = $options[ 'cff_icon_style' ];
|
357 |
+
$cff_meta_text_color = $options[ 'cff_meta_text_color' ];
|
358 |
+
$cff_meta_bg_color = $options[ 'cff_meta_bg_color' ];
|
359 |
+
$cff_nocomments_text = $options[ 'cff_nocomments_text' ];
|
360 |
+
$cff_hide_comments = $options[ 'cff_hide_comments' ];
|
361 |
+
//Misc
|
362 |
+
$cff_feed_width = $options[ 'cff_feed_width' ];
|
363 |
+
$cff_feed_height = $options[ 'cff_feed_height' ];
|
364 |
+
$cff_feed_padding = $options[ 'cff_feed_padding' ];
|
365 |
+
$cff_like_box_position = $options[ 'cff_like_box_position' ];
|
366 |
+
$cff_like_box_outside = $options[ 'cff_like_box_outside' ];
|
367 |
+
$cff_show_media = $options[ 'cff_show_media' ];
|
368 |
+
$cff_open_links = $options[ 'cff_open_links' ];
|
369 |
+
$cff_bg_color = $options[ 'cff_bg_color' ];
|
370 |
+
$cff_likebox_bg_color = $options[ 'cff_likebox_bg_color' ];
|
371 |
+
$cff_video_height = $options[ 'cff_video_height' ];
|
372 |
+
$cff_show_author = $options[ 'cff_show_author' ];
|
373 |
+
$cff_class = $options[ 'cff_class' ];
|
374 |
+
//New
|
375 |
+
$cff_custom_css = $options[ 'cff_custom_css' ];
|
376 |
+
$cff_title_link = $options[ 'cff_title_link' ];
|
377 |
+
$cff_event_title_link = $options[ 'cff_event_title_link' ];
|
378 |
+
$cff_video_action = $options[ 'cff_video_action' ];
|
379 |
+
$cff_sep_color = $options[ 'cff_sep_color' ];
|
380 |
+
$cff_sep_size = $options[ 'cff_sep_size' ];
|
381 |
+
|
382 |
+
// Texts lengths
|
383 |
+
$cff_title_length = 'cff_title_length';
|
384 |
+
$cff_body_length = 'cff_body_length';
|
385 |
+
// Read in existing option value from database
|
386 |
+
$cff_title_length_val = get_option( $cff_title_length );
|
387 |
+
$cff_body_length_val = get_option( $cff_body_length );
|
388 |
+
// See if the user has posted us some information. If they did, this hidden field will be set to 'Y'.
|
389 |
+
if( isset($_POST[ $style_hidden_field_name ]) && $_POST[ $style_hidden_field_name ] == 'Y' ) {
|
390 |
+
//Update the General options
|
391 |
+
if( isset($_POST[ $style_general_hidden_field_name ]) && $_POST[ $style_general_hidden_field_name ] == 'Y' ) {
|
392 |
+
//General
|
393 |
+
$cff_feed_width = $_POST[ 'cff_feed_width' ];
|
394 |
+
$cff_feed_height = $_POST[ 'cff_feed_height' ];
|
395 |
+
$cff_feed_padding = $_POST[ 'cff_feed_padding' ];
|
396 |
+
$cff_bg_color = $_POST[ 'cff_bg_color' ];
|
397 |
+
$cff_show_author = $_POST[ 'cff_show_author' ];
|
398 |
+
$cff_class = $_POST[ 'cff_class' ];
|
399 |
+
//Post types
|
400 |
+
$cff_show_links_type = $_POST[ 'cff_show_links_type' ];
|
401 |
+
$cff_show_event_type = $_POST[ 'cff_show_event_type' ];
|
402 |
+
$cff_show_video_type = $_POST[ 'cff_show_video_type' ];
|
403 |
+
$cff_show_photos_type = $_POST[ 'cff_show_photos_type' ];
|
404 |
+
$cff_show_status_type = $_POST[ 'cff_show_status_type' ];
|
405 |
+
//General
|
406 |
+
$options[ 'cff_feed_width' ] = $cff_feed_width;
|
407 |
+
$options[ 'cff_feed_height' ] = $cff_feed_height;
|
408 |
+
$options[ 'cff_feed_padding' ] = $cff_feed_padding;
|
409 |
+
$options[ 'cff_bg_color' ] = $cff_bg_color;
|
410 |
+
$options[ 'cff_show_author' ] = $cff_show_author;
|
411 |
+
$options[ 'cff_class' ] = $cff_class;
|
412 |
+
//Post types
|
413 |
+
$options[ 'cff_show_links_type' ] = $cff_show_links_type;
|
414 |
+
$options[ 'cff_show_event_type' ] = $cff_show_event_type;
|
415 |
+
$options[ 'cff_show_video_type' ] = $cff_show_video_type;
|
416 |
+
$options[ 'cff_show_photos_type' ] = $cff_show_photos_type;
|
417 |
+
$options[ 'cff_show_status_type' ] = $cff_show_status_type;
|
418 |
+
}
|
419 |
+
//Update the Post Layout options
|
420 |
+
if( isset($_POST[ $style_post_layout_hidden_field_name ]) && $_POST[ $style_post_layout_hidden_field_name ] == 'Y' ) {
|
421 |
+
//Layout
|
422 |
+
$cff_preset_layout = $_POST[ 'cff_preset_layout' ];
|
423 |
+
//Include
|
424 |
+
$cff_show_text = $_POST[ 'cff_show_text' ];
|
425 |
+
$cff_show_desc = $_POST[ 'cff_show_desc' ];
|
426 |
+
$cff_show_shared_links = $_POST[ 'cff_show_shared_links' ];
|
427 |
+
$cff_show_date = $_POST[ 'cff_show_date' ];
|
428 |
+
$cff_show_media = $_POST[ 'cff_show_media' ];
|
429 |
+
$cff_show_event_title = $_POST[ 'cff_show_event_title' ];
|
430 |
+
$cff_show_event_details = $_POST[ 'cff_show_event_details' ];
|
431 |
+
$cff_show_meta = $_POST[ 'cff_show_meta' ];
|
432 |
+
$cff_show_link = $_POST[ 'cff_show_link' ];
|
433 |
+
//Layout
|
434 |
+
$options[ 'cff_preset_layout' ] = $cff_preset_layout;
|
435 |
+
//Include
|
436 |
+
$options[ 'cff_show_text' ] = $cff_show_text;
|
437 |
+
$options[ 'cff_show_desc' ] = $cff_show_desc;
|
438 |
+
$options[ 'cff_show_shared_links' ] = $cff_show_shared_links;
|
439 |
+
$options[ 'cff_show_date' ] = $cff_show_date;
|
440 |
+
$options[ 'cff_show_media' ] = $cff_show_media;
|
441 |
+
$options[ 'cff_show_event_title' ] = $cff_show_event_title;
|
442 |
+
$options[ 'cff_show_event_details' ] = $cff_show_event_details;
|
443 |
+
$options[ 'cff_show_meta' ] = $cff_show_meta;
|
444 |
+
$options[ 'cff_show_link' ] = $cff_show_link;
|
445 |
+
}
|
446 |
+
//Update the Post Layout options
|
447 |
+
if( isset($_POST[ $style_typography_hidden_field_name ]) && $_POST[ $style_typography_hidden_field_name ] == 'Y' ) {
|
448 |
+
//Character limits
|
449 |
+
$cff_title_length_val = $_POST[ $cff_title_length ];
|
450 |
+
$cff_body_length_val = $_POST[ $cff_body_length ];
|
451 |
+
$cff_see_more_text = $_POST[ 'cff_see_more_text' ];
|
452 |
+
$cff_see_less_text = $_POST[ 'cff_see_less_text' ];
|
453 |
+
//Typography
|
454 |
+
$cff_title_format = $_POST[ 'cff_title_format' ];
|
455 |
+
$cff_title_size = $_POST[ 'cff_title_size' ];
|
456 |
+
$cff_title_weight = $_POST[ 'cff_title_weight' ];
|
457 |
+
$cff_title_color = $_POST[ 'cff_title_color' ];
|
458 |
+
$cff_title_link = $_POST[ 'cff_title_link' ];
|
459 |
+
$cff_body_size = $_POST[ 'cff_body_size' ];
|
460 |
+
$cff_body_weight = $_POST[ 'cff_body_weight' ];
|
461 |
+
$cff_body_color = $_POST[ 'cff_body_color' ];
|
462 |
+
//Event title
|
463 |
+
$cff_event_title_format = $_POST[ 'cff_event_title_format' ];
|
464 |
+
$cff_event_title_size = $_POST[ 'cff_event_title_size' ];
|
465 |
+
$cff_event_title_weight = $_POST[ 'cff_event_title_weight' ];
|
466 |
+
$cff_event_title_color = $_POST[ 'cff_event_title_color' ];
|
467 |
+
$cff_event_title_link = $_POST[ 'cff_event_title_link' ];
|
468 |
+
//Event date
|
469 |
+
$cff_event_date_size = $_POST[ 'cff_event_date_size' ];
|
470 |
+
$cff_event_date_weight = $_POST[ 'cff_event_date_weight' ];
|
471 |
+
$cff_event_date_color = $_POST[ 'cff_event_date_color' ];
|
472 |
+
$cff_event_date_position = $_POST[ 'cff_event_date_position' ];
|
473 |
+
$cff_event_date_formatting = $_POST[ 'cff_event_date_formatting' ];
|
474 |
+
$cff_event_date_custom = $_POST[ 'cff_event_date_custom' ];
|
475 |
+
//Event details
|
476 |
+
$cff_event_details_size = $_POST[ 'cff_event_details_size' ];
|
477 |
+
$cff_event_details_weight = $_POST[ 'cff_event_details_weight' ];
|
478 |
+
$cff_event_details_color = $_POST[ 'cff_event_details_color' ];
|
479 |
+
//Date
|
480 |
+
$cff_date_position = $_POST[ 'cff_date_position' ];
|
481 |
+
$cff_date_size = $_POST[ 'cff_date_size' ];
|
482 |
+
$cff_date_weight = $_POST[ 'cff_date_weight' ];
|
483 |
+
$cff_date_color = $_POST[ 'cff_date_color' ];
|
484 |
+
$cff_date_formatting = $_POST[ 'cff_date_formatting' ];
|
485 |
+
$cff_date_custom = $_POST[ 'cff_date_custom' ];
|
486 |
+
$cff_date_before = $_POST[ 'cff_date_before' ];
|
487 |
+
$cff_date_after = $_POST[ 'cff_date_after' ];
|
488 |
+
//View on Facebook link
|
489 |
+
$cff_link_size = $_POST[ 'cff_link_size' ];
|
490 |
+
$cff_link_weight = $_POST[ 'cff_link_weight' ];
|
491 |
+
$cff_link_color = $_POST[ 'cff_link_color' ];
|
492 |
+
$cff_facebook_link_text = $_POST[ 'cff_facebook_link_text' ];
|
493 |
+
$cff_view_link_text = $_POST[ 'cff_view_link_text' ];
|
494 |
+
//Character limits
|
495 |
+
update_option( $cff_title_length, $cff_title_length_val );
|
496 |
+
update_option( $cff_body_length, $cff_body_length_val );
|
497 |
+
$options[ 'cff_see_more_text' ] = $cff_see_more_text;
|
498 |
+
$options[ 'cff_see_less_text' ] = $cff_see_less_text;
|
499 |
+
//Typography
|
500 |
+
$options[ 'cff_title_format' ] = $cff_title_format;
|
501 |
+
$options[ 'cff_title_size' ] = $cff_title_size;
|
502 |
+
$options[ 'cff_title_weight' ] = $cff_title_weight;
|
503 |
+
$options[ 'cff_title_color' ] = $cff_title_color;
|
504 |
+
$options[ 'cff_title_link' ] = $cff_title_link;
|
505 |
+
$options[ 'cff_body_size' ] = $cff_body_size;
|
506 |
+
$options[ 'cff_body_weight' ] = $cff_body_weight;
|
507 |
+
$options[ 'cff_body_color' ] = $cff_body_color;
|
508 |
+
//Event title
|
509 |
+
$options[ 'cff_event_title_format' ] = $cff_event_title_format;
|
510 |
+
$options[ 'cff_event_title_size' ] = $cff_event_title_size;
|
511 |
+
$options[ 'cff_event_title_weight' ] = $cff_event_title_weight;
|
512 |
+
$options[ 'cff_event_title_color' ] = $cff_event_title_color;
|
513 |
+
$options[ 'cff_event_title_link' ] = $cff_event_title_link;
|
514 |
+
//Event date
|
515 |
+
$options[ 'cff_event_date_size' ] = $cff_event_date_size;
|
516 |
+
$options[ 'cff_event_date_weight' ] = $cff_event_date_weight;
|
517 |
+
$options[ 'cff_event_date_color' ] = $cff_event_date_color;
|
518 |
+
$options[ 'cff_event_date_position' ] = $cff_event_date_position;
|
519 |
+
$options[ 'cff_event_date_formatting' ] = $cff_event_date_formatting;
|
520 |
+
$options[ 'cff_event_date_custom' ] = $cff_event_date_custom;
|
521 |
+
//Event details
|
522 |
+
$options[ 'cff_event_details_size' ] = $cff_event_details_size;
|
523 |
+
$options[ 'cff_event_details_weight' ] = $cff_event_details_weight;
|
524 |
+
$options[ 'cff_event_details_color' ] = $cff_event_details_color;
|
525 |
+
//Date
|
526 |
+
$options[ 'cff_date_position' ] = $cff_date_position;
|
527 |
+
$options[ 'cff_date_size' ] = $cff_date_size;
|
528 |
+
$options[ 'cff_date_weight' ] = $cff_date_weight;
|
529 |
+
$options[ 'cff_date_color' ] = $cff_date_color;
|
530 |
+
$options[ 'cff_date_formatting' ] = $cff_date_formatting;
|
531 |
+
$options[ 'cff_date_custom' ] = $cff_date_custom;
|
532 |
+
$options[ 'cff_date_before' ] = $cff_date_before;
|
533 |
+
$options[ 'cff_date_after' ] = $cff_date_after;
|
534 |
+
//View on Facebook link
|
535 |
+
$options[ 'cff_link_size' ] = $cff_link_size;
|
536 |
+
$options[ 'cff_link_weight' ] = $cff_link_weight;
|
537 |
+
$options[ 'cff_link_color' ] = $cff_link_color;
|
538 |
+
$options[ 'cff_facebook_link_text' ] = $cff_facebook_link_text;
|
539 |
+
$options[ 'cff_view_link_text' ] = $cff_view_link_text;
|
540 |
+
}
|
541 |
+
//Update the Post Layout options
|
542 |
+
if( isset($_POST[ $style_misc_hidden_field_name ]) && $_POST[ $style_misc_hidden_field_name ] == 'Y' ) {
|
543 |
+
//Meta
|
544 |
+
$cff_icon_style = $_POST[ 'cff_icon_style' ];
|
545 |
+
$cff_meta_text_color = $_POST[ 'cff_meta_text_color' ];
|
546 |
+
$cff_meta_bg_color = $_POST[ 'cff_meta_bg_color' ];
|
547 |
+
$cff_nocomments_text = $_POST[ 'cff_nocomments_text' ];
|
548 |
+
$cff_hide_comments = $_POST[ 'cff_hide_comments' ];
|
549 |
+
//Custom CSS
|
550 |
+
$cff_custom_css = $_POST[ 'cff_custom_css' ];
|
551 |
+
//Misc
|
552 |
+
$cff_show_like_box = $_POST[ 'cff_show_like_box' ];
|
553 |
+
$cff_like_box_position = $_POST[ 'cff_like_box_position' ];
|
554 |
+
$cff_like_box_outside = $_POST[ 'cff_like_box_outside' ];
|
555 |
+
$cff_likebox_bg_color = $_POST[ 'cff_likebox_bg_color' ];
|
556 |
+
$cff_video_height = $_POST[ 'cff_video_height' ];
|
557 |
+
$cff_video_action = $_POST[ 'cff_video_action' ];
|
558 |
+
$cff_sep_color = $_POST[ 'cff_sep_color' ];
|
559 |
+
$cff_sep_size = $_POST[ 'cff_sep_size' ];
|
560 |
+
$cff_open_links = $_POST[ 'cff_open_links' ];
|
561 |
+
//Meta
|
562 |
+
$options[ 'cff_icon_style' ] = $cff_icon_style;
|
563 |
+
$options[ 'cff_meta_text_color' ] = $cff_meta_text_color;
|
564 |
+
$options[ 'cff_meta_bg_color' ] = $cff_meta_bg_color;
|
565 |
+
$options[ 'cff_nocomments_text' ] = $cff_nocomments_text;
|
566 |
+
$options[ 'cff_hide_comments' ] = $cff_hide_comments;
|
567 |
+
//Custom CSS
|
568 |
+
$options[ 'cff_custom_css' ] = $cff_custom_css;
|
569 |
+
//Misc
|
570 |
+
$options[ 'cff_show_like_box' ] = $cff_show_like_box;
|
571 |
+
$options[ 'cff_like_box_position' ] = $cff_like_box_position;
|
572 |
+
$options[ 'cff_like_box_outside' ] = $cff_like_box_outside;
|
573 |
+
$options[ 'cff_likebox_bg_color' ] = $cff_likebox_bg_color;
|
574 |
+
$options[ 'cff_video_height' ] = $cff_video_height;
|
575 |
+
$options[ 'cff_video_action' ] = $cff_video_action;
|
576 |
+
$options[ 'cff_sep_color' ] = $cff_sep_color;
|
577 |
+
$options[ 'cff_sep_size' ] = $cff_sep_size;
|
578 |
+
$options[ 'cff_open_links' ] = $cff_open_links;
|
579 |
+
}
|
580 |
+
//Update the array
|
581 |
+
update_option( 'cff_style_settings', $options );
|
582 |
+
// Put an settings updated message on the screen
|
583 |
+
?>
|
584 |
+
<div class="updated"><p><strong><?php _e('Settings saved.', 'custom-facebook-feed' ); ?></strong></p></div>
|
585 |
+
<?php } ?>
|
586 |
+
|
587 |
+
<div id="cff-admin" class="wrap">
|
588 |
+
<div id="header">
|
589 |
+
<h1><?php _e('Layout & Style'); ?></h1>
|
590 |
+
</div>
|
591 |
+
<form name="form1" method="post" action="">
|
592 |
+
<input type="hidden" name="<?php echo $style_hidden_field_name; ?>" value="Y">
|
593 |
+
<?php
|
594 |
+
$active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general';
|
595 |
+
?>
|
596 |
+
<h2 class="nav-tab-wrapper">
|
597 |
+
<a href="?page=cff-style&tab=general" class="nav-tab <?php echo $active_tab == 'general' ? 'nav-tab-active' : ''; ?>"><?php _e('General'); ?></a>
|
598 |
+
<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>
|
599 |
+
<a href="?page=cff-style&tab=typography" class="nav-tab <?php echo $active_tab == 'typography' ? 'nav-tab-active' : ''; ?>"><?php _e('Typography'); ?></a>
|
600 |
+
<a href="?page=cff-style&tab=misc" class="nav-tab <?php echo $active_tab == 'misc' ? 'nav-tab-active' : ''; ?>"><?php _e('Misc'); ?></a>
|
601 |
+
</h2>
|
602 |
+
<?php if( $active_tab == 'general' ) { //Start General tab ?>
|
603 |
+
<input type="hidden" name="<?php echo $style_general_hidden_field_name; ?>" value="Y">
|
604 |
+
<br />
|
605 |
+
<table class="form-table">
|
606 |
+
<tbody>
|
607 |
+
<h3><?php _e('General'); ?></h3>
|
608 |
+
<tr valign="top">
|
609 |
+
<th scope="row"><?php _e('Feed Width'); ?></th>
|
610 |
+
<td>
|
611 |
+
<input name="cff_feed_width" type="text" value="<?php esc_attr_e( $cff_feed_width ); ?>" size="6" />
|
612 |
+
<span>Eg. 500px, 50%, 10em. <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Default is 100%'); ?></i></span>
|
613 |
+
</td>
|
614 |
+
</tr>
|
615 |
+
<tr valign="top">
|
616 |
+
<th scope="row"><?php _e('Feed Height'); ?></th>
|
617 |
+
<td>
|
618 |
+
<input name="cff_feed_height" type="text" value="<?php esc_attr_e( $cff_feed_height ); ?>" size="6" />
|
619 |
+
<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>
|
620 |
+
</td>
|
621 |
+
</tr>
|
622 |
+
<th scope="row"><?php _e('Feed Padding'); ?></th>
|
623 |
+
<td>
|
624 |
+
<input name="cff_feed_padding" type="text" value="<?php esc_attr_e( $cff_feed_padding ); ?>" size="6" />
|
625 |
+
<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>
|
626 |
+
</td>
|
627 |
+
</tr>
|
628 |
+
<tr valign="top">
|
629 |
+
<th scope="row"><?php _e('Feed Background Color'); ?></th>
|
630 |
+
<td>
|
631 |
+
<label for="cff_bg_color">#</label>
|
632 |
+
<input name="cff_bg_color" type="text" value="<?php esc_attr_e( $cff_bg_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
633 |
+
<span><a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a></span>
|
634 |
+
</td>
|
635 |
+
</tr>
|
636 |
+
<tr valign="top">
|
637 |
+
<th scope="row"><?php _e('Show name and picture of author'); ?></th>
|
638 |
+
<td>
|
639 |
+
<input name="cff_show_author" type="checkbox" id="cff_show_author" <?php if($cff_show_author == true) echo "checked"; ?> />
|
640 |
+
<label for="cff_show_status_type">Yes</label>
|
641 |
+
<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>
|
642 |
+
|
643 |
+
</td>
|
644 |
+
</tr>
|
645 |
+
<tr valign="top">
|
646 |
+
<th scope="row"><?php _e('Add CSS class to feed'); ?></th>
|
647 |
+
<td>
|
648 |
+
<input name="cff_class" type="text" value="<?php esc_attr_e( $cff_class ); ?>" size="25" />
|
649 |
+
<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>
|
650 |
+
</td>
|
651 |
+
</tr>
|
652 |
+
</tbody>
|
653 |
+
</table>
|
654 |
+
|
655 |
+
<hr />
|
656 |
+
<table class="form-table">
|
657 |
+
<tbody>
|
658 |
+
<h3><?php _e('Post Types'); ?></h3>
|
659 |
+
<tr valign="top">
|
660 |
+
<th scope="row"><?php _e('Only show these types of posts:'); ?><br />
|
661 |
+
<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>
|
662 |
+
<td>
|
663 |
+
<div>
|
664 |
+
<input name="cff_show_status_type" type="checkbox" id="cff_show_status_type" disabled <?php if($cff_show_status_type == true) echo "checked"; ?> />
|
665 |
+
<label for="cff_show_status_type"><?php _e('Statuses'); ?></label>
|
666 |
+
</div>
|
667 |
+
<div>
|
668 |
+
<input type="checkbox" name="cff_show_event_type" id="cff_show_event_type" disabled <?php if($cff_show_event_type == true) echo 'checked="checked"' ?> />
|
669 |
+
<label for="cff_show_event_type"><?php _e('Events'); ?></label>
|
670 |
+
</div>
|
671 |
+
<div>
|
672 |
+
<input type="checkbox" name="cff_show_photos_type" id="cff_show_photos_type" disabled <?php if($cff_show_photos_type == true) echo 'checked="checked"' ?> />
|
673 |
+
<label for="cff_show_photos_type"><?php _e('Photos'); ?></label>
|
674 |
+
</div>
|
675 |
+
<div>
|
676 |
+
<input type="checkbox" name="cff_show_video_type" id="cff_show_video_type" disabled <?php if($cff_show_video_type == true) echo 'checked="checked"' ?> />
|
677 |
+
<label for="cff_show_video_type"><?php _e('Videos'); ?></label>
|
678 |
+
</div>
|
679 |
+
<div>
|
680 |
+
<input type="checkbox" name="cff_show_links_type" id="cff_show_links_type" disabled <?php if($cff_show_links_type == true) echo 'checked="checked"' ?> />
|
681 |
+
<label for="cff_show_links_type"><?php _e('Links'); ?></label>
|
682 |
+
</div>
|
683 |
+
</td>
|
684 |
+
</tr>
|
685 |
+
</tbody>
|
686 |
+
</table>
|
687 |
+
<?php submit_button(); ?>
|
688 |
+
|
689 |
+
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
|
690 |
+
|
691 |
+
<?php } //End General tab ?>
|
692 |
+
<?php if( $active_tab == 'post_layout' ) { //Start Post Layout tab ?>
|
693 |
+
<input type="hidden" name="<?php echo $style_post_layout_hidden_field_name; ?>" value="Y">
|
694 |
+
<br />
|
695 |
+
<h3><?php _e('Post Layout'); ?></h3>
|
696 |
+
<table class="form-table">
|
697 |
+
<tbody>
|
698 |
+
<tr>
|
699 |
+
<td><p><?php _e('Choose a layout from the 3 below:'); ?></p></td>
|
700 |
+
<td>
|
701 |
+
<select name="cff_preset_layout" disabled>
|
702 |
+
<option value="thumb"><?php _e('Thumbnail'); ?></option>
|
703 |
+
<option value="half"><?php _e('Half-width'); ?></option>
|
704 |
+
<option value="full"><?php _e('Full-width'); ?></option>
|
705 |
+
</select>
|
706 |
+
<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>
|
707 |
+
</td>
|
708 |
+
</tr>
|
709 |
+
<tr valign="top">
|
710 |
+
<th scope="row"><?php _e('Thumbnail:'); ?></th>
|
711 |
+
<td>
|
712 |
+
<img src="<?php echo plugins_url( 'img/layout-thumb.png' , __FILE__ ) ?>" alt="Thumbnail Layout" width="400px" style="border: 1px solid #ccc;" />
|
713 |
+
</td>
|
714 |
+
</tr>
|
715 |
+
<tr valign="top">
|
716 |
+
<th scope="row"><?php _e('Half-width:'); ?></th>
|
717 |
+
<td>
|
718 |
+
<img src="<?php echo plugins_url( 'img/layout-half.png' , __FILE__ ) ?>" alt="Half Width Layout" width="400px" style="border: 1px solid #ccc;" />
|
719 |
+
</td>
|
720 |
+
</tr>
|
721 |
+
<tr valign="top">
|
722 |
+
<th scope="row"><?php _e('Full-width:'); ?></th>
|
723 |
+
<td>
|
724 |
+
<img src="<?php echo plugins_url( 'img/layout-full.png' , __FILE__ ) ?>" alt="Full Width Layout" width="400px" style="border: 1px solid #ccc;" />
|
725 |
+
</td>
|
726 |
+
</tr>
|
727 |
+
</tbody>
|
728 |
+
</table>
|
729 |
+
<hr />
|
730 |
+
<h3><?php _e('Show/Hide'); ?></h3>
|
731 |
+
<table class="form-table">
|
732 |
+
<tbody>
|
733 |
+
<tr valign="top">
|
734 |
+
<th scope="row"><?php _e('Include the following in posts:'); ?><br /><?php _e('(when applicable)'); ?>
|
735 |
+
<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>
|
736 |
+
<td>
|
737 |
+
<div>
|
738 |
+
<input name="cff_show_text" type="checkbox" id="cff_show_text" <?php if($cff_show_text == true) echo "checked"; ?> />
|
739 |
+
<label for="cff_show_text"><?php _e('Post text'); ?></label>
|
740 |
+
</div>
|
741 |
+
<div>
|
742 |
+
<input type="checkbox" name="cff_show_date" id="cff_show_date" <?php if($cff_show_date == true) echo 'checked="checked"' ?> />
|
743 |
+
<label for="cff_show_date"><?php _e('Date'); ?></label>
|
744 |
+
</div>
|
745 |
+
<div>
|
746 |
+
<input type="checkbox" id="cff_show_media" disabled />
|
747 |
+
<label for="cff_show_media"><?php _e('Photos/videos'); ?></label>
|
748 |
+
</div>
|
749 |
+
<div>
|
750 |
+
<input type="checkbox" name="cff_show_shared_links" id="cff_show_shared_links" <?php if($cff_show_shared_links == true) echo 'checked="checked"' ?> />
|
751 |
+
<label for="cff_show_shared_links"><?php _e('Shared links'); ?></label>
|
752 |
+
</div>
|
753 |
+
<div>
|
754 |
+
<input type="checkbox" name="cff_show_desc" id="cff_show_desc" <?php if($cff_show_desc == true) echo 'checked="checked"' ?> />
|
755 |
+
<label for="cff_show_desc"><?php _e('Link, photo and video descriptions'); ?></label>
|
756 |
+
</div>
|
757 |
+
<div>
|
758 |
+
<input type="checkbox" name="cff_show_event_title" id="cff_show_event_title" <?php if($cff_show_event_title == true) echo 'checked="checked"' ?> />
|
759 |
+
<label for="cff_show_event_title"><?php _e('Event title'); ?></label>
|
760 |
+
</div>
|
761 |
+
<div>
|
762 |
+
<input type="checkbox" name="cff_show_event_details" id="cff_show_event_details" <?php if($cff_show_event_details == true) echo 'checked="checked"' ?> />
|
763 |
+
<label for="cff_show_event_details"><?php _e('Event details'); ?></label>
|
764 |
+
</div>
|
765 |
+
<div>
|
766 |
+
<input type="checkbox" id="cff_show_meta" disabled />
|
767 |
+
<label for="cff_show_meta"><?php _e('Like/shares/comments'); ?></label>
|
768 |
+
</div>
|
769 |
+
<div>
|
770 |
+
<input type="checkbox" name="cff_show_link" id="cff_show_link" <?php if($cff_show_link == true) echo 'checked="checked"' ?> />
|
771 |
+
<label for="cff_show_link"><?php _e('View on Facebook/View Link'); ?></label>
|
772 |
+
</div>
|
773 |
+
</td>
|
774 |
+
</tr>
|
775 |
+
</tbody>
|
776 |
+
</table>
|
777 |
+
|
778 |
+
<?php submit_button(); ?>
|
779 |
+
|
780 |
+
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
|
781 |
+
|
782 |
+
<?php } //End Post Layout tab ?>
|
783 |
+
<?php if( $active_tab == 'typography' ) { //Start Typography tab ?>
|
784 |
+
<input type="hidden" name="<?php echo $style_typography_hidden_field_name; ?>" value="Y">
|
785 |
+
<br />
|
786 |
+
<h3><?php _e('Typography'); ?></h3>
|
787 |
+
<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>
|
788 |
+
<div id="poststuff" class="metabox-holder">
|
789 |
+
<div class="meta-box-sortables ui-sortable">
|
790 |
+
<div id="adminform" class="postbox" style="display: block;">
|
791 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
792 |
+
<h3 class="hndle"><span><?php _e('Text Character Limits'); ?></span></h3>
|
793 |
+
<div class="inside">
|
794 |
+
<table class="form-table">
|
795 |
+
<tbody>
|
796 |
+
<tr valign="top">
|
797 |
+
<th scope="row"><label class="bump-left"><?php _e('Maximum Post Text Length'); ?></label></th>
|
798 |
+
<td>
|
799 |
+
<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>
|
800 |
+
</td>
|
801 |
+
</tr>
|
802 |
+
<tr valign="top">
|
803 |
+
<th scope="row"><label class="bump-left"><?php _e('Maximum Description Length'); ?></label></th>
|
804 |
+
<td>
|
805 |
+
<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>
|
806 |
+
</td>
|
807 |
+
</tr>
|
808 |
+
<tr>
|
809 |
+
<th><label for="cff_see_more_text" class="bump-left"><?php _e('Custom "See More" text'); ?></label></th>
|
810 |
+
<td>
|
811 |
+
<input name="cff_see_more_text" type="text" value="<?php esc_attr_e( $cff_see_more_text ); ?>" size="20" />
|
812 |
+
<i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Use different text in place of the default "See More" text'); ?></i>
|
813 |
+
</td>
|
814 |
+
</tr>
|
815 |
+
<tr>
|
816 |
+
<th><label for="cff_see_less_text" class="bump-left"><?php _e('Custom "See Less" text'); ?></label></th>
|
817 |
+
<td>
|
818 |
+
<input name="cff_see_less_text" type="text" value="<?php esc_attr_e( $cff_see_less_text ); ?>" size="20" />
|
819 |
+
<i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Use different text in place of the default "See Less" text'); ?></i>
|
820 |
+
</td>
|
821 |
+
</tr>
|
822 |
+
</tbody>
|
823 |
+
</table>
|
824 |
+
</div>
|
825 |
+
</div>
|
826 |
+
<div id="adminform" class="postbox" style="display: block;">
|
827 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
828 |
+
<h3 class="hndle"><span><?php _e('Post Text'); ?></span></h3>
|
829 |
+
<div class="inside">
|
830 |
+
<table class="form-table">
|
831 |
+
<tbody>
|
832 |
+
<tr>
|
833 |
+
<th><label for="cff_title_format" class="bump-left"><?php _e('Format'); ?></label></th>
|
834 |
+
<td>
|
835 |
+
<select name="cff_title_format">
|
836 |
+
<option value="p" <?php if($cff_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
|
837 |
+
<option value="h3" <?php if($cff_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
|
838 |
+
<option value="h4" <?php if($cff_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
|
839 |
+
<option value="h5" <?php if($cff_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
|
840 |
+
<option value="h6" <?php if($cff_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
|
841 |
+
</select>
|
842 |
+
</td>
|
843 |
+
</tr>
|
844 |
+
<tr>
|
845 |
+
<th><label for="cff_title_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
846 |
+
<td>
|
847 |
+
<select name="cff_title_size">
|
848 |
+
<option value="inherit" <?php if($cff_title_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
849 |
+
<option value="10" <?php if($cff_title_size == "10") echo 'selected="selected"' ?> >10px</option>
|
850 |
+
<option value="11" <?php if($cff_title_size == "11") echo 'selected="selected"' ?> >11px</option>
|
851 |
+
<option value="12" <?php if($cff_title_size == "12") echo 'selected="selected"' ?> >12px</option>
|
852 |
+
<option value="14" <?php if($cff_title_size == "14") echo 'selected="selected"' ?> >14px</option>
|
853 |
+
<option value="16" <?php if($cff_title_size == "16") echo 'selected="selected"' ?> >16px</option>
|
854 |
+
<option value="18" <?php if($cff_title_size == "18") echo 'selected="selected"' ?> >18px</option>
|
855 |
+
<option value="20" <?php if($cff_title_size == "20") echo 'selected="selected"' ?> >20px</option>
|
856 |
+
<option value="24" <?php if($cff_title_size == "24") echo 'selected="selected"' ?> >24px</option>
|
857 |
+
<option value="28" <?php if($cff_title_size == "28") echo 'selected="selected"' ?> >28px</option>
|
858 |
+
<option value="32" <?php if($cff_title_size == "32") echo 'selected="selected"' ?> >32px</option>
|
859 |
+
<option value="36" <?php if($cff_title_size == "36") echo 'selected="selected"' ?> >36px</option>
|
860 |
+
<option value="42" <?php if($cff_title_size == "42") echo 'selected="selected"' ?> >42px</option>
|
861 |
+
<option value="48" <?php if($cff_title_size == "48") echo 'selected="selected"' ?> >48px</option>
|
862 |
+
<option value="60" <?php if($cff_title_size == "54") echo 'selected="selected"' ?> >54px</option>
|
863 |
+
<option value="60" <?php if($cff_title_size == "60") echo 'selected="selected"' ?> >60px</option>
|
864 |
+
</select>
|
865 |
+
</td>
|
866 |
+
</tr>
|
867 |
+
<tr>
|
868 |
+
<th><label for="cff_title_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
869 |
+
<td>
|
870 |
+
<select name="cff_title_weight">
|
871 |
+
<option value="inherit" <?php if($cff_title_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
872 |
+
<option value="normal" <?php if($cff_title_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
873 |
+
<option value="bold" <?php if($cff_title_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
874 |
+
</select>
|
875 |
+
</td>
|
876 |
+
</tr>
|
877 |
+
<tr>
|
878 |
+
<th><label for="cff_title_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
879 |
+
<td>
|
880 |
+
#<input name="cff_title_color" type="text" value="<?php esc_attr_e( $cff_title_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
881 |
+
<span><a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a></span>
|
882 |
+
</td>
|
883 |
+
</tr>
|
884 |
+
<tr>
|
885 |
+
<th><label for="cff_title_link" class="bump-left"><?php _e('Link text to Facebook post?'); ?></label></th>
|
886 |
+
<td><input type="checkbox" name="cff_title_link" id="cff_title_link" <?php if($cff_title_link == true) echo 'checked="checked"' ?> /> Yes</td>
|
887 |
+
</tr>
|
888 |
+
|
889 |
+
</tbody>
|
890 |
+
</table>
|
891 |
+
</div>
|
892 |
+
</div>
|
893 |
+
<div id="adminform" class="postbox" style="display: block;">
|
894 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
895 |
+
<h3 class="hndle"><span><?php _e('Link, Photo and Video Description'); ?></span></h3>
|
896 |
+
<div class="inside">
|
897 |
+
<table class="form-table">
|
898 |
+
<tbody>
|
899 |
+
|
900 |
+
<tr>
|
901 |
+
<th><label for="cff_body_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
902 |
+
<td>
|
903 |
+
<select name="cff_body_size">
|
904 |
+
<option value="inherit" <?php if($cff_body_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
905 |
+
<option value="10" <?php if($cff_body_size == "10") echo 'selected="selected"' ?> >10px</option>
|
906 |
+
<option value="11" <?php if($cff_body_size == "11") echo 'selected="selected"' ?> >11px</option>
|
907 |
+
<option value="12" <?php if($cff_body_size == "12") echo 'selected="selected"' ?> >12px</option>
|
908 |
+
<option value="14" <?php if($cff_body_size == "14") echo 'selected="selected"' ?> >14px</option>
|
909 |
+
<option value="16" <?php if($cff_body_size == "16") echo 'selected="selected"' ?> >16px</option>
|
910 |
+
<option value="18" <?php if($cff_body_size == "18") echo 'selected="selected"' ?> >18px</option>
|
911 |
+
<option value="20" <?php if($cff_body_size == "20") echo 'selected="selected"' ?> >20px</option>
|
912 |
+
<option value="24" <?php if($cff_body_size == "24") echo 'selected="selected"' ?> >24px</option>
|
913 |
+
<option value="28" <?php if($cff_body_size == "28") echo 'selected="selected"' ?> >28px</option>
|
914 |
+
<option value="32" <?php if($cff_body_size == "32") echo 'selected="selected"' ?> >32px</option>
|
915 |
+
<option value="36" <?php if($cff_body_size == "36") echo 'selected="selected"' ?> >36px</option>
|
916 |
+
<option value="42" <?php if($cff_body_size == "42") echo 'selected="selected"' ?> >42px</option>
|
917 |
+
<option value="48" <?php if($cff_body_size == "48") echo 'selected="selected"' ?> >48px</option>
|
918 |
+
<option value="60" <?php if($cff_body_size == "54") echo 'selected="selected"' ?> >54px</option>
|
919 |
+
<option value="60" <?php if($cff_body_size == "60") echo 'selected="selected"' ?> >60px</option>
|
920 |
+
</select>
|
921 |
+
</td>
|
922 |
+
</tr>
|
923 |
+
<tr>
|
924 |
+
<th><label for="cff_body_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
925 |
+
<td>
|
926 |
+
<select name="cff_body_weight">
|
927 |
+
<option value="inherit" <?php if($cff_body_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
928 |
+
<option value="normal" <?php if($cff_body_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
929 |
+
<option value="bold" <?php if($cff_body_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
930 |
+
</select>
|
931 |
+
</td>
|
932 |
+
</tr>
|
933 |
+
<tr>
|
934 |
+
<th><label for="cff_body_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
935 |
+
|
936 |
+
<td>
|
937 |
+
#<input name="cff_body_color" type="text" value="<?php esc_attr_e( $cff_body_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
938 |
+
<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
939 |
+
</td>
|
940 |
+
</tr>
|
941 |
+
</tbody>
|
942 |
+
</table>
|
943 |
+
</div>
|
944 |
+
</div>
|
945 |
+
<div style="margin-top: -15px;">
|
946 |
+
<?php submit_button(); ?>
|
947 |
+
</div>
|
948 |
+
<div id="adminform" class="postbox" style="display: block;">
|
949 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
950 |
+
<h3 class="hndle"><span><?php _e('Date'); ?></span></h3>
|
951 |
+
<div class="inside">
|
952 |
+
<table class="form-table">
|
953 |
+
<tbody>
|
954 |
+
<tr>
|
955 |
+
<th><label for="cff_date_position" class="bump-left"><?php _e('Position'); ?></label></th>
|
956 |
+
<td>
|
957 |
+
<select name="cff_date_position">
|
958 |
+
<option value="below" <?php if($cff_date_position == "below") echo 'selected="selected"' ?> >Below Text</option>
|
959 |
+
<option value="above" <?php if($cff_date_position == "above") echo 'selected="selected"' ?> >Above Text</option>
|
960 |
+
</select>
|
961 |
+
</td>
|
962 |
+
</tr>
|
963 |
+
<tr>
|
964 |
+
<th><label for="cff_date_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
965 |
+
<td>
|
966 |
+
<select name="cff_date_size">
|
967 |
+
<option value="inherit" <?php if($cff_date_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
968 |
+
<option value="10" <?php if($cff_date_size == "10") echo 'selected="selected"' ?> >10px</option>
|
969 |
+
<option value="11" <?php if($cff_date_size == "11") echo 'selected="selected"' ?> >11px</option>
|
970 |
+
<option value="12" <?php if($cff_date_size == "12") echo 'selected="selected"' ?> >12px</option>
|
971 |
+
<option value="14" <?php if($cff_date_size == "14") echo 'selected="selected"' ?> >14px</option>
|
972 |
+
<option value="16" <?php if($cff_date_size == "16") echo 'selected="selected"' ?> >16px</option>
|
973 |
+
<option value="18" <?php if($cff_date_size == "18") echo 'selected="selected"' ?> >18px</option>
|
974 |
+
<option value="20" <?php if($cff_date_size == "20") echo 'selected="selected"' ?> >20px</option>
|
975 |
+
<option value="24" <?php if($cff_date_size == "24") echo 'selected="selected"' ?> >24px</option>
|
976 |
+
<option value="28" <?php if($cff_date_size == "28") echo 'selected="selected"' ?> >28px</option>
|
977 |
+
<option value="32" <?php if($cff_date_size == "32") echo 'selected="selected"' ?> >32px</option>
|
978 |
+
<option value="36" <?php if($cff_date_size == "36") echo 'selected="selected"' ?> >36px</option>
|
979 |
+
<option value="42" <?php if($cff_date_size == "42") echo 'selected="selected"' ?> >42px</option>
|
980 |
+
<option value="48" <?php if($cff_date_size == "48") echo 'selected="selected"' ?> >48px</option>
|
981 |
+
<option value="60" <?php if($cff_date_size == "54") echo 'selected="selected"' ?> >54px</option>
|
982 |
+
<option value="60" <?php if($cff_date_size == "60") echo 'selected="selected"' ?> >60px</option>
|
983 |
+
</select>
|
984 |
+
</td>
|
985 |
+
</tr>
|
986 |
+
<tr>
|
987 |
+
<th><label for="cff_date_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
988 |
+
<td>
|
989 |
+
<select name="cff_date_weight">
|
990 |
+
<option value="inherit" <?php if($cff_date_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
991 |
+
<option value="normal" <?php if($cff_date_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
992 |
+
<option value="bold" <?php if($cff_date_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
993 |
+
</select>
|
994 |
+
</td>
|
995 |
+
</tr>
|
996 |
+
<tr>
|
997 |
+
<th><label for="cff_date_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
998 |
+
<td>
|
999 |
+
#<input name="cff_date_color" type="text" value="<?php esc_attr_e( $cff_date_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
1000 |
+
<a href="http://www.colorpicker.com/" target="_blank">Color Picker</a>
|
1001 |
+
</td>
|
1002 |
+
</tr>
|
1003 |
+
|
1004 |
+
<tr>
|
1005 |
+
<th><label for="cff_date_formatting" class="bump-left"><?php _e('Date formatting'); ?></label></th>
|
1006 |
+
<td>
|
1007 |
+
<select name="cff_date_formatting">
|
1008 |
+
<?php $original = strtotime('2013-07-25T17:30:00+0000'); ?>
|
1009 |
+
<option value="1" <?php if($cff_date_formatting == "1") echo 'selected="selected"' ?> ><?php _e('Posted 2 days ago'); ?></option>
|
1010 |
+
<option value="2" <?php if($cff_date_formatting == "2") echo 'selected="selected"' ?> ><?php echo date('F jS, g:i a', $original); ?></option>
|
1011 |
+
<option value="3" <?php if($cff_date_formatting == "3") echo 'selected="selected"' ?> ><?php echo date('F jS', $original); ?></option>
|
1012 |
+
<option value="4" <?php if($cff_date_formatting == "4") echo 'selected="selected"' ?> ><?php echo date('D F jS', $original); ?></option>
|
1013 |
+
<option value="5" <?php if($cff_date_formatting == "5") echo 'selected="selected"' ?> ><?php echo date('l F jS', $original); ?></option>
|
1014 |
+
<option value="6" <?php if($cff_date_formatting == "6") echo 'selected="selected"' ?> ><?php echo date('D M jS, Y', $original); ?></option>
|
1015 |
+
<option value="7" <?php if($cff_date_formatting == "7") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y', $original); ?></option>
|
1016 |
+
<option value="8" <?php if($cff_date_formatting == "8") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y - g:i a', $original); ?></option>
|
1017 |
+
<option value="9" <?php if($cff_date_formatting == "9") echo 'selected="selected"' ?> ><?php echo date("l M jS, 'y", $original); ?></option>
|
1018 |
+
<option value="10" <?php if($cff_date_formatting == "10") echo 'selected="selected"' ?> ><?php echo date('m.d.y', $original); ?></option>
|
1019 |
+
<option value="11" <?php if($cff_date_formatting == "11") echo 'selected="selected"' ?> ><?php echo date('m/d/y', $original); ?></option>
|
1020 |
+
<option value="12" <?php if($cff_date_formatting == "12") echo 'selected="selected"' ?> ><?php echo date('d.m.y', $original); ?></option>
|
1021 |
+
<option value="13" <?php if($cff_date_formatting == "13") echo 'selected="selected"' ?> ><?php echo date('d/m/y', $original); ?></option>
|
1022 |
+
</select>
|
1023 |
+
</td>
|
1024 |
+
</tr>
|
1025 |
+
<tr>
|
1026 |
+
<th><label for="cff_date_custom" class="bump-left"><?php _e('Custom format'); ?></label></th>
|
1027 |
+
<td>
|
1028 |
+
<input name="cff_date_custom" type="text" value="<?php esc_attr_e( $cff_date_custom ); ?>" size="10" placeholder="Eg. F j, Y" />
|
1029 |
+
<i style="color: #666; font-size: 11px;">(<a href="http://smashballoon.com/custom-facebook-feed/docs/date/" target="_blank"><?php _e('Examples'); ?></a>)</i>
|
1030 |
+
</td>
|
1031 |
+
</tr>
|
1032 |
+
<tr>
|
1033 |
+
<th><label for="cff_date_before" class="bump-left"><?php _e('Text before date'); ?></label></th>
|
1034 |
+
<td><input name="cff_date_before" type="text" value="<?php esc_attr_e( $cff_date_before ); ?>" size="10" placeholder="Eg. Posted" /></td>
|
1035 |
+
</tr>
|
1036 |
+
<tr>
|
1037 |
+
<th><label for="cff_date_after" class="bump-left"><?php _e('Text after date'); ?></label></th>
|
1038 |
+
<td><input name="cff_date_after" type="text" value="<?php esc_attr_e( $cff_date_after ); ?>" size="10" placeholder="Eg. ago" /></td>
|
1039 |
+
</tr>
|
1040 |
+
</tbody>
|
1041 |
+
</table>
|
1042 |
+
</div>
|
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('Event Title'); ?></span></h3>
|
1047 |
+
<div class="inside">
|
1048 |
+
<table class="form-table">
|
1049 |
+
<tbody>
|
1050 |
+
|
1051 |
+
<tr>
|
1052 |
+
<th><label for="cff_event_title_format" class="bump-left"><?php _e('Format'); ?></label></th>
|
1053 |
+
<td>
|
1054 |
+
<select name="cff_event_title_format">
|
1055 |
+
<option value="p" <?php if($cff_event_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
|
1056 |
+
<option value="h3" <?php if($cff_event_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
|
1057 |
+
<option value="h4" <?php if($cff_event_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
|
1058 |
+
<option value="h5" <?php if($cff_event_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
|
1059 |
+
<option value="h6" <?php if($cff_event_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
|
1060 |
+
</select>
|
1061 |
+
</td>
|
1062 |
+
</tr>
|
1063 |
+
|
1064 |
+
<tr>
|
1065 |
+
<th><label for="cff_event_title_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
1066 |
+
<td>
|
1067 |
+
<select name="cff_event_title_size">
|
1068 |
+
<option value="inherit" <?php if($cff_event_title_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1069 |
+
<option value="10" <?php if($cff_event_title_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1070 |
+
<option value="11" <?php if($cff_event_title_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1071 |
+
<option value="12" <?php if($cff_event_title_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1072 |
+
<option value="14" <?php if($cff_event_title_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1073 |
+
<option value="16" <?php if($cff_event_title_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1074 |
+
<option value="18" <?php if($cff_event_title_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1075 |
+
<option value="20" <?php if($cff_event_title_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1076 |
+
<option value="24" <?php if($cff_event_title_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1077 |
+
<option value="28" <?php if($cff_event_title_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1078 |
+
<option value="32" <?php if($cff_event_title_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1079 |
+
<option value="36" <?php if($cff_event_title_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1080 |
+
<option value="42" <?php if($cff_event_title_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1081 |
+
<option value="48" <?php if($cff_event_title_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1082 |
+
<option value="60" <?php if($cff_event_title_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1083 |
+
<option value="60" <?php if($cff_event_title_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1084 |
+
</select>
|
1085 |
+
</td>
|
1086 |
+
</tr>
|
1087 |
+
<tr>
|
1088 |
+
<th><label for="cff_event_title_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
1089 |
+
<td>
|
1090 |
+
<select name="cff_event_title_weight">
|
1091 |
+
<option value="inherit" <?php if($cff_event_title_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1092 |
+
<option value="normal" <?php if($cff_event_title_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
1093 |
+
<option value="bold" <?php if($cff_event_title_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
1094 |
+
</select>
|
1095 |
+
</td>
|
1096 |
+
</tr>
|
1097 |
+
<tr>
|
1098 |
+
<th><label for="cff_event_title_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
1099 |
+
<td>
|
1100 |
+
<input name="cff_event_title_color" type="text" value="<?php esc_attr_e( $cff_event_title_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
1101 |
+
<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1102 |
+
</td>
|
1103 |
+
</tr>
|
1104 |
+
<tr>
|
1105 |
+
<th><label for="cff_title_link" class="bump-left"><?php _e('Link title to Facebook event page?'); ?></label></th>
|
1106 |
+
<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>
|
1107 |
+
</tr>
|
1108 |
+
</tbody>
|
1109 |
+
</table>
|
1110 |
+
</div>
|
1111 |
+
</div>
|
1112 |
+
<div style="margin-top: -15px;">
|
1113 |
+
<?php submit_button(); ?>
|
1114 |
+
</div>
|
1115 |
+
<div id="adminform" class="postbox" style="display: block;">
|
1116 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
1117 |
+
<h3 class="hndle"><span><?php _e('Event Date'); ?></span></h3>
|
1118 |
+
<div class="inside">
|
1119 |
+
<table class="form-table">
|
1120 |
+
<tbody>
|
1121 |
+
|
1122 |
+
<tr>
|
1123 |
+
<th><label for="cff_event_date_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
1124 |
+
<td>
|
1125 |
+
<select name="cff_event_date_size">
|
1126 |
+
<option value="inherit" <?php if($cff_event_date_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1127 |
+
<option value="10" <?php if($cff_event_date_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1128 |
+
<option value="11" <?php if($cff_event_date_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1129 |
+
<option value="12" <?php if($cff_event_date_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1130 |
+
<option value="14" <?php if($cff_event_date_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1131 |
+
<option value="16" <?php if($cff_event_date_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1132 |
+
<option value="18" <?php if($cff_event_date_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1133 |
+
<option value="20" <?php if($cff_event_date_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1134 |
+
<option value="24" <?php if($cff_event_date_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1135 |
+
<option value="28" <?php if($cff_event_date_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1136 |
+
<option value="32" <?php if($cff_event_date_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1137 |
+
<option value="36" <?php if($cff_event_date_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1138 |
+
<option value="42" <?php if($cff_event_date_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1139 |
+
<option value="48" <?php if($cff_event_date_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1140 |
+
<option value="60" <?php if($cff_event_date_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1141 |
+
<option value="60" <?php if($cff_event_date_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1142 |
+
</select>
|
1143 |
+
</td>
|
1144 |
+
</tr>
|
1145 |
+
<tr>
|
1146 |
+
<th><label for="cff_event_date_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
1147 |
+
<td>
|
1148 |
+
<select name="cff_event_date_weight">
|
1149 |
+
<option value="inherit" <?php if($cff_event_date_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1150 |
+
<option value="normal" <?php if($cff_event_date_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
1151 |
+
<option value="bold" <?php if($cff_event_date_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
1152 |
+
</select>
|
1153 |
+
</td>
|
1154 |
+
</tr>
|
1155 |
+
<tr>
|
1156 |
+
<th><label for="cff_event_date_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
1157 |
+
<td>
|
1158 |
+
#<input name="cff_event_date_color" type="text" value="<?php esc_attr_e( $cff_event_date_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
1159 |
+
<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1160 |
+
</td>
|
1161 |
+
</tr>
|
1162 |
+
<tr valign="top">
|
1163 |
+
<th scope="row"><label class="bump-left"><?php _e('Date Position'); ?></label></th>
|
1164 |
+
<td>
|
1165 |
+
<select name="cff_event_date_position">
|
1166 |
+
<option value="below" <?php if($cff_event_date_position == "below") echo 'selected="selected"' ?> ><?php _e('Below event title'); ?></option>
|
1167 |
+
<option value="above" <?php if($cff_event_date_position == "above") echo 'selected="selected"' ?> ><?php _e('Above event title'); ?></option>
|
1168 |
+
</select>
|
1169 |
+
</td>
|
1170 |
+
</tr>
|
1171 |
+
<tr>
|
1172 |
+
<th><label for="cff_event_date_formatting" class="bump-left"><?php _e('Event date formatting'); ?></label></th>
|
1173 |
+
<td>
|
1174 |
+
<select name="cff_event_date_formatting">
|
1175 |
+
<?php $original = strtotime('2013-07-25T17:30:00+0000'); ?>
|
1176 |
+
<option value="1" <?php if($cff_event_date_formatting == "1") echo 'selected="selected"' ?> ><?php echo date('F j, Y, g:ia', $original); ?></option>
|
1177 |
+
<option value="2" <?php if($cff_event_date_formatting == "2") echo 'selected="selected"' ?> ><?php echo date('F jS, g:ia', $original); ?></option>
|
1178 |
+
<option value="3" <?php if($cff_event_date_formatting == "3") echo 'selected="selected"' ?> ><?php echo date('g:ia - F jS', $original); ?></option>
|
1179 |
+
<option value="4" <?php if($cff_event_date_formatting == "4") echo 'selected="selected"' ?> ><?php echo date('g:ia, F jS', $original); ?></option>
|
1180 |
+
<option value="5" <?php if($cff_event_date_formatting == "5") echo 'selected="selected"' ?> ><?php echo date('l F jS - g:ia', $original); ?></option>
|
1181 |
+
<option value="6" <?php if($cff_event_date_formatting == "6") echo 'selected="selected"' ?> ><?php echo date('D M jS, Y, g:iA', $original); ?></option>
|
1182 |
+
<option value="7" <?php if($cff_event_date_formatting == "7") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y, g:iA', $original); ?></option>
|
1183 |
+
<option value="8" <?php if($cff_event_date_formatting == "8") echo 'selected="selected"' ?> ><?php echo date('l F jS, Y - g:ia', $original); ?></option>
|
1184 |
+
<option value="9" <?php if($cff_event_date_formatting == "9") echo 'selected="selected"' ?> ><?php echo date("l M jS, 'y", $original); ?></option>
|
1185 |
+
<option value="10" <?php if($cff_event_date_formatting == "10") echo 'selected="selected"' ?> ><?php echo date('m.d.y - g:iA', $original); ?></option>
|
1186 |
+
<option value="11" <?php if($cff_event_date_formatting == "11") echo 'selected="selected"' ?> ><?php echo date('m/d/y, g:ia', $original); ?></option>
|
1187 |
+
<option value="12" <?php if($cff_event_date_formatting == "12") echo 'selected="selected"' ?> ><?php echo date('d.m.y - g:iA', $original); ?></option>
|
1188 |
+
<option value="13" <?php if($cff_event_date_formatting == "13") echo 'selected="selected"' ?> ><?php echo date('d/m/y, g:ia', $original); ?></option>
|
1189 |
+
</select>
|
1190 |
+
</td>
|
1191 |
+
</tr>
|
1192 |
+
<tr>
|
1193 |
+
<th><label for="cff_event_date_custom" class="bump-left"><?php _e('Custom event date format'); ?></label></th>
|
1194 |
+
<td>
|
1195 |
+
<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" />
|
1196 |
+
<i style="color: #666; font-size: 11px;">(<a href="http://smashballoon.com/custom-facebook-feed/docs/date/" target="_blank"><?php _e('Examples'); ?></a>)</i>
|
1197 |
+
</td>
|
1198 |
+
</tr>
|
1199 |
+
</tbody>
|
1200 |
+
</table>
|
1201 |
+
</div>
|
1202 |
+
</div>
|
1203 |
+
<div id="adminform" class="postbox" style="display: block;">
|
1204 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
1205 |
+
<h3 class="hndle"><span><?php _e('Event Details'); ?></span></h3>
|
1206 |
+
<div class="inside">
|
1207 |
+
<table class="form-table">
|
1208 |
+
<tbody>
|
1209 |
+
|
1210 |
+
<tr>
|
1211 |
+
<th><label for="cff_event_details_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
1212 |
+
<td>
|
1213 |
+
<select name="cff_event_details_size">
|
1214 |
+
<option value="inherit" <?php if($cff_event_details_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1215 |
+
<option value="10" <?php if($cff_event_details_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1216 |
+
<option value="11" <?php if($cff_event_details_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1217 |
+
<option value="12" <?php if($cff_event_details_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1218 |
+
<option value="14" <?php if($cff_event_details_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1219 |
+
<option value="16" <?php if($cff_event_details_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1220 |
+
<option value="18" <?php if($cff_event_details_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1221 |
+
<option value="20" <?php if($cff_event_details_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1222 |
+
<option value="24" <?php if($cff_event_details_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1223 |
+
<option value="28" <?php if($cff_event_details_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1224 |
+
<option value="32" <?php if($cff_event_details_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1225 |
+
<option value="36" <?php if($cff_event_details_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1226 |
+
<option value="42" <?php if($cff_event_details_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1227 |
+
<option value="48" <?php if($cff_event_details_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1228 |
+
<option value="60" <?php if($cff_event_details_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1229 |
+
<option value="60" <?php if($cff_event_details_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1230 |
+
</select>
|
1231 |
+
</td>
|
1232 |
+
</tr>
|
1233 |
+
<tr>
|
1234 |
+
<th><label for="cff_event_details_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
1235 |
+
<td>
|
1236 |
+
<select name="cff_event_details_weight">
|
1237 |
+
<option value="inherit" <?php if($cff_event_details_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1238 |
+
<option value="normal" <?php if($cff_event_details_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
1239 |
+
<option value="bold" <?php if($cff_event_details_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
1240 |
+
</select>
|
1241 |
+
</td>
|
1242 |
+
</tr>
|
1243 |
+
<tr>
|
1244 |
+
<th><label for="cff_event_details_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
1245 |
+
<td>
|
1246 |
+
#<input name="cff_event_details_color" type="text" value="<?php esc_attr_e( $cff_event_details_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
1247 |
+
<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1248 |
+
</td>
|
1249 |
+
</tr>
|
1250 |
+
</tbody>
|
1251 |
+
</table>
|
1252 |
+
</div>
|
1253 |
+
</div>
|
1254 |
+
<div id="adminform" class="postbox" style="display: block;">
|
1255 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
1256 |
+
<h3 class="hndle"><span><?php _e('Link to Facebook'); ?></span></h3>
|
1257 |
+
<div class="inside">
|
1258 |
+
<table class="form-table">
|
1259 |
+
<tbody>
|
1260 |
+
|
1261 |
+
<tr>
|
1262 |
+
<th><label for="cff_link_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
1263 |
+
<td>
|
1264 |
+
<select name="cff_link_size">
|
1265 |
+
<option value="inherit" <?php if($cff_link_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1266 |
+
<option value="10" <?php if($cff_link_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1267 |
+
<option value="11" <?php if($cff_link_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1268 |
+
<option value="12" <?php if($cff_link_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1269 |
+
<option value="14" <?php if($cff_link_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1270 |
+
<option value="16" <?php if($cff_link_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1271 |
+
<option value="18" <?php if($cff_link_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1272 |
+
<option value="20" <?php if($cff_link_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1273 |
+
<option value="24" <?php if($cff_link_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1274 |
+
<option value="28" <?php if($cff_link_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1275 |
+
<option value="32" <?php if($cff_link_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1276 |
+
<option value="36" <?php if($cff_link_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1277 |
+
<option value="42" <?php if($cff_link_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1278 |
+
<option value="48" <?php if($cff_link_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1279 |
+
<option value="60" <?php if($cff_link_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1280 |
+
<option value="60" <?php if($cff_link_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1281 |
+
</select>
|
1282 |
+
</td>
|
1283 |
+
</tr>
|
1284 |
+
<tr>
|
1285 |
+
<th><label for="cff_link_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
1286 |
+
<td>
|
1287 |
+
<select name="cff_link_weight">
|
1288 |
+
<option value="inherit" <?php if($cff_link_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1289 |
+
<option value="normal" <?php if($cff_link_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
1290 |
+
<option value="bold" <?php if($cff_link_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
1291 |
+
</select>
|
1292 |
+
</td>
|
1293 |
+
</tr>
|
1294 |
+
<tr>
|
1295 |
+
<th><label for="cff_link_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
1296 |
+
<td>
|
1297 |
+
<input name="cff_link_color" type="text" value="<?php esc_attr_e( $cff_link_color ); ?>" size="10" placeholder="Eg. ED9A00" />
|
1298 |
+
<a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1299 |
+
</td>
|
1300 |
+
</tr>
|
1301 |
+
<tr>
|
1302 |
+
<th><label for="cff_facebook_link_text" class="bump-left"><?php _e('Custom "View on Facebook" text'); ?></label></th>
|
1303 |
+
<td>
|
1304 |
+
<input name="cff_facebook_link_text" type="text" value="<?php esc_attr_e( $cff_facebook_link_text ); ?>" size="20" />
|
1305 |
+
<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>
|
1306 |
+
</td>
|
1307 |
+
</tr>
|
1308 |
+
<tr>
|
1309 |
+
<th><label for="cff_view_link_text" class="bump-left"><?php _e('Custom "View Link" text'); ?></label></th>
|
1310 |
+
<td>
|
1311 |
+
<input name="cff_view_link_text" type="text" value="<?php esc_attr_e( $cff_view_link_text ); ?>" size="20" />
|
1312 |
+
<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>
|
1313 |
+
</td>
|
1314 |
+
</tr>
|
1315 |
+
|
1316 |
+
</tbody>
|
1317 |
+
</table>
|
1318 |
+
</div>
|
1319 |
+
</div>
|
1320 |
+
</div>
|
1321 |
+
</div>
|
1322 |
+
<div style="margin-top: -15px;">
|
1323 |
+
<?php submit_button(); ?>
|
1324 |
+
</div>
|
1325 |
+
|
1326 |
+
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
|
1327 |
+
|
1328 |
+
<?php } //End Typography tab ?>
|
1329 |
+
<?php if( $active_tab == 'misc' ) { //Start Misc tab ?>
|
1330 |
+
<input type="hidden" name="<?php echo $style_misc_hidden_field_name; ?>" value="Y">
|
1331 |
+
<br />
|
1332 |
+
<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>
|
1333 |
+
|
1334 |
+
<hr />
|
1335 |
+
<h3><?php _e('Custom CSS'); ?></h3>
|
1336 |
+
<table class="form-table">
|
1337 |
+
<tbody>
|
1338 |
+
<tr valign="top">
|
1339 |
+
<td>
|
1340 |
+
<?php _e('Enter your own custom CSS in the box below'); ?>
|
1341 |
+
</td>
|
1342 |
+
</tr>
|
1343 |
+
<tr valign="top">
|
1344 |
+
<td>
|
1345 |
+
<textarea name="cff_custom_css" id="cff_custom_css" style="width: 70%;" rows="7"><?php esc_attr_e( $cff_custom_css ); ?></textarea>
|
1346 |
+
</td>
|
1347 |
+
</tr>
|
1348 |
+
</tbody>
|
1349 |
+
</table>
|
1350 |
+
<hr />
|
1351 |
+
<h3><?php _e('Misc'); ?></h3>
|
1352 |
+
<table class="form-table">
|
1353 |
+
<tbody>
|
1354 |
+
<tr><td><b style="font-size: 14px;"><?php _e('Like Box'); ?></b></td></tr>
|
1355 |
+
<tr valign="top">
|
1356 |
+
<th scope="row"><label class="bump-left"><?php _e('Show the Like Box'); ?></label></th>
|
1357 |
+
<td>
|
1358 |
+
<input type="checkbox" name="cff_show_like_box" id="cff_show_like_box" <?php if($cff_show_like_box == true) echo 'checked="checked"' ?> />
|
1359 |
+
</td>
|
1360 |
+
</tr>
|
1361 |
+
<tr valign="top">
|
1362 |
+
<th scope="row"><label class="bump-left"><?php _e('Like Box Position'); ?></label></th>
|
1363 |
+
<td>
|
1364 |
+
<select name="cff_like_box_position">
|
1365 |
+
<option value="bottom" <?php if($cff_like_box_position == "bottom") echo 'selected="selected"' ?> ><?php _e('Bottom'); ?></option>
|
1366 |
+
<option value="top" <?php if($cff_like_box_position == "top") echo 'selected="selected"' ?> ><?php _e('Top'); ?></option>
|
1367 |
+
</select>
|
1368 |
+
</td>
|
1369 |
+
</tr>
|
1370 |
+
<tr valign="top">
|
1371 |
+
<th scope="row"><label class="bump-left"><?php _e('Display outside the scrollable area'); ?></label></th>
|
1372 |
+
<td>
|
1373 |
+
<input type="checkbox" name="cff_like_box_outside" id="cff_like_box_outside" <?php if($cff_like_box_outside == true) echo 'checked="checked"' ?> />
|
1374 |
+
<i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('(Only applicable if you have set a height on the feed)'); ?></i>
|
1375 |
+
</td>
|
1376 |
+
</tr>
|
1377 |
+
<tr valign="top">
|
1378 |
+
<th scope="row"><label class="bump-left"><?php _e('Like Box Background Color'); ?></label></th>
|
1379 |
+
<td>
|
1380 |
+
<label for="cff_likebox_bg_color">#</label>
|
1381 |
+
<input name="cff_likebox_bg_color" type="text" value="<?php esc_attr_e( $cff_likebox_bg_color ); ?>" size="10" />
|
1382 |
+
<span>Eg. ED9A00</span> <a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1383 |
+
</td>
|
1384 |
+
</tr>
|
1385 |
+
|
1386 |
+
<tr><td><b style="font-size: 14px;"><?php _e('Separating Line'); ?></b></td></tr>
|
1387 |
+
<tr valign="top">
|
1388 |
+
<th scope="row"><label class="bump-left"><?php _e('Separating Line Color'); ?></label></th>
|
1389 |
+
<td>
|
1390 |
+
<label for="cff_sep_color">#</label>
|
1391 |
+
<input name="cff_sep_color" type="text" value="<?php esc_attr_e( $cff_sep_color ); ?>" size="10" />
|
1392 |
+
<span>Eg. ED9A00</span> <a href="http://www.colorpicker.com/" target="_blank"><?php _e('Color Picker'); ?></a>
|
1393 |
+
</td>
|
1394 |
+
</tr>
|
1395 |
+
<tr valign="top">
|
1396 |
+
<th scope="row"><label class="bump-left"><?php _e('Separating Line Thickness'); ?></label></th>
|
1397 |
+
<td>
|
1398 |
+
<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>
|
1399 |
+
</td>
|
1400 |
+
</tr>
|
1401 |
+
</tbody>
|
1402 |
+
</table>
|
1403 |
+
<?php submit_button(); ?>
|
1404 |
+
|
1405 |
+
<a href="http://smashballoon.com/custom-facebook-feed/demo" target="_blank"><img src="<?php echo plugins_url( 'img/pro.png' , __FILE__ ) ?>" /></a>
|
1406 |
+
|
1407 |
+
<?php } //End Misc tab ?>
|
1408 |
+
</form>
|
1409 |
+
<?php
|
1410 |
+
} //End Style_Page
|
1411 |
+
//Enqueue admin styles
|
1412 |
+
function cff_admin_style() {
|
1413 |
+
wp_register_style( 'custom_wp_admin_css', plugin_dir_url( __FILE__ ) . 'css/cff-admin-style.css', false, '1.0.0' );
|
1414 |
+
wp_enqueue_style( 'custom_wp_admin_css' );
|
1415 |
+
}
|
1416 |
+
add_action( 'admin_enqueue_scripts', 'cff_admin_style' );
|
1417 |
+
//Enqueue admin scripts
|
1418 |
+
function cff_admin_scripts() {
|
1419 |
+
wp_enqueue_script( 'cff_admin_script', plugin_dir_url( __FILE__ ) . 'js/cff-admin-scripts.js' );
|
1420 |
+
if( !wp_script_is('jquery-ui') ) {
|
1421 |
+
wp_enqueue_script( 'jquery-ui' , 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js' );
|
1422 |
+
}
|
1423 |
+
wp_enqueue_script( 'hoverIntent' );
|
1424 |
+
}
|
1425 |
+
add_action( 'admin_enqueue_scripts', 'cff_admin_scripts' );
|
1426 |
?>
|
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
|
@@ -317,7 +317,7 @@ function display_cff($atts) {
|
|
317 |
//Use posts? or feed?
|
318 |
$show_others = $atts['others'];
|
319 |
$graph_query = 'posts';
|
320 |
-
if ($show_others) $graph_query = 'feed';
|
321 |
$cff_post_limit = $atts['limit'];
|
322 |
//Calculate the cache time in seconds
|
323 |
if($cff_cache_time_unit == 'minutes') $cff_cache_time_unit = 60;
|
@@ -349,16 +349,20 @@ function display_cff($atts) {
|
|
349 |
|
350 |
//ALL POSTS
|
351 |
if (!$cff_events_only){
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
|
|
|
|
|
|
|
|
360 |
} else {
|
361 |
-
$posts_json =
|
362 |
}
|
363 |
|
364 |
//Interpret data with JSON
|
@@ -397,6 +401,9 @@ function display_cff($atts) {
|
|
397 |
case 'photo':
|
398 |
if ( $cff_show_photos_type ) $cff_show_post = true;
|
399 |
break;
|
|
|
|
|
|
|
400 |
case 'status':
|
401 |
//Check whether it's a status (author comment or like)
|
402 |
if ( $cff_show_status_type && !empty($news->message) ) $cff_show_post = true;
|
@@ -413,7 +420,6 @@ function display_cff($atts) {
|
|
413 |
//********************************//
|
414 |
//***COMPILE SECTION VARIABLES***//
|
415 |
//********************************//
|
416 |
-
|
417 |
//Set the post link
|
418 |
$link = $news->link;
|
419 |
//Is it a shared album?
|
@@ -435,7 +441,8 @@ function display_cff($atts) {
|
|
435 |
if ($cff_title_link) $cff_post_text .= '<a class="cff-post-text-link" href="'.$link.'" '.$target.'>';
|
436 |
if (!empty($news->story)) $post_text = $news->story;
|
437 |
if (!empty($news->message)) $post_text = $news->message;
|
438 |
-
|
|
|
439 |
//If the text is wrapped in a link then don't hyperlink any text within
|
440 |
if ($cff_title_link) {
|
441 |
//Wrap links in a span so we can break the text if it's too long
|
@@ -451,7 +458,8 @@ function display_cff($atts) {
|
|
451 |
$cff_post_text .= '</' . $cff_title_format . '>';
|
452 |
//DESCRIPTION
|
453 |
$cff_description = '';
|
454 |
-
if (
|
|
|
455 |
$description_text = $news->description;
|
456 |
if (!empty($body_limit)) {
|
457 |
if (strlen($description_text) > $body_limit) $description_text = substr($description_text, 0, $body_limit) . '...';
|
@@ -489,7 +497,7 @@ function display_cff($atts) {
|
|
489 |
$eventID = $url_parts[count($url_parts)-2];
|
490 |
}
|
491 |
//Get the contents of the event using the WP HTTP API
|
492 |
-
$event_json =
|
493 |
//Interpret data with JSON
|
494 |
$event_object = json_decode($event_json);
|
495 |
//Event date
|
@@ -541,6 +549,7 @@ function display_cff($atts) {
|
|
541 |
$link_text = $cff_view_link_text;
|
542 |
}
|
543 |
}
|
|
|
544 |
$cff_link = '<a class="cff-viewpost" href="' . $link . '" title="' . $link_text . '" ' . $target . ' ' . $cff_link_styles . '>' . $link_text . '</a>';
|
545 |
//Compile the meta and link if included
|
546 |
if ($cff_show_meta) $cff_meta_total .= $cff_meta;
|
@@ -583,14 +592,13 @@ function display_cff($atts) {
|
|
583 |
if($cff_show_shared_links) $content .= $cff_shared_link;
|
584 |
//DATE BELOW
|
585 |
if ($cff_show_date && $cff_date_position == 'below') $content .= $cff_date;
|
|
|
|
|
586 |
//VIEW ON FACEBOOK LINK
|
587 |
if($cff_show_link) $content .= $cff_link;
|
588 |
|
589 |
-
//EVENT
|
590 |
-
if($cff_show_event_title || $cff_show_event_details) $content .= $cff_event;
|
591 |
-
|
592 |
//End the post item
|
593 |
-
$content .= '</div><div class="clear"></div>';
|
594 |
} // End post type check
|
595 |
$prev_post_message = $news->message;
|
596 |
$prev_post_link = $news->link;
|
@@ -602,14 +610,14 @@ function display_cff($atts) {
|
|
602 |
//Add the Like Box inside
|
603 |
if ($cff_like_box_position == 'bottom' && $cff_show_like_box && !$cff_like_box_outside) $content .= $like_box;
|
604 |
//End the feed
|
605 |
-
$content .= '</div><div class="clear"></div>';
|
606 |
//Add the Like Box outside
|
607 |
if ($cff_like_box_position == 'bottom' && $cff_show_like_box && $cff_like_box_outside) $content .= $like_box;
|
608 |
//Return our feed HTML to display
|
609 |
return $content;
|
610 |
}
|
611 |
//Get JSON object of feed data
|
612 |
-
function
|
613 |
//Can we use cURL?
|
614 |
if(is_callable('curl_init')){
|
615 |
$ch = curl_init();
|
@@ -636,9 +644,9 @@ function fetchUrl($url){
|
|
636 |
//Make links in text clickable
|
637 |
function cff_make_clickable($text) {
|
638 |
$pattern = '#\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))#';
|
639 |
-
return preg_replace_callback($pattern, '
|
640 |
}
|
641 |
-
function
|
642 |
$max_url_length = 50;
|
643 |
$max_depth_if_over_length = 2;
|
644 |
$ellipsis = '…';
|
@@ -871,6 +879,10 @@ if(!is_callable('stripos')){
|
|
871 |
return strpos($haystack, stristr( $haystack, $needle ));
|
872 |
}
|
873 |
}
|
|
|
|
|
|
|
|
|
874 |
//Enqueue stylesheet
|
875 |
add_action( 'wp_enqueue_scripts', 'cff_add_my_stylesheet' );
|
876 |
function cff_add_my_stylesheet() {
|
@@ -958,6 +970,7 @@ function cff_js() {
|
|
958 |
echo '</script>';
|
959 |
echo "\r\n";
|
960 |
}
|
|
|
961 |
//Comment out the line below to view errors
|
962 |
error_reporting(0);
|
963 |
?>
|
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.3
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
317 |
//Use posts? or feed?
|
318 |
$show_others = $atts['others'];
|
319 |
$graph_query = 'posts';
|
320 |
+
if ($show_others == 'true') $graph_query = 'feed';
|
321 |
$cff_post_limit = $atts['limit'];
|
322 |
//Calculate the cache time in seconds
|
323 |
if($cff_cache_time_unit == 'minutes') $cff_cache_time_unit = 60;
|
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('https://graph.facebook.com/' . $page_id . '/' . $graph_query . '?access_token=' . $access_token . '&limit=' . $cff_post_limit);
|
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('https://graph.facebook.com/' . $page_id . '/' . $graph_query . '?access_token=' . $access_token . '&limit=' . $cff_post_limit);
|
366 |
}
|
367 |
|
368 |
//Interpret data with JSON
|
401 |
case 'photo':
|
402 |
if ( $cff_show_photos_type ) $cff_show_post = true;
|
403 |
break;
|
404 |
+
case 'offer':
|
405 |
+
$cff_show_post = true;
|
406 |
+
break;
|
407 |
case 'status':
|
408 |
//Check whether it's a status (author comment or like)
|
409 |
if ( $cff_show_status_type && !empty($news->message) ) $cff_show_post = true;
|
420 |
//********************************//
|
421 |
//***COMPILE SECTION VARIABLES***//
|
422 |
//********************************//
|
|
|
423 |
//Set the post link
|
424 |
$link = $news->link;
|
425 |
//Is it a shared album?
|
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;
|
444 |
+
//Use the name if neither the story or message are available, or if the post type is an offer
|
445 |
+
if ( (!empty($news->name) && empty($news->story) && empty($news->message)) || $cff_post_type == 'offer') $post_text = $news->name;
|
446 |
//If the text is wrapped in a link then don't hyperlink any text within
|
447 |
if ($cff_title_link) {
|
448 |
//Wrap links in a span so we can break the text if it's too long
|
458 |
$cff_post_text .= '</' . $cff_title_format . '>';
|
459 |
//DESCRIPTION
|
460 |
$cff_description = '';
|
461 |
+
//Use the description if it's available and the post type isn't set to offer (offer description isn't useful)
|
462 |
+
if (!empty($news->description) && $cff_post_type != 'offer') {
|
463 |
$description_text = $news->description;
|
464 |
if (!empty($body_limit)) {
|
465 |
if (strlen($description_text) > $body_limit) $description_text = substr($description_text, 0, $body_limit) . '...';
|
497 |
$eventID = $url_parts[count($url_parts)-2];
|
498 |
}
|
499 |
//Get the contents of the event using the WP HTTP API
|
500 |
+
$event_json = cff_fetchUrl('https://graph.facebook.com/'.$eventID.'?access_token=' . $access_token);
|
501 |
//Interpret data with JSON
|
502 |
$event_object = json_decode($event_json);
|
503 |
//Event date
|
549 |
$link_text = $cff_view_link_text;
|
550 |
}
|
551 |
}
|
552 |
+
if ($cff_post_type == 'offer') $link_text = 'View Offer';
|
553 |
$cff_link = '<a class="cff-viewpost" href="' . $link . '" title="' . $link_text . '" ' . $target . ' ' . $cff_link_styles . '>' . $link_text . '</a>';
|
554 |
//Compile the meta and link if included
|
555 |
if ($cff_show_meta) $cff_meta_total .= $cff_meta;
|
592 |
if($cff_show_shared_links) $content .= $cff_shared_link;
|
593 |
//DATE BELOW
|
594 |
if ($cff_show_date && $cff_date_position == 'below') $content .= $cff_date;
|
595 |
+
//EVENT
|
596 |
+
if($cff_show_event_title || $cff_show_event_details) $content .= $cff_event;
|
597 |
//VIEW ON FACEBOOK LINK
|
598 |
if($cff_show_link) $content .= $cff_link;
|
599 |
|
|
|
|
|
|
|
600 |
//End the post item
|
601 |
+
$content .= '</div><div class="cff-clear"></div>';
|
602 |
} // End post type check
|
603 |
$prev_post_message = $news->message;
|
604 |
$prev_post_link = $news->link;
|
610 |
//Add the Like Box inside
|
611 |
if ($cff_like_box_position == 'bottom' && $cff_show_like_box && !$cff_like_box_outside) $content .= $like_box;
|
612 |
//End the feed
|
613 |
+
$content .= '</div><div class="cff-clear"></div>';
|
614 |
//Add the Like Box outside
|
615 |
if ($cff_like_box_position == 'bottom' && $cff_show_like_box && $cff_like_box_outside) $content .= $like_box;
|
616 |
//Return our feed HTML to display
|
617 |
return $content;
|
618 |
}
|
619 |
//Get JSON object of feed data
|
620 |
+
function cff_fetchUrl($url){
|
621 |
//Can we use cURL?
|
622 |
if(is_callable('curl_init')){
|
623 |
$ch = curl_init();
|
644 |
//Make links in text clickable
|
645 |
function cff_make_clickable($text) {
|
646 |
$pattern = '#\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))#';
|
647 |
+
return preg_replace_callback($pattern, 'cff_auto_link_text_callback', $text);
|
648 |
}
|
649 |
+
function cff_auto_link_text_callback($matches) {
|
650 |
$max_url_length = 50;
|
651 |
$max_depth_if_over_length = 2;
|
652 |
$ellipsis = '…';
|
879 |
return strpos($haystack, stristr( $haystack, $needle ));
|
880 |
}
|
881 |
}
|
882 |
+
|
883 |
+
// remove_filter( 'the_content', 'wpautop' );
|
884 |
+
// add_filter( 'the_content', 'wpautop', 99 );
|
885 |
+
|
886 |
//Enqueue stylesheet
|
887 |
add_action( 'wp_enqueue_scripts', 'cff_add_my_stylesheet' );
|
888 |
function cff_add_my_stylesheet() {
|
970 |
echo '</script>';
|
971 |
echo "\r\n";
|
972 |
}
|
973 |
+
|
974 |
//Comment out the line below to view errors
|
975 |
error_reporting(0);
|
976 |
?>
|
js/cff-scripts.js
CHANGED
@@ -1,17 +1,22 @@
|
|
1 |
jQuery(document).ready(function() {
|
2 |
-
|
3 |
-
//Wpautop fix
|
4 |
-
if( jQuery('.cff-viewpost').parent('p').length ){
|
5 |
-
jQuery('.cff-viewpost').unwrap('p');
|
6 |
-
}
|
7 |
-
if( jQuery('#cff .link').parent('p').length ){
|
8 |
-
jQuery('#cff .link').unwrap('p');
|
9 |
-
}
|
10 |
|
11 |
jQuery('#cff .cff-item').each(function(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
//Expand post
|
13 |
-
var
|
14 |
-
expanded = false,
|
15 |
$post_text = $self.find('.cff-post-text .text'),
|
16 |
text_limit = $self.closest('#cff').attr('rel');
|
17 |
if (typeof text_limit === 'undefined' || text_limit == '') text_limit = 99999;
|
@@ -45,5 +50,4 @@ jQuery(document).ready(function() {
|
|
45 |
}
|
46 |
});
|
47 |
});
|
48 |
-
|
49 |
});
|
1 |
jQuery(document).ready(function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
jQuery('#cff .cff-item').each(function(){
|
4 |
+
var $self = jQuery(this);
|
5 |
+
|
6 |
+
//Wpautop fix
|
7 |
+
if( $self.find('.cff-viewpost').parent('p').length ){
|
8 |
+
$self.find('.cff-viewpost').unwrap('p');
|
9 |
+
}
|
10 |
+
if( $self.find('.cff-author').parent('p').length ){
|
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;
|
50 |
}
|
51 |
});
|
52 |
});
|
|
|
53 |
});
|