PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 All 508 releases
← All changes | modules/sitemaps.php +45 -0 16.2-beta → 16.3 View file →
@@ -1,0 +1,45 @@
1 +<?php
2 +/**
3 + * Module Name: Sitemaps
4 + * Module Description: Generate XML sitemaps so search engines can index your site efficiently.
5 + * Sort Order: 13
6 + * First Introduced: 3.9
7 + * Requires Connection: No
8 + * Auto Activate: No
9 + * Module Tags: Recommended, Traffic
10 + * Feature: Recommended
11 + * Additional Search Queries: sitemap, traffic, search, site map, seo
12 + *
13 + * @package automattic/jetpack
14 + */
15 +
16 +/**
17 + * Disable direct access and execution.
18 + */
19 +if ( ! defined( 'ABSPATH' ) ) {
20 + exit( 0 );
21 +}
22 +
23 +if ( '1' == get_option( 'blog_public' ) ) { // phpcs:ignore Universal.Operators.StrictComparisons.LooseEqual
24 + include_once __DIR__ . '/sitemaps/sitemaps.php';
25 +
26 + // Disable WordPress 5.5-era sitemaps.
27 + add_filter( 'wp_sitemaps_enabled', '__return_false' );
28 +}
29 +
30 +add_action( 'jetpack_activate_module_sitemaps', 'jetpack_sitemap_on_activate' );
31 +
32 +/**
33 + * Run when Sitemaps module is activated.
34 + *
35 + * @since 4.8.0
36 + */
37 +function jetpack_sitemap_on_activate() {
38 + wp_clear_scheduled_hook( 'jp_sitemap_cron_hook' );
39 + require_once __DIR__ . '/sitemaps/sitemap-constants.php';
40 + require_once __DIR__ . '/sitemaps/sitemap-buffer.php';
41 + require_once __DIR__ . '/sitemaps/sitemap-stylist.php';
42 + require_once __DIR__ . '/sitemaps/sitemap-librarian.php';
43 + require_once __DIR__ . '/sitemaps/sitemap-finder.php';
44 + require_once __DIR__ . '/sitemaps/sitemap-builder.php';
45 +}