summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/related-posts/jetpack-related-posts.php')
-rw-r--r--plugins/jetpack/modules/related-posts/jetpack-related-posts.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/jetpack/modules/related-posts/jetpack-related-posts.php b/plugins/jetpack/modules/related-posts/jetpack-related-posts.php
index 131d6a93..751a66dd 100644
--- a/plugins/jetpack/modules/related-posts/jetpack-related-posts.php
+++ b/plugins/jetpack/modules/related-posts/jetpack-related-posts.php
@@ -386,7 +386,7 @@ EOT;
checked( $options['show_headline'], true, false ),
esc_html__( 'Show a "Related" header to more clearly separate the related section from posts', 'jetpack' ),
checked( $options['show_thumbnails'], true, false ),
- esc_html__( 'Use a large and visually striking layout', 'jetpack' ),
+ esc_html__( 'Show a thumbnail image where available', 'jetpack' ),
checked( $options['show_date'], true, false ),
esc_html__( 'Show entry date', 'jetpack' ),
checked( $options['show_context'], true, false ),
@@ -591,11 +591,13 @@ EOT;
public function get_for_post_id( $post_id, array $args ) {
$options = $this->get_options();
- if ( ! empty( $args['size'] ) )
+ if ( ! empty( $args['size'] ) ) {
$options['size'] = $args['size'];
+ }
- if ( ! $options['enabled'] || 0 == (int)$post_id || empty( $options['size'] ) )
+ if ( ! $options['enabled'] || 0 == (int)$post_id || empty( $options['size'] ) || get_post_status( $post_id) !== 'publish' ) {
return array();
+ }
$defaults = array(
'size' => (int)$options['size'],
@@ -1413,7 +1415,9 @@ EOT;
&&
! is_admin()
&&
- ( !$this->_allow_feature_toggle() || $this->get_option( 'enabled' ) );
+ ( !$this->_allow_feature_toggle() || $this->get_option( 'enabled' ) )
+ &&
+ ! Jetpack_AMP_Support::is_amp_request();
/**
* Filter the Enabled value to allow related posts to be shown on pages as well.