Version Description
- New: Added background and border styling options to shared links
- Tweak: Reduced the clickable area of the post author
- Tweak: Added a 'Customize' tab to the Settings page
- Fix: Fixed an issue with post tag linking not working correctly in some languages
- Fix: Fixed an issue with line breaks not being respected in IE8
Download this release
Release Info
Developer | smashballoon |
Plugin | Custom Facebook Feed |
Version | 1.9.4 |
Comparing to | |
See all releases |
Code changes from version 1.9.3 to 1.9.4
- README.txt +39 -32
- css/cff-style.css +19 -2
- custom-facebook-feed-admin.php +202 -118
- custom-facebook-feed.php +99 -43
- img/layout-full.png +0 -0
- img/layout-half.png +0 -0
- img/layout-thumb.png +0 -0
- js/cff-scripts.js +6 -0
README.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: smashballoon
|
|
3 |
Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook events, Facebook page, Facebook group, Facebook Like box, Customizable Facebook Feed, custom, customizable, seo, responsive, mobile, social
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.9
|
6 |
-
Stable tag: 1.9.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -269,12 +269,19 @@ Credit [iMarketing Factory](http://www.imarketingfactory.com/facebook/ "The Impo
|
|
269 |
9. It's super easy to display your Facebook feed in any page or post
|
270 |
|
271 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
|
273 |
= 1.9.2 =
|
274 |
-
* Fix: Added title and alt attributes to the post author profile picture
|
275 |
* Fix: Improved the reliability of the post tag linking
|
276 |
* Fix: Fixed an issue with HTML characters not rendering correctly when linking the post text
|
277 |
* Fix: Improved the reliability of the CSS clearing method used on the feed container
|
|
|
278 |
|
279 |
= 1.9.1 =
|
280 |
* Fix: Fixed an issue with the 'textlink' shortcode option
|
@@ -284,10 +291,10 @@ Credit [iMarketing Factory](http://www.imarketingfactory.com/facebook/ "The Impo
|
|
284 |
= 1.9.0 =
|
285 |
* New: Added the ability to change the text size and color of the post author
|
286 |
* New: Define the format, size and color of shared link titles
|
287 |
-
* New: You can now define the color of the links in your post text, descriptions and events
|
288 |
* Tweak: Moved the Feed Header options to the Typography page
|
289 |
* Tweak: Moved the Ajax setting to the Misc page
|
290 |
-
* Tweak: Now removes any query strings attached to the Page ID
|
291 |
* Fix: Fixed an issue with some themes causing the clear element to prevent links being clickable
|
292 |
* Fix: Some minor bug fixes
|
293 |
|
@@ -309,33 +316,33 @@ Credit [iMarketing Factory](http://www.imarketingfactory.com/facebook/ "The Impo
|
|
309 |
= 1.8.0 =
|
310 |
* New: Added a built-in color picker
|
311 |
* New: Added class to posts based on the author to allow for independent styling
|
312 |
-
* Tweak: Now loads the author
|
313 |
-
* Tweak: Now automatically set the post limit based on the number of posts to be displayed
|
314 |
-
* Tweak: Core improvements to the way posts are output
|
315 |
* Tweak: Changed 'Layout & Style' page name to 'Customize'
|
316 |
* Tweak: Moved the Support information to a tab on the Settings page
|
317 |
* Tweak: Improved the 'Test connection to Facebook API' function
|
318 |
-
* Fix: Encode URLs so that they pass HTML validation
|
319 |
-
* Fix: Fixed an issue with post captions not displaying under some circumstances
|
320 |
-
* Fix: More robust method for stripping the URL when user enters Facebook page URL instead of their Page ID
|
321 |
|
322 |
= 1.7.2 =
|
323 |
* Tweak: Moved the 'Show post author' option from the General settings tab to the Post Layout tab
|
324 |
* Tweak: Added the ability to show or hide the author to the 'include' shortcode option
|
325 |
* Fix: Added CSS box-sizing property to feed header so that padding doesn't increase its width
|
326 |
* Fix: Fixed showheader=false and headeroutside=false shortcode options
|
327 |
-
* Fix: Now allows users to enter their Facebook page URL as their Page ID
|
328 |
|
329 |
= 1.7.0 =
|
330 |
* New: Added ability to add a customizable header to your feed
|
331 |
* New: Added a Custom JavaScript section to allow you to add your own JS or jQuery functionality to the feed
|
332 |
* New: Added a 'Custom Text / Translate' tab to house all customizable text
|
333 |
-
* New: You can now choose to show posts only by other people on your page
|
334 |
* New: Set your timezone so that dates/times are displayed in your local time
|
335 |
-
* New: When a post contains a link to multiple images it now states the number of photos after the post text and links to the album
|
336 |
* Tweak: Plugin now detects whether the page is using SSL and pulls https resources
|
337 |
* Tweak: Added a button to test the connection to Facebook's API for easier troubleshooting
|
338 |
-
* Fix: Now using HTML encoding to parse any raw HTML tags in the post text or descriptions
|
339 |
* Fix: Added a protocol to the beginning of links which don't include one
|
340 |
* Fix: Fixed date width issue in IE7
|
341 |
* Fix: Removed stray PHP notices
|
@@ -346,47 +353,47 @@ Credit [iMarketing Factory](http://www.imarketingfactory.com/facebook/ "The Impo
|
|
346 |
|
347 |
= 1.6.8.1 =
|
348 |
* Tweak: Moved 'View on Facebook' link up to be level with the date rather than on the line below it
|
349 |
-
* Fix: Don't show the caption when it is the same as the post text
|
350 |
* Fix: Fixed issue with enqueueing JavaScript file
|
351 |
|
352 |
= 1.6.8 =
|
353 |
-
* New: Added option to remove border from the Like box when showing faces
|
354 |
-
* New: Set "Like" box text color to either blue or white
|
355 |
* Tweak: Moved descripion below video or link title and added link source
|
356 |
* Tweak: Added ability to manually translate the '2 weeks ago' text
|
357 |
* Tweak: Replaced 'View Link' with 'View on Facebook' so that shared links now link to the Facebook post
|
358 |
-
* Tweak: "Like" box is now responsive
|
359 |
-
* Tweak: Displays post caption if no description is available
|
360 |
-
* Tweak: Vertically center multi-line author names rather than bumping them down below the
|
361 |
* Tweak: Checks whether the Access Token is inputted in the correct format
|
362 |
* Fix: Fixed bug in the 'Show posts on my page by others' option
|
363 |
-
* Fix: If displaying a group then automatically hides the "Like" box
|
364 |
* Fix: 'others=false' shortcode option now working correctly
|
365 |
-
* Fix: Strip any white space characters from beginning or end of Access Token and Page ID
|
366 |
|
367 |
= 1.6.7.1 =
|
368 |
-
* Fix: Fixed a bug in 1.6.7 which was causing an issue displaying the feed in some circumstances
|
369 |
|
370 |
= 1.6.7 =
|
371 |
-
* New: Your feed can now be completely displayed in any language - added i18n support for date translation
|
372 |
* Tweak: Improved documentation within the plugin
|
373 |
-
* Tweak: Changed order of methods used to retrieve feed data
|
374 |
|
375 |
= 1.6.6.3 =
|
376 |
-
* New: Added support for group events
|
377 |
|
378 |
= 1.6.6.1 =
|
379 |
* Fix: Resolved jQuery UI draggable bug which was causing issues with drag and drop
|
380 |
|
381 |
= 1.6.6 =
|
382 |
-
* New: Now works with groups
|
383 |
* Fix: Fixed an issue with the 'Show posts by others' option not working correctly in the previous version
|
384 |
|
385 |
= 1.6.4 =
|
386 |
* New: Added localization support. Full support for various languages coming soon
|
387 |
-
* New: Added CSS classes to different post types to allow for different styling based on post type
|
388 |
-
* New: Option to link statuses to either the status post itself or the directly to the page/timeline
|
389 |
-
* New: Added option to add thumbnail faces of fans to the Like box and define a width
|
390 |
* Tweak: Added separate classes to 'View on Facebook' and 'View Link' links so that they can be targeted with CSS
|
391 |
* Tweak: Prefixed every CSS class to prevent styling conflicts with theme stylesheets. Please note that if you used custom CSS to style parts of the feed that the CSS classes are now prefixed with 'cff-' to prevent theme conflicts. Eg. '.more' is now '.cff-more'.
|
392 |
|
@@ -400,8 +407,8 @@ Credit [iMarketing Factory](http://www.imarketingfactory.com/facebook/ "The Impo
|
|
400 |
* New: Define your own caching time. Check for new Facebook posts every few seconds, minutes, hours or days. You decide.
|
401 |
* New: Define your own custom text for the 'See More' and 'See Less' buttons
|
402 |
* New: Add your own CSS class to your Custom Facebook Feeds
|
403 |
-
* New: Define a post limit which is higher or lower than the default 25
|
404 |
-
* New: Include the Like box inside or outside of the Facebook feed's container
|
405 |
* New: Customize the Facebook event date independently
|
406 |
* New: Improved layout of admin pages for easier navigation and customization
|
407 |
* Fix: Provided a fix for the Facebook API duplicate post bug
|
3 |
Tags: Facebook, Facebook feed, Facebook posts, Facebook wall, Facebook events, Facebook page, Facebook group, Facebook Like box, Customizable Facebook Feed, custom, customizable, seo, responsive, mobile, social
|
4 |
Requires at least: 3.0
|
5 |
Tested up to: 3.9
|
6 |
+
Stable tag: 1.9.4
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
269 |
9. It's super easy to display your Facebook feed in any page or post
|
270 |
|
271 |
== Changelog ==
|
272 |
+
= 1.9.4 =
|
273 |
+
* New: Added background and border styling options to shared links
|
274 |
+
* Tweak: Reduced the clickable area of the post author
|
275 |
+
* Tweak: Added a 'Customize' tab to the Settings page
|
276 |
+
* Fix: Fixed an issue with post tag linking not working correctly in some languages
|
277 |
+
* Fix: Fixed an issue with line breaks not being respected in IE8
|
278 |
|
279 |
= 1.9.2 =
|
280 |
+
* Fix: Added title and alt attributes to the post author's Facebook profile picture
|
281 |
* Fix: Improved the reliability of the post tag linking
|
282 |
* Fix: Fixed an issue with HTML characters not rendering correctly when linking the post text
|
283 |
* Fix: Improved the reliability of the CSS clearing method used on the feed container
|
284 |
+
* Compatible with WordPress 3.9
|
285 |
|
286 |
= 1.9.1 =
|
287 |
* Fix: Fixed an issue with the 'textlink' shortcode option
|
291 |
= 1.9.0 =
|
292 |
* New: Added the ability to change the text size and color of the post author
|
293 |
* New: Define the format, size and color of shared link titles
|
294 |
+
* New: You can now define the color of the links in your post text, descriptions and Facebook events
|
295 |
* Tweak: Moved the Feed Header options to the Typography page
|
296 |
* Tweak: Moved the Ajax setting to the Misc page
|
297 |
+
* Tweak: Now removes any query strings attached to the Facebook Page ID
|
298 |
* Fix: Fixed an issue with some themes causing the clear element to prevent links being clickable
|
299 |
* Fix: Some minor bug fixes
|
300 |
|
316 |
= 1.8.0 =
|
317 |
* New: Added a built-in color picker
|
318 |
* New: Added class to posts based on the author to allow for independent styling
|
319 |
+
* Tweak: Now loads the author's Facebook profile picture in using JavaScript to help speed up load times
|
320 |
+
* Tweak: Now automatically set the Facebook post limit based on the number of Facebook posts to be displayed
|
321 |
+
* Tweak: Core improvements to the way Facebook posts are output
|
322 |
* Tweak: Changed 'Layout & Style' page name to 'Customize'
|
323 |
* Tweak: Moved the Support information to a tab on the Settings page
|
324 |
* Tweak: Improved the 'Test connection to Facebook API' function
|
325 |
+
* Fix: Encode Facebook URLs so that they pass HTML validation
|
326 |
+
* Fix: Fixed an issue with Facebook post captions not displaying under some circumstances
|
327 |
+
* Fix: More robust method for stripping the URL when a user enters Facebook page URL instead of their Facebook Page ID
|
328 |
|
329 |
= 1.7.2 =
|
330 |
* Tweak: Moved the 'Show post author' option from the General settings tab to the Post Layout tab
|
331 |
* Tweak: Added the ability to show or hide the author to the 'include' shortcode option
|
332 |
* Fix: Added CSS box-sizing property to feed header so that padding doesn't increase its width
|
333 |
* Fix: Fixed showheader=false and headeroutside=false shortcode options
|
334 |
+
* Fix: Now allows users to enter their Facebook page URL as their Facebook Page ID
|
335 |
|
336 |
= 1.7.0 =
|
337 |
* New: Added ability to add a customizable header to your feed
|
338 |
* New: Added a Custom JavaScript section to allow you to add your own JS or jQuery functionality to the feed
|
339 |
* New: Added a 'Custom Text / Translate' tab to house all customizable text
|
340 |
+
* New: You can now choose to show posts only by other people on your Facebook page
|
341 |
* New: Set your timezone so that dates/times are displayed in your local time
|
342 |
+
* New: When a Facebook post contains a link to multiple images it now states the number of photos after the post text and links to the Facebook album
|
343 |
* Tweak: Plugin now detects whether the page is using SSL and pulls https resources
|
344 |
* Tweak: Added a button to test the connection to Facebook's API for easier troubleshooting
|
345 |
+
* Fix: Now using HTML encoding to parse any raw HTML tags in the Facebook post text or descriptions
|
346 |
* Fix: Added a protocol to the beginning of links which don't include one
|
347 |
* Fix: Fixed date width issue in IE7
|
348 |
* Fix: Removed stray PHP notices
|
353 |
|
354 |
= 1.6.8.1 =
|
355 |
* Tweak: Moved 'View on Facebook' link up to be level with the date rather than on the line below it
|
356 |
+
* Fix: Don't show the caption when it is the same as the Facebook post text
|
357 |
* Fix: Fixed issue with enqueueing JavaScript file
|
358 |
|
359 |
= 1.6.8 =
|
360 |
+
* New: Added option to remove border from the Facebook Like box when showing faces
|
361 |
+
* New: Set Facebook "Like" box text color to either blue or white
|
362 |
* Tweak: Moved descripion below video or link title and added link source
|
363 |
* Tweak: Added ability to manually translate the '2 weeks ago' text
|
364 |
* Tweak: Replaced 'View Link' with 'View on Facebook' so that shared links now link to the Facebook post
|
365 |
+
* Tweak: Facebook "Like" box is now responsive
|
366 |
+
* Tweak: Displays Facebook post caption if no description is available
|
367 |
+
* Tweak: Vertically center multi-line author names rather than bumping them down below the Facebook profile picture
|
368 |
* Tweak: Checks whether the Access Token is inputted in the correct format
|
369 |
* Fix: Fixed bug in the 'Show posts on my page by others' option
|
370 |
+
* Fix: If displaying a Facebook group then automatically hides the Facebook "Like" box
|
371 |
* Fix: 'others=false' shortcode option now working correctly
|
372 |
+
* Fix: Strip any white space characters from beginning or end of Access Token and Facebook Page ID
|
373 |
|
374 |
= 1.6.7.1 =
|
375 |
+
* Fix: Fixed a bug in 1.6.7 which was causing an issue displaying the Facebook feed in some circumstances
|
376 |
|
377 |
= 1.6.7 =
|
378 |
+
* New: Your Facebook feed can now be completely displayed in any language - added i18n support for date translation
|
379 |
* Tweak: Improved documentation within the plugin
|
380 |
+
* Tweak: Changed order of methods used to retrieve Facebook feed data
|
381 |
|
382 |
= 1.6.6.3 =
|
383 |
+
* New: Added support for Facebook group events
|
384 |
|
385 |
= 1.6.6.1 =
|
386 |
* Fix: Resolved jQuery UI draggable bug which was causing issues with drag and drop
|
387 |
|
388 |
= 1.6.6 =
|
389 |
+
* New: Now works with Facebook groups
|
390 |
* Fix: Fixed an issue with the 'Show posts by others' option not working correctly in the previous version
|
391 |
|
392 |
= 1.6.4 =
|
393 |
* New: Added localization support. Full support for various languages coming soon
|
394 |
+
* New: Added CSS classes to different Facebook post types to allow for different styling based on post type
|
395 |
+
* New: Option to link statuses to either the status post itself or the directly to the Facebook page/timeline
|
396 |
+
* New: Added option to add thumbnail faces of fans to the Facebook Like box and define a width
|
397 |
* Tweak: Added separate classes to 'View on Facebook' and 'View Link' links so that they can be targeted with CSS
|
398 |
* Tweak: Prefixed every CSS class to prevent styling conflicts with theme stylesheets. Please note that if you used custom CSS to style parts of the feed that the CSS classes are now prefixed with 'cff-' to prevent theme conflicts. Eg. '.more' is now '.cff-more'.
|
399 |
|
407 |
* New: Define your own caching time. Check for new Facebook posts every few seconds, minutes, hours or days. You decide.
|
408 |
* New: Define your own custom text for the 'See More' and 'See Less' buttons
|
409 |
* New: Add your own CSS class to your Custom Facebook Feeds
|
410 |
+
* New: Define a Facebook post limit which is higher or lower than the default 25
|
411 |
+
* New: Include the Facebook Like box inside or outside of the Facebook feed's container
|
412 |
* New: Customize the Facebook event date independently
|
413 |
* New: Improved layout of admin pages for easier navigation and customization
|
414 |
* Fix: Provided a fix for the Facebook API duplicate post bug
|
css/cff-style.css
CHANGED
@@ -86,11 +86,15 @@
|
|
86 |
#cff .cff-author{
|
87 |
float: left;
|
88 |
clear: both;
|
89 |
-
display: block;
|
90 |
margin-bottom: 15px;
|
91 |
line-height: 1.2;
|
92 |
width: 100%;
|
93 |
}
|
|
|
|
|
|
|
|
|
|
|
94 |
#cff .cff-author img{
|
95 |
float: left;
|
96 |
margin-right: 15px;
|
@@ -124,6 +128,19 @@
|
|
124 |
float: left;
|
125 |
clear: both;
|
126 |
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
}
|
128 |
#cff .cff-link{
|
129 |
float: left;
|
@@ -202,7 +219,7 @@
|
|
202 |
.cff-likebox{
|
203 |
float: left;
|
204 |
width: 100%;
|
205 |
-
|
206 |
|
207 |
position: relative;
|
208 |
}
|
86 |
#cff .cff-author{
|
87 |
float: left;
|
88 |
clear: both;
|
|
|
89 |
margin-bottom: 15px;
|
90 |
line-height: 1.2;
|
91 |
width: 100%;
|
92 |
}
|
93 |
+
#cff .cff-author a{
|
94 |
+
float: left;
|
95 |
+
display: block;
|
96 |
+
min-width: 100%\9;
|
97 |
+
}
|
98 |
#cff .cff-author img{
|
99 |
float: left;
|
100 |
margin-right: 15px;
|
128 |
float: left;
|
129 |
clear: both;
|
130 |
width: 100%;
|
131 |
+
padding: 8px;
|
132 |
+
margin: 10px 0 5px 0;
|
133 |
+
background: rgba(0,0,0,0.02);
|
134 |
+
border: 1px solid rgba(0,0,0,0.07);
|
135 |
+
|
136 |
+
-webkit-box-sizing: border-box;
|
137 |
+
-moz-box-sizing: border-box;
|
138 |
+
box-sizing: border-box;
|
139 |
+
}
|
140 |
+
#cff .cff-no-styles{
|
141 |
+
background: none;
|
142 |
+
border: none;
|
143 |
+
padding: 0;
|
144 |
}
|
145 |
#cff .cff-link{
|
146 |
float: left;
|
219 |
.cff-likebox{
|
220 |
float: left;
|
221 |
width: 100%;
|
222 |
+
margin-left: -10px;
|
223 |
|
224 |
position: relative;
|
225 |
}
|
custom-facebook-feed-admin.php
CHANGED
@@ -114,7 +114,8 @@ function cff_settings_page() {
|
|
114 |
?>
|
115 |
<h2 class="nav-tab-wrapper">
|
116 |
<a href="?page=cff-top&tab=configuration" class="nav-tab <?php echo $active_tab == 'configuration' ? 'nav-tab-active' : ''; ?>"><?php _e('Configuration'); ?></a>
|
117 |
-
|
|
|
118 |
</h2>
|
119 |
|
120 |
<?php if( $active_tab == 'configuration' ) { //Start Extensions tab ?>
|
@@ -364,18 +365,10 @@ function cff_settings_page() {
|
|
364 |
|
365 |
<?php } ?>
|
366 |
|
367 |
-
|
368 |
-
<?php
|
369 |
-
|
370 |
-
//
|
371 |
-
function cff_style_page() {
|
372 |
-
//Declare variables for fields
|
373 |
-
$style_hidden_field_name = 'cff_style_submit_hidden';
|
374 |
-
$style_general_hidden_field_name = 'cff_style_general_submit_hidden';
|
375 |
-
$style_post_layout_hidden_field_name = 'cff_style_post_layout_submit_hidden';
|
376 |
-
$style_typography_hidden_field_name = 'cff_style_typography_submit_hidden';
|
377 |
-
$style_misc_hidden_field_name = 'cff_style_misc_submit_hidden';
|
378 |
-
$style_custom_text_hidden_field_name = 'cff_style_custom_text_submit_hidden';
|
379 |
$defaults = array(
|
380 |
//Post types
|
381 |
'cff_show_links_type' => true,
|
@@ -409,6 +402,9 @@ function cff_style_page() {
|
|
409 |
'cff_link_title_size' => 'inherit',
|
410 |
'cff_link_title_color' => '',
|
411 |
'cff_link_url_color' => '',
|
|
|
|
|
|
|
412 |
//Event title
|
413 |
'cff_event_title_format' => 'p',
|
414 |
'cff_event_title_size' => 'inherit',
|
@@ -522,6 +518,23 @@ function cff_style_page() {
|
|
522 |
$options = wp_parse_args(get_option('cff_style_settings'), $defaults);
|
523 |
add_option( 'cff_style_settings', $options );
|
524 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
525 |
//Set the page variables
|
526 |
//Post types
|
527 |
$cff_show_links_type = $options[ 'cff_show_links_type' ];
|
@@ -557,6 +570,10 @@ function cff_style_page() {
|
|
557 |
$cff_link_title_size = $options[ 'cff_link_title_size' ];
|
558 |
$cff_link_title_color = $options[ 'cff_link_title_color' ];
|
559 |
$cff_link_url_color = $options[ 'cff_link_url_color' ];
|
|
|
|
|
|
|
|
|
560 |
//Event title
|
561 |
$cff_event_title_format = $options[ 'cff_event_title_format' ];
|
562 |
$cff_event_title_size = $options[ 'cff_event_title_size' ];
|
@@ -767,11 +784,13 @@ function cff_style_page() {
|
|
767 |
$cff_body_size = $_POST[ 'cff_body_size' ];
|
768 |
if (isset($_POST[ 'cff_body_weight' ]) ) $cff_body_weight = $_POST[ 'cff_body_weight' ];
|
769 |
if (isset($_POST[ 'cff_body_color' ]) ) $cff_body_color = $_POST[ 'cff_body_color' ];
|
770 |
-
|
771 |
if (isset($_POST[ 'cff_link_title_format' ]) ) $cff_link_title_format = $_POST[ 'cff_link_title_format' ];
|
772 |
if (isset($_POST[ 'cff_link_title_size' ]) ) $cff_link_title_size = $_POST[ 'cff_link_title_size' ];
|
773 |
if (isset($_POST[ 'cff_link_title_color' ]) ) $cff_link_title_color = $_POST[ 'cff_link_title_color' ];
|
774 |
if (isset($_POST[ 'cff_link_url_color' ]) ) $cff_link_url_color = $_POST[ 'cff_link_url_color' ];
|
|
|
|
|
|
|
775 |
|
776 |
//Event title
|
777 |
if (isset($_POST[ 'cff_event_title_format' ]) ) $cff_event_title_format = $_POST[ 'cff_event_title_format' ];
|
@@ -860,6 +879,10 @@ function cff_style_page() {
|
|
860 |
$options[ 'cff_link_title_size' ] = $cff_link_title_size;
|
861 |
$options[ 'cff_link_title_color' ] = $cff_link_title_color;
|
862 |
$options[ 'cff_link_url_color' ] = $cff_link_url_color;
|
|
|
|
|
|
|
|
|
863 |
//Event title
|
864 |
$options[ 'cff_event_title_format' ] = $cff_event_title_format;
|
865 |
$options[ 'cff_event_title_size' ] = $cff_event_title_size;
|
@@ -1165,6 +1188,30 @@ function cff_style_page() {
|
|
1165 |
</div>
|
1166 |
</div>
|
1167 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1168 |
<hr />
|
1169 |
<h3><?php _e('Show/Hide'); ?></h3>
|
1170 |
<table class="form-table">
|
@@ -1505,117 +1552,70 @@ function cff_style_page() {
|
|
1505 |
</table>
|
1506 |
</div>
|
1507 |
</div>
|
|
|
|
|
1508 |
<div id="adminform" class="postbox" style="display: block;">
|
1509 |
<div class="handlediv" title="Click to toggle"><br></div>
|
1510 |
<h3 class="hndle"><span><?php _e('Link, Photo and Video Description'); ?></span></h3>
|
1511 |
<div class="inside">
|
1512 |
<table class="form-table">
|
1513 |
<tbody>
|
1514 |
-
|
1515 |
-
|
1516 |
-
|
1517 |
-
|
1518 |
-
|
1519 |
-
</
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
</td>
|
1562 |
-
</tr>
|
1563 |
-
<tr>
|
1564 |
-
<th><label for="cff_link_title_format" class="bump-left"><?php _e('Shared Link Title Format'); ?></label></th>
|
1565 |
-
<td>
|
1566 |
-
<select name="cff_link_title_format">
|
1567 |
-
<option value="p" <?php if($cff_link_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
|
1568 |
-
<option value="h3" <?php if($cff_link_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
|
1569 |
-
<option value="h4" <?php if($cff_link_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
|
1570 |
-
<option value="h5" <?php if($cff_link_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
|
1571 |
-
<option value="h6" <?php if($cff_link_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
|
1572 |
-
</select>
|
1573 |
-
</td>
|
1574 |
-
</tr>
|
1575 |
-
<tr>
|
1576 |
-
<th><label for="cff_link_title_size" class="bump-left"><?php _e('Shared Link Title Size'); ?></label></th>
|
1577 |
-
<td>
|
1578 |
-
<select name="cff_link_title_size">
|
1579 |
-
<option value="inherit" <?php if($cff_link_title_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1580 |
-
<option value="10" <?php if($cff_link_title_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1581 |
-
<option value="11" <?php if($cff_link_title_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1582 |
-
<option value="12" <?php if($cff_link_title_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1583 |
-
<option value="13" <?php if($cff_link_title_size == "13") echo 'selected="selected"' ?> >13px</option>
|
1584 |
-
<option value="14" <?php if($cff_link_title_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1585 |
-
<option value="16" <?php if($cff_link_title_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1586 |
-
<option value="18" <?php if($cff_link_title_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1587 |
-
<option value="20" <?php if($cff_link_title_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1588 |
-
<option value="24" <?php if($cff_link_title_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1589 |
-
<option value="28" <?php if($cff_link_title_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1590 |
-
<option value="32" <?php if($cff_link_title_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1591 |
-
<option value="36" <?php if($cff_link_title_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1592 |
-
<option value="42" <?php if($cff_link_title_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1593 |
-
<option value="48" <?php if($cff_link_title_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1594 |
-
<option value="54" <?php if($cff_link_title_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1595 |
-
<option value="60" <?php if($cff_link_title_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1596 |
-
</select>
|
1597 |
-
</td>
|
1598 |
-
</tr>
|
1599 |
-
<tr>
|
1600 |
-
<th><label for="cff_link_title_color" class="bump-left"><?php _e('Shared Link Title Color'); ?></label></th>
|
1601 |
-
<td>
|
1602 |
-
<input name="cff_link_title_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_title_color) ); ?>" class="cff-colorpicker" />
|
1603 |
-
</td>
|
1604 |
-
</tr>
|
1605 |
-
<tr>
|
1606 |
-
<th><label for="cff_link_url_color" class="bump-left"><?php _e('Shared Link URL Color'); ?></label></th>
|
1607 |
-
<td>
|
1608 |
-
<input name="cff_link_url_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_url_color) ); ?>" class="cff-colorpicker" />
|
1609 |
-
</td>
|
1610 |
-
</tr>
|
1611 |
-
|
1612 |
</tbody>
|
1613 |
</table>
|
1614 |
</div>
|
1615 |
</div>
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
|
|
|
|
1619 |
<div id="adminform" class="postbox" style="display: block;">
|
1620 |
<div class="handlediv" title="Click to toggle"><br></div>
|
1621 |
<h3 class="hndle"><span><?php _e('Post Date'); ?></span></h3>
|
@@ -1810,6 +1810,92 @@ function cff_style_page() {
|
|
1810 |
</table>
|
1811 |
</div>
|
1812 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1813 |
<div id="adminform" class="postbox" style="display: block;">
|
1814 |
<div class="handlediv" title="Click to toggle"><br></div>
|
1815 |
<h3 class="hndle"><span><?php _e('Event Title'); ?></span></h3>
|
@@ -1878,9 +1964,7 @@ function cff_style_page() {
|
|
1878 |
</table>
|
1879 |
</div>
|
1880 |
</div>
|
1881 |
-
|
1882 |
-
<?php submit_button(); ?>
|
1883 |
-
</div>
|
1884 |
<div id="adminform" class="postbox" style="display: block;">
|
1885 |
<div class="handlediv" title="Click to toggle"><br></div>
|
1886 |
<h3 class="hndle"><span><?php _e('Event Date'); ?></span></h3>
|
114 |
?>
|
115 |
<h2 class="nav-tab-wrapper">
|
116 |
<a href="?page=cff-top&tab=configuration" class="nav-tab <?php echo $active_tab == 'configuration' ? 'nav-tab-active' : ''; ?>"><?php _e('Configuration'); ?></a>
|
117 |
+
<a href="?page=cff-style" class="nav-tab <?php echo $active_tab == 'support' ? 'nav-tab-active' : ''; ?>"><?php _e('Customize'); ?></a>
|
118 |
+
<a href="?page=cff-top&tab=support" class="nav-tab <?php echo $active_tab == 'support' ? 'nav-tab-active' : ''; ?>"><?php _e('Support'); ?></a>
|
119 |
</h2>
|
120 |
|
121 |
<?php if( $active_tab == 'configuration' ) { //Start Extensions tab ?>
|
365 |
|
366 |
<?php } ?>
|
367 |
|
368 |
+
|
369 |
+
<?php
|
370 |
+
|
371 |
+
//Defaults need to be here on the Settings page so that they're saved when the initial settings are saved
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
$defaults = array(
|
373 |
//Post types
|
374 |
'cff_show_links_type' => true,
|
402 |
'cff_link_title_size' => 'inherit',
|
403 |
'cff_link_title_color' => '',
|
404 |
'cff_link_url_color' => '',
|
405 |
+
'cff_link_bg_color' => '',
|
406 |
+
'cff_link_border_color' => '',
|
407 |
+
'cff_disable_link_box' => '',
|
408 |
//Event title
|
409 |
'cff_event_title_format' => 'p',
|
410 |
'cff_event_title_size' => 'inherit',
|
518 |
$options = wp_parse_args(get_option('cff_style_settings'), $defaults);
|
519 |
add_option( 'cff_style_settings', $options );
|
520 |
|
521 |
+
?>
|
522 |
+
|
523 |
+
|
524 |
+
<?php
|
525 |
+
} //End Settings_Page
|
526 |
+
//Create Style page
|
527 |
+
function cff_style_page() {
|
528 |
+
//Declare variables for fields
|
529 |
+
$style_hidden_field_name = 'cff_style_submit_hidden';
|
530 |
+
$style_general_hidden_field_name = 'cff_style_general_submit_hidden';
|
531 |
+
$style_post_layout_hidden_field_name = 'cff_style_post_layout_submit_hidden';
|
532 |
+
$style_typography_hidden_field_name = 'cff_style_typography_submit_hidden';
|
533 |
+
$style_misc_hidden_field_name = 'cff_style_misc_submit_hidden';
|
534 |
+
$style_custom_text_hidden_field_name = 'cff_style_custom_text_submit_hidden';
|
535 |
+
|
536 |
+
$options = get_option('cff_style_settings');
|
537 |
+
|
538 |
//Set the page variables
|
539 |
//Post types
|
540 |
$cff_show_links_type = $options[ 'cff_show_links_type' ];
|
570 |
$cff_link_title_size = $options[ 'cff_link_title_size' ];
|
571 |
$cff_link_title_color = $options[ 'cff_link_title_color' ];
|
572 |
$cff_link_url_color = $options[ 'cff_link_url_color' ];
|
573 |
+
$cff_link_bg_color = $options[ 'cff_link_bg_color' ];
|
574 |
+
$cff_link_border_color = $options[ 'cff_link_border_color' ];
|
575 |
+
$cff_disable_link_box = $options[ 'cff_disable_link_box' ];
|
576 |
+
|
577 |
//Event title
|
578 |
$cff_event_title_format = $options[ 'cff_event_title_format' ];
|
579 |
$cff_event_title_size = $options[ 'cff_event_title_size' ];
|
784 |
$cff_body_size = $_POST[ 'cff_body_size' ];
|
785 |
if (isset($_POST[ 'cff_body_weight' ]) ) $cff_body_weight = $_POST[ 'cff_body_weight' ];
|
786 |
if (isset($_POST[ 'cff_body_color' ]) ) $cff_body_color = $_POST[ 'cff_body_color' ];
|
|
|
787 |
if (isset($_POST[ 'cff_link_title_format' ]) ) $cff_link_title_format = $_POST[ 'cff_link_title_format' ];
|
788 |
if (isset($_POST[ 'cff_link_title_size' ]) ) $cff_link_title_size = $_POST[ 'cff_link_title_size' ];
|
789 |
if (isset($_POST[ 'cff_link_title_color' ]) ) $cff_link_title_color = $_POST[ 'cff_link_title_color' ];
|
790 |
if (isset($_POST[ 'cff_link_url_color' ]) ) $cff_link_url_color = $_POST[ 'cff_link_url_color' ];
|
791 |
+
if (isset($_POST[ 'cff_link_bg_color' ]) ) $cff_link_bg_color = $_POST[ 'cff_link_bg_color' ];
|
792 |
+
if (isset($_POST[ 'cff_link_border_color' ]) ) $cff_link_border_color = $_POST[ 'cff_link_border_color' ];
|
793 |
+
$cff_disable_link_box = $_POST[ 'cff_disable_link_box' ];
|
794 |
|
795 |
//Event title
|
796 |
if (isset($_POST[ 'cff_event_title_format' ]) ) $cff_event_title_format = $_POST[ 'cff_event_title_format' ];
|
879 |
$options[ 'cff_link_title_size' ] = $cff_link_title_size;
|
880 |
$options[ 'cff_link_title_color' ] = $cff_link_title_color;
|
881 |
$options[ 'cff_link_url_color' ] = $cff_link_url_color;
|
882 |
+
$options[ 'cff_link_bg_color' ] = $cff_link_bg_color;
|
883 |
+
$options[ 'cff_link_border_color' ] = $cff_link_border_color;
|
884 |
+
$options[ 'cff_disable_link_box' ] = $cff_disable_link_box;
|
885 |
+
|
886 |
//Event title
|
887 |
$options[ 'cff_event_title_format' ] = $cff_event_title_format;
|
888 |
$options[ 'cff_event_title_size' ] = $cff_event_title_size;
|
1188 |
</div>
|
1189 |
</div>
|
1190 |
|
1191 |
+
<table class="form-table cff-disabled">
|
1192 |
+
<tbody>
|
1193 |
+
<tr class="cff-media-position">
|
1194 |
+
<th><label for="cff_media_position" class="bump-left"><?php _e('Photo/Video Position'); ?></label></th>
|
1195 |
+
<td>
|
1196 |
+
<select name="cff_media_position" disabled>
|
1197 |
+
<option value="below" <?php if($cff_media_position == "below") echo 'selected="selected"' ?> >Below Text</option>
|
1198 |
+
<option value="above" <?php if($cff_media_position == "above") echo 'selected="selected"' ?> >Above Text</option>
|
1199 |
+
</select>
|
1200 |
+
<i style="color: #666; font-size: 11px; margin-left: 5px;">Only applies to Full-width layout</i>
|
1201 |
+
</td>
|
1202 |
+
</tr>
|
1203 |
+
<tr>
|
1204 |
+
<th><label for="cff_enable_narrow" class="bump-left"><?php _e('Always use the Full-width layout when feed is narrow?'); ?></label></th>
|
1205 |
+
<td>
|
1206 |
+
<input name="cff_enable_narrow" type="checkbox" id="cff_enable_narrow" <?php if($cff_enable_narrow == true) echo "checked"; ?> disabled />
|
1207 |
+
<label for="cff_enable_narrow"><?php _e('Yes'); ?></label>
|
1208 |
+
<a class="cff-tooltip-link" href="JavaScript:void(0);"><?php _e('What does this mean?'); ?></a>
|
1209 |
+
<p class="cff-tooltip cff-more-info"><?php _e("When displaying posts in either a narrow column or on a mobile device the plugin will automatically default to using the 'Full-width' layout as it's better suited to narrow sizes."); ?></p>
|
1210 |
+
</td>
|
1211 |
+
</tr>
|
1212 |
+
</tbody>
|
1213 |
+
</table>
|
1214 |
+
|
1215 |
<hr />
|
1216 |
<h3><?php _e('Show/Hide'); ?></h3>
|
1217 |
<table class="form-table">
|
1552 |
</table>
|
1553 |
</div>
|
1554 |
</div>
|
1555 |
+
|
1556 |
+
|
1557 |
<div id="adminform" class="postbox" style="display: block;">
|
1558 |
<div class="handlediv" title="Click to toggle"><br></div>
|
1559 |
<h3 class="hndle"><span><?php _e('Link, Photo and Video Description'); ?></span></h3>
|
1560 |
<div class="inside">
|
1561 |
<table class="form-table">
|
1562 |
<tbody>
|
1563 |
+
<tr valign="top">
|
1564 |
+
<th scope="row"><label class="bump-left"><?php _e('Maximum Description Length'); ?></label></th>
|
1565 |
+
<td>
|
1566 |
+
<input name="cff_body_length" type="text" value="<?php esc_attr_e( $cff_body_length_val ); ?>" size="4" /> <span><?php _e('Characters. Eg. 200'); ?></span> <i style="color: #666; font-size: 11px; margin-left: 5px;"><?php _e('Leave empty to set no maximum length'); ?></i>
|
1567 |
+
</td>
|
1568 |
+
</tr>
|
1569 |
+
<tr>
|
1570 |
+
<th><label for="cff_body_size" class="bump-left"><?php _e('Text Size'); ?></label></th>
|
1571 |
+
<td>
|
1572 |
+
<select name="cff_body_size">
|
1573 |
+
<option value="inherit" <?php if($cff_body_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1574 |
+
<option value="10" <?php if($cff_body_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1575 |
+
<option value="11" <?php if($cff_body_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1576 |
+
<option value="12" <?php if($cff_body_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1577 |
+
<option value="13" <?php if($cff_body_size == "13") echo 'selected="selected"' ?> >13px</option>
|
1578 |
+
<option value="14" <?php if($cff_body_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1579 |
+
<option value="16" <?php if($cff_body_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1580 |
+
<option value="18" <?php if($cff_body_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1581 |
+
<option value="20" <?php if($cff_body_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1582 |
+
<option value="24" <?php if($cff_body_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1583 |
+
<option value="28" <?php if($cff_body_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1584 |
+
<option value="32" <?php if($cff_body_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1585 |
+
<option value="36" <?php if($cff_body_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1586 |
+
<option value="42" <?php if($cff_body_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1587 |
+
<option value="48" <?php if($cff_body_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1588 |
+
<option value="54" <?php if($cff_body_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1589 |
+
<option value="60" <?php if($cff_body_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1590 |
+
</select>
|
1591 |
+
</td>
|
1592 |
+
</tr>
|
1593 |
+
<tr>
|
1594 |
+
<th><label for="cff_body_weight" class="bump-left"><?php _e('Text Weight'); ?></label></th>
|
1595 |
+
<td>
|
1596 |
+
<select name="cff_body_weight">
|
1597 |
+
<option value="inherit" <?php if($cff_body_weight == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1598 |
+
<option value="normal" <?php if($cff_body_weight == "normal") echo 'selected="selected"' ?> >Normal</option>
|
1599 |
+
<option value="bold" <?php if($cff_body_weight == "bold") echo 'selected="selected"' ?> >Bold</option>
|
1600 |
+
</select>
|
1601 |
+
</td>
|
1602 |
+
</tr>
|
1603 |
+
<tr>
|
1604 |
+
<th><label for="cff_body_color" class="bump-left"><?php _e('Text Color'); ?></label></th>
|
1605 |
+
|
1606 |
+
<td>
|
1607 |
+
<input name="cff_body_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_body_color) ); ?>" class="cff-colorpicker" />
|
1608 |
+
</td>
|
1609 |
+
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1610 |
</tbody>
|
1611 |
</table>
|
1612 |
</div>
|
1613 |
</div>
|
1614 |
+
|
1615 |
+
<div style="margin-top: -15px;">
|
1616 |
+
<?php submit_button(); ?>
|
1617 |
+
</div>
|
1618 |
+
|
1619 |
<div id="adminform" class="postbox" style="display: block;">
|
1620 |
<div class="handlediv" title="Click to toggle"><br></div>
|
1621 |
<h3 class="hndle"><span><?php _e('Post Date'); ?></span></h3>
|
1810 |
</table>
|
1811 |
</div>
|
1812 |
</div>
|
1813 |
+
|
1814 |
+
|
1815 |
+
<div id="adminform" class="postbox" style="display: block;">
|
1816 |
+
<div class="handlediv" title="Click to toggle"><br></div>
|
1817 |
+
<h3 class="hndle"><span><?php _e('Shared Links'); ?></span></h3>
|
1818 |
+
<div class="inside">
|
1819 |
+
<table class="form-table">
|
1820 |
+
<tbody>
|
1821 |
+
|
1822 |
+
<tr>
|
1823 |
+
<th><label for="cff_link_title_format" class="bump-left"><?php _e('Link Title Format'); ?></label></th>
|
1824 |
+
<td>
|
1825 |
+
<select name="cff_link_title_format">
|
1826 |
+
<option value="p" <?php if($cff_link_title_format == "p") echo 'selected="selected"' ?> >Paragraph</option>
|
1827 |
+
<option value="h3" <?php if($cff_link_title_format == "h3") echo 'selected="selected"' ?> >Heading 3</option>
|
1828 |
+
<option value="h4" <?php if($cff_link_title_format == "h4") echo 'selected="selected"' ?> >Heading 4</option>
|
1829 |
+
<option value="h5" <?php if($cff_link_title_format == "h5") echo 'selected="selected"' ?> >Heading 5</option>
|
1830 |
+
<option value="h6" <?php if($cff_link_title_format == "h6") echo 'selected="selected"' ?> >Heading 6</option>
|
1831 |
+
</select>
|
1832 |
+
</td>
|
1833 |
+
</tr>
|
1834 |
+
<tr>
|
1835 |
+
<th><label for="cff_link_title_size" class="bump-left"><?php _e('Link Title Size'); ?></label></th>
|
1836 |
+
<td>
|
1837 |
+
<select name="cff_link_title_size">
|
1838 |
+
<option value="inherit" <?php if($cff_link_title_size == "inherit") echo 'selected="selected"' ?> >Inherit</option>
|
1839 |
+
<option value="10" <?php if($cff_link_title_size == "10") echo 'selected="selected"' ?> >10px</option>
|
1840 |
+
<option value="11" <?php if($cff_link_title_size == "11") echo 'selected="selected"' ?> >11px</option>
|
1841 |
+
<option value="12" <?php if($cff_link_title_size == "12") echo 'selected="selected"' ?> >12px</option>
|
1842 |
+
<option value="13" <?php if($cff_link_title_size == "13") echo 'selected="selected"' ?> >13px</option>
|
1843 |
+
<option value="14" <?php if($cff_link_title_size == "14") echo 'selected="selected"' ?> >14px</option>
|
1844 |
+
<option value="16" <?php if($cff_link_title_size == "16") echo 'selected="selected"' ?> >16px</option>
|
1845 |
+
<option value="18" <?php if($cff_link_title_size == "18") echo 'selected="selected"' ?> >18px</option>
|
1846 |
+
<option value="20" <?php if($cff_link_title_size == "20") echo 'selected="selected"' ?> >20px</option>
|
1847 |
+
<option value="24" <?php if($cff_link_title_size == "24") echo 'selected="selected"' ?> >24px</option>
|
1848 |
+
<option value="28" <?php if($cff_link_title_size == "28") echo 'selected="selected"' ?> >28px</option>
|
1849 |
+
<option value="32" <?php if($cff_link_title_size == "32") echo 'selected="selected"' ?> >32px</option>
|
1850 |
+
<option value="36" <?php if($cff_link_title_size == "36") echo 'selected="selected"' ?> >36px</option>
|
1851 |
+
<option value="42" <?php if($cff_link_title_size == "42") echo 'selected="selected"' ?> >42px</option>
|
1852 |
+
<option value="48" <?php if($cff_link_title_size == "48") echo 'selected="selected"' ?> >48px</option>
|
1853 |
+
<option value="54" <?php if($cff_link_title_size == "54") echo 'selected="selected"' ?> >54px</option>
|
1854 |
+
<option value="60" <?php if($cff_link_title_size == "60") echo 'selected="selected"' ?> >60px</option>
|
1855 |
+
</select>
|
1856 |
+
</td>
|
1857 |
+
</tr>
|
1858 |
+
<tr>
|
1859 |
+
<th><label for="cff_link_title_color" class="bump-left"><?php _e('Link Title Color'); ?></label></th>
|
1860 |
+
<td>
|
1861 |
+
<input name="cff_link_title_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_title_color) ); ?>" class="cff-colorpicker" />
|
1862 |
+
</td>
|
1863 |
+
</tr>
|
1864 |
+
<tr>
|
1865 |
+
<th><label for="cff_link_url_color" class="bump-left"><?php _e('Link URL Color'); ?></label></th>
|
1866 |
+
<td>
|
1867 |
+
<input name="cff_link_url_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_url_color) ); ?>" class="cff-colorpicker" />
|
1868 |
+
</td>
|
1869 |
+
</tr>
|
1870 |
+
|
1871 |
+
<tr>
|
1872 |
+
<th><label for="cff_link_bg_color" class="bump-left"><?php _e('Link Box Background Color'); ?></label></th>
|
1873 |
+
<td>
|
1874 |
+
<input name="cff_link_bg_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_bg_color) ); ?>" class="cff-colorpicker" />
|
1875 |
+
</td>
|
1876 |
+
</tr>
|
1877 |
+
|
1878 |
+
<tr>
|
1879 |
+
<th><label for="cff_link_border_color" class="bump-left"><?php _e('Link Box Border Color'); ?></label></th>
|
1880 |
+
<td>
|
1881 |
+
<input name="cff_link_border_color" value="#<?php esc_attr_e( str_replace('#', '', $cff_link_border_color) ); ?>" class="cff-colorpicker" />
|
1882 |
+
</td>
|
1883 |
+
</tr>
|
1884 |
+
|
1885 |
+
<tr>
|
1886 |
+
<th><label for="cff_disable_link_box" class="bump-left"><?php _e('Remove Background/Border'); ?></label></th>
|
1887 |
+
<td><input type="checkbox" name="cff_disable_link_box" id="cff_disable_link_box" <?php if($cff_disable_link_box == true) echo 'checked="checked"' ?> /> <?php _e('Yes'); ?></td>
|
1888 |
+
</tr>
|
1889 |
+
|
1890 |
+
</tbody>
|
1891 |
+
</table>
|
1892 |
+
</div>
|
1893 |
+
</div>
|
1894 |
+
|
1895 |
+
<div style="margin-top: -15px;">
|
1896 |
+
<?php submit_button(); ?>
|
1897 |
+
</div>
|
1898 |
+
|
1899 |
<div id="adminform" class="postbox" style="display: block;">
|
1900 |
<div class="handlediv" title="Click to toggle"><br></div>
|
1901 |
<h3 class="hndle"><span><?php _e('Event Title'); ?></span></h3>
|
1964 |
</table>
|
1965 |
</div>
|
1966 |
</div>
|
1967 |
+
|
|
|
|
|
1968 |
<div id="adminform" class="postbox" style="display: block;">
|
1969 |
<div class="handlediv" title="Click to toggle"><br></div>
|
1970 |
<h3 class="hndle"><span><?php _e('Event Date'); ?></span></h3>
|
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.9.
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
@@ -84,6 +84,9 @@ function display_cff($atts) {
|
|
84 |
'linktitlesize' => isset($options[ 'cff_link_title_size' ]) ? $options[ 'cff_link_title_size' ] : '',
|
85 |
'linktitlecolor' => isset($options[ 'cff_link_title_color' ]) ? $options[ 'cff_link_title_color' ] : '',
|
86 |
'linkurlcolor' => isset($options[ 'cff_link_url_color' ]) ? $options[ 'cff_link_url_color' ] : '',
|
|
|
|
|
|
|
87 |
|
88 |
//Author
|
89 |
'authorsize' => isset($options[ 'cff_author_size' ]) ? $options[ 'cff_author_size' ] : '',
|
@@ -310,6 +313,17 @@ function display_cff($atts) {
|
|
310 |
if ( !empty($cff_link_title_size) && $cff_link_title_size != 'inherit' ) $cff_link_title_styles .= 'font-size:' . $cff_link_title_size . 'px;';
|
311 |
$cff_link_title_styles .= '"';
|
312 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
//Event Title
|
314 |
$cff_event_title_format = $atts[ 'eventtitleformat' ];
|
315 |
if (empty($cff_event_title_format)) $cff_event_title_format = 'p';
|
@@ -381,9 +395,6 @@ function display_cff($atts) {
|
|
381 |
$cff_like_box_colorscheme = 'light';
|
382 |
if ($cff_like_box_text_color == 'white') $cff_like_box_colorscheme = 'dark';
|
383 |
|
384 |
-
$cff_likebox_styles = 'style="';
|
385 |
-
if ( !empty($cff_likebox_bg_color) ) $cff_likebox_styles .= 'background-color:#' . str_replace('#', '', $cff_likebox_bg_color) . '; margin-left: 0; ';
|
386 |
-
|
387 |
$cff_likebox_width = $atts[ 'likeboxwidth' ];
|
388 |
if ( !isset($cff_likebox_width) || empty($cff_likebox_width) || $cff_likebox_width == '' ) $cff_likebox_width = '100%';
|
389 |
$cff_like_box_faces = $atts[ 'likeboxfaces' ];
|
@@ -397,7 +408,7 @@ function display_cff($atts) {
|
|
397 |
|
398 |
//Compile Like box styles
|
399 |
$cff_likebox_styles = 'style="width: ' . $cff_likebox_width . ';';
|
400 |
-
if ( !empty($cff_likebox_bg_color) ) $cff_likebox_styles .= 'background-color: #' . str_replace('#', '', $cff_likebox_bg_color) . ';';
|
401 |
if ( empty($cff_likebox_bg_color) && $cff_like_box_faces == 'false' ) $cff_likebox_styles .= ' margin-left: -10px;';
|
402 |
$cff_likebox_styles .= '"';
|
403 |
|
@@ -469,7 +480,7 @@ function display_cff($atts) {
|
|
469 |
if ($access_token == '') $access_token = '1436737606570258|MGh1BX4_b_D9HzJtKe702cwMRPI';
|
470 |
//Check whether a Page ID has been defined
|
471 |
if ($page_id == '') {
|
472 |
-
echo "Please enter the Page ID of the Facebook feed you'd like to display. You can do this in either the Custom Facebook Feed plugin settings or in the shortcode itself. For example, [
|
473 |
return false;
|
474 |
}
|
475 |
|
@@ -731,14 +742,14 @@ function display_cff($atts) {
|
|
731 |
}
|
732 |
|
733 |
//POST AUTHOR
|
734 |
-
$cff_author = '<
|
735 |
|
736 |
//Set the author image as a variable. If it already exists then don't query the api for it again.
|
737 |
$cff_author_img_var = '$cff_author_img_' . $news->from->id;
|
738 |
if ( !isset($$cff_author_img_var) ) $$cff_author_img_var = 'https://graph.facebook.com/' . $news->from->id . '/picture?type=square';
|
739 |
$cff_author .= '<img src="'.$$cff_author_img_var.'" title="'.$news->from->name.'" alt="'.$news->from->name.'" width=50 height=50>';
|
740 |
$cff_author .= '<span class="cff-page-name">'.$news->from->name.'</span>';
|
741 |
-
$cff_author .= '</a>';
|
742 |
|
743 |
//POST TEXT
|
744 |
$cff_translate_photos_text = $atts['photostext'];
|
@@ -781,7 +792,7 @@ function display_cff($atts) {
|
|
781 |
//If the post tags option doesn't exist yet (ie. on plugin update) then set them as true
|
782 |
if ( !array_key_exists( 'cff_post_tags', $options ) ) $cff_post_tags = true;
|
783 |
//Add message and story tags if there are any and the post text is the message or the story
|
784 |
-
if( $cff_post_tags && ( isset($news->message_tags) || isset($news->story_tags) ) && ($cff_post_text_type == 'message' || $cff_post_text_type == 'story') && !$cff_title_link
|
785 |
//Use message_tags or story_tags?
|
786 |
( isset($news->message_tags) )? $text_tags = $news->message_tags : $text_tags = $news->story_tags;
|
787 |
|
@@ -789,14 +800,10 @@ function display_cff($atts) {
|
|
789 |
if( ( $cff_post_text_type == 'message' && isset($news->message_tags) ) || ( $cff_post_text_type == 'story' && !isset($news->message_tags) ) ) {
|
790 |
|
791 |
//Does the Post Text contain any html tags? - the & symbol is the best indicator of this
|
792 |
-
$
|
793 |
-
$html_check_2 = stripos($post_text, '’');
|
794 |
-
$html_check_3 = stripos($post_text, '“');
|
795 |
|
796 |
-
//If it contains HTML tags then use the name replace method
|
797 |
-
// $html_check = true;
|
798 |
//always use the text replace method
|
799 |
-
if( $
|
800 |
//Loop through the tags
|
801 |
foreach($text_tags as $message_tag ) {
|
802 |
$tag_name = $message_tag[0]->name;
|
@@ -831,16 +838,18 @@ function display_cff($atts) {
|
|
831 |
$c = $message_tags_arr[$i]['offset'];
|
832 |
$d = $message_tags_arr[$i]['length'];
|
833 |
|
834 |
-
$post_text =
|
835 |
|
836 |
}
|
837 |
|
838 |
-
} // end if/else
|
839 |
|
840 |
} // end message check
|
841 |
|
842 |
} //END MESSAGE TAGS
|
843 |
|
|
|
|
|
844 |
|
845 |
//If the text is wrapped in a link then don't hyperlink any text within
|
846 |
if ($cff_title_link) {
|
@@ -882,8 +891,11 @@ function display_cff($atts) {
|
|
882 |
//LINK
|
883 |
$cff_shared_link = '';
|
884 |
//Display shared link
|
885 |
-
if ($
|
886 |
-
$cff_shared_link .= '<div class="cff-shared-link
|
|
|
|
|
|
|
887 |
|
888 |
//Display link name and description
|
889 |
if (!empty($news->description)) {
|
@@ -988,10 +1000,13 @@ function display_cff($atts) {
|
|
988 |
if($cff_is_video_embed) {
|
989 |
isset($news->name) ? $video_name = $news->name : $video_name = $link;
|
990 |
isset($news->description) ? $description_text = $news->description : $description_text = '';
|
991 |
-
$cff_description = '<div class="cff-desc-wrap ';
|
992 |
if (empty($picture)) $cff_description .= 'cff-no-image';
|
|
|
|
|
|
|
993 |
|
994 |
-
if( isset($news->name) ) $cff_description .= '
|
995 |
|
996 |
if (!empty($body_limit)) {
|
997 |
if (strlen($description_text) > $body_limit) $description_text = substr($description_text, 0, $body_limit) . '...';
|
@@ -1421,6 +1436,48 @@ if(!is_callable('stripos')){
|
|
1421 |
return strpos($haystack, stristr( $haystack, $needle ));
|
1422 |
}
|
1423 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1424 |
|
1425 |
//Push to assoc array
|
1426 |
function array_push_assoc($array, $key, $value){
|
@@ -1456,28 +1513,27 @@ function cff_scripts_method() {
|
|
1456 |
wp_enqueue_script('cffscripts');
|
1457 |
}
|
1458 |
|
1459 |
-
function cff_activate() {
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
register_activation_hook( __FILE__, 'cff_activate' );
|
1481 |
//Uninstall
|
1482 |
function cff_uninstall()
|
1483 |
{
|
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.9.4
|
7 |
Author: Smash Balloon
|
8 |
Author URI: http://smashballoon.com/
|
9 |
License: GPLv2 or later
|
84 |
'linktitlesize' => isset($options[ 'cff_link_title_size' ]) ? $options[ 'cff_link_title_size' ] : '',
|
85 |
'linktitlecolor' => isset($options[ 'cff_link_title_color' ]) ? $options[ 'cff_link_title_color' ] : '',
|
86 |
'linkurlcolor' => isset($options[ 'cff_link_url_color' ]) ? $options[ 'cff_link_url_color' ] : '',
|
87 |
+
'linkbgcolor' => isset($options[ 'cff_link_bg_color' ]) ? $options[ 'cff_link_bg_color' ] : '',
|
88 |
+
'linkbordercolor' => isset($options[ 'cff_link_border_color' ]) ? $options[ 'cff_link_border_color' ] : '',
|
89 |
+
'disablelinkbox' => isset($options[ 'cff_disable_link_box' ]) ? $options[ 'cff_disable_link_box' ] : '',
|
90 |
|
91 |
//Author
|
92 |
'authorsize' => isset($options[ 'cff_author_size' ]) ? $options[ 'cff_author_size' ] : '',
|
313 |
if ( !empty($cff_link_title_size) && $cff_link_title_size != 'inherit' ) $cff_link_title_styles .= 'font-size:' . $cff_link_title_size . 'px;';
|
314 |
$cff_link_title_styles .= '"';
|
315 |
|
316 |
+
//Shared link box
|
317 |
+
$cff_link_bg_color = $atts[ 'linkbgcolor' ];
|
318 |
+
$cff_link_border_color = $atts[ 'linkbordercolor' ];
|
319 |
+
$cff_disable_link_box = $atts['disablelinkbox'];
|
320 |
+
($cff_disable_link_box == 'true' || $cff_disable_link_box == 'on') ? $cff_disable_link_box = true : $cff_disable_link_box = false;
|
321 |
+
|
322 |
+
$cff_link_box_styles = 'style="';
|
323 |
+
if ( !empty($cff_link_border_color) ) $cff_link_box_styles .= 'border: 1px solid #' . str_replace('#', '', $cff_link_border_color) . '; ';
|
324 |
+
if ( !empty($cff_link_bg_color) ) $cff_link_box_styles .= 'background-color: #' . str_replace('#', '', $cff_link_bg_color) . ';';
|
325 |
+
$cff_link_box_styles .= '"';
|
326 |
+
|
327 |
//Event Title
|
328 |
$cff_event_title_format = $atts[ 'eventtitleformat' ];
|
329 |
if (empty($cff_event_title_format)) $cff_event_title_format = 'p';
|
395 |
$cff_like_box_colorscheme = 'light';
|
396 |
if ($cff_like_box_text_color == 'white') $cff_like_box_colorscheme = 'dark';
|
397 |
|
|
|
|
|
|
|
398 |
$cff_likebox_width = $atts[ 'likeboxwidth' ];
|
399 |
if ( !isset($cff_likebox_width) || empty($cff_likebox_width) || $cff_likebox_width == '' ) $cff_likebox_width = '100%';
|
400 |
$cff_like_box_faces = $atts[ 'likeboxfaces' ];
|
408 |
|
409 |
//Compile Like box styles
|
410 |
$cff_likebox_styles = 'style="width: ' . $cff_likebox_width . ';';
|
411 |
+
if ( !empty($cff_likebox_bg_color) ) $cff_likebox_styles .= 'background-color: #' . str_replace('#', '', $cff_likebox_bg_color) . '; margin-left: 0; ';
|
412 |
if ( empty($cff_likebox_bg_color) && $cff_like_box_faces == 'false' ) $cff_likebox_styles .= ' margin-left: -10px;';
|
413 |
$cff_likebox_styles .= '"';
|
414 |
|
480 |
if ($access_token == '') $access_token = '1436737606570258|MGh1BX4_b_D9HzJtKe702cwMRPI';
|
481 |
//Check whether a Page ID has been defined
|
482 |
if ($page_id == '') {
|
483 |
+
echo "Please enter the Page ID of the Facebook feed you'd like to display. You can do this in either the Custom Facebook Feed plugin settings or in the shortcode itself. For example, [custom-facebook-feed id=YOUR_PAGE_ID_HERE].<br /><br />";
|
484 |
return false;
|
485 |
}
|
486 |
|
742 |
}
|
743 |
|
744 |
//POST AUTHOR
|
745 |
+
$cff_author = '<div class="cff-author"><a href="https://facebook.com/' . $news->from->id . '" '.$target.' title="'.$news->from->name.' on Facebook" '.$cff_author_styles.'>';
|
746 |
|
747 |
//Set the author image as a variable. If it already exists then don't query the api for it again.
|
748 |
$cff_author_img_var = '$cff_author_img_' . $news->from->id;
|
749 |
if ( !isset($$cff_author_img_var) ) $$cff_author_img_var = 'https://graph.facebook.com/' . $news->from->id . '/picture?type=square';
|
750 |
$cff_author .= '<img src="'.$$cff_author_img_var.'" title="'.$news->from->name.'" alt="'.$news->from->name.'" width=50 height=50>';
|
751 |
$cff_author .= '<span class="cff-page-name">'.$news->from->name.'</span>';
|
752 |
+
$cff_author .= '</a></div>';
|
753 |
|
754 |
//POST TEXT
|
755 |
$cff_translate_photos_text = $atts['photostext'];
|
792 |
//If the post tags option doesn't exist yet (ie. on plugin update) then set them as true
|
793 |
if ( !array_key_exists( 'cff_post_tags', $options ) ) $cff_post_tags = true;
|
794 |
//Add message and story tags if there are any and the post text is the message or the story
|
795 |
+
if( $cff_post_tags && ( isset($news->message_tags) || isset($news->story_tags) ) && ($cff_post_text_type == 'message' || $cff_post_text_type == 'story') && !$cff_title_link){
|
796 |
//Use message_tags or story_tags?
|
797 |
( isset($news->message_tags) )? $text_tags = $news->message_tags : $text_tags = $news->story_tags;
|
798 |
|
800 |
if( ( $cff_post_text_type == 'message' && isset($news->message_tags) ) || ( $cff_post_text_type == 'story' && !isset($news->message_tags) ) ) {
|
801 |
|
802 |
//Does the Post Text contain any html tags? - the & symbol is the best indicator of this
|
803 |
+
$cff_html_check_array = array('<', '’', '“', '"', '&');
|
|
|
|
|
804 |
|
|
|
|
|
805 |
//always use the text replace method
|
806 |
+
if( stripos_arr($post_text, $cff_html_check_array) !== false ) {
|
807 |
//Loop through the tags
|
808 |
foreach($text_tags as $message_tag ) {
|
809 |
$tag_name = $message_tag[0]->name;
|
838 |
$c = $message_tags_arr[$i]['offset'];
|
839 |
$d = $message_tags_arr[$i]['length'];
|
840 |
|
841 |
+
$post_text = mb_substr_replace( $post_text, $b, $c, $d);
|
842 |
|
843 |
}
|
844 |
|
845 |
+
} // end if/else
|
846 |
|
847 |
} // end message check
|
848 |
|
849 |
} //END MESSAGE TAGS
|
850 |
|
851 |
+
//Replace line breaks in text (needed for IE8)
|
852 |
+
$post_text = preg_replace("/\r\n|\r|\n/",'<br/>', $post_text);
|
853 |
|
854 |
//If the text is wrapped in a link then don't hyperlink any text within
|
855 |
if ($cff_title_link) {
|
891 |
//LINK
|
892 |
$cff_shared_link = '';
|
893 |
//Display shared link
|
894 |
+
if ($cff_post_type == 'link') {
|
895 |
+
$cff_shared_link .= '<div class="cff-shared-link';
|
896 |
+
if($cff_disable_link_box) $cff_shared_link .= ' cff-no-styles"';
|
897 |
+
if(!$cff_disable_link_box) $cff_shared_link .= '" ' . $cff_link_box_styles;
|
898 |
+
$cff_shared_link .= '>';
|
899 |
|
900 |
//Display link name and description
|
901 |
if (!empty($news->description)) {
|
1000 |
if($cff_is_video_embed) {
|
1001 |
isset($news->name) ? $video_name = $news->name : $video_name = $link;
|
1002 |
isset($news->description) ? $description_text = $news->description : $description_text = '';
|
1003 |
+
$cff_description = '<div class="cff-desc-wrap cff-shared-link ';
|
1004 |
if (empty($picture)) $cff_description .= 'cff-no-image';
|
1005 |
+
if($cff_disable_link_box) $cff_description .= ' cff-no-styles"';
|
1006 |
+
if(!$cff_disable_link_box) $cff_description .= '" ' . $cff_link_box_styles;
|
1007 |
+
$cff_description .= '>';
|
1008 |
|
1009 |
+
if( isset($news->name) ) $cff_description .= '<'.$cff_link_title_format.' class="cff-link-title" '.$cff_link_title_styles.'><a href="'.$link.'" '.$target.' style="color:#' . str_replace('#', '', $cff_link_title_color) . ';">'. $news->name . '</a></'.$cff_link_title_format.'>';
|
1010 |
|
1011 |
if (!empty($body_limit)) {
|
1012 |
if (strlen($description_text) > $body_limit) $description_text = substr($description_text, 0, $body_limit) . '...';
|
1436 |
return strpos($haystack, stristr( $haystack, $needle ));
|
1437 |
}
|
1438 |
}
|
1439 |
+
function stripos_arr($haystack, $needle) {
|
1440 |
+
if(!is_array($needle)) $needle = array($needle);
|
1441 |
+
foreach($needle as $what) {
|
1442 |
+
if(($pos = stripos($haystack, ltrim($what) ))!==false) return $pos;
|
1443 |
+
}
|
1444 |
+
return false;
|
1445 |
+
}
|
1446 |
+
function mb_substr_replace($string, $replacement, $start, $length=NULL) {
|
1447 |
+
if (is_array($string)) {
|
1448 |
+
$num = count($string);
|
1449 |
+
// $replacement
|
1450 |
+
$replacement = is_array($replacement) ? array_slice($replacement, 0, $num) : array_pad(array($replacement), $num, $replacement);
|
1451 |
+
// $start
|
1452 |
+
if (is_array($start)) {
|
1453 |
+
$start = array_slice($start, 0, $num);
|
1454 |
+
foreach ($start as $key => $value)
|
1455 |
+
$start[$key] = is_int($value) ? $value : 0;
|
1456 |
+
}
|
1457 |
+
else {
|
1458 |
+
$start = array_pad(array($start), $num, $start);
|
1459 |
+
}
|
1460 |
+
// $length
|
1461 |
+
if (!isset($length)) {
|
1462 |
+
$length = array_fill(0, $num, 0);
|
1463 |
+
}
|
1464 |
+
elseif (is_array($length)) {
|
1465 |
+
$length = array_slice($length, 0, $num);
|
1466 |
+
foreach ($length as $key => $value)
|
1467 |
+
$length[$key] = isset($value) ? (is_int($value) ? $value : $num) : 0;
|
1468 |
+
}
|
1469 |
+
else {
|
1470 |
+
$length = array_pad(array($length), $num, $length);
|
1471 |
+
}
|
1472 |
+
// Recursive call
|
1473 |
+
return array_map(__FUNCTION__, $string, $replacement, $start, $length);
|
1474 |
+
}
|
1475 |
+
preg_match_all('/./us', (string)$string, $smatches);
|
1476 |
+
preg_match_all('/./us', (string)$replacement, $rmatches);
|
1477 |
+
if ($length === NULL) $length = mb_strlen($string);
|
1478 |
+
array_splice($smatches[0], $start, $length, $rmatches[0]);
|
1479 |
+
return join($smatches[0]);
|
1480 |
+
}
|
1481 |
|
1482 |
//Push to assoc array
|
1483 |
function array_push_assoc($array, $key, $value){
|
1513 |
wp_enqueue_script('cffscripts');
|
1514 |
}
|
1515 |
|
1516 |
+
// function cff_activate() {
|
1517 |
+
// $options = get_option('cff_style_settings');
|
1518 |
+
// $options[ 'cff_show_links_type' ] = true;
|
1519 |
+
// $options[ 'cff_show_event_type' ] = true;
|
1520 |
+
// $options[ 'cff_show_video_type' ] = true;
|
1521 |
+
// $options[ 'cff_show_photos_type' ] = true;
|
1522 |
+
// $options[ 'cff_show_status_type' ] = true;
|
1523 |
+
// $options[ 'cff_show_author' ] = true;
|
1524 |
+
// $options[ 'cff_show_text' ] = true;
|
1525 |
+
// $options[ 'cff_show_desc' ] = true;
|
1526 |
+
// $options[ 'cff_show_shared_links' ] = true;
|
1527 |
+
// $options[ 'cff_show_date' ] = true;
|
1528 |
+
// $options[ 'cff_show_media' ] = true;
|
1529 |
+
// $options[ 'cff_show_event_title' ] = true;
|
1530 |
+
// $options[ 'cff_show_event_details' ] = true;
|
1531 |
+
// $options[ 'cff_show_meta' ] = true;
|
1532 |
+
// $options[ 'cff_show_link' ] = true;
|
1533 |
+
// $options[ 'cff_show_like_box' ] = true;
|
1534 |
+
// update_option( 'cff_style_settings', $options );
|
1535 |
+
// }
|
1536 |
+
// register_activation_hook( __FILE__, 'cff_activate' );
|
|
|
1537 |
//Uninstall
|
1538 |
function cff_uninstall()
|
1539 |
{
|
img/layout-full.png
CHANGED
Binary file
|
img/layout-half.png
CHANGED
Binary file
|
img/layout-thumb.png
CHANGED
Binary file
|
js/cff-scripts.js
CHANGED
@@ -49,6 +49,12 @@ jQuery(document).ready(function() {
|
|
49 |
$less.hide();
|
50 |
}
|
51 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
});
|
54 |
});
|
49 |
$less.hide();
|
50 |
}
|
51 |
});
|
52 |
+
|
53 |
+
//Hide the shared link box if it's empty
|
54 |
+
$sharedLink = $self.find('.cff-shared-link');
|
55 |
+
if( $sharedLink.text() == '' ){
|
56 |
+
$sharedLink.remove();
|
57 |
+
}
|
58 |
|
59 |
});
|
60 |
});
|