Initial commit
This commit is contained in:
commit
65e0da7e11
1397 changed files with 596542 additions and 0 deletions
30
site/OFF_plugins/embed/core/data.php
Normal file
30
site/OFF_plugins/embed/core/data.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace Kirby\Embed;
|
||||
|
||||
use C;
|
||||
use Embed\Embed;
|
||||
|
||||
class Data {
|
||||
|
||||
public static function get($url) {
|
||||
try {
|
||||
return Embed::create($url, static::config());
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected static function config() {
|
||||
return [
|
||||
'choose_bigger_image' => true,
|
||||
'google' => [
|
||||
'key' => c::get('plugin.embed.providers.google.key', null)
|
||||
],
|
||||
'soundcloud' => [
|
||||
'key' => c::get('plugin.embed.providers.soundcloud.key', null)
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue