Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook Page Plugin: update deprecated stream attribute #13725

Merged
merged 2 commits into from
Oct 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/widgets/facebook-likebox.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function widget( $args, $instance ) {
$page_url = set_url_scheme( $like_args['href'], 'https' );

$like_args['show_faces'] = (bool) $like_args['show_faces'] ? 'true' : 'false';
$like_args['stream'] = (bool) $like_args['stream'] ? 'true' : 'false';
$like_args['stream'] = (bool) $like_args['stream'] ? 'timeline' : 'false';
$like_args['cover'] = (bool) $like_args['cover'] ? 'false' : 'true';

echo $before_widget;
Expand Down Expand Up @@ -105,7 +105,7 @@ function widget( $args, $instance ) {

?>
<div id="fb-root"></div>
<div class="fb-page" data-href="<?php echo esc_url( $page_url ); ?>" data-width="<?php echo intval( $like_args['width'] ); ?>" data-height="<?php echo intval( $like_args['height'] ); ?>" data-hide-cover="<?php echo esc_attr( $like_args['cover'] ); ?>" data-show-facepile="<?php echo esc_attr( $like_args['show_faces'] ); ?>" data-show-posts="<?php echo esc_attr( $like_args['stream'] ); ?>">
<div class="fb-page" data-href="<?php echo esc_url( $page_url ); ?>" data-width="<?php echo intval( $like_args['width'] ); ?>" data-height="<?php echo intval( $like_args['height'] ); ?>" data-hide-cover="<?php echo esc_attr( $like_args['cover'] ); ?>" data-show-facepile="<?php echo esc_attr( $like_args['show_faces'] ); ?>" data-tabs="<?php echo esc_attr( $like_args['stream'] ); ?>">
<div class="fb-xfbml-parse-ignore"><blockquote cite="<?php echo esc_url( $page_url ); ?>"><a href="<?php echo esc_url( $page_url ); ?>"><?php echo esc_html( $title ); ?></a></blockquote></div>
</div>
<?php
Expand Down Expand Up @@ -193,7 +193,7 @@ function form( $instance ) {
<p>
<label for="<?php echo esc_attr( $this->get_field_id( 'stream' ) ); ?>">
<input type="checkbox" name="<?php echo esc_attr( $this->get_field_name( 'stream' ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( 'stream' ) ); ?>" <?php checked( $like_args['stream'] ); ?> />
<?php _e( 'Show Stream', 'jetpack' ); ?>
<?php _e( 'Show Timeline', 'jetpack' ); ?>
<br />
<small><?php _e( 'Show Page Posts.', 'jetpack' ); ?></small>
</label>
Expand Down