Making WordPress.org

Changeset 14540


Ignore:
Timestamp:
09/24/2025 08:50:52 PM (8 weeks ago)
Author:
coffee2code
Message:

Photo Directory, Tags: Only create a redirect if the original tag actually has posts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/photo-directory/inc/tags.php

    r14539 r14540  
    207207                $message = $updated->get_error_message();
    208208            } else {
    209                 self::add_slug_redirect( $old_slug, $new_slug, $taxonomy );
     209                // Only create redirect if the tag has posts.
     210                if ( $term->count > 0 ) {
     211                    self::add_slug_redirect( $old_slug, $new_slug, $taxonomy );
     212                }
    210213
    211214                $message = sprintf(
    212215                    /* translators: %s: New term name */
    213                     __( 'Change term slug to <strong>%s</strong>.', 'wporg-photos' ),
     216                    __( 'Changed term slug to <strong>%s</strong>.', 'wporg-photos' ),
    214217                    esc_html( $new_name )
    215218                );
Note: See TracChangeset for help on using the changeset viewer.