summaryrefslogtreecommitdiffstats
path: root/wp-includes/formatting.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-08-31 14:55:29 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-08-31 14:55:29 +0000
commitb764f60728be1d4e026f9d7ae618ab47e23322f8 (patch)
tree1f1b45c4f1c1cf027b3240f605346e56209be8ff /wp-includes/formatting.php
parentdad010666b767a1d06588d1d09c771c62f67c387 (diff)
downloadwordpress-mu-b764f60728be1d4e026f9d7ae618ab47e23322f8.tar.gz
wordpress-mu-b764f60728be1d4e026f9d7ae618ab47e23322f8.tar.xz
wordpress-mu-b764f60728be1d4e026f9d7ae618ab47e23322f8.zip
WP Merge to rev #4147
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@729 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/formatting.php')
-rw-r--r--wp-includes/formatting.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php
index f027869..1be7f1e 100644
--- a/wp-includes/formatting.php
+++ b/wp-includes/formatting.php
@@ -598,7 +598,7 @@ function wp_rel_nofollow( $text ) {
global $wpdb;
// This is a pre save filter, so text is already escaped.
$text = stripslashes($text);
- $text = preg_replace('|<a (.+?)>|i', '<a $1 rel="nofollow">', $text);
+ $text = preg_replace('|<a (.+?)>|ie', "'<a ' . str_replace(' rel=\"nofollow\"','',stripslashes('$1')) . ' rel=\"nofollow\">'", $text);
$text = $wpdb->escape($text);
return $text;
}
@@ -606,7 +606,7 @@ function wp_rel_nofollow( $text ) {
function convert_smilies($text) {
global $wp_smiliessearch, $wp_smiliesreplace;
$output = '';
- if (get_settings('use_smilies')) {
+ if (get_option('use_smilies')) {
// HTML loop taken from texturize function, could possible be consolidated
$textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between
$stop = count($textarr);// loop stuff
@@ -656,7 +656,7 @@ function get_gmt_from_date($string) {
// note: this only substracts $time_difference from the given date
preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches);
$string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
- $string_gmt = gmdate('Y-m-d H:i:s', $string_time - get_settings('gmt_offset') * 3600);
+ $string_gmt = gmdate('Y-m-d H:i:s', $string_time - get_option('gmt_offset') * 3600);
return $string_gmt;
}
@@ -665,7 +665,7 @@ function get_date_from_gmt($string) {
// note: this only adds $time_difference to the given date
preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches);
$string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
- $string_localtime = gmdate('Y-m-d H:i:s', $string_time + get_settings('gmt_offset')*3600);
+ $string_localtime = gmdate('Y-m-d H:i:s', $string_time + get_option('gmt_offset')*3600);
return $string_localtime;
}
@@ -690,7 +690,7 @@ function iso8601_to_datetime($date_string, $timezone = USER) {
if (!empty($date_bits[7])) { // we have a timezone, so let's compute an offset
$offset = iso8601_timezone_to_offset($date_bits[7]);
} else { // we don't have a timezone, so we assume user local timezone (not server's!)
- $offset = 3600 * get_settings('gmt_offset');
+ $offset = 3600 * get_option('gmt_offset');
}
$timestamp = gmmktime($date_bits[4], $date_bits[5], $date_bits[6], $date_bits[2], $date_bits[3], $date_bits[1]);
$timestamp -= $offset;