Skip to content

Commit

Permalink
Use Jetpack_RelatedPosts::get_options() to get options for ser… (#14386)
Browse files Browse the repository at this point in the history
This ensures that options are normalized and that they can be filtered via jetpack_relatedposts_filter_options.
  • Loading branch information
westonruter authored and jeherve committed Jan 20, 2020
1 parent 03212a4 commit 5e2bbbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/related-posts/jetpack-related-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ public function filter_add_target_to_dom( $content ) {
* @return string Rendered related posts HTML.
*/
public function get_server_rendered_html() {
$rp_settings = Jetpack_Options::get_option( 'relatedposts', array() );
$rp_settings = $this->get_options();
$block_rp_settings = array(
'displayThumbnails' => $rp_settings['show_thumbnails'],
'showHeadline' => $rp_settings['show_headline'],
Expand Down

0 comments on commit 5e2bbbc

Please sign in to comment.