Make WordPress Core


Ignore:
Timestamp:
05/05/2004 07:34:41 AM (22 years ago)
Author:
saxmatt
Message:

Some style cleanup. Category base and additional URI options from Jay McCarthy.

File:
1 edited

Legend:

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

    r1226 r1227  
    247247        '%monthnum%',
    248248        '%day%',
     249        '%hour%',
     250        '%minute%',
     251        '%second%',
    249252        '%postname%',
    250253        '%post_id%'
     
    254257        '([0-9]{1,2})?',
    255258        '([0-9]{1,2})?',
     259        '([0-9]{1,2})?',
     260        '([0-9]{1,2})?',
     261        '([0-9]{1,2})?',
    256262        '([_0-9a-z-]+)?',
    257263        '([0-9]+)?'
     
    283289    if ($monthnum) $where .= " AND MONTH(post_date) = '" . intval($monthnum) . "'";
    284290    if ($day) $where .= " AND DAYOFMONTH(post_date) = '" . intval($day) . "'";
     291    if ($hour) $where .= " AND HOUR(post_date) = '" . intval($hour) . "'";
     292    if ($minute) $where .= " AND MINUTE(post_date) = '" . intval($minute) . "'";
     293    if ($second) $where .= " AND SECOND(post_date) = '" . intval($second) . "'";
    285294    if ($postname) $where .= " AND post_name = '" . $wpdb->escape($postname) . "' ";
    286295
     
    11881197    }
    11891198
    1190     $rewritecode = array(
    1191                          '%year%',
    1192                          '%monthnum%',
    1193                          '%day%',
    1194                          '%postname%',
    1195                          '%post_id%'
    1196                          );
    1197 
    1198     $rewritereplace = array(
    1199                             '([0-9]{4})?',
    1200                             '([0-9]{1,2})?',
    1201                             '([0-9]{1,2})?',
    1202                             '([_0-9a-z-]+)?',
    1203                             '([0-9]+)?'
    1204                             );
    1205 
    1206     $queryreplace = array (
    1207                            'year=',
    1208                            'monthnum=',
    1209                            'day=',
    1210                            'name=',
    1211                            'p='
    1212                            );
     1199    $rewritecode =
     1200    array(
     1201    '%year%',
     1202    '%monthnum%',
     1203    '%day%',
     1204    '%hour%',
     1205    '%minute%',
     1206    '%second%',
     1207    '%postname%',
     1208    '%post_id%'
     1209    );
     1210
     1211    $rewritereplace =
     1212    array(
     1213    '([0-9]{4})?',
     1214    '([0-9]{1,2})?',
     1215    '([0-9]{1,2})?',
     1216    '([0-9]{1,2})?',
     1217    '([0-9]{1,2})?',
     1218    '([0-9]{1,2})?',
     1219    '([_0-9a-z-]+)?',
     1220    '([0-9]+)?'
     1221    );
     1222
     1223    $queryreplace =
     1224    array (
     1225    'year=',
     1226    'monthnum=',
     1227    'day=',
     1228    'hour=',
     1229    'minute=',
     1230    'second=',
     1231    'name=',
     1232    'p='
     1233    );
    12131234
    12141235
     
    12641285    // Code for nice categories and authors, currently not very flexible
    12651286    $front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
    1266     $catmatch = $front . 'category/';
     1287    $catmatch = get_settings( 'category_base' ) . '/';
    12671288    $catmatch = preg_replace('|^/+|', '', $catmatch);
    12681289   
Note: See TracChangeset for help on using the changeset viewer.