summaryrefslogtreecommitdiffstats
path: root/wp-includes/general-template.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-06-21 16:41:02 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-06-21 16:41:02 +0000
commita5fe68e002632c190ffbd85167671ed4d4961135 (patch)
treeae57f94603111507c50cb3c212a03bedf8f7dc5a /wp-includes/general-template.php
parent4e38776b5b68c61a4593a84340f4654200f7568e (diff)
WP Merge to WP 2.2.1
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1005 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-includes/general-template.php')
-rw-r--r--wp-includes/general-template.php81
1 files changed, 40 insertions, 41 deletions
diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php
index 7980319..bdc5b04 100644
--- a/wp-includes/general-template.php
+++ b/wp-includes/general-template.php
@@ -63,8 +63,8 @@ function bloginfo($show='') {
$info = get_bloginfo($show);
// Don't filter URL's.
- if (strpos($show, 'url') === false ||
- strpos($show, 'directory') === false ||
+ if (strpos($show, 'url') === false &&
+ strpos($show, 'directory') === false &&
strpos($show, 'home') === false) {
$info = apply_filters('bloginfo', $info, $show);
$info = convert_chars($info);
@@ -109,6 +109,7 @@ function get_bloginfo($show='') {
break;
case 'comments_atom_url':
$output = get_feed_link('comments_atom');
+ break;
case 'comments_rss2_url':
$output = get_feed_link('comments_rss2');
break;
@@ -217,8 +218,7 @@ function wp_title($sep = '&raquo;', $display = true) {
// If there is a post
if ( is_single() || is_page() ) {
$post = $wp_query->get_queried_object();
- $title = apply_filters('single_post_title', $title);
- $title = strip_tags($post->post_title);
+ $title = strip_tags( apply_filters( 'single_post_title', $post->post_title ) );
}
$prefix = '';
@@ -313,16 +313,16 @@ function get_archives_link($url, $text, $format = 'html', $before = '', $after =
function wp_get_archives($args = '') {
- global $wpdb, $wp_locale;
-
- $defaults = array(
- 'type' => 'monthly', 'limit' => '',
- 'format' => 'html', 'before' => '',
- 'after' => '', 'show_post_count' => false
- );
-
- $r = wp_parse_args( $args, $defaults );
- extract( $r );
+ global $wp_locale, $wpdb;
+
+ if ( is_array($args) )
+ $r = &$args;
+ else
+ parse_str($args, $r);
+
+ $defaults = array('type' => 'monthly', 'limit' => '', 'format' => 'html', 'before' => '', 'after' => '', 'show_post_count' => false);
+ $r = array_merge($defaults, $r);
+ extract($r, EXTR_SKIP);
if ( '' == $type )
$type = 'monthly';
@@ -900,10 +900,11 @@ function the_editor($content, $id = 'content', $prev_id = 'title') {
//<!--
edCanvas = document.getElementById('<?php echo $id; ?>');
<?php if ( $prev_id && user_can_richedit() ) : ?>
+ // If tinyMCE is defined.
+ if ( typeof tinyMCE != 'undefined' ) {
// This code is meant to allow tabbing from Title to Post (TinyMCE).
- if ( tinyMCE.isMSIE )
- document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e)
- {
+ if ( tinyMCE.isMSIE ) {
+ document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e) {
e = e ? e : window.event;
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
var i = tinyMCE.getInstanceById('<?php echo $id; ?>');
@@ -916,9 +917,8 @@ function the_editor($content, $id = 'content', $prev_id = 'title') {
return false;
}
}
- else
- document.getElementById('<?php echo $prev_id; ?>').onkeypress = function (e)
- {
+ } else {
+ document.getElementById('<?php echo $prev_id; ?>').onkeypress = function (e) {
e = e ? e : window.event;
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
var i = tinyMCE.getInstanceById('<?php echo $id; ?>');
@@ -931,6 +931,8 @@ function the_editor($content, $id = 'content', $prev_id = 'title') {
return false;
}
}
+ }
+ }
<?php endif; ?>
//-->
</script>
@@ -956,27 +958,24 @@ function language_attributes() {
echo $output;
}
-function paginate_links( $arg = '' ) {
- if ( is_array($arg) )
- $a = &$arg;
- else
- parse_str($arg, $a);
-
- // Defaults
- $base = '%_%'; // http://example.com/all_posts.php%_% : %_% is replaced by format (below)
- $format = '?page=%#%'; // ?page=%#% : %#% is replaced by the page number
- $total = 1;
- $current = 0;
- $show_all = false;
- $prev_next = true;
- $prev_text = __('&laquo; Previous');
- $next_text = __('Next &raquo;');
- $end_size = 1; // How many numbers on either end including the end
- $mid_size = 2; // How many numbers to either side of current not including current
- $type = 'plain';
- $add_args = false; // array of query args to aadd
-
- extract($a);
+function paginate_links( $args = '' ) {
+ $defaults = array(
+ 'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below)
+ 'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number
+ 'total' => 1,
+ 'current' => 0,
+ 'show_all' => false,
+ 'prev_next' => true,
+ 'prev_text' => __('&laquo; Previous'),
+ 'next_text' => __('Next &raquo;'),
+ 'end_size' => 1, // How many numbers on either end including the end
+ 'mid_size' => 2, // How many numbers to either side of current not including current
+ 'type' => 'plain',
+ 'add_args' => false // array of query args to aadd
+ );
+
+ $args = wp_parse_args( $args, $defaults );
+ extract($args, EXTR_SKIP);
// Who knows what else people pass in $args
$total = (int) $total;