diff --git a/wp-admin/admin-footer.php b/wp-admin/admin-footer.php index dcdfd973b..556a5e48a 100644 --- a/wp-admin/admin-footer.php +++ b/wp-admin/admin-footer.php @@ -3,8 +3,11 @@

-

Get Firefox

+ +

Get Firefox

+ + \ No newline at end of file diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 188e3875a..56a831e00 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -114,33 +114,12 @@ window.onload = focusit; edCanvas = document.getElementById('content'); //--> - -
-
-  -  -
-
- -

- +
/> @@ -123,31 +123,7 @@ include('options-head.php');

' ) ?>

-
- - /> - - - - - - - - - - - - - - -
- -
- -
-
+

diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index 026819db8..a252752e4 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -4,30 +4,20 @@ require_once('../wp-includes/wp-l10n.php'); $title = __('Permalink Options'); $parent_file = 'options-general.php'; -$wpvarstoreset = array('action','standalone', 'option_group_id'); -for ($i=0; $i +

- -

- -

- -

- WordPress offers you the ability to create a custom URI structure for your permalinks and archives. The following “tags” are available:

')?> +

number of tags are available, and here are some examples to get you started.'); ?>

+
-
%year%
-
- 2004') ?> -
-
%monthnum%
-
- 05') ?> -
-
%day%
-
- 28') ?> -
-
%hour%
-
- 15') ?> -
-
%minute%
-
- 43') ?> -
-
%second%
-
- 33') ?> -
-
%postname%
-
- this-is-a-great-post” in the URI') ?> -
-
%post_id%
-
- 423') ?> -
-
%category%
-
- -
-
%author%
-
- -
+
: /%year%/%monthnum%/%day%/%postname%/
+ +
:
+
+
: /archives/%post_id%
+ +
: /archives/123
+
+
- So for example a value like:

-

/archives/%year%/%monthnum%/%day%/%postname%/

-

would give you a permalink like:

-

/archives/2003/05/23/my-cheese-sandwich/

-

In general for this you must use mod_rewrite, however if you put a filename at the beginning WordPress will attempt to use that to pass the arguments, for example:

-

/index.php/archives/%year%/%monthnum%/%day%/%postname%/

-

If you use this option you can ignore the mod_rewrite rules.

') ?> +

mod_rewrite installed on your server. (Ask your host.) If that isn’t available, you can prefix the structure with /index.php/ . This is the recommend method if you are on any web server but Apache.'); ?>

+ + +
+
: /index.php/%year%/%monthnum%/%day%/%postname%/
+ +
:
+
+
: /index.php/archives/%post_id%
+ +
: /index.php/archives/123
+
+
+
+ +

- + :

/taxonomy/categorias would make your category links like http://example.org/taxonomy/categorias/general/. If you leave this blank the default will be used.') ?>

- + :

- -

%s, these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.'), $permalink_structure) ?>

+ +

.htaccess was writable we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.') ?>

- -

- -

- +
- - -

- -

- +
- \ No newline at end of file + \ No newline at end of file diff --git a/wp-admin/options-writing.php b/wp-admin/options-writing.php index 7d72e1bc6..29f705122 100644 --- a/wp-admin/options-writing.php +++ b/wp-admin/options-writing.php @@ -4,44 +4,9 @@ require_once('../wp-includes/wp-l10n.php'); $title = __('Writing Options'); $parent_file = 'options-general.php'; -function add_magic_quotes($array) { - foreach ($array as $k => $v) { - if (is_array($v)) { - $array[$k] = add_magic_quotes($v); - } else { - $array[$k] = addslashes($v); - } - } - return $array; -} - -if (!get_magic_quotes_gpc()) { - $_GET = add_magic_quotes($_GET); - $_POST = add_magic_quotes($_POST); - $_COOKIE = add_magic_quotes($_COOKIE); -} - -$wpvarstoreset = array('action','standalone', 'option_group_id'); -for ($i=0; $i
@@ -92,53 +57,56 @@ endforeach;

- -
+ + +
-

Update Services on the wiki. Separate multiple URIs by line breaks.'), 'http://wiki.wordpress.org/index.php/UpdateServices') ?>

+

Update Services on the Codex. Separate multiple service URIs with line breaks.'), 'http://codex.wordpress.org/Update_Services') ?>

-
-
+
+ +

%s, %s, %s.'), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5), substr(md5(uniqid(microtime())),0,5)) ?>

- - - - - - - - - - - - - - - - + +
- - -
- -
+ + + + + + + + + + + + + + + - -
+ + +
+ +
- -

- -

- +
+
+

+ +

+
- + + \ No newline at end of file diff --git a/wp-admin/post.php b/wp-admin/post.php index 54c214a39..dcce308ed 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -54,14 +54,6 @@ case 'post': $excerpt = format_to_post($excerpt); $post_title = $_POST['post_title']; $post_categories = $_POST['post_category']; - if(get_settings('use_geo_positions')) { - $latstr = $_POST['post_latf']; - $lonstr = $_POST['post_lonf']; - if((strlen($latstr) > 2) && (strlen($lonstr) > 2 ) ) { - $post_latf = floatval($_POST['post_latf']); - $post_lonf = floatval($_POST['post_lonf']); - } - } $post_status = $_POST['post_status']; $post_name = $_POST['post_name']; @@ -112,19 +104,11 @@ case 'post': if ('' != $_POST['advanced']) $post_status = 'draft'; if ('' != $_POST['savepage']) $post_status = 'static'; - if((get_settings('use_geo_positions')) && (strlen($latstr) > 2) && (strlen($lonstr) > 2) ) { - $postquery ="INSERT INTO $wpdb->posts - (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_lat, post_lon, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt) - VALUES - ('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', $post_latf, $post_lonf,'$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt') - "; - } else { $postquery ="INSERT INTO $wpdb->posts (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, post_modified, post_modified_gmt) VALUES ('0', '$user_ID', '$now', '$now_gmt', '$content', '$post_title', '$excerpt', '$post_status', '$comment_status', '$ping_status', '$post_password', '$post_name', '$trackback', '$now', '$now_gmt') "; - } $result = $wpdb->query($postquery); @@ -178,9 +162,6 @@ case 'post': } if ($post_status == 'publish') { - if((get_settings('use_geo_positions')) && ($post_latf != null) && ($post_lonf != null)) { - pingGeoUrl($post_ID); - } if ($post_pingback) { pingback($content, $post_ID); @@ -228,8 +209,6 @@ case 'edit': $content = $postdata->post_content; $content = format_to_edit($content); - $edited_lat = $postdata->post_lat; - $edited_lon = $postdata->post_lon; $excerpt = $postdata->post_excerpt; $excerpt = format_to_edit($excerpt); $edited_post_title = format_to_edit($postdata->post_title); @@ -291,19 +270,6 @@ case 'editpost': $excerpt = balanceTags($_POST['excerpt']); $excerpt = format_to_post($excerpt); $post_title = $_POST['post_title']; - if(get_settings('use_geo_positions')) { - $latf = floatval($_POST["post_latf"]); - $lonf = floatval($_POST["post_lonf"]); - $latlonaddition = ""; - if( ($latf != null) && ($latf <= 90 ) && ($latf >= -90) && ($lonf != null) && ($lonf <= 360) && ($lonf >= -360) ) { - pingGeoUrl($post_ID); - $latlonaddition = " post_lat=".$latf.", post_lon =".$lonf.", "; - } else { - $latlonaddition = " post_lat=null, post_lon=null, "; - } - } else { - $latlonaddition = ''; - } $prev_status = $_POST['prev_status']; $post_status = $_POST['post_status']; $comment_status = $_POST['comment_status']; @@ -369,9 +335,7 @@ $now_gmt = current_time('mysql', 1); post_excerpt = '$excerpt', post_title = '$post_title'" .$datemodif_gmt - .$datemodif."," - .$latlonaddition." - + .$datemodif.", post_status = '$post_status', comment_status = '$comment_status', ping_status = '$ping_status', @@ -468,15 +432,6 @@ case 'delete': if ($user_level < $authordata->user_level) die (sprintf(__('You don’t have the right to delete %s’s posts.'), $authordata[1])); - // send geoURL ping to "erase" from their DB - $query = "SELECT post_lat from $wpdb->posts WHERE ID=$post_id"; - $rows = $wpdb->query($query); - $myrow = $rows[0]; - $latf = $myrow->post_lat; - if($latf != null ) { - pingGeoUrl($post); - } - $result = $wpdb->query("DELETE FROM $wpdb->posts WHERE ID=$post_id"); if (!$result) die(__('Error in deleting...')); diff --git a/wp-admin/upgrade-schema.php b/wp-admin/upgrade-schema.php index 95ae062e7..40ae57e7f 100644 --- a/wp-admin/upgrade-schema.php +++ b/wp-admin/upgrade-schema.php @@ -105,8 +105,6 @@ CREATE TABLE $wpdb->posts ( post_title text NOT NULL, post_category int(4) NOT NULL default '0', post_excerpt text NOT NULL, - post_lat float default NULL, - post_lon float default NULL, post_status enum('publish','draft','private','static') NOT NULL default 'publish', comment_status enum('open','closed','registered_only') NOT NULL default 'open', ping_status enum('open','closed') NOT NULL default 'open', @@ -189,10 +187,6 @@ function populate_options() { add_option('what_to_show', 'posts'); add_option('date_format', 'F j, Y'); add_option('time_format', 'g:i a'); - add_option('use_geo_positions', 0); - add_option('use_default_geourl', 0); - add_option('default_geourl_lat', 0); - add_option('default_geourl_lon', 0); add_option('weblogs_xml_url', 'http://static.wordpress.org/changes.xml'); add_option('links_updated_date_format', 'F j, Y g:i a'); add_option('links_recently_updated_prepend', ''); @@ -219,7 +213,7 @@ function populate_options() { add_option('stylesheet', 'default'); // Delete unused options - $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'rss_language', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls'); + $unusedoptions = array ('blodotgsping_url', 'bodyterminator', 'emailtestonly', 'phoneemail_separator', 'smilies_directory', 'subjectprefix', 'use_bbcode', 'use_blodotgsping', 'use_phoneemail', 'use_quicktags', 'use_weblogsping', 'weblogs_cache_file', 'use_preview', 'use_htmltrans', 'smilies_directory', 'rss_language', 'fileupload_allowedusers', 'use_phoneemail', 'default_post_status', 'default_post_category', 'archive_mode', 'time_difference', 'links_minadminlevel', 'links_use_adminlevels', 'links_rating_type', 'links_rating_char', 'links_rating_ignore_zero', 'links_rating_single_image', 'links_rating_image0', 'links_rating_image1', 'links_rating_image2', 'links_rating_image3', 'links_rating_image4', 'links_rating_image5', 'links_rating_image6', 'links_rating_image7', 'links_rating_image8', 'links_rating_image9', 'weblogs_cacheminutes', 'comment_allowed_tags', 'search_engine_friendly_urls', 'default_geourl_lat', 'default_geourl_lon', 'use_default_geourl'); foreach ($unusedoptions as $option) : delete_option($option); endforeach; diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 204ee97d3..f249ede4e 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -400,8 +400,6 @@ function get_postdata($postid) { 'Excerpt' => $post->post_excerpt, 'Title' => $post->post_title, 'Category' => $post->post_category, - 'Lat' => $post->post_lat, - 'Lon' => $post->post_lon, 'post_status' => $post->post_status, 'comment_status' => $post->comment_status, 'ping_status' => $post->ping_status, @@ -825,55 +823,6 @@ include_once (ABSPATH . WPINC . '/class-xmlrpcs.php'); debug_fclose($log); } -function doGeoUrlHeader($post_list = '') { - global $posts; - - if (get_settings('use_geo_positions')) { - if ($posts && 1 === count($posts) && ! empty($posts[0]->post_lat)) { - // there's only one result see if it has a geo code - $row = $posts[0]; - $lat = $row->post_lat; - $lon = $row->post_lon; - $title = $row->post_title; - if(($lon != null) && ($lat != null) ) { - echo "\n"; - echo "\n"; - echo "\n"; - return; - } - } else { - if(get_settings('use_default_geourl')) { - // send the default here - echo "\n"; - echo "\n"; - echo "\n"; - } - } - } -} - -function getRemoteFile($host,$path) { - $fp = fsockopen($host, 80, $errno, $errstr, 5); - if ($fp) { - fputs($fp,"GET $path HTTP/1.0\r\nHost: $host\r\n\r\n"); - while ($line = fgets($fp, 4096)) { - $lines[] = $line; - } - fclose($fp); - return $lines; - } else { - return false; - } -} - -function pingGeoURL($blog_ID) { - - $ourUrl = get_settings('home') ."/index.php?p=".$blog_ID; - $host="geourl.org"; - $path="/ping/?p=".$ourUrl; - getRemoteFile($host,$path); -} - /* wp_set_comment_status: part of otaku42's comment moderation hack changes the status of a comment according to $comment_status. diff --git a/wp-includes/template-functions-comment.php b/wp-includes/template-functions-comment.php index afe63cd93..354fc38f8 100644 --- a/wp-includes/template-functions-comment.php +++ b/wp-includes/template-functions-comment.php @@ -62,7 +62,7 @@ function comments_number($zero='No Comments', $one='1 Comment', $more='% Comment } elseif ($number > 1) { $blah = str_replace('%', $number, $more); } - echo $blah; + echo apply_filters('comments_number', $blah); } function comments_link($file='', $echo=true) { diff --git a/wp-includes/template-functions-geo.php b/wp-includes/template-functions-geo.php deleted file mode 100644 index 1316de26f..000000000 --- a/wp-includes/template-functions-geo.php +++ /dev/null @@ -1,155 +0,0 @@ -post_lat != '') { - return trim($post->post_lat); - } else if(get_settings('use_default_geourl')) { - return trim(get_settings('default_geourl_lat')); - } - - return ''; -} - -function get_Lon() { - global $post; - - if ($post->post_lon != '') { - return trim($post->post_lon); - } else if(get_settings('use_default_geourl')) { - return trim(get_settings('default_geourl_lon')); - } - - return ''; -} - -function print_Lat() { - if(get_settings('use_geo_positions')) { - if(get_Lat() > 0) { - echo "".get_Lat()."N"; - } else { - echo "".get_Lat()."S"; - } - } -} - -function print_Lon() { - global $id, $postdata; - if(get_settings('use_geo_positions')) { - if(get_Lon() < 0) { - $temp = get_Lon() * -1; - echo "".$temp."W"; - } else { - echo "".get_Lon()."E"; - } - } -} - -function print_PopUpScript() { - echo " - "; -} - -function print_UrlPopNav() { - $sites = array( - array('http://www.acme.com/mapper/?lat='.get_Lat().'&long='.get_Lon().'&scale=11&theme=Image&width=3&height=2&dot=Yes', - __('Acme Mapper')), - array('http://geourl.org/near/?lat='.get_Lat().'&lon='.get_Lon().'&dist=500', - __('GeoURLs near here')), - array('http://www.geocaching.com/seek/nearest.aspx?origin_lat='.get_Lat().'&origin_long='.get_Lon().'&dist=5', - __('Geocaches near here')), - array('http://www.mapquest.com/maps/map.adp?latlongtype=decimal&latitude='.get_Lat().'&longitude='.get_Lon(), - __('Mapquest map of this spot')), - array('http://www.sidebit.com/ProjectGeoURLMap.php?lat='.get_Lat().'&lon='.get_Lon(), - __('SideBit URL Map of this spot')), - array('http://confluence.org/confluence.php?lat='.get_Lat().'&lon='.get_Lon(), - __('Confluence.org near here')), - array('http://www.topozone.com/map.asp?lat='.get_Lat().'&lon='.get_Lon(), - __('Topozone near here')), - array('http://www.findu.com/cgi-bin/near.cgi?lat='.get_Lat().'&lon='.get_Lon(), - __('FindU near here')), - array('http://mapserver.maptech.com/api/espn/index.cfm?lat='.get_Lat().'&lon='.get_Lon().'&scale=100000&zoom=50&type=1&icon=0&&scriptfile=http://mapserver.maptech.com/api/espn/index.cfm', - __('Maptech near here')) - ); - echo '
-
-
'."\n"; -} - -function longitude_invalid() { - if (get_Lon() == null) return true; - if (get_Lon() > 360) return true; - if (get_Lon() < -360) return true; -} - -function print_AcmeMap_Url() { - if (!get_settings('use_geo_positions')) return; - if (longitude_invalid()) return; - echo "http://www.acme.com/mapper?lat=".get_Lat()."&long=".get_Lon()."&scale=11&theme=Image&width=3&height=2&dot=Yes"; -} - -function print_GeoURL_Url() { - if (!get_settings('use_geo_positions')) return; - if (longitude_invalid()) return; - echo "http://geourl.org/near/?lat=".get_Lat()."&lon=".get_Lon()."&dist=500"; -} - -function print_GeoCache_Url() { - if (!get_settings('use_geo_positions')) return; - if (longitude_invalid()) return; - echo "http://www.geocaching.com/seek/nearest.aspx?origin_lat=".get_Lat()."&origin_long=".get_Lon()."&dist=5"; -} - -function print_MapQuest_Url() { - if (!get_settings('use_geo_positions')) return; - - if (longitude_invalid()) return; - echo "http://www.mapquest.com/maps/map.adp?latlongtype=decimal&latitude=".get_Lat()."&longitude=".get_Lon(); -} - -function print_SideBit_Url() { - if (!get_settings('use_geo_positions')) return; - if (longitude_invalid()) return; - echo "http://www.sidebit.com/ProjectGeoURLMap.php?lat=".get_Lat()."&lon=".get_Lon(); -} - -function print_DegreeConfluence_Url() { - if (!get_settings('use_geo_positions')) return; - if (longitude_invalid()) return; - echo "http://confluence.org/confluence.php?lat=".get_Lat()."&lon=".get_Lon(); -} - -function print_TopoZone_Url() { - if (!get_settings('use_geo_positions')) return; - if (longitude_invalid()) return; - echo "http://www.topozone.com/map.asp?lat=".get_Lat()."&lon=".get_Lon(); -} - -function print_FindU_Url() { - if (!get_settings('use_geo_positions')) return; - if (longitude_invalid()) return; - echo "http://www.findu.com/cgi-bin/near.cgi?lat=".get_Lat()."&lon=".get_Lon()."&scale=100000&zoom=50&type=1&icon=0&&scriptfile=http://mapserver.maptech.com/api/espn/index.cfm"; -} - -function print_MapTech_Url() { - if (!get_settings('use_geo_positions')) return; - if (longitude_invalid()) return; - echo "http://mapserver.maptech.com/api/espn/index.cfm?lat=".get_Lat()."&lon=".get_Lon(); -} - -?> diff --git a/wp-includes/template-functions.php b/wp-includes/template-functions.php index 02e2d6a85..d4e813a9b 100644 --- a/wp-includes/template-functions.php +++ b/wp-includes/template-functions.php @@ -7,9 +7,6 @@ require($curpath . 'template-functions-general.php'); /***** Links *****/ require($curpath . 'template-functions-links.php'); -/**** // Geo Tags ****/ -require($curpath . 'template-functions-geo.php'); - /***** Author tags *****/ require($curpath . 'template-functions-author.php'); diff --git a/wp-includes/vars.php b/wp-includes/vars.php index cd0eef81a..9253204a2 100644 --- a/wp-includes/vars.php +++ b/wp-includes/vars.php @@ -190,5 +190,4 @@ add_filter('single_post_title', 'wptexturize'); add_filter('the_title', 'wptexturize'); add_filter('the_content', 'wptexturize'); add_filter('the_excerpt', 'wptexturize'); -add_action('wp_head', 'doGeoUrlHeader'); ?> \ No newline at end of file