Changeset 3221753
- Timestamp:
- 01/13/2025 06:13:11 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
skyword-plugin/tags/2.5.3/php/class-skyword-sitemaps.php
r1857440 r3221753 16 16 $options = get_option( 'skyword_plugin_options' ); 17 17 //check all requests for if they are for autogenerated robots.txt or sitemaps 18 19 if ( strpos($ _SERVER['REQUEST_URI'], 'skyword-sitemap.xml') !== false) {18 $request_uri = filter_input(INPUT_SERVER, 'REQUEST_URI'); 19 if ( strpos($request_uri, 'skyword-sitemap.xml') !== false) { 20 20 if ( $options['skyword_generate_all_sitemaps'] ) { 21 21 header( 'Content-type: text/xml' ); … … 25 25 return; 26 26 } 27 } else if ( strpos($ _SERVER['REQUEST_URI'], 'skyword-pages-sitemap.xml') !== false) {27 } else if ( strpos($request_uri, 'skyword-pages-sitemap.xml') !== false) { 28 28 if ( $options['skyword_generate_pages_sitemaps'] ) { 29 29 header( 'Content-type: text/xml' ); … … 33 33 return; 34 34 } 35 } else if ( strpos($ _SERVER['REQUEST_URI'], 'skyword-categories-sitemap.xml') !== false) {35 } else if ( strpos($request_uri, 'skyword-categories-sitemap.xml') !== false) { 36 36 if ( $options['skyword_generate_categories_sitemaps'] ) { 37 37 header( 'Content-type: text/xml' ); … … 41 41 return; 42 42 } 43 } else if ( strpos($ _SERVER['REQUEST_URI'], 'skyword-tags-sitemap.xml') !== false) {43 } else if ( strpos($request_uri, 'skyword-tags-sitemap.xml') !== false) { 44 44 if ( $options['skyword_generate_tags_sitemaps'] ) { 45 45 header( 'Content-type: text/xml' ); … … 49 49 return; 50 50 } 51 } else if ( strpos($ _SERVER['REQUEST_URI'], 'skyword-google-news-sitemap.xml') !== false) {51 } else if ( strpos($request_uri, 'skyword-google-news-sitemap.xml') !== false) { 52 52 if ( $options['skyword_generate_news_sitemaps'] ) { 53 53 header( 'Content-type: text/xml' ); … … 58 58 } 59 59 die; 60 } else if ( strpos($ _SERVER['REQUEST_URI'], 'robots.txt') !== false) {60 } else if ( strpos($request_uri, 'robots.txt') !== false) { 61 61 header( 'Content-type: text/plain' ); 62 62 print "User-agent: * \n";
Note: See TracChangeset
for help on using the changeset viewer.