IMPR: Minor social links improvements

This commit is contained in:
Tony Air 2023-11-09 19:20:25 +02:00
parent 90e1a0676e
commit fc596b45ff

View File

@ -58,10 +58,16 @@ class SocialExtension extends DataExtension
{ {
parent::updateCMSFields($fields); parent::updateCMSFields($fields);
$nwfieldsList = array_keys(self::$has_one);
foreach ($nwfieldsList as $k) {
$fields->removeByName($k.'ID');
}
$cfg = [ $cfg = [
'types' => [ 'title_display' => false,
'URL', 'types' => [
], 'URL',
],
]; ];
$linkFields = [ $linkFields = [
@ -71,7 +77,7 @@ class SocialExtension extends DataExtension
LinkField::create('Instagram', 'Instagram', $this->owner, $cfg), LinkField::create('Instagram', 'Instagram', $this->owner, $cfg),
LinkField::create('Twitter', 'Twitter', $this->owner, $cfg), LinkField::create('Twitter', 'Twitter', $this->owner, $cfg),
LinkField::create('YouTube', 'YouTube', $this->owner, $cfg), LinkField::create('YouTube', 'YouTube', $this->owner, $cfg),
LinkField::create('Tiktok', 'Tiktok' , $this->owner, $cfg), LinkField::create('Tiktok', 'Tiktok', $this->owner, $cfg),
]; ];
$fields->findOrMakeTab('Root.Social'); $fields->findOrMakeTab('Root.Social');