![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/cartforge.co/app/code/Magefan/Blog/Model/Sitemap/ |
<?php /** * Copyright © Magefan ([email protected]). All rights reserved. * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement). * * Glory to Ukraine! Glory to the heroes! */ declare(strict_types=1); namespace Magefan\Blog\Model\Sitemap; use Magefan\Blog\Api\SitemapConfigInterface; /** * Class Sitemap Config Model */ class SitemapConfig extends \Magefan\Blog\Model\Config implements SitemapConfigInterface { /** * @param $page * @param $storeId * @return bool */ public function isEnabledSitemap($page, $storeId = null) : bool { return $this->isEnabled($storeId); } /** * @param $page * @param $storeId * @return string */ public function getFrequency($page, $storeId = null): string { $frequency = ''; switch ($page) { case 'index': $frequency = 'daily'; break; case 'category': $frequency = 'daily'; break; case 'post': $frequency = 'daily'; break; default: $frequency = 'daily'; } return $frequency; } /** * @param $page * @param $storeId * @return float */ public function getPriority($page, $storeId = null): float { switch ($page) { case 'index': $priority = 1; break; case 'category': $priority = 0.8; break; case 'post': $priority = 0.5; break; default: $priority = 0.3; } return (float)$priority; } }