Changeset 1556
- Timestamp:
- 08/24/2004 01:24:48 AM (21 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
-
classes.php (modified) (3 diffs)
-
functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/classes.php
r1536 r1556 13 13 var $is_archive = false; 14 14 var $is_date = false; 15 var $is_year = false; 16 var $is_month = false; 17 var $is_day = false; 18 var $is_time = false; 15 19 var $is_author = false; 16 20 var $is_category = false; … … 23 27 $this->is_archive = false; 24 28 $this->is_date = false; 29 $this->is_year = false; 30 $this->is_month = false; 31 $this->is_day = false; 32 $this->is_time = false; 25 33 $this->is_author = false; 26 34 $this->is_category = false; … … 50 58 } 51 59 60 if ('' != $qv['second']) { 61 $this->is_time = true; 62 $this->is_date = true; 63 } 64 65 if ('' != $qv['minute']) { 66 $this->is_time = true; 67 $this->is_date = true; 68 } 69 70 if ('' != $qv['hour']) { 71 $this->is_time = true; 72 $this->is_date = true; 73 } 74 75 if ('' != $qv['day']) { 76 if (! $this->is_date) { 77 $this->is_day = true; 78 $this->is_date = true; 79 } 80 } 81 82 if ('' != $qv['monthnum']) { 83 if (! $this->is_date) { 84 $this->is_month = true; 85 $this->is_date = true; 86 } 87 } 88 89 if ('' != $qv['year']) { 90 if (! $this->is_date) { 91 $this->is_year = true; 92 $this->is_date = true; 93 } 94 } 95 52 96 if ('' != $qv['m']) { 53 97 $this->is_date = true; 54 } 55 56 if ('' != $qv['hour']) { 57 $this->is_date = true; 58 } 59 60 if ('' != $qv['minute']) { 61 $this->is_date = true; 62 } 63 64 if ('' != $qv['second']) { 65 $this->is_date = true; 66 } 67 68 if ('' != $qv['year']) { 69 $this->is_date = true; 70 } 71 72 if ('' != $qv['monthnum']) { 73 $this->is_date = true; 74 } 75 76 if ('' != $qv['day']) { 77 $this->is_date = true; 78 } 98 99 if (strlen($qv['m']) > 9) { 100 $this->is_time = true; 101 } else if (strlen($qv['m']) > 7) { 102 $this->is_day = true; 103 } else if (strlen($qv['m']) > 5) { 104 $this->is_month = true; 105 } else { 106 $this->is_year = true; 107 } 108 } 79 109 80 110 if ('' != $qv['w']) { -
trunk/wp-includes/functions.php
r1555 r1556 1603 1603 } 1604 1604 1605 function is_year () { 1606 global $wp_query; 1607 1608 return $wp_query->is_year; 1609 } 1610 1611 function is_month () { 1612 global $wp_query; 1613 1614 return $wp_query->is_month; 1615 } 1616 1617 function is_day () { 1618 global $wp_query; 1619 1620 return $wp_query->is_day; 1621 } 1622 1623 function is_time () { 1624 global $wp_query; 1625 1626 return $wp_query->is_time; 1627 } 1628 1605 1629 function is_author () { 1606 1630 global $wp_query;
Note: See TracChangeset
for help on using the changeset viewer.