| @@ -19,8 +19,12 @@ | ||
| 19 | 19 | * |
| 20 | 20 | * @package automattic/jetpack |
| 21 | 21 | */ |
| 22 | 22 | |
| 23 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 24 | + exit( 0 ); | |
| 25 | +} | |
| 26 | + | |
| 23 | 27 | /** |
| 24 | 28 | * Register and display shortcode. |
| 25 | 29 | * |
| 26 | 30 | * @param array $atts Shortcode attributes. |
| @@ -63,10 +67,8 @@ | ||
| 63 | 67 | if ( empty( $w ) && ! empty( $content_width ) ) { |
| 64 | 68 | $w = (int) $content_width; |
| 65 | 69 | } elseif ( $w < 300 || $w > 1600 ) { // If width was specified, but is too small/large, set default value. |
| 66 | 70 | $w = 425; |
| 67 | - } else { | |
| 68 | - $w = (int) $w; | |
| 69 | 71 | } |
| 70 | 72 | |
| 71 | 73 | $h = ceil( $w * 348 / 425 ); // Note: user-supplied height is ignored. |
| 72 | 74 | |