Make WordPress Core

Changeset 13717


Ignore:
Timestamp:
03/16/2010 06:36:26 PM (15 years ago)
Author:
nacin
Message:

Prevent page(\d+) slugs, and force a suffix. props miqrogroove. fixes #11917. see #8948

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r13710 r13717  
    24132413        $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_ID, $post_parent ) );
    24142414
    2415         if ( $post_name_check || in_array( $slug, $feeds ) || preg_match( '@^\d+$@', $slug ) ) {
     2415        if ( $post_name_check || in_array( $slug, $feeds ) || preg_match( '@^(page)?\d+$@', $slug ) ) {
    24162416            $suffix = 2;
    24172417            do {
Note: See TracChangeset for help on using the changeset viewer.