summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/modules/shortcodes')
-rw-r--r--plugins/jetpack/modules/shortcodes/dailymotion.php4
-rw-r--r--plugins/jetpack/modules/shortcodes/instagram.php2
-rw-r--r--plugins/jetpack/modules/shortcodes/medium.php2
-rw-r--r--plugins/jetpack/modules/shortcodes/polldaddy.php6
-rw-r--r--plugins/jetpack/modules/shortcodes/scribd.php2
-rw-r--r--plugins/jetpack/modules/shortcodes/videopress.php24
-rw-r--r--plugins/jetpack/modules/shortcodes/wufoo.php4
7 files changed, 32 insertions, 12 deletions
diff --git a/plugins/jetpack/modules/shortcodes/dailymotion.php b/plugins/jetpack/modules/shortcodes/dailymotion.php
index d538ba38..bd4612ec 100644
--- a/plugins/jetpack/modules/shortcodes/dailymotion.php
+++ b/plugins/jetpack/modules/shortcodes/dailymotion.php
@@ -118,11 +118,11 @@ function dailymotion_shortcode( $atts ) {
$after = '';
if ( array_key_exists( 'video', $atts ) && $video = preg_replace( '/[^-a-z0-9_]/i', '', $atts['video'] ) && array_key_exists( 'title', $atts ) && $title = wp_kses( $atts['title'], array() ) ) {
- $after .= '<br /><strong><a href="' . esc_url( 'http://www.dailymotion.com/video/' . $video ) . '">' . esc_html( $title ) . '</a></strong>';
+ $after .= '<br /><strong><a href="' . esc_url( 'http://www.dailymotion.com/video/' . $video ) . '" target="_blank">' . esc_html( $title ) . '</a></strong>';
}
if ( array_key_exists( 'user', $atts ) && $user = preg_replace( '/[^-a-z0-9_]/i', '', $atts['user'] ) ) {
- $after .= '<br /><em>Uploaded by <a href="' . esc_url( 'http://www.dailymotion.com/' . $user ) . '">' . esc_html( $user ) . '</a></em>';
+ $after .= '<br /><em>Uploaded by <a href="' . esc_url( 'http://www.dailymotion.com/' . $user ) . '" target="_blank">' . esc_html( $user ) . '</a></em>';
}
}
diff --git a/plugins/jetpack/modules/shortcodes/instagram.php b/plugins/jetpack/modules/shortcodes/instagram.php
index 08c8ceb0..cb246d50 100644
--- a/plugins/jetpack/modules/shortcodes/instagram.php
+++ b/plugins/jetpack/modules/shortcodes/instagram.php
@@ -73,7 +73,7 @@ function jetpack_instagram_handler( $matches, $atts, $url ) {
if ( is_feed() ) {
$media_url = sprintf( 'http://instagr.am/p/%s/media/?size=l', $matches[4] );
- return sprintf( '<a href="%s" title="%s"><img src="%s" alt="Instagram Photo" /></a>', esc_url( $url ), esc_attr__( 'View on Instagram', 'jetpack' ), esc_url( $media_url ) );
+ return sprintf( '<a href="%s" title="%s" target="_blank"><img src="%s" alt="Instagram Photo" /></a>', esc_url( $url ), esc_attr__( 'View on Instagram', 'jetpack' ), esc_url( $media_url ) );
}
$atts = shortcode_atts( array(
diff --git a/plugins/jetpack/modules/shortcodes/medium.php b/plugins/jetpack/modules/shortcodes/medium.php
index 2d11cf15..fc0bab5c 100644
--- a/plugins/jetpack/modules/shortcodes/medium.php
+++ b/plugins/jetpack/modules/shortcodes/medium.php
@@ -27,7 +27,7 @@ function jetpack_embed_medium_embed_html( $args ) {
$args['type'] = jetpack_embed_medium_get_embed_type( $args['url'] );
- return sprintf( '<script async src="https://static.medium.com/embed.js"></script><a class="m-%1$s" href="%2$s" data-width="%3$s" data-border="%4$s" data-collapsed="%5$s">View %1$s at Medium.com</a>', esc_attr( $args['type'] ), esc_url( $args['url'] ), esc_attr( $args['width'] ), esc_attr( $args['border'] ), esc_attr( $args['collapsed'] ) );
+ return sprintf( '<script async src="https://static.medium.com/embed.js"></script><a class="m-%1$s" href="%2$s" target="_blank" data-width="%3$s" data-border="%4$s" data-collapsed="%5$s">View %1$s at Medium.com</a>', esc_attr( $args['type'] ), esc_url( $args['url'] ), esc_attr( $args['width'] ), esc_attr( $args['border'] ), esc_attr( $args['collapsed'] ) );
}
/**
diff --git a/plugins/jetpack/modules/shortcodes/polldaddy.php b/plugins/jetpack/modules/shortcodes/polldaddy.php
index dc6bc1c3..70ec89b7 100644
--- a/plugins/jetpack/modules/shortcodes/polldaddy.php
+++ b/plugins/jetpack/modules/shortcodes/polldaddy.php
@@ -251,7 +251,7 @@ CONTAINER;
$poll = intval( $poll );
$poll_url = sprintf( 'http://polldaddy.com/poll/%d', $poll );
$poll_js = sprintf( '%s.polldaddy.com/p/%d.js', ( is_ssl() ? 'https://secure' : 'http://static' ), $poll );
- $poll_link = sprintf( '<a href="%s">Take Our Poll</a>', $poll_url );
+ $poll_link = sprintf( '<a href="%s" target="_blank">Take Our Poll</a>', $poll_url );
if ( $no_script ) {
return $poll_link;
@@ -360,7 +360,7 @@ CONTAINER;
$survey = preg_replace( '/[^a-f0-9]/i', '', $survey );
$survey_url = esc_url( "http://polldaddy.com/s/{$survey}" );
- $survey_link = sprintf( '<a href="%s">%s</a>', $survey_url, esc_html( $title ) );
+ $survey_link = sprintf( '<a href="%s" target="_blank">%s</a>', $survey_url, esc_html( $title ) );
$settings = array();
@@ -565,7 +565,7 @@ new PolldaddyShortcode();
if ( ! function_exists( 'polldaddy_link' ) ) {
// http://polldaddy.com/poll/1562975/?view=results&msg=voted
function polldaddy_link( $content ) {
- return preg_replace( '!(?:\n|\A)http://polldaddy.com/poll/([0-9]+?)/(.+)?(?:\n|\Z)!i', "\n<script type='text/javascript' language='javascript' charset='utf-8' src='//static.polldaddy.com/p/$1.js'></script><noscript> <a href='http://polldaddy.com/poll/$1/'>View Poll</a></noscript>\n", $content );
+ return preg_replace( '!(?:\n|\A)http://polldaddy.com/poll/([0-9]+?)/(.+)?(?:\n|\Z)!i', "\n<script type='text/javascript' language='javascript' charset='utf-8' src='//static.polldaddy.com/p/$1.js'></script><noscript> <a href='http://polldaddy.com/poll/$1/' target='_blank'>View Poll</a></noscript>\n", $content );
}
// higher priority because we need it before auto-link and autop get to it
diff --git a/plugins/jetpack/modules/shortcodes/scribd.php b/plugins/jetpack/modules/shortcodes/scribd.php
index 7a278ea1..2f745daf 100644
--- a/plugins/jetpack/modules/shortcodes/scribd.php
+++ b/plugins/jetpack/modules/shortcodes/scribd.php
@@ -37,7 +37,7 @@ function scribd_shortcode_handler( $atts ) {
function scribd_shortcode_markup( $atts ) {
$markup = <<<EOD
<iframe class="scribd_iframe_embed" src="//www.scribd.com/embeds/$atts[id]/content?start_page=1&view_mode=$atts[mode]&access_key=$atts[key]" data-auto-height="true" scrolling="no" id="scribd_$atts[id]" width="100%" height="500" frameborder="0"></iframe>
-<div style="font-size:10px;text-align:center;width:100%"><a href="http://www.scribd.com/doc/$atts[id]">View this document on Scribd</a></div>
+<div style="font-size:10px;text-align:center;width:100%"><a href="http://www.scribd.com/doc/$atts[id]" target="_blank">View this document on Scribd</a></div>
EOD;
return $markup;
diff --git a/plugins/jetpack/modules/shortcodes/videopress.php b/plugins/jetpack/modules/shortcodes/videopress.php
index 08f33c6f..f876f1d3 100644
--- a/plugins/jetpack/modules/shortcodes/videopress.php
+++ b/plugins/jetpack/modules/shortcodes/videopress.php
@@ -1,3 +1,23 @@
<?php
-// Boom!
-require_once( JETPACK__PLUGIN_DIR . 'modules/videopress/shortcode.php' ); \ No newline at end of file
+/**
+ * Provides VideoPress videos support when module is disabled.
+ *
+ * @since 2.4
+ * @since 3.9.5 Added compatibility with refactored VideoPress module.
+ */
+
+if ( ! Jetpack::is_module_active( 'videopress' ) ) {
+
+ Jetpack::dns_prefetch( array(
+ '//v0.wordpress.com',
+ ) );
+
+ /**
+ * We won't have any videos less than sixty pixels wide. That would be silly.
+ */
+ define( 'VIDEOPRESS_MIN_WIDTH', 60 );
+
+ include_once JETPACK__PLUGIN_DIR . 'modules/videopress/utility-functions.php';
+ include_once JETPACK__PLUGIN_DIR . 'modules/videopress/shortcode.php';
+
+} \ No newline at end of file
diff --git a/plugins/jetpack/modules/shortcodes/wufoo.php b/plugins/jetpack/modules/shortcodes/wufoo.php
index 4020c5ea..3dd88a0e 100644
--- a/plugins/jetpack/modules/shortcodes/wufoo.php
+++ b/plugins/jetpack/modules/shortcodes/wufoo.php
@@ -28,7 +28,7 @@ function wufoo_shortcode( $atts ) {
* Return an error to the users with instructions if one of these params is invalid
* They don't have default values because they are user/form-specific
*/
- $return_error = sprintf( __( 'Something is wrong with your Wufoo shortcode. If you copy and paste it from the %sWufoo Code Manager%s, you should be golden.', 'jetpack' ), '<a href="http://wufoo.com/docs/code-manager/">', '</a>' );
+ $return_error = sprintf( __( 'Something is wrong with your Wufoo shortcode. If you copy and paste it from the %sWufoo Code Manager%s, you should be golden.', 'jetpack' ), '<a href="http://wufoo.com/docs/code-manager/" target="_blank">', '</a>' );
return '
<div style="border: 20px solid red; border-radius: 40px; padding: 40px; margin: 50px 0 70px;">
@@ -68,7 +68,7 @@ function wufoo_shortcode( $atts ) {
$iframe_embed .= 'allowTransparency="true" frameborder="0" scrolling="no" style="width:100%;border:none;"';
$iframe_embed .= 'src="https://' . $attr['username'] . '.wufoo.com/embed/' . $attr['formhash'] . '/">';
$iframe_embed .= '<a href="https://' . $attr['username'] . '.wufoo.com/forms/' . $attr['formhash'] . '/" ';
- $iframe_embed .= 'rel="nofollow">Fill out my Wufoo form!</a></iframe>';
+ $iframe_embed .= 'rel="nofollow" target="_blank">' . __( 'Fill out my Wufoo form!', 'jetpack' ) . '</a></iframe>';
/** This action is already documented in modules/widgets/gravatar-profile.php */
do_action( 'jetpack_stats_extra', 'embeds', 'wufoo' );