diff --git a/classes/class-wpcom-liveblog-amp.php b/classes/class-wpcom-liveblog-amp.php index 83dc004df..66114cb6c 100644 --- a/classes/class-wpcom-liveblog-amp.php +++ b/classes/class-wpcom-liveblog-amp.php @@ -88,7 +88,14 @@ public static function add_custom_query_vars( $query_vars ) { public static function add_social_share_options() { $social_array = array( 'twitter', 'pinterest', 'email', 'gplus' ); - if ( defined( 'LIVEBLOG_AMP_FACEBOOK_SHARE' ) ) { + /** + * Filter Liveblog AMP Facebook share app id + * + * @param mixed $app_id Facebook app id to enable Facebook sharing, default false. + */ + $facebook_app_id = apply_filters( 'liveblog_amp_facebook_share_app_id', false ); + + if ( ! empty( $facebook_app_id ) ) { $social_array[] = 'facebook'; } diff --git a/templates/amp/entry.php b/templates/amp/entry.php index 073a43922..5db097f2e 100644 --- a/templates/amp/entry.php +++ b/templates/amp/entry.php @@ -7,6 +7,9 @@ $share_link = $this->get( 'share_link' ); $update_time = $this->get( 'update_time' ); $share_link_amp = $this->get( 'share_link_amp' ); + + /* This filter is defined in class-wpcom-liveblog-amp.php */ + $facebook_app_id = apply_filters( 'liveblog_amp_facebook_share_app_id', false ); ?>
+ data-param-url="" + + data-param-app_id="" + + >