Make WordPress Core


Ignore:
Timestamp:
02/26/2010 04:53:30 AM (15 years ago)
Author:
nacin
Message:

Reject numeric page slugs as they don't work, and force a suffix. Props miqrogroove see #11917

File:
1 edited

Legend:

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

    r13382 r13424  
    23932393        $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_ID, $post_parent ) );
    23942394
    2395         if ( $post_name_check || in_array( $slug, $feeds ) ) {
     2395        if ( $post_name_check || in_array( $slug, $feeds ) || preg_match( '@^\d+$@', $slug ) ) {
    23962396            $suffix = 2;
    23972397            do {
Note: See TracChangeset for help on using the changeset viewer.