Skip to content

Commit

Permalink
Automatic delete wp-includes and wp-json slug
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-jacob committed Nov 26, 2024
1 parent 4c2df0e commit f392cb2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inc/slug.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,10 @@ function wplng_get_slugs_from_query() {

$source = sanitize_title( $meta['wplng_slug_original'][0] );

if ( 'index-php' === $source ) {
if ( 'index-php' === $source
|| 'wp-includes' === $source
|| 'wp-json' === $source
) {
$slug_to_delete[] = $slug_id;
continue;
}
Expand Down

0 comments on commit f392cb2

Please sign in to comment.