Plugin Directory

Changeset 2968719


Ignore:
Timestamp:
09/19/2023 12:09:38 PM (2 years ago)
Author:
Papin
Message:

Tagging version 4.5.4

Location:
companion-sitemap-generator
Files:
5 edited
6 copied

Legend:

Unmodified
Added
Removed
  • companion-sitemap-generator/tags/4.5.4/companion_sitemap.php

    r2924773 r2968719  
    44 * Plugin URI: http://codeermeneer.nl/portfolio/companion-sitemap-generator/
    55 * Description: Easy to use XML & HTML sitemap generator and robots editor.
    6  * Version: 4.5.3
     6 * Version: 4.5.4
    77 * Author: Papin Schipper
    88 * Author URI: http://codeermeneer.nl
  • companion-sitemap-generator/tags/4.5.4/csg_functions.php

    r2924773 r2968719  
    299299    $csg_sitemap_content = '<?xml version="1.0" encoding="UTF-8"?>';
    300300
     301    // Use stylesheet?
    301302    if( csg_use_XMLstylesheet() ) {
    302303        $csg_sitemap_content .= '<?xml-stylesheet type="text/xsl" href="'.csg_XMLstylesheet().'"?>';
    303304    }
    304305
     306    // Urlset
    305307    $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">';
    306308
     
    308310    $csg_sitemap_args = array(
    309311        'order'             => 'asc',
    310         'posts_per_page'    => '-1',
     312        'posts_per_page'    => '5000',
    311313        '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
    318316    );
    319317
    320318    // If is multilingual add language filter
    321319    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();
    353334
    354335    // 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
    356337
    357338    // If there are any taxonomies
    358339    if ( $taxonomies ) {
    359340
    360         // Loop trough all
     341        // Loop trough them all
    361342        foreach( $taxonomies as $taxonomie ) {
    362343
    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 );
    378351                }
    379 
    380352            }
    381353
  • companion-sitemap-generator/tags/4.5.4/dashboard/dashboard.php

    r2798315 r2968719  
    4242
    4343    // 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' );
    4545
    4646    echo '<div id="message" class="updated"><p>'.__('Settings saved', 'companion-sitemap-generator' ).'.</p></div>';
     
    138138                <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>
    139139                <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>
    140141                    <option value='hourly' <?php if( $sitemap_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e( 'Hourly', 'companion-sitemap-generator' ); ?></option>
    141142                    <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  
    55Requires at least: 4.6.0
    66Tested up to: 6.0
    7 Stable tag: 4.5.3
     7Stable tag: 4.5.4
    88License: GPLv2 or later
    99License 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.
     11Creates and XML sitemap for search engines
    1212
    1313== Description ==
     
    6868== Changelog ==
    6969
     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
    7074= 4.5.3 (June 12, 2023) =
    7175* Fix: XSS issues
    7276
    73 = 4.5.1.1 (October 28, 2022) =
     77= 4.5.2 (October 28, 2022) =
    7478* Fix: Critical error on Post content filter
    7579
  • companion-sitemap-generator/trunk/companion_sitemap.php

    r2924773 r2968719  
    44 * Plugin URI: http://codeermeneer.nl/portfolio/companion-sitemap-generator/
    55 * Description: Easy to use XML & HTML sitemap generator and robots editor.
    6  * Version: 4.5.3
     6 * Version: 4.5.4
    77 * Author: Papin Schipper
    88 * Author URI: http://codeermeneer.nl
  • companion-sitemap-generator/trunk/csg_functions.php

    r2924773 r2968719  
    299299    $csg_sitemap_content = '<?xml version="1.0" encoding="UTF-8"?>';
    300300
     301    // Use stylesheet?
    301302    if( csg_use_XMLstylesheet() ) {
    302303        $csg_sitemap_content .= '<?xml-stylesheet type="text/xsl" href="'.csg_XMLstylesheet().'"?>';
    303304    }
    304305
     306    // Urlset
    305307    $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">';
    306308
     
    308310    $csg_sitemap_args = array(
    309311        'order'             => 'asc',
    310         'posts_per_page'    => '-1',
     312        'posts_per_page'    => '5000',
    311313        '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
    318316    );
    319317
    320318    // If is multilingual add language filter
    321319    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();
    353334
    354335    // 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
    356337
    357338    // If there are any taxonomies
    358339    if ( $taxonomies ) {
    359340
    360         // Loop trough all
     341        // Loop trough them all
    361342        foreach( $taxonomies as $taxonomie ) {
    362343
    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 );
    378351                }
    379 
    380352            }
    381353
  • companion-sitemap-generator/trunk/dashboard/dashboard.php

    r2798315 r2968719  
    4242
    4343    // 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' );
    4545
    4646    echo '<div id="message" class="updated"><p>'.__('Settings saved', 'companion-sitemap-generator' ).'.</p></div>';
     
    138138                <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>
    139139                <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>
    140141                    <option value='hourly' <?php if( $sitemap_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e( 'Hourly', 'companion-sitemap-generator' ); ?></option>
    141142                    <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  
    55Requires at least: 4.6.0
    66Tested up to: 6.0
    7 Stable tag: 4.5.3
     7Stable tag: 4.5.4
    88License: GPLv2 or later
    99License 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.
     11Creates and XML sitemap for search engines
    1212
    1313== Description ==
     
    6868== Changelog ==
    6969
     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
    7074= 4.5.3 (June 12, 2023) =
    7175* Fix: XSS issues
    7276
    73 = 4.5.1.1 (October 28, 2022) =
     77= 4.5.2 (October 28, 2022) =
    7478* Fix: Critical error on Post content filter
    7579
Note: See TracChangeset for help on using the changeset viewer.