Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldwight committed Jan 4, 2024
1 parent e98f46e commit 8411029
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/Models/Metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ protected function getFallbackValue($columnName)
try {
// Check if the default site title has been added at all in settings.
$siteTitle = TwillAppSettings::getTranslated('seo.metadata.site_title');
} catch(\Exception $e) {}
} catch (\Exception $e) {
}

return strip_tags($this->meta_describable->$fallbackColumnName).($siteTitle ? ' - '.$siteTitle : '');
}

Expand Down
11 changes: 1 addition & 10 deletions src/Repositories/Behaviours/HandleMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ trait HandleMetadata

/**
* Handle saving of metadata fields from form submission.
*
* @param \A17\Twill\Models\Contracts\TwillModelContract $object
* @param array $fields
*/
public function afterSaveHandleMetadata(TwillModelContract $object, array $fields)
{
Expand All @@ -39,8 +36,6 @@ public function afterSaveHandleMetadata(TwillModelContract $object, array $field
/**
* Prepares the metadata fields for the admin form view.
*
* @param \A17\Twill\Models\Contracts\TwillModelContract $object
* @param array $fields
*
* @return array
*/
Expand Down Expand Up @@ -69,7 +64,6 @@ public function getFormFieldsHandleMetadata(TwillModelContract $object, array $f
* Filters the full fields array down to just the metadata fields
* removes the field prefix and sets the keys correctly for persisting to store.
*
* @param array $fields
*
* @return array
*/
Expand All @@ -90,9 +84,7 @@ protected function getMetadataFields(array $fields)
/**
* Set default values on fields that require it.
*
* @param \A17\Twill\Models\Contracts\TwillModelContract $object
* @param array $fields
*
* @param array $fields
* @return array
*/
protected function setFieldDefaults(TwillModelContract $object, $fields)
Expand All @@ -110,7 +102,6 @@ protected function setFieldDefaults(TwillModelContract $object, $fields)
/**
* Determine if the field belongs to the metadata.
*
* @param string $key
*
* @return bool
*/
Expand Down

0 comments on commit 8411029

Please sign in to comment.