Plugin Directory

Changeset 3395803


Ignore:
Timestamp:
11/14/2025 02:35:36 PM (4 months ago)
Author:
wpdive
Message:

update for xml Prevent any processing

Location:
nexa-blocks
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nexa-blocks/tags/1.1.1/nexa-blocks.php

    r3392899 r3395803  
    1414 * @package NexaBlocks
    1515 */
     16
     17// IMPORTANT FIX: Prevent any processing on sitemap requests
     18if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
     19    $request_uri = $_SERVER['REQUEST_URI'];
     20   
     21    if ( strpos( $request_uri, 'sitemap' ) !== false ||
     22         strpos( $request_uri, '.xml' ) !== false ||
     23         strpos( $request_uri, 'xsl' ) !== false ||
     24         ( isset( $_GET['sitemap'] ) ) ) {
     25        // Don't load Nexa Blocks on sitemap pages
     26        return;
     27    }
     28}
    1629
    1730if ( ! defined( 'ABSPATH' ) ) {
  • nexa-blocks/trunk/nexa-blocks.php

    r3392899 r3395803  
    1414 * @package NexaBlocks
    1515 */
     16
     17// IMPORTANT FIX: Prevent any processing on sitemap requests
     18if ( ! empty( $_SERVER['REQUEST_URI'] ) ) {
     19    $request_uri = $_SERVER['REQUEST_URI'];
     20   
     21    if ( strpos( $request_uri, 'sitemap' ) !== false ||
     22         strpos( $request_uri, '.xml' ) !== false ||
     23         strpos( $request_uri, 'xsl' ) !== false ||
     24         ( isset( $_GET['sitemap'] ) ) ) {
     25        // Don't load Nexa Blocks on sitemap pages
     26        return;
     27    }
     28}
    1629
    1730if ( ! defined( 'ABSPATH' ) ) {
Note: See TracChangeset for help on using the changeset viewer.