Skip to content

Commit

Permalink
added filter sp_auto_flush_fb to bypass facebook cache flusher
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyblake committed Dec 16, 2013
1 parent e3fbd56 commit feeefd0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
5 changes: 4 additions & 1 deletion readme.txt
Expand Up @@ -4,7 +4,7 @@ Donate link: https://getsharepress.com
Tags: facebook, twitter, social, like, posts, page
Requires at least: 2.9
Tested up to: 3.8
Stable tag: 2.2.24
Stable tag: 2.2.26

Automatic posting and reposting to Facebook and Twitter.

Expand Down Expand Up @@ -121,6 +121,9 @@ E-mail based tech support is available to Pro customers. All you have to do is [

== Changelog ==

= 2.2.26 =
* Add filter 'sp_auto_flush_fb' to bypass facebook cache flush

= 2.2.24 =
* Compatible with WordPress 3.8
* Fixed: Hide the wait spinner when there are SharePress validation issues on publish
Expand Down
3 changes: 1 addition & 2 deletions settings.php
Expand Up @@ -229,8 +229,7 @@
</td>
</tr>
</table>

<br />
<br />
<h3 class="title">Post Link</h3>
<p>Append post link to the end of Facebook messages?</p>

Expand Down
16 changes: 9 additions & 7 deletions sharepress.php
Expand Up @@ -5,7 +5,7 @@
Description: SharePress publishes your content to your personal Facebook Wall and the Walls of Pages you choose.
Author: Fat Panda, LLC
Author URI: http://fatpandadev.com
Version: 2.2.24
Version: 2.2.26
License: GPL2
*/

Expand Down Expand Up @@ -41,7 +41,7 @@

class Sharepress {

const VERSION = '2.2.23';
const VERSION = '2.2.26';

const MISSED_SCHEDULE_DELAY = 5;
const MISSED_SCHEDULE_OPTION = 'sharepress_missed_schedule';
Expand Down Expand Up @@ -1499,11 +1499,13 @@ function share($post) {

try {
// flush the fb cache
$poke = self::api('/', 'POST', array(
'id' => $meta['link'],
'scrape' => 'true'
)
);
if ( apply_filters('sp_auto_flush_fb', true) ) {
$poke = self::api('/', 'POST', array(
'id' => $meta['link'],
'scrape' => 'true'
)
);
}


// no targets? error.
Expand Down

0 comments on commit feeefd0

Please sign in to comment.