From 52819d39d9797920360df6b52b948beb75073d93 Mon Sep 17 00:00:00 2001 From: Miguel Dantas Date: Sat, 6 Jul 2019 04:31:02 +0100 Subject: [PATCH] [OEmbed][Embed] Renamed OEmbed plugin to Embed --- lib/default.php | 2 +- plugins/{Oembed => Embed}/CONFIGURE | 0 .../EmbedPlugin.php} | 162 +++++++++--------- plugins/{Oembed => Embed}/README | 0 plugins/{Oembed => Embed}/actions/oembed.php | 2 +- .../classes/File_embed.php} | 38 ++-- .../lib/embedhelper.php} | 0 .../{Oembed => Embed}/lib/opengraphhelper.php | 0 .../Oembed.pot => Embed/locale/Embed.pot} | 0 .../locale/af/LC_MESSAGES/Embed.po} | 0 .../locale/ar/LC_MESSAGES/Embed.po} | 0 .../locale/arz/LC_MESSAGES/Embed.po} | 0 .../locale/ast/LC_MESSAGES/Embed.po} | 0 .../locale/be-tarask/LC_MESSAGES/Embed.po} | 0 .../locale/bg/LC_MESSAGES/Embed.po} | 0 .../locale/bn_IN/LC_MESSAGES/Embed.po} | 0 .../locale/br/LC_MESSAGES/Embed.po} | 0 .../locale/ca/LC_MESSAGES/Embed.po} | 0 .../locale/cs/LC_MESSAGES/Embed.po} | 0 .../locale/da/LC_MESSAGES/Embed.po} | 0 .../locale/de/LC_MESSAGES/Embed.po} | 0 .../locale/el/LC_MESSAGES/Embed.po} | 0 .../locale/en_GB/LC_MESSAGES/Embed.po} | 0 .../locale/eo/LC_MESSAGES/Embed.po} | 0 .../locale/es/LC_MESSAGES/Embed.po} | 0 .../locale/eu/LC_MESSAGES/Embed.po} | 0 .../locale/fa/LC_MESSAGES/Embed.po} | 0 .../locale/fi/LC_MESSAGES/Embed.po} | 0 .../locale/fr/LC_MESSAGES/Embed.po} | 0 .../locale/fur/LC_MESSAGES/Embed.po} | 0 .../locale/gl/LC_MESSAGES/Embed.po} | 0 .../locale/he/LC_MESSAGES/Embed.po} | 0 .../locale/hsb/LC_MESSAGES/Embed.po} | 0 .../locale/hu/LC_MESSAGES/Embed.po} | 0 .../locale/hy_AM/LC_MESSAGES/Embed.po} | 0 .../locale/ia/LC_MESSAGES/Embed.po} | 0 .../locale/id/LC_MESSAGES/Embed.po} | 0 .../locale/io/LC_MESSAGES/Embed.po} | 0 .../locale/is/LC_MESSAGES/Embed.po} | 0 .../locale/it/LC_MESSAGES/Embed.po} | 0 .../locale/ja/LC_MESSAGES/Embed.po} | 0 .../locale/ka/LC_MESSAGES/Embed.po} | 0 .../locale/ko/LC_MESSAGES/Embed.po} | 0 .../locale/ksh/LC_MESSAGES/Embed.po} | 0 .../locale/lb/LC_MESSAGES/Embed.po} | 0 .../locale/lt/LC_MESSAGES/Embed.po} | 0 .../locale/lv/LC_MESSAGES/Embed.po} | 0 .../locale/mg/LC_MESSAGES/Embed.po} | 0 .../locale/mk/LC_MESSAGES/Embed.po} | 0 .../locale/ml/LC_MESSAGES/Embed.po} | 0 .../locale/ms/LC_MESSAGES/Embed.po} | 0 .../locale/my/LC_MESSAGES/Embed.po} | 0 .../locale/nb/LC_MESSAGES/Embed.po} | 0 .../locale/ne/LC_MESSAGES/Embed.po} | 0 .../locale/nl/LC_MESSAGES/Embed.po} | 0 .../locale/nn/LC_MESSAGES/Embed.po} | 0 .../locale/pl/LC_MESSAGES/Embed.po} | 0 .../locale/pt/LC_MESSAGES/Embed.po} | 0 .../locale/pt_BR/LC_MESSAGES/Embed.po} | 0 .../locale/ro_RO/LC_MESSAGES/Embed.po} | 0 .../locale/ru/LC_MESSAGES/Embed.po} | 0 .../locale/sl/LC_MESSAGES/Embed.po} | 0 .../locale/sr-ec/LC_MESSAGES/Embed.po} | 0 .../locale/sv/LC_MESSAGES/Embed.po} | 0 .../locale/ta/LC_MESSAGES/Embed.po} | 0 .../locale/te/LC_MESSAGES/Embed.po} | 0 .../locale/tl/LC_MESSAGES/Embed.po} | 0 .../locale/tr/LC_MESSAGES/Embed.po} | 0 .../locale/uk/LC_MESSAGES/Embed.po} | 0 .../locale/ur_PK/LC_MESSAGES/Embed.po} | 0 .../locale/vi/LC_MESSAGES/Embed.po} | 0 .../locale/zh/LC_MESSAGES/Embed.po} | 0 .../locale/zh_CN/LC_MESSAGES/Embed.po} | 0 .../locale/zh_TW/LC_MESSAGES/Embed.po} | 0 .../{Oembed => Embed}/scripts/fixup_files.php | 0 .../scripts/poll_embed.php} | 0 .../tests/EmbedTest.php} | 0 .../css/oembed.css => Embed/css/embed.css} | 0 78 files changed, 104 insertions(+), 100 deletions(-) rename plugins/{Oembed => Embed}/CONFIGURE (100%) rename plugins/{Oembed/OembedPlugin.php => Embed/EmbedPlugin.php} (82%) rename plugins/{Oembed => Embed}/README (100%) rename plugins/{Oembed => Embed}/actions/oembed.php (99%) rename plugins/{Oembed/classes/File_oembed.php => Embed/classes/File_embed.php} (87%) rename plugins/{Oembed/lib/oembedhelper.php => Embed/lib/embedhelper.php} (100%) rename plugins/{Oembed => Embed}/lib/opengraphhelper.php (100%) rename plugins/{Oembed/locale/Oembed.pot => Embed/locale/Embed.pot} (100%) rename plugins/{Oembed/locale/af/LC_MESSAGES/Oembed.po => Embed/locale/af/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ar/LC_MESSAGES/Oembed.po => Embed/locale/ar/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/arz/LC_MESSAGES/Oembed.po => Embed/locale/arz/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ast/LC_MESSAGES/Oembed.po => Embed/locale/ast/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/be-tarask/LC_MESSAGES/Oembed.po => Embed/locale/be-tarask/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/bg/LC_MESSAGES/Oembed.po => Embed/locale/bg/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/bn_IN/LC_MESSAGES/Oembed.po => Embed/locale/bn_IN/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/br/LC_MESSAGES/Oembed.po => Embed/locale/br/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ca/LC_MESSAGES/Oembed.po => Embed/locale/ca/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/cs/LC_MESSAGES/Oembed.po => Embed/locale/cs/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/da/LC_MESSAGES/Oembed.po => Embed/locale/da/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/de/LC_MESSAGES/Oembed.po => Embed/locale/de/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/el/LC_MESSAGES/Oembed.po => Embed/locale/el/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/en_GB/LC_MESSAGES/Oembed.po => Embed/locale/en_GB/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/eo/LC_MESSAGES/Oembed.po => Embed/locale/eo/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/es/LC_MESSAGES/Oembed.po => Embed/locale/es/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/eu/LC_MESSAGES/Oembed.po => Embed/locale/eu/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/fa/LC_MESSAGES/Oembed.po => Embed/locale/fa/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/fi/LC_MESSAGES/Oembed.po => Embed/locale/fi/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/fr/LC_MESSAGES/Oembed.po => Embed/locale/fr/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/fur/LC_MESSAGES/Oembed.po => Embed/locale/fur/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/gl/LC_MESSAGES/Oembed.po => Embed/locale/gl/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/he/LC_MESSAGES/Oembed.po => Embed/locale/he/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/hsb/LC_MESSAGES/Oembed.po => Embed/locale/hsb/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/hu/LC_MESSAGES/Oembed.po => Embed/locale/hu/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/hy_AM/LC_MESSAGES/Oembed.po => Embed/locale/hy_AM/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ia/LC_MESSAGES/Oembed.po => Embed/locale/ia/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/id/LC_MESSAGES/Oembed.po => Embed/locale/id/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/io/LC_MESSAGES/Oembed.po => Embed/locale/io/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/is/LC_MESSAGES/Oembed.po => Embed/locale/is/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/it/LC_MESSAGES/Oembed.po => Embed/locale/it/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ja/LC_MESSAGES/Oembed.po => Embed/locale/ja/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ka/LC_MESSAGES/Oembed.po => Embed/locale/ka/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ko/LC_MESSAGES/Oembed.po => Embed/locale/ko/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ksh/LC_MESSAGES/Oembed.po => Embed/locale/ksh/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/lb/LC_MESSAGES/Oembed.po => Embed/locale/lb/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/lt/LC_MESSAGES/Oembed.po => Embed/locale/lt/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/lv/LC_MESSAGES/Oembed.po => Embed/locale/lv/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/mg/LC_MESSAGES/Oembed.po => Embed/locale/mg/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/mk/LC_MESSAGES/Oembed.po => Embed/locale/mk/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ml/LC_MESSAGES/Oembed.po => Embed/locale/ml/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ms/LC_MESSAGES/Oembed.po => Embed/locale/ms/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/my/LC_MESSAGES/Oembed.po => Embed/locale/my/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/nb/LC_MESSAGES/Oembed.po => Embed/locale/nb/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ne/LC_MESSAGES/Oembed.po => Embed/locale/ne/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/nl/LC_MESSAGES/Oembed.po => Embed/locale/nl/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/nn/LC_MESSAGES/Oembed.po => Embed/locale/nn/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/pl/LC_MESSAGES/Oembed.po => Embed/locale/pl/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/pt/LC_MESSAGES/Oembed.po => Embed/locale/pt/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/pt_BR/LC_MESSAGES/Oembed.po => Embed/locale/pt_BR/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ro_RO/LC_MESSAGES/Oembed.po => Embed/locale/ro_RO/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ru/LC_MESSAGES/Oembed.po => Embed/locale/ru/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/sl/LC_MESSAGES/Oembed.po => Embed/locale/sl/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/sr-ec/LC_MESSAGES/Oembed.po => Embed/locale/sr-ec/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/sv/LC_MESSAGES/Oembed.po => Embed/locale/sv/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ta/LC_MESSAGES/Oembed.po => Embed/locale/ta/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/te/LC_MESSAGES/Oembed.po => Embed/locale/te/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/tl/LC_MESSAGES/Oembed.po => Embed/locale/tl/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/tr/LC_MESSAGES/Oembed.po => Embed/locale/tr/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/uk/LC_MESSAGES/Oembed.po => Embed/locale/uk/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/ur_PK/LC_MESSAGES/Oembed.po => Embed/locale/ur_PK/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/vi/LC_MESSAGES/Oembed.po => Embed/locale/vi/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/zh/LC_MESSAGES/Oembed.po => Embed/locale/zh/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/zh_CN/LC_MESSAGES/Oembed.po => Embed/locale/zh_CN/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed/locale/zh_TW/LC_MESSAGES/Oembed.po => Embed/locale/zh_TW/LC_MESSAGES/Embed.po} (100%) rename plugins/{Oembed => Embed}/scripts/fixup_files.php (100%) rename plugins/{Oembed/scripts/poll_oembed.php => Embed/scripts/poll_embed.php} (100%) rename plugins/{Oembed/tests/oEmbedTest.php => Embed/tests/EmbedTest.php} (100%) rename public/plugins/{Oembed/css/oembed.css => Embed/css/embed.css} (100%) diff --git a/lib/default.php b/lib/default.php index dd038236b2..150399bb46 100644 --- a/lib/default.php +++ b/lib/default.php @@ -349,7 +349,7 @@ $default = 'DirectMessage' => array(), 'EmailAuthentication' => array(), 'Event' => array(), - 'Oembed' => array(), + 'Embed' => array(), 'OpenID' => array(), 'OpportunisticQM' => array(), 'OStatus' => array(), diff --git a/plugins/Oembed/CONFIGURE b/plugins/Embed/CONFIGURE similarity index 100% rename from plugins/Oembed/CONFIGURE rename to plugins/Embed/CONFIGURE diff --git a/plugins/Oembed/OembedPlugin.php b/plugins/Embed/EmbedPlugin.php similarity index 82% rename from plugins/Oembed/OembedPlugin.php rename to plugins/Embed/EmbedPlugin.php index 668f3bfd18..7557fc0adc 100644 --- a/plugins/Oembed/OembedPlugin.php +++ b/plugins/Embed/EmbedPlugin.php @@ -15,13 +15,14 @@ // along with GNU social. If not, see . /** - * OembedPlugin implementation for GNU social + * OEmbed and OpenGraph implementation for GNU social * * @package GNUsocial * @author Stephen Paul Weber * @author hannes * @author Mikael Nordfeldth * @author Diogo Cordeiro + * @author Miguel Dantas * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ @@ -29,29 +30,31 @@ defined('GNUSOCIAL') || die(); /** - * Base class for the oEmbed plugin that does most of the heavy lifting to get + * Base class for the Embed plugin that does most of the heavy lifting to get * and display representations for remote content. * * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ -class OembedPlugin extends Plugin +class EmbedPlugin extends Plugin { - const PLUGIN_VERSION = '2.0.1'; - - // settings which can be set in config.php with addPlugin('Oembed', array('param'=>'value', ...)); - // WARNING, these are _regexps_ (slashes added later). Always escape your dots and end your strings - public $domain_whitelist = array( // hostname => service provider - '^i\d*\.ytimg\.com$' => 'YouTube', - '^i\d*\.vimeocdn\.com$' => 'Vimeo', - ); + const PLUGIN_VERSION = '0.1.0'; + + // settings which can be set in config.php with addPlugin('Embed', array('param'=>'value', ...)); + // WARNING, these are _regexps_ (slashes added later). Always escape your dots and end ('$') your strings + + public $domain_whitelist = [ + // hostname => service provider + '^i\d*\.ytimg\.com$' => 'YouTube', + '^i\d*\.vimeocdn\.com$' => 'Vimeo', + ]; public $append_whitelist = array(); // fill this array as domain_whitelist to add more trusted sources public $check_whitelist = false; // security/abuse precaution protected $imgData = array(); /** - * Initialize the oEmbed plugin and set up the environment it needs for it. + * Initialize the Embed plugin and set up the environment it needs for it. * Returns true if it initialized properly, the exception object if it * doesn't. */ @@ -77,19 +80,19 @@ class OembedPlugin extends Plugin /** * This code executes when GNU social creates the page routing, and we hook - * on this event to add our action handler for oEmbed. + * on this event to add our action handler for Embed. * * @param $m URLMapper the router that was initialized. * @return bool true if successful, the exception object if it isn't. */ public function onRouterInitialized(URLMapper $m) { - $m->connect('main/oembed', ['action' => 'oembed']); + $m->connect('main/embed', ['action' => 'embed']); } /** * This event executes when GNU social encounters a remote URL we then decide - * to interrogate for metadata. oEmbed gloms onto it to see if we have an + * to interrogate for metadata. Embed gloms onto it to see if we have an * oEmbed endpoint or image to try to represent in the post. * * @param $url string the remote URL we're looking at @@ -218,7 +221,7 @@ class OembedPlugin extends Plugin public function onEndShowStylesheets(Action $action) { - $action->cssLink($this->path('css/oembed.css')); + $action->cssLink($this->path('css/embed.css')); return true; } @@ -233,9 +236,9 @@ class OembedPlugin extends Plugin */ public function onEndFileSaveNew(File $file) { - $fo = File_oembed::getKV('file_id', $file->getID()); - if ($fo instanceof File_oembed) { - common_log(LOG_WARNING, "Strangely, a File_oembed object exists for new file {$file->getID()}", __FILE__); + $fo = File_embed::getKV('file_id', $file->getID()); + if ($fo instanceof File_embed) { + common_log(LOG_WARNING, "Strangely, a File_embed object exists for new file {$file->getID()}", __FILE__); return true; } @@ -243,51 +246,51 @@ class OembedPlugin extends Plugin && (('text/html' === substr($file->mimetype, 0, 9) || 'application/xhtml+xml' === substr($file->mimetype, 0, 21)))) { try { - $oembed_data = File_oembed::_getOembed($file->url); - if ($oembed_data === false) { - throw new Exception('Did not get oEmbed data from URL'); + $embed_data = File_embed::_getEmbed($file->url); + if ($embed_data === false) { + throw new Exception('Did not get embed data from URL'); } - $file->setTitle($oembed_data->title); + $file->setTitle($embed_data->title); } catch (Exception $e) { - common_log(LOG_WARNING, sprintf(__METHOD__.': %s thrown when getting oEmbed data: %s', get_class($e), _ve($e->getMessage()))); + common_log(LOG_WARNING, sprintf(__METHOD__.': %s thrown when getting embed data: %s', get_class($e), _ve($e->getMessage()))); return true; } - File_oembed::saveNew($oembed_data, $file->getID()); + File_embed::saveNew($embed_data, $file->getID()); } return true; } public function onEndShowAttachmentLink(HTMLOutputter $out, File $file) { - $oembed = File_oembed::getKV('file_id', $file->getID()); - if (empty($oembed->author_name) && empty($oembed->provider)) { + $embed = File_embed::getKV('file_id', $file->getID()); + if (empty($embed->author_name) && empty($embed->provider)) { return true; } $out->elementStart('div', array('id'=>'oembed_info', 'class'=>'e-content')); - if (!empty($oembed->author_name)) { + if (!empty($embed->author_name)) { $out->elementStart('div', 'fn vcard author'); - if (empty($oembed->author_url)) { - $out->text($oembed->author_name); + if (empty($embed->author_url)) { + $out->text($embed->author_name); } else { $out->element( 'a', - array('href' => $oembed->author_url, + array('href' => $embed->author_url, 'class' => 'url'), - $oembed->author_name + $embed->author_name ); } } - if (!empty($oembed->provider)) { + if (!empty($embed->provider)) { $out->elementStart('div', 'fn vcard'); - if (empty($oembed->provider_url)) { - $out->text($oembed->provider); + if (empty($embed->provider_url)) { + $out->text($embed->provider); } else { $out->element( 'a', - array('href' => $oembed->provider_url, + array('href' => $embed->provider_url, 'class' => 'url'), - $oembed->provider + $embed->provider ); } } @@ -297,15 +300,15 @@ class OembedPlugin extends Plugin public function onFileEnclosureMetadata(File $file, &$enclosure) { // Never treat generic HTML links as an enclosure type! - // But if we have oEmbed info, we'll consider it golden. - $oembed = File_oembed::getKV('file_id', $file->getID()); - if (!$oembed instanceof File_oembed || !in_array($oembed->type, array('photo', 'video'))) { + // But if we have embed info, we'll consider it golden. + $embed = File_embed::getKV('file_id', $file->getID()); + if (!$embed instanceof File_embed || !in_array($embed->type, array('photo', 'video'))) { return true; } foreach (array('mimetype', 'url', 'title', 'modified', 'width', 'height') as $key) { - if (isset($oembed->{$key}) && !empty($oembed->{$key})) { - $enclosure->{$key} = $oembed->{$key}; + if (isset($embed->{$key}) && !empty($embed->{$key})) { + $enclosure->{$key} = $embed->{$key}; } } return true; @@ -314,59 +317,59 @@ class OembedPlugin extends Plugin public function onStartShowAttachmentRepresentation(HTMLOutputter $out, File $file) { try { - $oembed = File_oembed::getByFile($file); + $embed = File_embed::getByFile($file); } catch (NoResultException $e) { return true; } // Show thumbnail as usual if it's a photo. - if ($oembed->type === 'photo') { + if ($embed->type === 'photo') { return true; } - $out->elementStart('article', ['class'=>'h-entry oembed']); + $out->elementStart('article', ['class'=>'h-entry embed']); $out->elementStart('header'); try { $thumb = $file->getThumbnail(128, 128); - $out->element('img', $thumb->getHtmlAttrs(['class'=>'u-photo oembed'])); + $out->element('img', $thumb->getHtmlAttrs(['class'=>'u-photo embed'])); unset($thumb); } catch (Exception $e) { $out->element('div', ['class'=>'error'], $e->getMessage()); } - $out->elementStart('h5', ['class'=>'p-name oembed']); - $out->element('a', ['class'=>'u-url', 'href'=>$file->getUrl()], common_strip_html($oembed->title)); + $out->elementStart('h5', ['class'=>'p-name embed']); + $out->element('a', ['class'=>'u-url', 'href'=>$file->getUrl()], common_strip_html($embed->title)); $out->elementEnd('h5'); - $out->elementStart('div', ['class'=>'p-author oembed']); - if (!empty($oembed->author_name)) { - // TRANS: text before the author name of oEmbed attachment representation + $out->elementStart('div', ['class'=>'p-author embed']); + if (!empty($embed->author_name)) { + // TRANS: text before the author name of embed attachment representation // FIXME: The whole "By x from y" should be i18n because of different language constructions. $out->text(_('By ')); $attrs = ['class'=>'h-card p-author']; - if (!empty($oembed->author_url)) { - $attrs['href'] = $oembed->author_url; + if (!empty($embed->author_url)) { + $attrs['href'] = $embed->author_url; $tag = 'a'; } else { $tag = 'span'; } - $out->element($tag, $attrs, $oembed->author_name); + $out->element($tag, $attrs, $embed->author_name); } - if (!empty($oembed->provider)) { - // TRANS: text between the oEmbed author name and provider url + if (!empty($embed->provider)) { + // TRANS: text between the embed author name and provider url // FIXME: The whole "By x from y" should be i18n because of different language constructions. $out->text(_(' from ')); $attrs = ['class'=>'h-card']; - if (!empty($oembed->provider_url)) { - $attrs['href'] = $oembed->provider_url; + if (!empty($embed->provider_url)) { + $attrs['href'] = $embed->provider_url; $tag = 'a'; } else { $tag = 'span'; } - $out->element($tag, $attrs, $oembed->provider); + $out->element($tag, $attrs, $embed->provider); } $out->elementEnd('div'); $out->elementEnd('header'); $out->elementStart('div', ['class'=>'p-summary oembed']); - $out->raw(common_purify($oembed->html)); + $out->raw(common_purify($embed->html)); $out->elementEnd('div'); $out->elementStart('footer'); $out->elementEnd('footer'); @@ -378,20 +381,21 @@ class OembedPlugin extends Plugin public function onShowUnsupportedAttachmentRepresentation(HTMLOutputter $out, File $file) { try { - $oembed = File_oembed::getByFile($file); + $embed = File_embed::getByFile($file); } catch (NoResultException $e) { return true; } // the 'photo' type is shown through ordinary means, using StartShowAttachmentRepresentation! - switch ($oembed->type) { + switch ($embed->type) { case 'video': case 'link': - if (!empty($oembed->html) + if (!empty($embed->html) && (GNUsocial::isAjax() || common_config('attachments', 'show_html'))) { - $purifier = new \HTMLPurifier(); + require_once INSTALLDIR.'/extlib/HTMLPurifier/HTMLPurifier.auto.php'; + $purifier = new HTMLPurifier(); // FIXME: do we allow and here? we did that when we used htmLawed, but I'm not sure anymore... - $out->raw($purifier->purify($oembed->html)); + $out->raw($purifier->purify($embed->html)); } return false; } @@ -401,7 +405,7 @@ class OembedPlugin extends Plugin /** * This event executes when GNU social is creating a file thumbnail entry in - * the database. We glom onto this to create proper information for oEmbed + * the database. We glom onto this to create proper information for Embed * object thumbnails. * * @param $file File the file of the created thumbnail @@ -418,20 +422,20 @@ class OembedPlugin extends Plugin return true; } - // All our remote Oembed images lack a local filename property in the File object + // All our remote Embed images lack a local filename property in the File object if (!is_null($file->filename)) { - common_debug(sprintf('Filename of file id==%d is not null (%s), so nothing oEmbed '. + common_debug(sprintf('Filename of file id==%d is not null (%s), so nothing Embed '. 'should handle.', $file->getID(), _ve($file->filename))); return true; } try { - // If we have proper oEmbed data, there should be an entry in the File_oembed + // If we have proper Embed data, there should be an entry in the File_embed // and File_thumbnail tables respectively. If not, we're not going to do anything. $thumbnail = File_thumbnail::byFile($file); } catch (NoResultException $e) { - // Not Oembed data, or at least nothing we either can or want to use. - common_debug('No oEmbed data found for file id=='.$file->getID()); + // Not Embed data, or at least nothing we either can or want to use. + common_debug('No Embed data found for file id=='.$file->getID()); return true; } @@ -440,7 +444,7 @@ class OembedPlugin extends Plugin } catch (AlreadyFulfilledException $e) { // aw yiss! } catch (Exception $e) { - common_debug(sprintf('oEmbed encountered an exception (%s) for file id==%d: %s', + common_debug(sprintf('Embed encountered an exception (%s) for file id==%d: %s', get_class($e), $file->getID(), _ve($e->getMessage()))); throw $e; } @@ -512,11 +516,11 @@ class OembedPlugin extends Plugin private function isRemoteImage($url) { if (!filter_var($url, FILTER_VALIDATE_URL)) { - common_log(LOG_ERR, "Invalid URL in OEmbed::isRemoteImage()"); + common_log(LOG_ERR, "Invalid URL in Embed::isRemoteImage()"); return false; } if ($url==null) { - common_log(LOG_ERR, "URL not specified in OEmbed::isRemoteImage()"); + common_log(LOG_ERR, "URL not specified in Embed::isRemoteImage()"); return false; } try { @@ -585,7 +589,7 @@ class OembedPlugin extends Plugin try { // We'll trust sha256 (File::FILEHASH_ALG) not to have collision issues any time soon :) - $original_filename = bin2hex('oembed.' . $ext); + $original_filename = bin2hex('embed.' . $ext); $filehash = hash(File::FILEHASH_ALG, $imgData); $filename = "{$original_filename}-{$filehash}"; $fullpath = File_thumbnail::path($filename); @@ -594,7 +598,7 @@ class OembedPlugin extends Plugin throw new ServerException(_('Could not write downloaded file to disk.')); } } catch (Exception $err) { - common_log(LOG_ERROR, "Went to write a thumbnail to disk in OembedPlugin::storeRemoteThumbnail " . + common_log(LOG_ERROR, "Went to write a thumbnail to disk in EmbedPlugin::storeRemoteThumbnail " . "but encountered error: {$err}"); return $err; } finally { @@ -611,7 +615,7 @@ class OembedPlugin extends Plugin $thumbnail->updateWithKeys($orig); } catch (exception $err) { common_log(LOG_ERROR, "Went to write a thumbnail entry to the database in " . - "OembedPlugin::storeRemoteThumbnail but encountered error: ".$err); + "EmbedPlugin::storeRemoteThumbnail but encountered error: ".$err); return $err; } return true; @@ -626,13 +630,13 @@ class OembedPlugin extends Plugin */ public function onPluginVersion(array &$versions) { - $versions[] = array('name' => 'Oembed', + $versions[] = array('name' => 'Embed', 'version' => self::PLUGIN_VERSION, 'author' => 'Mikael Nordfeldth', 'homepage' => 'http://gnu.io/social/', 'description' => // TRANS: Plugin description. - _m('Plugin for using and representing Oembed data.')); + _m('Plugin for using and representing oEmbed, OpenGraph and other data.')); return true; } } diff --git a/plugins/Oembed/README b/plugins/Embed/README similarity index 100% rename from plugins/Oembed/README rename to plugins/Embed/README diff --git a/plugins/Oembed/actions/oembed.php b/plugins/Embed/actions/oembed.php similarity index 99% rename from plugins/Oembed/actions/oembed.php rename to plugins/Embed/actions/oembed.php index 7108545c79..1d4276a325 100644 --- a/plugins/Oembed/actions/oembed.php +++ b/plugins/Embed/actions/oembed.php @@ -36,7 +36,7 @@ defined('GNUSOCIAL') || die(); * @copyright 2019 Free Software Foundation, Inc http://www.fsf.org * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ -class OembedAction extends Action +class EmbedAction extends Action { protected function handle() { diff --git a/plugins/Oembed/classes/File_oembed.php b/plugins/Embed/classes/File_embed.php similarity index 87% rename from plugins/Oembed/classes/File_oembed.php rename to plugins/Embed/classes/File_embed.php index dcfc5f6401..f05bf09889 100644 --- a/plugins/Oembed/classes/File_oembed.php +++ b/plugins/Embed/classes/File_embed.php @@ -92,7 +92,7 @@ class File_oembed extends Managed_DataObject */ public static function getByFile(File $file) { - $fo = new File_oembed(); + $fo = new File_embed(); $fo->file_id = $file->id; if (!$fo->find(true)) { throw new NoResultException($fo); @@ -113,47 +113,47 @@ class File_oembed extends Managed_DataObject */ public static function saveNew($data, $file_id) { - $file_oembed = new File_oembed; - $file_oembed->file_id = $file_id; + $file_embed = new File_embed; + $file_embed->file_id = $file_id; if (!isset($data->version)) { common_debug('DEBUGGING oEmbed: data->version undefined in variable $data: '.var_export($data, true)); } - $file_oembed->version = $data->version; - $file_oembed->type = $data->type; + $file_embed->version = $data->version; + $file_embed->type = $data->type; if (!empty($data->provider_name)) { - $file_oembed->provider = $data->provider_name; + $file_embed->provider = $data->provider_name; } if (!empty($data->provider)) { - $file_oembed->provider = $data->provider; + $file_embed->provider = $data->provider; } if (!empty($data->provider_url)) { - $file_oembed->provider_url = $data->provider_url; + $file_embed->provider_url = $data->provider_url; } if (!empty($data->width)) { - $file_oembed->width = intval($data->width); + $file_embed->width = intval($data->width); } if (!empty($data->height)) { - $file_oembed->height = intval($data->height); + $file_embed->height = intval($data->height); } if (!empty($data->html)) { - $file_oembed->html = $data->html; + $file_embed->html = $data->html; } if (!empty($data->title)) { - $file_oembed->title = $data->title; + $file_embed->title = $data->title; } if (!empty($data->author_name)) { - $file_oembed->author_name = $data->author_name; + $file_embed->author_name = $data->author_name; } if (!empty($data->author_url)) { - $file_oembed->author_url = $data->author_url; + $file_embed->author_url = $data->author_url; } if (!empty($data->url)) { - $file_oembed->url = $data->url; - $given_url = File_redirection::_canonUrl($file_oembed->url); + $file_embed->url = $data->url; + $given_url = File_redirection::_canonUrl($file_embed->url); if (! empty($given_url)) { try { $file = File::getByUrl($given_url); - $file_oembed->mimetype = $file->mimetype; + $file_embed->mimetype = $file->mimetype; } catch (NoResultException $e) { // File_redirection::where argument 'discover' is false to avoid loops $redir = File_redirection::where($given_url, false); @@ -163,9 +163,9 @@ class File_oembed extends Managed_DataObject } } } - $result = $file_oembed->insert(); + $result = $file_embed->insert(); if ($result === false) { - throw new ServerException('Failed to insert File_oembed data into database!'); + throw new ServerException('Failed to insert File_embed data into database!'); } if (!empty($data->thumbnail_url) || ($data->type == 'photo')) { $ft = File_thumbnail::getKV('file_id', $file_id); diff --git a/plugins/Oembed/lib/oembedhelper.php b/plugins/Embed/lib/embedhelper.php similarity index 100% rename from plugins/Oembed/lib/oembedhelper.php rename to plugins/Embed/lib/embedhelper.php diff --git a/plugins/Oembed/lib/opengraphhelper.php b/plugins/Embed/lib/opengraphhelper.php similarity index 100% rename from plugins/Oembed/lib/opengraphhelper.php rename to plugins/Embed/lib/opengraphhelper.php diff --git a/plugins/Oembed/locale/Oembed.pot b/plugins/Embed/locale/Embed.pot similarity index 100% rename from plugins/Oembed/locale/Oembed.pot rename to plugins/Embed/locale/Embed.pot diff --git a/plugins/Oembed/locale/af/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/af/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/af/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/af/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ar/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ar/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ar/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ar/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/arz/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/arz/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/arz/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/arz/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ast/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ast/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ast/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ast/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/be-tarask/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/be-tarask/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/be-tarask/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/be-tarask/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/bg/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/bg/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/bg/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/bg/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/bn_IN/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/bn_IN/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/bn_IN/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/bn_IN/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/br/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/br/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/br/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/br/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ca/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ca/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ca/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ca/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/cs/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/cs/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/cs/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/cs/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/da/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/da/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/da/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/da/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/de/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/de/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/de/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/de/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/el/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/el/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/el/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/el/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/en_GB/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/en_GB/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/en_GB/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/en_GB/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/eo/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/eo/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/eo/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/eo/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/es/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/es/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/es/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/es/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/eu/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/eu/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/eu/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/eu/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/fa/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/fa/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/fa/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/fa/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/fi/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/fi/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/fi/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/fi/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/fr/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/fr/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/fr/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/fr/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/fur/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/fur/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/fur/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/fur/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/gl/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/gl/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/gl/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/gl/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/he/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/he/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/he/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/he/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/hsb/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/hsb/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/hsb/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/hsb/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/hu/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/hu/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/hu/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/hu/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/hy_AM/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/hy_AM/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/hy_AM/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/hy_AM/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ia/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ia/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ia/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ia/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/id/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/id/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/id/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/id/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/io/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/io/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/io/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/io/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/is/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/is/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/is/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/is/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/it/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/it/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/it/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/it/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ja/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ja/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ja/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ja/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ka/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ka/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ka/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ka/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ko/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ko/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ko/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ko/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ksh/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ksh/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ksh/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ksh/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/lb/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/lb/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/lb/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/lb/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/lt/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/lt/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/lt/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/lt/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/lv/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/lv/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/lv/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/lv/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/mg/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/mg/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/mg/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/mg/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/mk/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/mk/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/mk/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/mk/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ml/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ml/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ml/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ml/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ms/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ms/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ms/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ms/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/my/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/my/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/my/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/my/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/nb/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/nb/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/nb/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/nb/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ne/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ne/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ne/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ne/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/nl/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/nl/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/nl/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/nl/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/nn/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/nn/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/nn/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/nn/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/pl/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/pl/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/pl/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/pl/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/pt/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/pt/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/pt/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/pt/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/pt_BR/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/pt_BR/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/pt_BR/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/pt_BR/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ro_RO/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ro_RO/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ro_RO/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ro_RO/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ru/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ru/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ru/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ru/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/sl/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/sl/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/sl/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/sl/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/sr-ec/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/sr-ec/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/sr-ec/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/sr-ec/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/sv/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/sv/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/sv/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/sv/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ta/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ta/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ta/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ta/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/te/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/te/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/te/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/te/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/tl/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/tl/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/tl/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/tl/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/tr/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/tr/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/tr/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/tr/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/uk/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/uk/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/uk/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/uk/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/ur_PK/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/ur_PK/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/ur_PK/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/ur_PK/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/vi/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/vi/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/vi/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/vi/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/zh/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/zh/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/zh/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/zh/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/zh_CN/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/zh_CN/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/zh_CN/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/zh_CN/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/locale/zh_TW/LC_MESSAGES/Oembed.po b/plugins/Embed/locale/zh_TW/LC_MESSAGES/Embed.po similarity index 100% rename from plugins/Oembed/locale/zh_TW/LC_MESSAGES/Oembed.po rename to plugins/Embed/locale/zh_TW/LC_MESSAGES/Embed.po diff --git a/plugins/Oembed/scripts/fixup_files.php b/plugins/Embed/scripts/fixup_files.php similarity index 100% rename from plugins/Oembed/scripts/fixup_files.php rename to plugins/Embed/scripts/fixup_files.php diff --git a/plugins/Oembed/scripts/poll_oembed.php b/plugins/Embed/scripts/poll_embed.php similarity index 100% rename from plugins/Oembed/scripts/poll_oembed.php rename to plugins/Embed/scripts/poll_embed.php diff --git a/plugins/Oembed/tests/oEmbedTest.php b/plugins/Embed/tests/EmbedTest.php similarity index 100% rename from plugins/Oembed/tests/oEmbedTest.php rename to plugins/Embed/tests/EmbedTest.php diff --git a/public/plugins/Oembed/css/oembed.css b/public/plugins/Embed/css/embed.css similarity index 100% rename from public/plugins/Oembed/css/oembed.css rename to public/plugins/Embed/css/embed.css -- 2.39.5