Skip to content
Snippets Groups Projects
Commit 2052a8d8 authored by Tasneem Natshah's avatar Tasneem Natshah
Browse files

Issue #3341506: Initialize Webtheme Default Content module

parent 6dee8b79
No related branches found
No related tags found
No related merge requests found
Showing
with 617 additions and 0 deletions
File moved
langcode: en
status: true
dependencies: { }
id: social-media-menu
label: 'Social media menu'
description: ''
locked: false
_meta:
version: '1.0'
entity_type: block_content
uuid: 71152dfa-f7a4-4df0-863b-db6d4e6cabc9
bundle: basic
default_langcode: en
default:
status:
-
value: true
info:
-
value: 'Webtheme footer logo'
reusable:
-
value: true
revision_translation_affected:
-
value: true
body:
-
value: '<img src="themes/contrib/webtheme/logo-white.svg" alt="Home">'
format: full_html
summary: ''
_meta:
version: '1.0'
entity_type: block_content
uuid: e524b434-01da-4807-9726-a5d9a320a3ed
bundle: basic
default_langcode: en
default:
status:
-
value: true
info:
-
value: 'Webtheme copyright'
reusable:
-
value: true
revision_translation_affected:
-
value: true
body:
-
value: '<p>©&nbsp;Copyright&nbsp;[date:custom:Y] Webship</p>'
format: restricted_html
summary: ''
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: 03659e41-bfe9-4e8b-bfb0-5156d16266e6
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Documentation
menu_name:
-
value: main
link:
-
uri: 'internal:/documentation'
title: ''
options: { }
external:
-
value: false
rediscover:
-
value: true
weight:
-
value: 2
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: 0a192b2c-f9e8-48a7-bafa-077bb55633b4
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Twitter
menu_name:
-
value: social-media-menu
link:
-
uri: 'https://twitter.com/webshipco'
title: ''
options:
attributes:
class:
- twitter
external:
-
value: false
rediscover:
-
value: false
weight:
-
value: -47
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: 0bb07787-e7da-4fa5-9103-fd9b6a23c4f6
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Blog
menu_name:
-
value: main
link:
-
uri: 'internal:/blog'
title: ''
options: { }
external:
-
value: false
rediscover:
-
value: true
weight:
-
value: 3
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: 1f66f3fb-36d3-4756-a2f3-f91f7a3fde6c
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Contact
description:
-
value: Contact
menu_name:
-
value: footer
link:
-
uri: 'internal:/contact'
title: ''
options: { }
external:
-
value: false
rediscover:
-
value: true
weight:
-
value: -47
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: 3b1bf034-5c27-42f5-a8b1-03d42ea5921b
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Github
menu_name:
-
value: social-media-menu
link:
-
uri: 'https://github.com/webship/webship'
title: ''
options:
attributes:
class:
- github
external:
-
value: false
rediscover:
-
value: false
weight:
-
value: -50
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: 6c720ffa-d6d9-483a-8b78-03e5ef116901
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Privacy
menu_name:
-
value: footer
link:
-
uri: 'internal:/privacy'
title: ''
options: { }
external:
-
value: false
rediscover:
-
value: true
weight:
-
value: -49
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: 705186aa-0260-4221-9c86-db47bfbbb933
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Bitbucket
menu_name:
-
value: social-media-menu
link:
-
uri: 'https://bitbucket.org/webshipco/'
title: ''
options:
attributes:
class:
- bitbucket
external:
-
value: false
rediscover:
-
value: false
weight:
-
value: -48
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: 7ff712ca-17fa-4dca-98e9-25c8fbee408a
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: 'About us'
menu_name:
-
value: footer
link:
-
uri: 'internal:/about-us'
title: ''
options: { }
external:
-
value: false
rediscover:
-
value: true
weight:
-
value: -48
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: c1b24fea-6134-43c0-9f45-a9dce4226b46
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Pricing
menu_name:
-
value: main
link:
-
uri: 'internal:/pricing'
title: ''
options: { }
external:
-
value: false
rediscover:
-
value: true
weight:
-
value: 1
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: c204a677-f713-4971-b841-14b8f6a02445
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Gitlab
menu_name:
-
value: social-media-menu
link:
-
uri: 'https://gitlab.com/webship'
title: ''
options:
attributes:
class:
- gitlab
external:
-
value: false
rediscover:
-
value: false
weight:
-
value: -49
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: c91c69ea-c341-432c-b2f9-76598dde37d5
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Youtube
menu_name:
-
value: social-media-menu
link:
-
uri: 'https://www.youtube.com/channel/UCB6-J447aDgfPKP8HmV5TUw'
title: ''
options:
attributes:
class:
- youtube
external:
-
value: false
rediscover:
-
value: false
weight:
-
value: -45
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: de0d7ca4-7319-4d05-9c47-4652a32e0388
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Terms
menu_name:
-
value: footer
link:
-
uri: 'internal:/terms'
title: ''
options: { }
external:
-
value: false
rediscover:
-
value: true
weight:
-
value: -50
expanded:
-
value: false
revision_translation_affected:
-
value: true
_meta:
version: '1.0'
entity_type: menu_link_content
uuid: ec5567d6-e813-42b1-ad6e-5ba4ae7ad40e
bundle: menu_link_content
default_langcode: en
default:
enabled:
-
value: true
title:
-
value: Linkedin
menu_name:
-
value: social-media-menu
link:
-
uri: 'https://www.linkedin.com/company/webshipco/'
title: ''
options:
attributes:
class:
- linkedin
external:
-
value: false
rediscover:
-
value: false
weight:
-
value: -46
expanded:
-
value: false
revision_translation_affected:
-
value: true
name: Webtheme Default Content
type: module
description: 'Add default content for menu links and custom block content'
package: Webship
core_version_requirement: ^10
dependencies:
- token_filter:token_filter
- default_content:default_content
- link_attributes:link_attributes
<?php
/**
* @file
* Contains install and update for Webtheme Default Content module.
*/
/**
* Implements hook_install().
*/
function webtheme_default_content_install() {
$basic_html = \Drupal::configFactory()->getEditable('filter.format.basic_html');
if (isset($basic_html)) {
$basic_html_filters = $basic_html->get('filters');
if (isset($basic_html_filters) && is_array($basic_html_filters)) {
$basic_html_filters['token_filter'] = [
'id' => 'token_filter',
'provider' => 'token_filter',
'status' => TRUE,
'weight' => 0,
'settings' => ['replace_empty' => '1'],
];
$basic_html->set('filters', $basic_html_filters)->save(TRUE);
}
}
$full_html = \Drupal::configFactory()->getEditable('filter.format.full_html');
if (isset($full_html)) {
$full_html_filters = $full_html->get('filters');
if (isset($full_html_filters) && is_array($full_html_filters)) {
$full_html_filters['token_filter'] = [
'id' => 'token_filter',
'provider' => 'token_filter',
'status' => TRUE,
'weight' => 0,
'settings' => ['replace_empty' => '1'],
];
$full_html->set('filters', $full_html_filters)->save(TRUE);
}
}
$restricted_html = \Drupal::configFactory()->getEditable('filter.format.restricted_html');
if (isset($restricted_html)) {
$restricted_html_filters = $restricted_html->get('filters');
if (isset($restricted_html_filters) && is_array($restricted_html_filters)) {
$restricted_html_filters['token_filter'] = [
'id' => 'token_filter',
'provider' => 'token_filter',
'status' => TRUE,
'weight' => 0,
'settings' => ['replace_empty' => '1'],
];
$restricted_html->set('filters', $restricted_html_filters)->save(TRUE);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment