Changeset 2968719
- Timestamp:
- 09/19/2023 12:09:38 PM (2 years ago)
- Location:
- companion-sitemap-generator
- Files:
-
- 5 edited
- 6 copied
-
tags/4.5.4 (copied) (copied from companion-sitemap-generator/trunk)
-
tags/4.5.4/companion_sitemap.php (copied) (copied from companion-sitemap-generator/trunk/companion_sitemap.php) (1 diff)
-
tags/4.5.4/csg_functions.php (copied) (copied from companion-sitemap-generator/trunk/csg_functions.php) (2 diffs)
-
tags/4.5.4/dashboard/dashboard.php (modified) (2 diffs)
-
tags/4.5.4/dashboard/exclusion.php (copied) (copied from companion-sitemap-generator/trunk/dashboard/exclusion.php)
-
tags/4.5.4/dashboard/start.php (copied) (copied from companion-sitemap-generator/trunk/dashboard/start.php)
-
tags/4.5.4/readme.txt (copied) (copied from companion-sitemap-generator/trunk/readme.txt) (2 diffs)
-
trunk/companion_sitemap.php (modified) (1 diff)
-
trunk/csg_functions.php (modified) (2 diffs)
-
trunk/dashboard/dashboard.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
companion-sitemap-generator/tags/4.5.4/companion_sitemap.php
r2924773 r2968719 4 4 * Plugin URI: http://codeermeneer.nl/portfolio/companion-sitemap-generator/ 5 5 * Description: Easy to use XML & HTML sitemap generator and robots editor. 6 * Version: 4.5. 36 * Version: 4.5.4 7 7 * Author: Papin Schipper 8 8 * Author URI: http://codeermeneer.nl -
companion-sitemap-generator/tags/4.5.4/csg_functions.php
r2924773 r2968719 299 299 $csg_sitemap_content = '<?xml version="1.0" encoding="UTF-8"?>'; 300 300 301 // Use stylesheet? 301 302 if( csg_use_XMLstylesheet() ) { 302 303 $csg_sitemap_content .= '<?xml-stylesheet type="text/xsl" href="'.csg_XMLstylesheet().'"?>'; 303 304 } 304 305 306 // Urlset 305 307 $csg_sitemap_content .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; 306 308 … … 308 310 $csg_sitemap_args = array( 309 311 'order' => 'asc', 310 'posts_per_page' => ' -1',312 'posts_per_page' => '5000', 311 313 'post_status' => 'publish', 312 'post__not_in' => csg_exclude() 313 ); 314 315 // Term arguments 316 $csg_term_args = array( 317 'hide_empty' => true 314 'post__not_in' => csg_exclude(), 315 'post_type' => array_diff( csg_get_posttypes(), csg_exclude_posttypes() ) // This get's all posttypes that are not excluded 318 316 ); 319 317 320 318 // If is multilingual add language filter 321 319 if( csg_is_multilingual() ) { 322 $csg_sitemap_args['lang'] = csg_default_language(); 323 $csg_term_args['lang'] = csg_default_language(); 324 } 325 326 // Add post types 327 $post_types = csg_get_posttypes(); 328 329 foreach ( $post_types as $post_type ) { 330 331 if( !in_array( $post_type, csg_exclude_posttypes() ) ) { 332 333 $csg_sitemap_args['post_type'] = $post_type; 334 335 query_posts( $csg_sitemap_args ); 336 337 if( have_posts() ) { 338 339 while( have_posts() ) { 340 341 the_post(); 342 $csg_sitemap_content .= csg_sitemap_line(); 343 344 } 345 346 } 347 348 wp_reset_query(); 349 350 } 351 352 } 320 $csg_sitemap_args['lang'] = csg_default_language(); 321 } 322 323 // Loop trough all the posts 324 query_posts( $csg_sitemap_args ); 325 326 if( have_posts() ) { 327 while( have_posts() ) { 328 the_post(); 329 $csg_sitemap_content .= csg_sitemap_line(); 330 } 331 } 332 333 wp_reset_query(); 353 334 354 335 // Add taxonomies 355 $taxonomies = csg_get_taxonomies();336 $taxonomies = array_diff( csg_get_taxonomies(), csg_exclude_posttypes() ); // This get's all taxonomies that are not excluded 356 337 357 338 // If there are any taxonomies 358 339 if ( $taxonomies ) { 359 340 360 // Loop trough all341 // Loop trough them all 361 342 foreach( $taxonomies as $taxonomie ) { 362 343 363 // Get information of current one 364 $thisTaxonomie = get_taxonomy( $taxonomie ); 365 366 // Check if it's not hidden 367 if( !in_array( $taxonomie, csg_exclude_posttypes() ) ) { 368 369 // Get all terms by taxonomy 370 global $wp_version; 371 $terms = version_compare( $wp_version, '4.5.0', '>=' ) ? get_terms( array( 'taxonomy' => $taxonomie, 'orderby' => 'name', 'order' => 'asc', 'hide_empty' => true ) ) : get_terms( $taxonomie, array( 'orderby' => 'name', 'order' => 'asc', 'hide_empty' => true ) ); 372 373 // Loop through them 374 foreach( $terms as $tax ) { 375 if( !in_array( $tax->term_id, csg_exclude_ctam() ) ) { 376 $csg_sitemap_content .= csg_sitemap_line_terms( $tax->term_id ); 377 } 344 // Filter by tax 345 $get_terms = get_terms( array( 'taxonomy' => $taxonomie, 'orderby' => 'name', 'order' => 'asc', 'hide_empty' => true ) ); 346 347 // Loop through the terms 348 foreach( $get_terms as $tax ) { 349 if( !in_array( $tax->term_id, csg_exclude_ctam() ) ) { 350 $csg_sitemap_content .= csg_sitemap_line_terms( $tax->term_id ); 378 351 } 379 380 352 } 381 353 -
companion-sitemap-generator/tags/4.5.4/dashboard/dashboard.php
r2798315 r2968719 42 42 43 43 // Then set the new times 44 wp_schedule_event( time(), $sitemap_sc, 'csg_create_sitemap' );44 if( $sitemap_sc != 'never' ) wp_schedule_event( time(), $sitemap_sc, 'csg_create_sitemap' ); 45 45 46 46 echo '<div id="message" class="updated"><p>'.__('Settings saved', 'companion-sitemap-generator' ).'.</p></div>'; … … 138 138 <p class="description"><?php _e( 'How often should the sitemap be updated? You can always update it manually. Settings only apply to the XML version, the HTML version is always up-to-date.', 'companion-sitemap-generator' ); ?></p> 139 139 <p><select name='sitemap_schedule' id='sitemap_schedule' style='width: 90%'> 140 <option value='never' <?php if( $sitemap_schedule == 'never' ) { echo "SELECTED"; } ?> ><?php _e( 'Never', 'companion-sitemap-generator' ); ?></option> 140 141 <option value='hourly' <?php if( $sitemap_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e( 'Hourly', 'companion-sitemap-generator' ); ?></option> 141 142 <option value='twicedaily' <?php if( $sitemap_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e( 'Twice Daily', 'companion-sitemap-generator' ); ?></option> -
companion-sitemap-generator/tags/4.5.4/readme.txt
r2924773 r2968719 5 5 Requires at least: 4.6.0 6 6 Tested up to: 6.0 7 Stable tag: 4.5. 37 Stable tag: 4.5.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 11 Creates and XML sitemap for search engines and allows you to add an HTML sitemap to any page using a shortcode or Gutenberg block. Also comes with an built-in Robots.txt editor.10 and allows you to add an HTML sitemap to any page using a shortcode or Gutenberg block. Also comes with an built-in Robots.txt editor. 11 Creates and XML sitemap for search engines 12 12 13 13 == Description == … … 68 68 == Changelog == 69 69 70 - 4.5.4 (September 19, 2023) = 71 * New: Added "Never" option for the auto update, because why not? 72 * Improvement: Better performance on larger sites 73 70 74 = 4.5.3 (June 12, 2023) = 71 75 * Fix: XSS issues 72 76 73 = 4.5. 1.1(October 28, 2022) =77 = 4.5.2 (October 28, 2022) = 74 78 * Fix: Critical error on Post content filter 75 79 -
companion-sitemap-generator/trunk/companion_sitemap.php
r2924773 r2968719 4 4 * Plugin URI: http://codeermeneer.nl/portfolio/companion-sitemap-generator/ 5 5 * Description: Easy to use XML & HTML sitemap generator and robots editor. 6 * Version: 4.5. 36 * Version: 4.5.4 7 7 * Author: Papin Schipper 8 8 * Author URI: http://codeermeneer.nl -
companion-sitemap-generator/trunk/csg_functions.php
r2924773 r2968719 299 299 $csg_sitemap_content = '<?xml version="1.0" encoding="UTF-8"?>'; 300 300 301 // Use stylesheet? 301 302 if( csg_use_XMLstylesheet() ) { 302 303 $csg_sitemap_content .= '<?xml-stylesheet type="text/xsl" href="'.csg_XMLstylesheet().'"?>'; 303 304 } 304 305 306 // Urlset 305 307 $csg_sitemap_content .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; 306 308 … … 308 310 $csg_sitemap_args = array( 309 311 'order' => 'asc', 310 'posts_per_page' => ' -1',312 'posts_per_page' => '5000', 311 313 'post_status' => 'publish', 312 'post__not_in' => csg_exclude() 313 ); 314 315 // Term arguments 316 $csg_term_args = array( 317 'hide_empty' => true 314 'post__not_in' => csg_exclude(), 315 'post_type' => array_diff( csg_get_posttypes(), csg_exclude_posttypes() ) // This get's all posttypes that are not excluded 318 316 ); 319 317 320 318 // If is multilingual add language filter 321 319 if( csg_is_multilingual() ) { 322 $csg_sitemap_args['lang'] = csg_default_language(); 323 $csg_term_args['lang'] = csg_default_language(); 324 } 325 326 // Add post types 327 $post_types = csg_get_posttypes(); 328 329 foreach ( $post_types as $post_type ) { 330 331 if( !in_array( $post_type, csg_exclude_posttypes() ) ) { 332 333 $csg_sitemap_args['post_type'] = $post_type; 334 335 query_posts( $csg_sitemap_args ); 336 337 if( have_posts() ) { 338 339 while( have_posts() ) { 340 341 the_post(); 342 $csg_sitemap_content .= csg_sitemap_line(); 343 344 } 345 346 } 347 348 wp_reset_query(); 349 350 } 351 352 } 320 $csg_sitemap_args['lang'] = csg_default_language(); 321 } 322 323 // Loop trough all the posts 324 query_posts( $csg_sitemap_args ); 325 326 if( have_posts() ) { 327 while( have_posts() ) { 328 the_post(); 329 $csg_sitemap_content .= csg_sitemap_line(); 330 } 331 } 332 333 wp_reset_query(); 353 334 354 335 // Add taxonomies 355 $taxonomies = csg_get_taxonomies();336 $taxonomies = array_diff( csg_get_taxonomies(), csg_exclude_posttypes() ); // This get's all taxonomies that are not excluded 356 337 357 338 // If there are any taxonomies 358 339 if ( $taxonomies ) { 359 340 360 // Loop trough all341 // Loop trough them all 361 342 foreach( $taxonomies as $taxonomie ) { 362 343 363 // Get information of current one 364 $thisTaxonomie = get_taxonomy( $taxonomie ); 365 366 // Check if it's not hidden 367 if( !in_array( $taxonomie, csg_exclude_posttypes() ) ) { 368 369 // Get all terms by taxonomy 370 global $wp_version; 371 $terms = version_compare( $wp_version, '4.5.0', '>=' ) ? get_terms( array( 'taxonomy' => $taxonomie, 'orderby' => 'name', 'order' => 'asc', 'hide_empty' => true ) ) : get_terms( $taxonomie, array( 'orderby' => 'name', 'order' => 'asc', 'hide_empty' => true ) ); 372 373 // Loop through them 374 foreach( $terms as $tax ) { 375 if( !in_array( $tax->term_id, csg_exclude_ctam() ) ) { 376 $csg_sitemap_content .= csg_sitemap_line_terms( $tax->term_id ); 377 } 344 // Filter by tax 345 $get_terms = get_terms( array( 'taxonomy' => $taxonomie, 'orderby' => 'name', 'order' => 'asc', 'hide_empty' => true ) ); 346 347 // Loop through the terms 348 foreach( $get_terms as $tax ) { 349 if( !in_array( $tax->term_id, csg_exclude_ctam() ) ) { 350 $csg_sitemap_content .= csg_sitemap_line_terms( $tax->term_id ); 378 351 } 379 380 352 } 381 353 -
companion-sitemap-generator/trunk/dashboard/dashboard.php
r2798315 r2968719 42 42 43 43 // Then set the new times 44 wp_schedule_event( time(), $sitemap_sc, 'csg_create_sitemap' );44 if( $sitemap_sc != 'never' ) wp_schedule_event( time(), $sitemap_sc, 'csg_create_sitemap' ); 45 45 46 46 echo '<div id="message" class="updated"><p>'.__('Settings saved', 'companion-sitemap-generator' ).'.</p></div>'; … … 138 138 <p class="description"><?php _e( 'How often should the sitemap be updated? You can always update it manually. Settings only apply to the XML version, the HTML version is always up-to-date.', 'companion-sitemap-generator' ); ?></p> 139 139 <p><select name='sitemap_schedule' id='sitemap_schedule' style='width: 90%'> 140 <option value='never' <?php if( $sitemap_schedule == 'never' ) { echo "SELECTED"; } ?> ><?php _e( 'Never', 'companion-sitemap-generator' ); ?></option> 140 141 <option value='hourly' <?php if( $sitemap_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e( 'Hourly', 'companion-sitemap-generator' ); ?></option> 141 142 <option value='twicedaily' <?php if( $sitemap_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e( 'Twice Daily', 'companion-sitemap-generator' ); ?></option> -
companion-sitemap-generator/trunk/readme.txt
r2924773 r2968719 5 5 Requires at least: 4.6.0 6 6 Tested up to: 6.0 7 Stable tag: 4.5. 37 Stable tag: 4.5.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 11 Creates and XML sitemap for search engines and allows you to add an HTML sitemap to any page using a shortcode or Gutenberg block. Also comes with an built-in Robots.txt editor.10 and allows you to add an HTML sitemap to any page using a shortcode or Gutenberg block. Also comes with an built-in Robots.txt editor. 11 Creates and XML sitemap for search engines 12 12 13 13 == Description == … … 68 68 == Changelog == 69 69 70 - 4.5.4 (September 19, 2023) = 71 * New: Added "Never" option for the auto update, because why not? 72 * Improvement: Better performance on larger sites 73 70 74 = 4.5.3 (June 12, 2023) = 71 75 * Fix: XSS issues 72 76 73 = 4.5. 1.1(October 28, 2022) =77 = 4.5.2 (October 28, 2022) = 74 78 * Fix: Critical error on Post content filter 75 79
Note: See TracChangeset
for help on using the changeset viewer.