Skip to content

Commit 0103601

Browse files
committed
Merge branch 'release/3.0.0-beta.16' into v3
2 parents 0b1af7c + 6380602 commit 0103601

26 files changed

Lines changed: 520 additions & 124 deletions

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# SEOmatic Changelog
22

3+
### 3.0.0-beta.16 - 2018.03.25
4+
## Changed
5+
* Fixed an issue where fresh installations were not taken to the Welcome screen
6+
* Replaced old SEOmatic icon in the Asset Bundle
7+
* Fixed an issue where Identity and Creator settings were not properly defaulted from the config files on fresh installations
8+
* Better parsing of the JSON-LD config files
9+
10+
## Added
11+
* Added Miscellaneous settings with Google Site Links search settings
12+
* Preserve user settings in the Tracking Scripts when bundles are updated
13+
* Fleshed out the JSON-LD for `mainEntityOfPage`, `identity`, and `creator`
14+
315
### 3.0.0-beta.15 - 2018.03.24
416
## Changed
517
* Separated the mainEntityOfPage templates off into a partial

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nystudio107/craft-seomatic",
33
"description": "SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.",
44
"type": "craft-plugin",
5-
"version": "3.0.0-beta.15",
5+
"version": "3.0.0-beta.16",
66
"keywords": [
77
"craft",
88
"cms",

src/Seomatic.php

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,27 @@ public function init()
181181
if ($this->tableSchemaExists()) {
182182
$this->installEventListeners();
183183
}
184+
// Handler: EVENT_AFTER_INSTALL_PLUGIN
185+
Event::on(
186+
Plugins::class,
187+
Plugins::EVENT_AFTER_INSTALL_PLUGIN,
188+
function (PluginEvent $event) {
189+
if ($event->plugin === $this) {
190+
// Invalidate our caches after we've been installed
191+
$this->clearAllCaches();
192+
// Send them to our welcome screen
193+
$request = Craft::$app->getRequest();
194+
if ($request->isCpRequest) {
195+
Craft::$app->getResponse()->redirect(UrlHelper::cpUrl(
196+
'seomatic/dashboard',
197+
[
198+
'showWelcome' => true
199+
]
200+
))->send();
201+
}
202+
}
203+
}
204+
);
184205
// We're loaded
185206
Craft::info(
186207
Craft::t(
@@ -312,27 +333,6 @@ function () {
312333
*/
313334
protected function installGlobalEventListeners()
314335
{
315-
// Handler: EVENT_AFTER_INSTALL_PLUGIN
316-
Event::on(
317-
Plugins::class,
318-
Plugins::EVENT_AFTER_INSTALL_PLUGIN,
319-
function (PluginEvent $event) {
320-
if ($event->plugin === $this) {
321-
// Invalidate our caches after we've been installed
322-
$this->clearAllCaches();
323-
// Send them to our welcome screen
324-
$request = Craft::$app->getRequest();
325-
if ($request->isCpRequest) {
326-
Craft::$app->getResponse()->redirect(UrlHelper::cpUrl(
327-
'seomatic/dashboard',
328-
[
329-
'showWelcome' => true
330-
]
331-
))->send();
332-
}
333-
}
334-
}
335-
);
336336
// Handler: Sections::EVENT_AFTER_SAVE_SECTION
337337
Event::on(
338338
Sections::class,
@@ -820,6 +820,9 @@ protected function customAdminCpPermissions(): array
820820
"seomatic:site-settings:social-media" => [
821821
'label' => Craft::t('seomatic', 'Social Media'),
822822
],
823+
"seomatic:site-settings:miscellaneous" => [
824+
'label' => Craft::t('seomatic', 'Miscellaneous'),
825+
],
823826
],
824827
],
825828
"seomatic:tracking-scripts" => [
Lines changed: 38 additions & 1 deletion
Loading
Lines changed: 36 additions & 59 deletions
Loading

src/base/MetaItem.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ public function debugMetaItem(
142142
if (is_subclass_of($this, MetaJsonLd::class)) {
143143
$isMetaJsonLdModel = true;
144144
}
145+
$modelScenarios = $this->scenarios();
146+
$scenarios = array_intersect_key($scenarios, $modelScenarios);
145147
foreach ($scenarios as $scenario => $logLevel) {
146148
$this->setScenario($scenario);
147149
if (!$this->validate()) {

0 commit comments

Comments
 (0)