true, 'image/png' => true, 'image/gif' => true, 'image/bmp' => true, 'image/webp' => true, 'image/avif' => true, ); public $youtube_api_key = ''; public $vimeo_api_key = ''; public $exclude_broken_images = false; public $include_featured_images = false; public $include_woo_gallery = false; // Cache Settings public $enable_cache = false; public $cache_timeout = 24; public $cache_timeout_period = 3600; public $clear_cache_on_save_post = false; public $enable_video_api_cache = true; public $disable_media_sitemap_cache = false; public $minimize_sitemap = false; public $hide_branding = true; public $enable_cronjob = false; public $cronjob_runtime = 'daily'; public $colors = array( 'header_background_color' => '#82a745', 'header_text_color' => '#ffffff', 'sitemap_background_color' => '#ecf4db', 'sitemap_text_color' => '#444444', 'sitemap_link_color' => '#2d89c7', 'footer_text_color' => '#666666', ); /** * Settings constructor. */ public function __construct() { $this->home = new PTSettings( 10, PTSettings::$DAILY ); $this->page = new PTSettings( 6, PTSettings::$WEEKLY, false, true, true ); $this->post = new PTSettings( 6, PTSettings::$MONTHLY, true, true, true ); $this->archive = new PTSettings( 6, PTSettings::$DAILY ); $this->archive_older = new PTSettings( 3, PTSettings::$YEARLY ); $this->authors = new PTSettings( 3, PTSettings::$WEEKLY ); $this->media = new PTSettings( 3, PTSettings::$WEEKLY ); // Media Pages are disabled by default $this->media->include = false; foreach ( $this->get_cpt() as $cpt ) { $this->cpt[ $cpt ] = new PTSettings( 6, PTSettings::$MONTHLY ); } foreach ( $this->get_taxonomy_types() as $taxonomy ) { $this->taxonomies[ $taxonomy ] = new PTSettings( 3, PTSettings::$WEEKLY ); } } /** * Get Default Settings * @param $option * @return PTSettings */ public function get_row_value( $option ) { $settings = new PTSettings(); $settings->include = isset( $_POST[ $option . '_include' ] ) ? sanitize_text_field( $_POST[ $option . '_include' ] ) : false; $settings->priority = isset( $_POST[ $option . '_priority' ] ) ? sanitize_text_field( $_POST[ $option . '_priority' ] ) : 0; $settings->frequency = isset( $_POST[ $option . '_frequency' ] ) ? sanitize_text_field( $_POST[ $option . '_frequency' ] ) : $settings->frequency; $settings->google_news = isset( $_POST[ $option . '_google_news' ] ) ? sanitize_text_field( $_POST[ $option . '_google_news' ] ) : 0; $settings->image_sitemap = isset( $_POST[ $option . '_image_sitemap' ] ) ? sanitize_text_field( $_POST[ $option . '_image_sitemap' ] ) : 0; $settings->video_sitemap = isset( $_POST[ $option . '_video_sitemap' ] ) ? sanitize_text_field( $_POST[ $option . '_video_sitemap' ] ) : 0; return $settings; } }