Skip to content

Commit

Permalink
Add support for “default” as the default include option
Browse files Browse the repository at this point in the history
Signed-off-by: Marty Friedel <[email protected]>
  • Loading branch information
martyf committed Oct 5, 2022
1 parent 9f8abf7 commit 7c1082a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Support/Sitemapamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ protected function loadEntries(): \Illuminate\Support\Collection

// include_xml_sitemap is one of null (when not set, so default to true), then either false or true
$includeInSitemap = $entry->get('meta_include_in_xml_sitemap');
if ($includeInSitemap === null) {
if ($includeInSitemap === null || $includeInSitemap == 'default') {
// get the default config, or return true by default
return config('sitemapamic.defaults.'.$entry->collection()->handle().'.include', true);
} elseif ($includeInSitemap == "false" || $includeInSitemap === false) {
Expand Down

0 comments on commit 7c1082a

Please sign in to comment.