- Unzip extension package and upload them into Magento root directory.
- Run the following command in magento root folder
- php bin/magneto setup:upgrade
- php bin/magento setup:static-content:deploy
var video_code = $(".video-code").val(); $.ajax({ type:'GET', url: 'http://vimeo.com/api/v2/video/' + video_code + '.json', jsonp: 'callback', dataType: 'jsonp', success: function(data){ var thumbnail_src = data[0].thumbnail_large; if(thumbnail_src) { pageBody.find('.thumb-container img').attr("src", thumbnail_src); } } });
get featured image if (has_post_thumbnail( $post->ID ) ){
echo wp_get_attachment_image( get_post_thumbnail_id(), 'full');
}
var getImageSize = function(imgSrc){
var imageSize = '';
var obj = new XMLHttpRequest();
obj.open('HEAD', imgSrc, true);
obj.onreadystatechange = function(){
if ( obj.readyState == 4 ) {
if ( obj.status == 200 ) {
//alert('Size in bytes: ' + obj.getResponseHeader('Content-Length'));
imageSize = obj.getResponseHeader('Content-Length');
} else {
}
}
};
obj.send(null);
return imageSize;
};
this value and arguments provided individually.this value, and arguments provided as
an arraythis keyword set
to the provided value, with a given sequence of arguments preceding any
provided when the new function is called.apply(), the fundamental difference is that call() accepts an argument list, while apply() accepts a single array of arguments.apply lets you invoke the function with arguments as an array; callrequires the
parameters be listed explicitly. A useful mnemonic is "A for array and C for comma.".bind() when you want that
function to later be called with a certain context, useful in events. Use .call() or .apply() when
you want to invoke the function immediately, and modify the context.bind returns
a function that, when later executed, will have the correct context set for
calling the original function. This way you can maintain context in async
callbacks and events.