Видео виджет для Elementor - PullRequest
0 голосов
/ 10 мая 2019

Я хочу добавить другой виджет в виджет elementor.

Видео виджет с https://aparat.com

"$ provider_match_masks" Где я должен застрять?

класс Embed {

/**
 * Provider match masks.
 *
 * Holds a list of supported providers with their URL structure in a regex format.
 *
 * @since 1.5.0
 * @access private
 * @static
 *
 * @var array Provider URL structure regex.
 */
private static $provider_match_masks = [
    'youtube' => '/^.*(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:(?:watch)?\?(?:.*&)?vi?=|(?:embed|v|vi|user)\/))([^\?&\"\'>]+)/',
    'vimeo' => '/^.*vimeo\.com\/(?:[a-z]*\/)*([‌​0-9]{6,11})[?]?.*/',
    'dailymotion' => '/^.*dailymotion.com\/(?:video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/',
    'aparat' => '......',
];

/**
 * Embed patterns.
 *
 * Holds a list of supported providers with their embed patters.
 *
 * @since 1.5.0
 * @access private
 * @static
 *
 * @var array Embed patters.
 */
private static $embed_patterns = [
    'youtube' => 'https://www.youtube{NO_COOKIE}.com/embed/{VIDEO_ID}?feature=oembed',
    'vimeo' => 'https://player.vimeo.com/video/{VIDEO_ID}#t={TIME}',
    'dailymotion' => 'https://dailymotion.com/embed/video/{VIDEO_ID}',
    'aparat' => 'https://aparat.com/video/video/embed/videohash/{VIDEO_ID}/vt/frame',
];
...