Merge pull request #10127 from Pross/master
[2.5] Videos only load when help is needed.
This commit is contained in:
commit
e9a45203c5
|
@ -222,4 +222,10 @@ jQuery( function ( $ ) {
|
|||
|
||||
// Attribute term table
|
||||
$( 'table.attributes-table tbody tr:nth-child(odd)' ).addClass( 'alternate' );
|
||||
|
||||
// load videos when help button is clicked.
|
||||
$('#contextual-help-link').click(function(){
|
||||
var src = $('#tab-panel-woocommerce_101_tab iframe').data('src');
|
||||
$('#tab-panel-woocommerce_101_tab iframe').attr('src', src);
|
||||
});
|
||||
});
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -160,7 +160,7 @@ class WC_Admin_Help {
|
|||
'title' => __( 'WooCommerce 101', 'woocommerce' ),
|
||||
'content' =>
|
||||
'<h2><a href="http://docs.woothemes.com/document/woocommerce-101-video-series/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Videos&utm_campaign=Onboarding">' . __( 'WooCommerce 101', 'woocommerce' ) . '</a> – ' . esc_html( $video_map[ $video_key ]['title'] ) . '</h2>' .
|
||||
'<iframe src="' . esc_url( $video_map[ $video_key ]['url'] ) . '" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="480" height="298"></iframe>'
|
||||
'<iframe data-src="' . esc_url( $video_map[ $video_key ]['url'] ) . '" src="" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="480" height="298"></iframe>'
|
||||
) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue