PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 13.5
Jetpack – WP Security, Backup, Speed, & Growth v13.5
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 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 14.4.2 All 500 releases
jetpack / modules / sitemaps.php
sitemaps.php
46 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Module Name: Sitemaps
4 * Module Description: Make it easy for search engines to find your site.
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;
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 }
46