WordPress.org

Make WordPress Core

Changeset 13424


Ignore:
Timestamp:
02/26/10 04:53:30 (4 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.