Version Description
- Changed: Autoupdate
Download this release
Release Info
| Developer | webdorado |
| Plugin | |
| Version | 1.0.19 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.18 to 1.0.19
- admin/controllers/FFWDControllerOptions_ffwd.php +3 -0
- facebook-feed-wd.php +31 -10
- framework/WDFacebookFeed.php +2 -2
- frontend/controllers/FFWDControllerMain.php +11 -0
- frontend/models/FFWDModelMain.php +2 -0
- js/ffwd_frontend.js +16 -0
- readme.txt +5 -2
admin/controllers/FFWDControllerOptions_ffwd.php
CHANGED
|
@@ -86,6 +86,9 @@ class FFWDControllerOptions_ffwd {
|
|
| 86 |
* refresh filter according to new time interval,
|
| 87 |
* then add new schedule with the same hook name
|
| 88 |
*/
|
|
|
|
|
|
|
|
|
|
| 89 |
wp_clear_scheduled_hook( 'wd_fb_schedule_event_hook' );
|
| 90 |
remove_filter( 'cron_schedules', 'wd_fb_add_autoupdate_interval' );
|
| 91 |
add_filter( 'cron_schedules', 'wd_fb_add_autoupdate_interval' );
|
| 86 |
* refresh filter according to new time interval,
|
| 87 |
* then add new schedule with the same hook name
|
| 88 |
*/
|
| 89 |
+
|
| 90 |
+
update_option('ffwd_autoupdate_time',$autoupdate_interval*60+current_time('timestamp'));
|
| 91 |
+
|
| 92 |
wp_clear_scheduled_hook( 'wd_fb_schedule_event_hook' );
|
| 93 |
remove_filter( 'cron_schedules', 'wd_fb_add_autoupdate_interval' );
|
| 94 |
add_filter( 'cron_schedules', 'wd_fb_add_autoupdate_interval' );
|
facebook-feed-wd.php
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
* Plugin Name: Facebook Feed WD
|
| 5 |
* Plugin URI: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
|
| 6 |
* Description:Facebook Feed WD is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
|
| 7 |
-
* Version: 1.0.
|
| 8 |
* Author: WebDorado
|
| 9 |
* Author URI: https://web-dorado.com/
|
| 10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
|
@@ -806,6 +806,14 @@ function ffwd_front_end_scripts() {
|
|
| 806 |
}
|
| 807 |
wp_enqueue_script( 'jquery' );
|
| 808 |
wp_enqueue_script( 'ffwd_frontend', WD_FFWD_FRONT_URL . '/js/ffwd_frontend.js', array(), $version );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 809 |
wp_enqueue_style( 'ffwd_frontend', WD_FFWD_FRONT_URL . '/css/ffwd_frontend.css', array(), $version );
|
| 810 |
// Styles/Scripts for popup.
|
| 811 |
wp_enqueue_style( 'ffwd_font-awesome', WD_FFWD_FRONT_URL . '/css/font-awesome/font-awesome.css', array(), '4.4.0' );
|
|
@@ -851,6 +859,8 @@ function ffwd_front_end_scripts() {
|
|
| 851 |
|
| 852 |
add_action( 'wp_enqueue_scripts', 'ffwd_front_end_scripts' );
|
| 853 |
|
|
|
|
|
|
|
| 854 |
/* Add bwg scheduled event for autoupdatable galleries.*/
|
| 855 |
add_filter( 'cron_schedules', 'wd_fb_add_autoupdate_interval' );
|
| 856 |
function wd_fb_add_autoupdate_interval( $schedules ) {
|
|
@@ -869,17 +879,28 @@ function wd_fb_add_autoupdate_interval( $schedules ) {
|
|
| 869 |
|
| 870 |
return $schedules;
|
| 871 |
}
|
| 872 |
-
|
| 873 |
-
|
| 874 |
-
add_action( 'wd_fb_schedule_event_hook', 'wd_fb_update' );
|
| 875 |
// wd_fb_update();
|
| 876 |
function wd_fb_update() {
|
| 877 |
-
global $wpdb;
|
| 878 |
-
$query = "SELECT * FROM " . $wpdb->prefix . "wd_fb_info WHERE `update_mode` <> 'no_update'";
|
| 879 |
-
$rows = $wpdb->get_results( $query );
|
| 880 |
require_once( WD_FFWD_DIR . '/framework/WDFacebookFeed.php' );
|
| 881 |
-
|
| 882 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 883 |
}
|
| 884 |
|
| 885 |
// Facebook feed wd Widget.
|
|
@@ -897,7 +918,7 @@ add_action( 'init', 'ffwd_language_load' );
|
|
| 897 |
|
| 898 |
function ffwd_version() {
|
| 899 |
|
| 900 |
-
$version = '1.0.
|
| 901 |
|
| 902 |
if ( get_option( 'ffwd_version' ) === false ) {
|
| 903 |
add_option( 'ffwd_version', $version );
|
| 4 |
* Plugin Name: Facebook Feed WD
|
| 5 |
* Plugin URI: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
|
| 6 |
* Description:Facebook Feed WD is a completely customizable, responsive solution to help you display your Facebook feed on your WordPress website.
|
| 7 |
+
* Version: 1.0.19
|
| 8 |
* Author: WebDorado
|
| 9 |
* Author URI: https://web-dorado.com/
|
| 10 |
* License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
|
| 806 |
}
|
| 807 |
wp_enqueue_script( 'jquery' );
|
| 808 |
wp_enqueue_script( 'ffwd_frontend', WD_FFWD_FRONT_URL . '/js/ffwd_frontend.js', array(), $version );
|
| 809 |
+
wp_localize_script('ffwd_frontend', 'wd_ffwd',
|
| 810 |
+
array(
|
| 811 |
+
'ajax_url' => admin_url('admin-ajax.php'),
|
| 812 |
+
|
| 813 |
+
));
|
| 814 |
+
|
| 815 |
+
|
| 816 |
+
|
| 817 |
wp_enqueue_style( 'ffwd_frontend', WD_FFWD_FRONT_URL . '/css/ffwd_frontend.css', array(), $version );
|
| 818 |
// Styles/Scripts for popup.
|
| 819 |
wp_enqueue_style( 'ffwd_font-awesome', WD_FFWD_FRONT_URL . '/css/font-awesome/font-awesome.css', array(), '4.4.0' );
|
| 859 |
|
| 860 |
add_action( 'wp_enqueue_scripts', 'ffwd_front_end_scripts' );
|
| 861 |
|
| 862 |
+
add_action( 'wp_ajax_ffwd_autoupdate', 'wd_fb_update' );
|
| 863 |
+
add_action( 'wp_ajax_nopriv_ffwd_autoupdate', 'wd_fb_update' );
|
| 864 |
/* Add bwg scheduled event for autoupdatable galleries.*/
|
| 865 |
add_filter( 'cron_schedules', 'wd_fb_add_autoupdate_interval' );
|
| 866 |
function wd_fb_add_autoupdate_interval( $schedules ) {
|
| 879 |
|
| 880 |
return $schedules;
|
| 881 |
}
|
| 882 |
+
//add_action( 'wd_fb_schedule_event_hook', 'wd_fb_update' );
|
|
|
|
|
|
|
| 883 |
// wd_fb_update();
|
| 884 |
function wd_fb_update() {
|
|
|
|
|
|
|
|
|
|
| 885 |
require_once( WD_FFWD_DIR . '/framework/WDFacebookFeed.php' );
|
| 886 |
+
$current_time=current_time('timestamp');
|
| 887 |
+
$update_time=get_option('ffwd_autoupdate_time');
|
| 888 |
+
$autoupdate_interval = WDFacebookFeed::get_autoupdate_interval();
|
| 889 |
+
if(!$update_time)
|
| 890 |
+
update_option('ffwd_autoupdate_time',$autoupdate_interval*60+$current_time);
|
| 891 |
+
|
| 892 |
+
if($current_time>=$update_time)
|
| 893 |
+
{
|
| 894 |
+
global $wpdb;
|
| 895 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "wd_fb_info WHERE `update_mode` <> 'no_update'";
|
| 896 |
+
$rows = $wpdb->get_results( $query );
|
| 897 |
+
|
| 898 |
+
WDFacebookFeed::update_from_shedule( $rows );
|
| 899 |
+
update_option('ffwd_autoupdate_time',$autoupdate_interval*60+current_time('timestamp'));
|
| 900 |
+
}
|
| 901 |
+
|
| 902 |
+
die();
|
| 903 |
+
|
| 904 |
}
|
| 905 |
|
| 906 |
// Facebook feed wd Widget.
|
| 918 |
|
| 919 |
function ffwd_version() {
|
| 920 |
|
| 921 |
+
$version = '1.0.19';
|
| 922 |
|
| 923 |
if ( get_option( 'ffwd_version' ) === false ) {
|
| 924 |
add_option( 'ffwd_version', $version );
|
framework/WDFacebookFeed.php
CHANGED
|
@@ -714,8 +714,8 @@ $ffwd_info_options[$ffwd_option_db] =((isset($_POST[$ffwd_option_db])) ? esc_htm
|
|
| 714 |
array(self::$id, $edge, 'access_token=' . self::$access_token . '&', $fields, 'locale='.get_locale().'&', ''), self::$graph_url
|
| 715 |
);
|
| 716 |
|
| 717 |
-
|
| 718 |
-
|
| 719 |
$data['data'] = self::complite_timeline($fb_graph_url);
|
| 720 |
self::$data = $data;
|
| 721 |
|
| 714 |
array(self::$id, $edge, 'access_token=' . self::$access_token . '&', $fields, 'locale='.get_locale().'&', ''), self::$graph_url
|
| 715 |
);
|
| 716 |
|
| 717 |
+
/*print_r($fb_graph_url);
|
| 718 |
+
wp_die();*/
|
| 719 |
$data['data'] = self::complite_timeline($fb_graph_url);
|
| 720 |
self::$data = $data;
|
| 721 |
|
frontend/controllers/FFWDControllerMain.php
CHANGED
|
@@ -15,6 +15,7 @@ class FFWDControllerMain {
|
|
| 15 |
// Constructor & Destructor //
|
| 16 |
////////////////////////////////////////////////////////////////////////////////////////
|
| 17 |
public function __construct($params = array(), $from_shortcode = 0, $ffwd = 0, $view) {
|
|
|
|
| 18 |
$this->view = $view;
|
| 19 |
$this->display($params, $from_shortcode, $ffwd);
|
| 20 |
}
|
|
@@ -31,6 +32,16 @@ class FFWDControllerMain {
|
|
| 31 |
$view = new $view_name($model);
|
| 32 |
$view->display($params, $from_shortcode, $ffwd);
|
| 33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
////////////////////////////////////////////////////////////////////////////////////////
|
| 35 |
// Getters & Setters //
|
| 36 |
////////////////////////////////////////////////////////////////////////////////////////
|
| 15 |
// Constructor & Destructor //
|
| 16 |
////////////////////////////////////////////////////////////////////////////////////////
|
| 17 |
public function __construct($params = array(), $from_shortcode = 0, $ffwd = 0, $view) {
|
| 18 |
+
|
| 19 |
$this->view = $view;
|
| 20 |
$this->display($params, $from_shortcode, $ffwd);
|
| 21 |
}
|
| 32 |
$view = new $view_name($model);
|
| 33 |
$view->display($params, $from_shortcode, $ffwd);
|
| 34 |
}
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
private function wd_fb_update() {
|
| 38 |
+
global $wpdb;
|
| 39 |
+
$query = "SELECT * FROM " . $wpdb->prefix . "wd_fb_info WHERE `update_mode` <> 'no_update'";
|
| 40 |
+
$rows = $wpdb->get_results( $query );
|
| 41 |
+
require_once( WD_FFWD_DIR . '/framework/WDFacebookFeed.php' );
|
| 42 |
+
WDFacebookFeed::update_from_shedule( $rows );
|
| 43 |
+
die;
|
| 44 |
+
}
|
| 45 |
////////////////////////////////////////////////////////////////////////////////////////
|
| 46 |
// Getters & Setters //
|
| 47 |
////////////////////////////////////////////////////////////////////////////////////////
|
frontend/models/FFWDModelMain.php
CHANGED
|
@@ -19,6 +19,8 @@ class FFWDModelMain {
|
|
| 19 |
// Constructor & Destructor //
|
| 20 |
////////////////////////////////////////////////////////////////////////////////////////
|
| 21 |
public function __construct() {
|
|
|
|
|
|
|
| 22 |
}
|
| 23 |
////////////////////////////////////////////////////////////////////////////////////////
|
| 24 |
// Public Methods //
|
| 19 |
// Constructor & Destructor //
|
| 20 |
////////////////////////////////////////////////////////////////////////////////////////
|
| 21 |
public function __construct() {
|
| 22 |
+
|
| 23 |
+
|
| 24 |
}
|
| 25 |
////////////////////////////////////////////////////////////////////////////////////////
|
| 26 |
// Public Methods //
|
js/ffwd_frontend.js
CHANGED
|
@@ -1064,3 +1064,19 @@ function ffwd_blog_style_resize(ffwd_params, ffwd) {
|
|
| 1064 |
blogstyle_comment_reply_content.css("max-width", max_width_for_comment_reply_content);
|
| 1065 |
ffwd_blog_style_img.css("max-width", max_width_for_attachment);
|
| 1066 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1064 |
blogstyle_comment_reply_content.css("max-width", max_width_for_comment_reply_content);
|
| 1065 |
ffwd_blog_style_img.css("max-width", max_width_for_attachment);
|
| 1066 |
}
|
| 1067 |
+
|
| 1068 |
+
|
| 1069 |
+
jQuery(window).ready(function () {
|
| 1070 |
+
jQuery.ajax({
|
| 1071 |
+
url: wd_ffwd.ajax_url,
|
| 1072 |
+
data: {
|
| 1073 |
+
'action': 'ffwd_autoupdate',
|
| 1074 |
+
},
|
| 1075 |
+
type: 'get',
|
| 1076 |
+
success: function (response) {
|
| 1077 |
+
console.log(response);
|
| 1078 |
+
}
|
| 1079 |
+
|
| 1080 |
+
})
|
| 1081 |
+
|
| 1082 |
+
})
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-facebook-feed-plugin.html
|
|
| 4 |
Tags: customizable facebook feed, facebook, facebook events, facebook feed, facebook group, facebook like box, facebook likes, facebook page, facebook photos, facebook plugin, facebook posts, facebook likebox
|
| 5 |
Requires at least: 3.4
|
| 6 |
Tested up to: 4.7
|
| 7 |
-
Stable tag: 1.0.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -59,7 +59,10 @@ Upgrade to [Facebook Feed Pro](https://web-dorado.com/products/wordpress-faceboo
|
|
| 59 |
|
| 60 |
== Changelog ==
|
| 61 |
|
| 62 |
-
= 1.0.
|
|
|
|
|
|
|
|
|
|
| 63 |
* Added: Support Forum links
|
| 64 |
|
| 65 |
= 1.0.17 =
|
| 4 |
Tags: customizable facebook feed, facebook, facebook events, facebook feed, facebook group, facebook like box, facebook likes, facebook page, facebook photos, facebook plugin, facebook posts, facebook likebox
|
| 5 |
Requires at least: 3.4
|
| 6 |
Tested up to: 4.7
|
| 7 |
+
Stable tag: 1.0.19
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 59 |
|
| 60 |
== Changelog ==
|
| 61 |
|
| 62 |
+
= 1.0.19 =
|
| 63 |
+
* Changed: Autoupdate
|
| 64 |
+
|
| 65 |
+
= 1.0.18 =
|
| 66 |
* Added: Support Forum links
|
| 67 |
|
| 68 |
= 1.0.17 =
|
