← All changes
|
modules/subscriptions/subscribe-modal/class-jetpack-subscribe-modal.php
+6
-3
13.8.3
→
16.3-a.7
View file →
| @@ -185,15 +185,15 @@ | ||
| 185 | 185 | <h2 class="wp-block-heading has-text-align-center" style="margin-top:4px;margin-bottom:10px;font-size:26px;font-style:normal;font-weight:600">$discover_more_from</h2> |
| 186 | 186 | <!-- /wp:heading --> |
| 187 | 187 | |
| 188 | 188 | <!-- wp:paragraph {"align":"center","style":{"typography":{"fontSize":"15px"},"spacing":{"margin":{"top":"4px","bottom":"0px"}}}} --> |
| 189 | - <p class='has-text-align-center' style='margin-top:4px;margin-bottom:0px;font-size:15px'>$subscribe_text</p> | |
| 189 | + <p class='has-text-align-center' style='margin-top:4px;margin-bottom:1em;font-size:15px'>$subscribe_text</p> | |
| 190 | 190 | <!-- /wp:paragraph --> |
| 191 | 191 | |
| 192 | 192 | <!-- wp:jetpack/subscriptions {"borderRadius":50,"className":"is-style-compact","appSource":"subscribe-modal"} /--> |
| 193 | 193 | |
| 194 | 194 | <!-- wp:paragraph {"align":"center","style":{"spacing":{"margin":{"top":"20px"}},"typography":{"fontSize":"14px"}},"className":"jetpack-subscribe-modal__close"} --> |
| 195 | - <p class="has-text-align-center jetpack-subscribe-modal__close" style="margin-top:20px;font-size:14px"><a href="#">$continue_reading</a></p> | |
| 195 | + <p class="has-text-align-center jetpack-subscribe-modal__close" style="margin-top:20px;margin-bottom:0;font-size:14px"><a href="#">$continue_reading</a></p> | |
| 196 | 196 | <!-- /wp:paragraph --> |
| 197 | 197 | </div> |
| 198 | 198 | <!-- /wp:group --> |
| 199 | 199 | HTML; |
| @@ -232,10 +232,13 @@ | ||
| 232 | 232 | if ( isset( $_GET['subscribe'] ) || isset( $_GET['blogsub'] ) ) { |
| 233 | 233 | return false; |
| 234 | 234 | } |
| 235 | 235 | |
| 236 | - // Don't show if post is for subscribers only or has paywall block | |
| 236 | + // Don't show if post is not a post, is for subscribers only, or has paywall block | |
| 237 | 237 | global $post; |
| 238 | + if ( ! $post instanceof WP_Post ) { | |
| 239 | + return false; | |
| 240 | + } | |
| 238 | 241 | if ( defined( 'Automattic\\Jetpack\\Extensions\\Subscriptions\\META_NAME_FOR_POST_LEVEL_ACCESS_SETTINGS' ) ) { |
| 239 | 242 | $access_level = get_post_meta( $post->ID, META_NAME_FOR_POST_LEVEL_ACCESS_SETTINGS, true ); |
| 240 | 243 | } else { |
| 241 | 244 | $access_level = get_post_meta( $post->ID, '_jetpack_newsletter_access', true ); |