• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Jetpack a2z

Jetpack a2z

Jetpack a2z

  • Home
  • Plugins
  • Blocks
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Jetpack_Sitemap_Finder::the_jetpack_sitemap_path_and_query_prefix() – Path and query prefix of sitemap files. Depends on permalink settings.

You appear to be a bot. Output may be restricted

Description

Path and query prefix of sitemap files. Depends on permalink settings.

Usage

$string = Jetpack_Sitemap_Finder::the_jetpack_sitemap_path_and_query_prefix();

Parameters

Returns

string The path+query prefix.

Source

File name: jetpack/modules/sitemaps/sitemap-finder.php
Lines:

1 to 25 of 25
  public function the_jetpack_sitemap_path_and_query_prefix() {
    global $wp_rewrite;

    // Get path fragment from home_url().
    $home = wp_parse_url( home_url() );
    if ( isset( $home['path'] ) ) {
      $home_path = $home['path'];
    } else {
      $home_path = '';
    }

    // Get additional path fragment from filter.
    $location = Jetpack_Options::get_option_and_ensure_autoload(
      'jetpack_sitemap_location',
      ''
    );

    if ( $wp_rewrite->using_index_permalinks() ) {
      return $home_path . '/index.php' . $location . '/';
    } elseif ( $wp_rewrite->using_permalinks() ) {
      return $home_path . $location . '/';
    } else {
      return $home_path . $location . '/?jetpack-sitemap=';
    }
  }
 

 View on GitHub View on Trac

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Related

Published: 27 November 2019 | Last updated: 27 November 2019

Primary Sidebar

Information

Function name: Jetpack_Sitemap_Finder::the_jetpack_sitemap_path_and_query_prefix
Class ref: Jetpack_Sitemap_Finder
Plugin ref: Jetpack
Version: 9.2
Sourcefile: modules/sitemaps/sitemap-finder.php
File ref: modules/sitemaps/sitemap-finder.php
Deprecated?: No
API Letters: F,J,S,T

Footer

Jetpack a2z
Jetpack a2z
Jetpack a2z
WordPress 5.6
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  jetpack.wp-a2z.org
© Copyright Jetpack a2z 2014-2021. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins

  • Home
  • Blog
  • Sitemap
  • Sites