Описание
Плагин сокращает время загрузки страницы и увеличивает ваш показатель Google PageSpeed.
Заменяет встроенные видеоролики YouTube и Vimeo изображением предварительного просмотра видео, сторонние CSS и JS файлы загружаются только после клика.
Установка
- Загрузите плагин на ваш сайт WordPress
- Активируйте плагин в меню Плагины
Часто задаваемые вопросы
-
Как работает этот плагин?
-
Instead of loading the iframe of your video on page load, it only loads the video preview image.
This will work automatically for all videos that have been inserted through the standard page editor. -
Is it possible to insert a video using a shortcode?
-
Yes, you can use the
[sllv_video]shortcode using a link to a YouTube or Vimeo video as its value, like:[sllv_video]https://youtu.be/GywDFkY3z-c[/sllv_video]A shortcode can contain several additional attributes:
thumbnail — alternate thumbnail URL, in case the auto-generated one doesn’t suit you
play — URL with an alternate image for the Play button, in case you’re not happy with the default button
hide_play — if you give any value to this attribute, such as «1», then the Play button will not be displayed -
Can I embed a lazy loaded video into my template file?
-
Yes, but you cannot insert a shortcode
[sllv_video]into your template file directly.
You will need to pass the code into apply_shortcodes() function (WordPress 5.4+, or do_shortcode() in older versions) and display its output like this:<?php echo apply_shortcodes( '[sllv_video]https://youtu.be/GywDFkY3z-c[/sllv_video]' ); ?>
Отзывы
Участники и разработчики
«Simple Lazy Load Videos» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:
Участники«Simple Lazy Load Videos» переведён на 2 языка. Благодарим переводчиков за их работу.
Перевести «Simple Lazy Load Videos» на ваш язык.
Заинтересованы в разработке?
Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.
Журнал изменений
1.10.0
- Add support for unlisted Vimeo videos
- Add support for YouTube start time (
t=andstart=parameters) - Add support for YouTube live links and share links with extra parameters
- Lazy load videos in content loaded via AJAX (e.g. «Load more», infinite scroll)
- Fix YouTube playlists being replaced with a broken video
- Fix fatal error when saving settings on PHP 8
- Fix outdated version in CSS/JS links, so browsers get the updated files
- Fix plugin translations not loading
- Fix gray YouTube placeholder when the selected thumbnail size does not exist, now falls back to hqdefault
- Fix broken image when the video thumbnail is not available
- Fix
[sllv_video]shortcode with encoded or wrapped URLs - Fix
hide_playshortcode attribute not working together withplay - Fix «Settings» and «GitHub» links appearing for other plugins with the same file name
- Fix PHP notices with incomplete plugin settings
- Do not flush the site’s oEmbed cache on a fresh install
- Validate plugin settings against allowed values
- Cache failed Vimeo API requests
- Accessibility: add title to the player, move focus to the player after start
- Allow picture-in-picture and encrypted media in the player
1.9.1
- Tested up to: 7.1
- Fix SCSS codestyle
- Update packages
1.9.0
- Speed-related optimizations
- Update packages (including sass)
- Update browserslist rules
1.8.2
- Fix stable tag
1.8.1
- Update *.pot file
1.8.0
- Fix WPCS compliance for JS
- Improve media_playing() JS function, now it uses event delegation on the capture phase to handle dynamically added media
- Migrate from jQuery ajaxComplete to native MutationObserver
- Optimize plugin initialization to reduce frontend load
- Improve remote API data fetching robustness
- Update packages
1.7.3
- Update old changelog entries
- Update Grunt configs
- Update Grunt packages
- Tested up to WordPress 7.0
1.7.2
- Update Grunt config
- Update Grunt packages
- Tested up to WordPress 6.9
1.7.1
- Fix PHP error
1.7.0
- Get YouTube thumbnails in WEBP format if exists
- Fix «Links are not crawlable» issue
- Remove line breaks and tabs to fix extra
<br>in the final code. - Move SVG to separate files
- Refactor Functions::remote_api_get() method
- Replace creating new instance of classes with static methods
- Fix methods visibility
- Remove global $sllv variable
- Fix WPCS compliance
- Update Grunt packages
- Tested up to WordPress 6.8.1
1.6.0
- Add new search key in preg_match for short YouTube videos (thanks @paulooliveirar)
- Fix WPCS
- Update Grunt packages
1.5.1
- Fix Notice «Function _load_textdomain_just_in_time was called incorrectly»
- Fix visibility of some methods
- Remove grunt-spritesmith
- Update Grunt packages
- Tested up to WordPress 6.7.1
1.5.0
- Add shortcode attributes: thumbnail, play, hide_play
- Update FAQ
- Update Grunt packages
- Tested up to WordPress 6.6.2
1.4.1
- Fix missing jQuery error
1.4.0
- Add BuddyPress support
- Tested up to WordPress 6.4.2
1.3.0
- Remove styles from admin_enqueue_scripts
- Remove old admin styles from CSS
- Replace dart-sass to sass
- Change esversion in jshint config to 8
- Update packages
- Fix svg
- Fix WPCS
- Tested up to WordPress 6.4.1
1.2.0
- Add filters:
sllv_youtube_button,sllv_vimeo_button,sllv_video_template - Remove jQuery from depends scripts
- Rename CSS & JS handles
- Tested up to WordPress 6.3
1.1.0
- Refactoring
- Add GitHub link to plugin meta
1.0.0
- Add Gutenberg support
- New oEmbed template logic
- Do template replacement only on frontend
- Fix Vimeo thumbnail
0.9.0
- Stop all other video or HTML media if new video starts playing
- Stop all video if HTML media starts playing
- Code refactoring
- Fix documentation standards
0.8.2
- Add a check if the link in the shortcode is a video link
0.8.1
- Fix the missing file problem
0.8
- Add shortcode to display SLLV in theme templates
- Update Frequently Asked Questions
- Small code refactor
0.7.6
- Fix editor styles
- Add margins between videos
0.7.5
- Add some data clearing
0.7.4
- Fix aspect ratio in some themes
- Fix «PHP Warning: Undefined property: stdClass::$title» if title is empty for any reason
0.7.3
- Repair params in embed youtube
- Delete plugin settings if uninstall
- Рефакторинг кода
- Tested up to WordPress 6.1
0.7.2
- Рефакторинг кода
0.7.1
- Made it possible to change Vimeo thumbnail size
0.7.0
- Рефакторинг кода
- Added plugins options page
- Made it possible to change YouTube thumbnail size
0.6.8
- Fixed styles for WPBakery Page Builder
0.6.7
- Fixed styles for WPBakery Page Builder
0.6.6
- Fixed some broken styles
0.6.5
- Fixed styles for Divi Builder
0.6.4
- Исправлены некоторые предупреждения PHP, возникавшие во время действий с плагином
0.6.3
- Удалён украинский перевод т.к. он теперь доступен на translate.wordpress.org
0.6.2
- Удалён нативный Lazy Loading
0.6.1
- Удалён русский перевод т.к. он теперь доступен на translate.wordpress.org
- Обновлён украинский перевод
0.6
- Изменения в версии CSS и JS файлов, теперь она равна номеру версии плагина
- Рефакторинг кода
0.5.3
- Немного мелких исправлений
0.5.2
- Исправлен небольшой баг с width и height изображения
0.5.1
- Поправлена совместимость с Visual Composer
- Обновлён украинский перевод
- Улучшена совместимость
0.5
- Исправлена фатальная ошибка, возникающая на некоторых сайтах
- Исправлена проверка существования файла для скриптов и стилей
0.4
- Нативный Lazy Loading для изображений
- Немного мелких исправлений
0.3.4
- Улучшена совместимость
- Исправлены грамматические ошибки
0.3.3
- Переведено на украинский и русский языки
0.3.2
- Изменён префикс в классах CSS для лучшей совместимости
0.3.1
- Исправлена совместимость с языковыми пакетами (снова)
0.3
- Исправлена совместимость с языковыми пакетами
- Немного мелких исправлений
0.2
- Обновлена кнопка Play для Vimeo
- Исправления в панели управления WP
- Добавлена поддержка мультиязычности
0.1
- Первый релиз

