Описание
🇨🇳 🎬 🧱 This Gutenberg block allows for embedding a video in a WordPress post or page. If the user who views the page is in China, a different video will show from users in the rest of the world. This is to appropriately deal with China’s Internet wall which blocks YouTube and other video platforms.
Дополнительную информацию о разработке этого блока см. в репозитории на GitHub.
Плагин был разработан для CNCF и The Linux Foundation.
Блоки
Этот плагин предоставляет 1 блок.
- China Video Block
Установка
- Загрузите файлы плагина в директорию
/wp-content/plugins/china-video-block
или установите плагин напрямую на странице плагинов WordPress. - Активируйте плагин на странице «Плагины» в WordPress
- Перейдите в Настройки -> China Video Block, чтобы указать токен IPInfo.io
- Вставьте блок в запись или страницу.
Отзывы
Участники и разработчики
«China Video Block» — проект с открытым исходным кодом. В развитие плагина внесли свой вклад следующие участники:
Участники«China Video Block» переведён на 2 языка. Благодарим переводчиков за их работу.
Перевести «China Video Block» на ваш язык.
Заинтересованы в разработке?
Посмотрите код, проверьте SVN репозиторий, или подпишитесь на журнал разработки по RSS.
Журнал изменений
0.2.4
- loads the front-end script using wp_enqueue_script() only when the block is present on the page
0.2.3
- fixed the ver number on the script so that the block doesn’t keep breaking
0.2.2
- added a browser-busting version querystring for the front.js file so that browsers download the new file when it updates
0.2.1
- added compiled build file
0.2.0
- rewrite of the code to favor the China video; the problem was that, when favoring the non-China video, it would produce a failed request for users in China since it was loaded on page load before being changed to the China video
- when the ipinfo call produces and error, no cookie value is now set so that the call can be tried again during a subsequent page load
0.1.0
- Первая версия