Don't highlight day if we're in a different month. :)
git-svn-id: http://svn.automattic.com/wordpress/trunk@512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c638c5429b
commit
9ac29ebf41
|
@ -247,7 +247,7 @@ if (!empty($monthnum) && !empty($year)) {
|
||||||
} elseif (!empty($w)) {
|
} elseif (!empty($w)) {
|
||||||
// We need to get the month from MySQL
|
// We need to get the month from MySQL
|
||||||
$thisyear = ''.intval(substr($m, 0, 4));
|
$thisyear = ''.intval(substr($m, 0, 4));
|
||||||
$d = (($w - 1) * 7) + 6; //it seems mysqls weeks disagree with php's
|
$d = (($w - 1) * 7) + 6; //it seems MySQL's weeks disagree with PHP's
|
||||||
$thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('${thisyear}0101', INTERVAL $d DAY) ), '%m')");
|
$thismonth = $wpdb->get_var("SELECT DATE_FORMAT((DATE_ADD('${thisyear}0101', INTERVAL $d DAY) ), '%m')");
|
||||||
} elseif (!empty($m)) {
|
} elseif (!empty($m)) {
|
||||||
$calendar = substr($m, 0, 6);
|
$calendar = substr($m, 0, 6);
|
||||||
|
@ -342,7 +342,7 @@ for ($day = 1; $day <= $daysinmonth; ++$day) {
|
||||||
if ($newrow) echo "\n </tr>\n <tr>\n\t";
|
if ($newrow) echo "\n </tr>\n <tr>\n\t";
|
||||||
$newrow = false;
|
$newrow = false;
|
||||||
|
|
||||||
if ($day == date('j', (time() + ($time_difference * 3600)))) echo '<td id="today">';
|
if ($day == date('j', (time() + ($time_difference * 3600))) && $thismonth == date('m', time()+($time_difference * 3600))) echo '<td id="today">';
|
||||||
else echo "<td>";
|
else echo "<td>";
|
||||||
|
|
||||||
if (in_array($day, $daywithpost)) {
|
if (in_array($day, $daywithpost)) {
|
||||||
|
|
Loading…
Reference in New Issue