Skip to content

Commit

Permalink
Add twitter handle field to section defaults and content seo.
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseleite committed Nov 25, 2020
1 parent 46d0e4e commit a4f9991
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions resources/lang/en/fieldsets/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
'image' => 'Social Image',
'image_instruct' => 'This image is used as a social network preview image.',

'twitter_handle' => 'Twitter Handle',
'twitter_handle_instruct' => 'Optionally override the twitter handle for this page.',

'sitemap' => 'Sitemap',
'sitemap_instruct' => 'If disabled, this item will not appear in the sitemap.',

Expand Down
2 changes: 1 addition & 1 deletion resources/lang/en/fieldsets/defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
'social_section_instruct' => 'We automatically generate most Twitter Card fields from your meta data and site configuration.',

'twitter_handle' => 'Twitter Handle',
'twitter_handle_instruct' => '_(Optional)_ Set the twitter handle that corresponds to the site.',
'twitter_handle_instruct' => 'Choose a default twitter handle that corresponds to the site.',

'sitemap_section' => 'Site Map',
'sitemap_section_instruct' => "Choose your default sitemap settings. If you're not sure, leave them blank for the standard default values.",
Expand Down
3 changes: 3 additions & 0 deletions resources/lang/en/fieldsets/sections.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
'image' => 'Image',
'image_instruct' => 'Choose a default image field to represent each URL in this section when shared on social networks.',

'twitter_handle' => 'Twitter Handle',
'twitter_handle_instruct' => 'Choose a default twitter handle that corresponds to this section.',

'sitemap_section' => 'Site Map',

'sitemap' => 'Enabled',
Expand Down
11 changes: 11 additions & 0 deletions src/Fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,17 @@ public function getConfig()
'field' => static::getAssetFieldConfig(),
],
],
[
'handle' => 'twitter_handle',
'field' => [
'display' => __("seo-pro::fieldsets/{$this->langFile}.twitter_handle"),
'instructions' => __("seo-pro::fieldsets/{$this->langFile}.twitter_handle_instruct"),
'type' => 'seo_pro_source',
'field' => [
'type' => 'text',
],
],
],
[
'handle' => 'sitemap',
'field' => [
Expand Down

0 comments on commit a4f9991

Please sign in to comment.