Skip to content

Commit b29210b

Browse files
Merge pull request #182 from xylusthemes/get_facebook_image_from_id
get facebook image from id
2 parents d902a3e + 98a3325 commit b29210b

4 files changed

Lines changed: 12 additions & 2 deletions

includes/class-import-facebook-events-common.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1273,7 +1273,9 @@ public function ife_sync_event_to_tec_custom_tables( $centralize_array, $event_p
12731273
}
12741274
$timezone = isset( $centralize_array['timezone_name'] ) ? $centralize_array['timezone_name'] : 'Africa/Abidjan';
12751275
$duration = 0;
1276-
$hash = sha1( $event_post_id . $duration . $start_time . $end_time . $start_date_utc . $end_date_utc . $timezone );
1276+
$vars = array( $event_post_id, $duration, $start_time, $end_time, $start_date_utc, $end_date_utc, $timezone );
1277+
$vars = array_map( function( $v ){ return is_wp_error( $v ) ? '' : $v; }, $vars );
1278+
$hash = sha1( implode( '', $vars ) );
12771279

12781280
$tec_events_table = $wpdb->prefix . 'tec_events';
12791281
$tec_occurrences_table = $wpdb->prefix . 'tec_occurrences';

includes/class-import-facebook-events-ical_parser.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@ public function generate_centralize_event_array( $event, $event_data = array()
317317
$start_time = strtotime( $cwt_start['date_format'] );
318318
$timezone_name = $cwt_end['timezone_name'];
319319
$end_time = strtotime( $cwt_end['date_format'] );
320+
321+
if ( isset( $ife_events->common_pro ) && is_object($ife_events->common_pro) && method_exists( $ife_events->common_pro, 'ife_get_facebook_event_url' ) ) {
322+
$event_image = $ife_events->common_pro->ife_get_facebook_event_url( $uid );
323+
}
320324
}
321325

322326
$post_description = $ife_events->common->ife_remove_facebook_link_in_event_description( $post_description, $uid );

includes/class-import-facebook-events-ical_parser_aioec.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,10 @@ public function generate_centralize_event_array( $event, $event_data = array() )
330330
$start_time = strtotime( $cwt_start['date_format'] );
331331
$timezone_name = $cwt_end['timezone_name'];
332332
$end_time = strtotime( $cwt_end['date_format'] );
333+
334+
if ( isset( $ife_events->common_pro ) && is_object($ife_events->common_pro) && method_exists( $ife_events->common_pro, 'ife_get_facebook_event_url' ) ) {
335+
$event_image = $ife_events->common_pro->ife_get_facebook_event_url( $uid );
336+
}
333337
}
334338

335339
$post_description = $ife_events->common->ife_remove_facebook_link_in_event_description( $post_description, $uid );

languages/import-facebook-events.pot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ msgstr ""
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2026-01-06T06:52:41+00:00\n"
12+
"POT-Creation-Date: 2026-01-06T06:54:11+00:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.12.0\n"
1515
"X-Domain: import-facebook-events\n"

0 commit comments

Comments
 (0)