<?php /* * SITESEO * https://siteseo.io * (c) SiteSEO Team */ namespace SiteSEO; if(!defined('ABSPATH')){ die('Hacking Attempt !'); } class Generate_sitemap{ static function general_settings(){ global $siteseo; if(isset($siteseo->sitemap_settings['xml_sitemap_general_enable'])){ } if(isset($siteseo->sitemap_settings['xml_sitemap_general_enable'])){ add_rewrite_rule('^sitemaps.xml$', 'index.php?siteseo_sitemap=1', 'top'); add_action('template_redirect','SiteSEO\Generate_sitemap::render_sitemap'); add_filter('query_vars', 'SiteSEO\Generate_sitemap::enable_args'); } add_rewrite_rule('author.xml?$', 'index.php?siteseo_author=1', 'top'); } static function enable_args($vars){ $vars[] = 'sitemap'; return $vars; } static function render_sitemap(){ /* if(get_query_var('sitemap')){ // Set the correct header for XML header('Content-Type: application/xml; charset=utf-8'); // Start outputting the XML structure echo '<?xml version="1.0" encoding="UTF-8"?>'; echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; // Query the posts you want to include in the sitemap $args = array( 'post_type' => 'post', // Change to any custom post type as needed 'post_status' => 'publish', 'posts_per_page' => -1, ); $query = new WP_Query($args); if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); $post_url = get_permalink(); echo '<url>'; echo '<loc>' . esc_url($post_url) . '</loc>'; echo '<lastmod>' . get_the_modified_date('c') . '</lastmod>'; echo '<changefreq>weekly</changefreq>'; echo '<priority>0.8</priority>'; echo '</url>'; } } echo '</urlset>'; exit; } */ } static function flush_premalinks(){ global $siteseo; } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
admin | Folder | 0755 |
|
|
metaboxes | Folder | 0755 |
|
|
public | Folder | 0755 |
|
|
settings | Folder | 0755 |
|
|
sitemap | Folder | 0755 |
|
|
admin.php | File | 2.08 KB | 0644 |
|
ajax.php | File | 5.29 KB | 0644 |
|
dynamic-variables.php | File | 13.55 KB | 0644 |
|
functions.php | File | 20.61 KB | 0644 |
|
generate_sitemap.php | File | 1.79 KB | 0644 |
|
image_seo.php | File | 348 B | 0644 |
|
install.php | File | 806 B | 0644 |
|
options-advanced-admin.php | File | 28.15 KB | 0644 |
|
options-advanced.php | File | 7.43 KB | 0644 |
|
options-breadcrumbs.php | File | 5.77 KB | 0644 |
|
options-clarity.php | File | 2.31 KB | 0644 |
|
options-google-analytics.php | File | 36.65 KB | 0644 |
|
options-google-ecommerce.php | File | 9.94 KB | 0644 |
|
options-import-export.php | File | 29.3 KB | 0644 |
|
options-instant-indexing.php | File | 10.32 KB | 0644 |
|
options-matomo.php | File | 9.05 KB | 0644 |
|
options-oembed.php | File | 5.85 KB | 0644 |
|
options-redirections.php | File | 6.26 KB | 0644 |
|
options-sitemap.php | File | 6.52 KB | 0644 |
|
options-social.php | File | 59.07 KB | 0644 |
|
options-titles-metas.php | File | 56.91 KB | 0644 |
|
options.php | File | 26 KB | 0644 |
|
social_metas.php | File | 6.36 KB | 0644 |
|
tableofcontent.php | File | 4.53 KB | 0644 |
|
titles_metas.php | File | 16.24 KB | 0644 |
|