Support for meta tags during article import
authorMarcel Werk <burntime@woltlab.com>
Sat, 14 May 2022 10:59:48 +0000 (12:59 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sat, 14 May 2022 10:59:48 +0000 (12:59 +0200)
wcfsetup/install/files/lib/system/importer/ArticleImporter.class.php

index f5ab0b6a7274185f993d7c2af7846503c63edc6c..f4b92e460958fe46dfe80b48fb0b67aad4448be6 100644 (file)
@@ -67,6 +67,8 @@ class ArticleImporter extends AbstractImporter
                 'imageID' => $imageID,
                 'teaserImageID' => $teaserImageID,
                 'tags' => (!empty($contentData['tags']) ? $contentData['tags'] : []),
+                'metaTitle' => (!empty($contentData['metaTitle']) ? $contentData['metaTitle'] : ''),
+                'metaDescription' => (!empty($contentData['metaDescription']) ? $contentData['metaDescription'] : ''),
             ];
         }
         if (empty($contents)) {
@@ -113,6 +115,8 @@ class ArticleImporter extends AbstractImporter
                 'content' => $contentData['content'],
                 'imageID' => $contentData['imageID'],
                 'teaserImageID' => $contentData['teaserImageID'],
+                'metaTitle' => $contentData['metaTitle'],
+                'metaDescription' => $contentData['metaDescription'],
             ]);
 
             // save tags