Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a54035abd8 | ||
|
|
af27a75670 | ||
|
|
58235c4df5 | ||
|
|
11f901ee4f | ||
|
|
9779403c81 | ||
|
|
39c6dfa998 | ||
|
|
67988bdff0 | ||
|
|
f66e4060a9 | ||
|
|
790a4d36d9 | ||
|
|
184928af47 | ||
|
|
c4e47d3e9b | ||
|
|
0161b0c2e8 | ||
|
|
04b303eaea | ||
|
|
79a8bf5d08 | ||
|
|
b95912c4a5 | ||
|
|
e9f8f9abf7 | ||
|
|
22de2d2cb9 | ||
|
|
250e1ea3f8 | ||
|
|
2cef330387 | ||
|
|
a5c59de945 | ||
|
|
987fb7822d | ||
|
|
edf6e21ebd | ||
|
|
9a8d98cb3d | ||
|
|
6323ce0a14 | ||
|
|
ab6e0e1e4f | ||
|
|
decde5cfd8 | ||
|
|
b86f82e435 | ||
|
|
1f46a9c3ae | ||
|
|
6c3dba8271 | ||
|
|
1527d0d4c4 | ||
|
|
0a737c65f2 | ||
|
|
238ca3e925 | ||
|
|
78ca745e30 | ||
|
|
8789eb2c7f | ||
|
|
a391b9676c | ||
|
|
58fb7284f3 | ||
|
|
8db733bca6 | ||
|
|
0024f9cd6d |
@@ -155,7 +155,7 @@ case 'add-meta' :
|
||||
if ( !current_user_can( 'edit_post', $id ) )
|
||||
die('-1');
|
||||
if ( $id < 0 ) {
|
||||
$now = current_time('timestamp');
|
||||
$now = current_time('timestamp', 1);
|
||||
if ( $pid = wp_insert_post( array(
|
||||
'post_title' => sprintf('Draft created on %s at %s', date(get_option('date_format'), $now), date(get_option('time_format'), $now))
|
||||
) ) )
|
||||
|
||||
@@ -139,14 +139,14 @@ function fix_attachment_links( $post_ID ) {
|
||||
|
||||
$post = & get_post( $post_ID, ARRAY_A );
|
||||
|
||||
$search = "#<a[^>]+rel=('|\" )[^'\"]*attachment[^>]*>#ie";
|
||||
$search = "#<a[^>]+rel=('|\")[^'\"]*attachment[^>]*>#ie";
|
||||
|
||||
// See if we have any rel="attachment" links
|
||||
if ( 0 == preg_match_all( $search, $post['post_content'], $anchor_matches, PREG_PATTERN_ORDER ) )
|
||||
return;
|
||||
|
||||
$i = 0;
|
||||
$search = "#[\s]+rel=(\"|' )(.*? )wp-att-(\d+ )\\1#i";
|
||||
$search = "#[\s]+rel=(\"|')(.*?)wp-att-(\d+)\\1#i";
|
||||
foreach ( $anchor_matches[0] as $anchor ) {
|
||||
if ( 0 == preg_match( $search, $anchor, $id_matches ) )
|
||||
continue;
|
||||
@@ -830,7 +830,7 @@ function page_rows( $parent = 0, $level = 0, $pages = 0, $hierarchy = true ) {
|
||||
<?php echo $pad; ?><?php the_title() ?>
|
||||
</td>
|
||||
<td><?php the_author() ?></td>
|
||||
<td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else echo mysql2date( 'Y-m-d g:i a', $post->post_modified ); ?></td>
|
||||
<td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else echo mysql2date( __('Y-m-d g:i a'), $post->post_modified ); ?></td>
|
||||
<td><a href="<?php the_permalink(); ?>" rel="permalink" class="edit"><?php _e( 'View' ); ?></a></td>
|
||||
<td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&post=$id' class='edit'>" . __( 'Edit' ) . "</a>"; } ?></td>
|
||||
<td><?php if ( current_user_can( 'delete_page', $id ) ) { echo "<a href='" . wp_nonce_url( "page.php?action=delete&post=$id", 'delete-page_' . $id ) . "' class='delete' onclick=\"return deleteSomething( 'page', " . $id . ", '" . js_escape(sprintf( __("You are about to delete the '%s' page.\n'OK' to delete, 'Cancel' to stop." ), get_the_title() ) ) . "' );\">" . __( 'Delete' ) . "</a>"; } ?></td>
|
||||
@@ -1269,7 +1269,7 @@ function parent_dropdown( $default = 0, $parent = 0, $level = 0 ) {
|
||||
|
||||
if ( $items ) {
|
||||
foreach ( $items as $item ) {
|
||||
// A page cannot be it's own parent.
|
||||
// A page cannot be its own parent.
|
||||
if (!empty ( $post_ID ) ) {
|
||||
if ( $item->ID == $post_ID ) {
|
||||
continue;
|
||||
@@ -1602,7 +1602,7 @@ function get_file_description( $file ) {
|
||||
}
|
||||
elseif ( file_exists( ABSPATH . $file ) && is_file( ABSPATH . $file ) ) {
|
||||
$template_data = implode( '', file( ABSPATH . $file ) );
|
||||
if ( preg_match( "|Template Name:(.* )|i", $template_data, $name ))
|
||||
if ( preg_match( "|Template Name:(.*)|i", $template_data, $name ))
|
||||
return $name[1];
|
||||
}
|
||||
|
||||
@@ -2190,7 +2190,7 @@ function wp_create_thumbnail( $file, $max_side, $effect = '' ) {
|
||||
|
||||
$thumbpath = str_replace( basename( $file ), $thumb, $file );
|
||||
|
||||
// move the thumbnail to it's final destination
|
||||
// move the thumbnail to its final destination
|
||||
if ( $type[2] == 1 ) {
|
||||
if (!imagegif( $thumbnail, $thumbpath ) ) {
|
||||
$error = __( "Thumbnail path invalid" );
|
||||
@@ -2215,8 +2215,7 @@ function wp_create_thumbnail( $file, $max_side, $effect = '' ) {
|
||||
if (!empty ( $error ) ) {
|
||||
return $error;
|
||||
} else {
|
||||
apply_filters( 'wp_create_thumbnail', $thumbpath );
|
||||
return $thumbpath;
|
||||
return apply_filters( 'wp_create_thumbnail', $thumbpath );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -223,12 +223,12 @@ Event.observe( window, 'load', hide_text );
|
||||
|
||||
if ( $width == HEADER_IMAGE_WIDTH && $height == HEADER_IMAGE_HEIGHT ) {
|
||||
set_theme_mod('header_image', $url);
|
||||
$header = apply_filters('wp_create_file_in_uploads', $header); // For replication
|
||||
$header = apply_filters('wp_create_file_in_uploads', $file, $id); // For replication
|
||||
return $this->finished();
|
||||
} elseif ( $width > HEADER_IMAGE_WIDTH ) {
|
||||
$oitar = $width / HEADER_IMAGE_WIDTH;
|
||||
$image = wp_crop_image($file, 0, 0, $width, $height, HEADER_IMAGE_WIDTH, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file));
|
||||
$image = apply_filters('wp_create_file_in_uploads', $image); // For replication
|
||||
$image = apply_filters('wp_create_file_in_uploads', $image, $id); // For replication
|
||||
|
||||
$url = str_replace(basename($url), basename($image), $url);
|
||||
$width = $width / $oitar;
|
||||
@@ -286,8 +286,7 @@ Event.observe( window, 'load', hide_text );
|
||||
// cleanup
|
||||
$file = get_attached_file( $_POST['attachment_id'] );
|
||||
$medium = str_replace(basename($file), 'midsize-'.basename($file), $file);
|
||||
@unlink( $medium );
|
||||
apply_filters( 'wp_delete_file', $medium );
|
||||
@unlink( apply_filters( 'wp_delete_file', $medium ) );
|
||||
wp_delete_attachment( $_POST['attachment_id'] );
|
||||
|
||||
return $this->finished();
|
||||
|
||||
@@ -19,7 +19,7 @@ require_once('admin-header.php');
|
||||
</form>
|
||||
|
||||
<?php
|
||||
wp('post_type=page&orderby=menu_order&what_to_show=posts&posts_per_page=-1&posts_per_archive_page=-1');
|
||||
wp('post_type=page&orderby=menu_order&what_to_show=posts&posts_per_page=-1&posts_per_archive_page=-1&order=asc');
|
||||
|
||||
if ( $_GET['s'] )
|
||||
$all = false;
|
||||
|
||||
@@ -177,7 +177,7 @@ foreach($posts_columns as $column_name=>$column_display_name) {
|
||||
|
||||
case 'date':
|
||||
?>
|
||||
<td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?></td>
|
||||
<td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Unpublished'); else the_time(_('Y-m-d \<\b\r \/\> g:i:s a')); ?></td>
|
||||
<?php
|
||||
break;
|
||||
case 'title':
|
||||
@@ -279,17 +279,17 @@ foreach ($comments as $comment) {
|
||||
|
||||
<?php comment_text() ?>
|
||||
|
||||
<p><?php comment_date('M j, g:i A'); ?> — [
|
||||
<p><?php comment_date(__('M j, g:i A')); ?> — [
|
||||
<?php
|
||||
if ( current_user_can('edit_post', $comment->comment_post_ID) ) {
|
||||
echo " <a href='comment.php?action=editcomment&c=".$comment->comment_ID."'>" . __('Edit') . '</a>';
|
||||
echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';
|
||||
echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . js_escape(sprintf(__("You are about to delete this comment by '%s'.\n'Cancel' to stop, 'OK' to delete."), $comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';
|
||||
if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) {
|
||||
echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>';
|
||||
echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>';
|
||||
echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>';
|
||||
echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>';
|
||||
}
|
||||
echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=".$comment->comment_post_ID."&c=".$comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), js_escape( $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ]";
|
||||
} // end if any comments to show
|
||||
echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=" . $comment->comment_post_ID . "&c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to mark as spam this comment by '%s'.\n'Cancel' to stop, 'OK' to mark as spam."), $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ";
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</li>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
require_once('admin.php');
|
||||
require_once (ABSPATH . WPINC . '/rss.php');
|
||||
|
||||
@header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
|
||||
|
||||
switch ( $_GET['jax'] ) {
|
||||
|
||||
case 'incominglinks' :
|
||||
|
||||
@@ -60,7 +60,7 @@ include('./admin-header.php');
|
||||
<table class="optiontable">
|
||||
<tr>
|
||||
<th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th>
|
||||
<td><code><?php echo gmdate('Y-m-d g:i:s a'); ?></code></td>
|
||||
<td><code><?php echo gmdate(__('Y-m-d g:i:s a')); ?></code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php _e('Times in the weblog should differ by:') ?> </th>
|
||||
|
||||
@@ -40,7 +40,6 @@ include('admin-header.php');
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -54,7 +53,6 @@ include('admin-header.php');
|
||||
<th width="33%" scope="row"><?php _e('Show at most:') ?></th>
|
||||
<td>
|
||||
<input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option('posts_per_page'); ?>" size="3" /> <?php _e('posts') ?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -72,7 +70,7 @@ include('admin-header.php');
|
||||
<td>
|
||||
<p><label><input name="rss_use_excerpt" type="radio" value="0" <?php checked(0, get_option('rss_use_excerpt')); ?> /> <?php _e('Full text') ?></label><br />
|
||||
<label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_option('rss_use_excerpt')); ?> /> <?php _e('Summary') ?></label></p>
|
||||
<p><?php _e('Note: If you use the <code><--more--></code> feature, it will cut off posts in RSS feeds.'); ?></p>
|
||||
<p><?php _e('Note: If you use the <code><!--more--></code> feature, it will cut off posts in RSS feeds.'); ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -344,10 +344,14 @@ function wp_list_bookmarks($args = '') {
|
||||
$bookmarks = get_bookmarks("limit=$limit&category=$category&show_updated=$show_updated&orderby=$orderby&order=$order&hide_invisible=$hide_invisible&show_updated=$show_updated");
|
||||
|
||||
if ( !empty($bookmarks) ) {
|
||||
$output .= str_replace(array('%id', '%class'), array("linkuncat", $class), $category_before);
|
||||
$output .= "$title_before$title_li$title_after\n\t<ul>\n";
|
||||
$output .= _walk_bookmarks($bookmarks, $r);
|
||||
$output .= "\n\t</ul>\n$category_after\n";
|
||||
if ( !empty( $title_li ) ){
|
||||
$output .= str_replace(array('%id', '%class'), array("linkcat-$category", $class), $category_before);
|
||||
$output .= "$title_before$title_li$title_after\n\t<ul>\n";
|
||||
$output .= _walk_bookmarks($bookmarks, $r);
|
||||
$output .= "\n\t</ul>\n$category_after\n";
|
||||
} else {
|
||||
$output .= _walk_bookmarks($bookmarks, $r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
function wp_cache_add($key, $data, $flag = '', $expire = 0) {
|
||||
global $wp_object_cache;
|
||||
$data = unserialize(serialize($data));
|
||||
|
||||
return $wp_object_cache->add($key, $data, $flag, $expire);
|
||||
}
|
||||
@@ -37,12 +38,14 @@ function wp_cache_init() {
|
||||
|
||||
function wp_cache_replace($key, $data, $flag = '', $expire = 0) {
|
||||
global $wp_object_cache;
|
||||
$data = unserialize(serialize($data));
|
||||
|
||||
return $wp_object_cache->replace($key, $data, $flag, $expire);
|
||||
}
|
||||
|
||||
function wp_cache_set($key, $data, $flag = '', $expire = 0) {
|
||||
global $wp_object_cache;
|
||||
$data = unserialize(serialize($data));
|
||||
|
||||
return $wp_object_cache->set($key, $data, $flag, $expire);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class WP_Roles {
|
||||
unset($this->role_objects[$role]);
|
||||
unset($this->role_names[$role]);
|
||||
unset($this->roles[$role]);
|
||||
|
||||
|
||||
if ( $this->use_db )
|
||||
update_option($this->role_key, $this->roles);
|
||||
}
|
||||
@@ -427,7 +427,7 @@ function map_meta_cap($cap, $user_id) {
|
||||
}
|
||||
|
||||
$author_data = get_userdata($user_id);
|
||||
$page_author_data = get_userdata($post->post_author);
|
||||
$page_author_data = get_userdata($page->post_author);
|
||||
if ($user_id == $page_author_data->ID)
|
||||
$caps[] = 'read';
|
||||
else
|
||||
|
||||
@@ -33,7 +33,7 @@ function &get_categories($args = '') {
|
||||
$key = md5( serialize( $r ) );
|
||||
if ( $cache = wp_cache_get( 'get_categories', 'category' ) )
|
||||
if ( isset( $cache[ $key ] ) )
|
||||
return $cache[ $key ];
|
||||
return apply_filters('get_categories', $cache[$key], $r);
|
||||
|
||||
$where = 'cat_ID > 0';
|
||||
$inclusions = '';
|
||||
|
||||
@@ -93,6 +93,10 @@ function spawn_cron() {
|
||||
}
|
||||
|
||||
function wp_cron() {
|
||||
// Prevent infinite loops caused by lack of wp-cron.php
|
||||
if ( strpos($_SERVER['REQUEST_URI'], '/wp-cron.php') !== false )
|
||||
return;
|
||||
|
||||
$crons = _get_cron_array();
|
||||
|
||||
if ( !is_array($crons) )
|
||||
|
||||
@@ -63,7 +63,6 @@ function wpautop($pee, $br = 1) {
|
||||
$pee = preg_replace("/\n\n+/", "\n\n", $pee); // take care of duplicates
|
||||
$pee = preg_replace('/\n?(.+?)(?:\n\s*\n|\z)/s', "<p>$1</p>\n", $pee); // make paragraphs, including one at the end
|
||||
$pee = preg_replace('|<p>\s*?</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace
|
||||
$pee = preg_replace( '|<p>(<div[^>]*>\s*)|', "$1<p>", $pee );
|
||||
$pee = preg_replace('!<p>([^<]+)\s*?(</(?:div|address|form)[^>]*>)!', "<p>$1</p>$2", $pee);
|
||||
$pee = preg_replace( '|<p>|', "$1<p>", $pee );
|
||||
$pee = preg_replace('!<p>\s*(</?' . $allblocks . '[^>]*>)\s*</p>!', "$1", $pee); // don't pee all over a tag
|
||||
@@ -82,7 +81,7 @@ function wpautop($pee, $br = 1) {
|
||||
if ( strstr( $pee, '<pre' ) )
|
||||
$pee = preg_replace('!(<pre.*?>)(.*?)</pre>!ise', " stripslashes('$1') . stripslashes(clean_pre('$2')) . '</pre>' ", $pee);
|
||||
$pee = preg_replace( "|\n</p>$|", '</p>', $pee );
|
||||
/**/
|
||||
|
||||
return $pee;
|
||||
}
|
||||
|
||||
|
||||
@@ -1190,7 +1190,7 @@ function wp_nonce_ays($action) {
|
||||
|
||||
$adminurl = get_option('siteurl') . '/wp-admin';
|
||||
if ( wp_get_referer() )
|
||||
$adminurl = wp_get_referer();
|
||||
$adminurl = attribute_escape(wp_get_referer());
|
||||
|
||||
$title = __('WordPress Confirmation');
|
||||
// Remove extra layer of slashes.
|
||||
@@ -1205,9 +1205,9 @@ function wp_nonce_ays($action) {
|
||||
$html .= "\t\t<input type='hidden' name='" . attribute_escape(urldecode($k)) . "' value='" . attribute_escape(urldecode($v)) . "' />\n";
|
||||
}
|
||||
$html .= "\t\t<input type='hidden' name='_wpnonce' value='" . wp_create_nonce($action) . "' />\n";
|
||||
$html .= "\t\t<div id='message' class='confirm fade'>\n\t\t<p>" . wp_explain_nonce($action) . "</p>\n\t\t<p><a href='$adminurl'>" . __('No') . "</a> <input type='submit' value='" . __('Yes') . "' /></p>\n\t\t</div>\n\t</form>\n";
|
||||
$html .= "\t\t<div id='message' class='confirm fade'>\n\t\t<p>" . wp_specialchars(wp_explain_nonce($action)) . "</p>\n\t\t<p><a href='$adminurl'>" . __('No') . "</a> <input type='submit' value='" . __('Yes') . "' /></p>\n\t\t</div>\n\t</form>\n";
|
||||
} else {
|
||||
$html .= "\t<div id='message' class='confirm fade'>\n\t<p>" . wp_explain_nonce($action) . "</p>\n\t<p><a href='$adminurl'>" . __('No') . "</a> <a href='" . add_query_arg( '_wpnonce', wp_create_nonce($action), $_SERVER['REQUEST_URI'] ) . "'>" . __('Yes') . "</a></p>\n\t</div>\n";
|
||||
$html .= "\t<div id='message' class='confirm fade'>\n\t<p>" . wp_specialchars(wp_explain_nonce($action)) . "</p>\n\t<p><a href='$adminurl'>" . __('No') . "</a> <a href='" . attribute_escape(add_query_arg( '_wpnonce', wp_create_nonce($action), $_SERVER['REQUEST_URI'] )) . "'>" . __('Yes') . "</a></p>\n\t</div>\n";
|
||||
}
|
||||
$html .= "</body>\n</html>";
|
||||
wp_die($html, $title);
|
||||
|
||||
40
wp-includes/js/scriptaculous/wp-scriptaculous.js
Normal file
40
wp-includes/js/scriptaculous/wp-scriptaculous.js
Normal file
@@ -0,0 +1,40 @@
|
||||
// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
|
||||
var Scriptaculous = {
|
||||
Version: '1.6.1',
|
||||
require: function(libraryName) {
|
||||
// inserting via DOM fails in Safari 2.0, so brute force approach
|
||||
document.write('<script type="text/javascript" src="'+libraryName+'"></script>');
|
||||
},
|
||||
load: function() {
|
||||
if((typeof Prototype=='undefined') ||
|
||||
(typeof Element == 'undefined') ||
|
||||
(typeof Element.Methods=='undefined') ||
|
||||
parseFloat(Prototype.Version.split(".")[0] + "." +
|
||||
Prototype.Version.split(".")[1]) < 1.5)
|
||||
throw("script.aculo.us requires the Prototype JavaScript framework >= 1.5.0");
|
||||
|
||||
$A(document.getElementsByTagName("script")).findAll( function(s) {
|
||||
return (s.src && s.src.match(/scriptaculous\.js(\?.*)?$/))
|
||||
}).each( function(s) {
|
||||
var path = s.src.replace(/scriptaculous\.js(\?.*)?$/,'');
|
||||
var includes = s.src.match(/\?.*load=([a-z,]*)/);
|
||||
if ( includes )
|
||||
includes[1].split(',').each(
|
||||
function(include) { Scriptaculous.require(path+include+'.js') });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Scriptaculous.load();
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
@ require('../../../wp-config.php');
|
||||
cache_javascript_headers();
|
||||
|
||||
function wp_translate_tinymce_lang($text) {
|
||||
if ( ! function_exists('__') ) {
|
||||
@@ -43,7 +44,7 @@
|
||||
$mce_popups_css = get_option('siteurl') . '/wp-includes/js/tinymce/plugins/wordpress/popups.css';
|
||||
$mce_css = get_option('siteurl') . '/wp-includes/js/tinymce/plugins/wordpress/wordpress.css';
|
||||
$mce_css = apply_filters('mce_css', $mce_css);
|
||||
if ( $_SERVER['HTTPS'] ) {
|
||||
if ( $_SERVER['HTTPS'] == 'on' ) {
|
||||
$mce_css = str_replace('http://', 'https://', $mce_css);
|
||||
$mce_popups_css = str_replace('http://', 'https://', $mce_popups_css);
|
||||
}
|
||||
@@ -73,6 +74,7 @@ initArray = {
|
||||
convert_newlines_to_brs : false,
|
||||
remove_linebreaks : false,
|
||||
fix_list_elements : true,
|
||||
gecko_spellcheck : true,
|
||||
entities : "38,amp,60,lt,62,gt",
|
||||
content_css : "<?php echo $mce_css; ?>",
|
||||
valid_elements : "<?php echo $valid_elements; ?>",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* @version 1.08
|
||||
* @author Moxiecode
|
||||
* @copyright Copyright <EFBFBD> 2005-2006, Moxiecode Systems AB, All rights reserved.
|
||||
* @copyright Copyright 2005-2006, Moxiecode Systems AB, All rights reserved.
|
||||
*
|
||||
* This file compresses the TinyMCE JavaScript using GZip and
|
||||
* enables the browser to do two requests instead of one for each .js file.
|
||||
@@ -82,7 +82,7 @@ $cacheDir = realpath("."); // Absolute directory path to where cached gz file
|
||||
$debug = false; // Enable this option if you need debuging info
|
||||
|
||||
// Headers
|
||||
header("Content-type: text/javascript; charset: UTF-8");
|
||||
header("Content-Type: text/javascript; charset=" . get_bloginfo('charset'));
|
||||
// header("Cache-Control: must-revalidate");
|
||||
header("Vary: Accept-Encoding"); // Handle proxies
|
||||
header("Expires: " . gmdate("D, d M Y H:i:s", time() + $expiresOffset) . " GMT");
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<?php require_once('../../../wp-config.php'); ?>
|
||||
<?php require_once('../../../wp-config.php');
|
||||
header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
|
||||
<head>
|
||||
|
||||
@@ -273,6 +273,7 @@ function wp_list_pages($args = '') {
|
||||
$r = array_merge($defaults, $r);
|
||||
|
||||
$output = '';
|
||||
$current_page = 0;
|
||||
|
||||
// sanitize, mostly to keep spaces out
|
||||
$r['exclude'] = preg_replace('[^0-9,]', '', $r['exclude']);
|
||||
@@ -288,7 +289,8 @@ function wp_list_pages($args = '') {
|
||||
$output .= '<li class="pagenav">' . $r['title_li'] . '<ul>';
|
||||
|
||||
global $wp_query;
|
||||
$current_page = $wp_query->get_queried_object_id();
|
||||
if ( is_page() )
|
||||
$current_page = $wp_query->get_queried_object_id();
|
||||
$output .= walk_page_tree($pages, $r['depth'], $current_page, $r);
|
||||
|
||||
if ( $r['title_li'] )
|
||||
|
||||
@@ -74,16 +74,16 @@ function &get_children($args = '', $output = OBJECT) {
|
||||
// get extended entry info (<!--more-->)
|
||||
function get_extended($post) {
|
||||
//Match the new style more links
|
||||
if (preg_match('/<!--more(.+?)?-->/', $post, $matches)) {
|
||||
list($main,$extended) = explode($matches[0],$post,2);
|
||||
if ( preg_match('/<!--more(.*?)-->/', $post, $matches) ) {
|
||||
list($main, $extended) = explode($matches[0], $post, 2);
|
||||
} else {
|
||||
$main = $post;
|
||||
$extended = '';
|
||||
}
|
||||
|
||||
// Strip leading and trailing whitespace
|
||||
$main = preg_replace('/^[\s]*(.*)[\s]*$/','\\1',$main);
|
||||
$extended = preg_replace('/^[\s]*(.*)[\s]*$/','\\1',$extended);
|
||||
$main = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $main);
|
||||
$extended = preg_replace('/^[\s]*(.*)[\s]*$/', '\\1', $extended);
|
||||
|
||||
return array('main' => $main, 'extended' => $extended);
|
||||
}
|
||||
|
||||
@@ -765,9 +765,11 @@ class WP_Query {
|
||||
$searchand = ' AND ';
|
||||
}
|
||||
$term = addslashes_gpc($q['s']);
|
||||
if (!$q['sentence'] && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] ) $search .= " OR (post_title LIKE '{$n}{$term}{$n}') OR (post_content LIKE '{$n}{$term}{$n}')";
|
||||
|
||||
$search = " AND ({$search}) ";
|
||||
if (!$q['sentence'] && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] )
|
||||
$search .= " OR (post_title LIKE '{$n}{$term}{$n}') OR (post_content LIKE '{$n}{$term}{$n}')";
|
||||
|
||||
if ( !empty($search) )
|
||||
$search = " AND ({$search}) ";
|
||||
}
|
||||
|
||||
// Category stuff
|
||||
@@ -794,16 +796,16 @@ class WP_Query {
|
||||
$in_cats = substr($in_cats, 0, -2);
|
||||
$out_cats = substr($out_cats, 0, -2);
|
||||
if ( strlen($in_cats) > 0 )
|
||||
$in_cats = " AND category_id IN ($in_cats)";
|
||||
$in_cats = " AND $wpdb->post2cat.category_id IN ($in_cats)";
|
||||
if ( strlen($out_cats) > 0 ) {
|
||||
$ids = $wpdb->get_col("SELECT post_id FROM $wpdb->post2cat WHERE category_id IN ($out_cats)");
|
||||
$ids = $wpdb->get_col("SELECT post_id FROM $wpdb->post2cat WHERE $wpdb->post2cat.category_id IN ($out_cats)");
|
||||
if ( is_array($ids) && count($ids > 0) ) {
|
||||
foreach ( $ids as $id )
|
||||
$out_posts .= "$id, ";
|
||||
$out_posts = substr($out_posts, 0, -2);
|
||||
}
|
||||
if ( strlen($out_posts) > 0 )
|
||||
$out_cats = " AND ID NOT IN ($out_posts)";
|
||||
$out_cats = " AND $wpdb->posts.ID NOT IN ($out_posts)";
|
||||
else
|
||||
$out_cats = '';
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class WP_Scripts {
|
||||
$this->add( 'colorpicker', '/wp-includes/js/colorpicker.js', false, '3517' );
|
||||
$this->add( 'tiny_mce', '/wp-includes/js/tinymce/tiny_mce_gzip.php', false, '20061113' );
|
||||
$mce_config = apply_filters('tiny_mce_config_url', '/wp-includes/js/tinymce/tiny_mce_config.php');
|
||||
$this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20061113' );
|
||||
$this->add( 'wp_tiny_mce', $mce_config, array('tiny_mce'), '20070225' );
|
||||
$this->add( 'prototype', '/wp-includes/js/prototype.js', false, '1.5.0');
|
||||
$this->add( 'autosave', '/wp-includes/js/autosave-js.php', array('prototype', 'sack'), '20070116');
|
||||
$this->add( 'wp-ajax', '/wp-includes/js/wp-ajax-js.php', array('prototype'), '20070118');
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
// This holds the version number in a separate file so we can bump it without cluttering the SVN
|
||||
|
||||
$wp_version = '2.1';
|
||||
$wp_db_version = 4772;
|
||||
$wp_version = '2.1.2';
|
||||
$wp_db_version = 4773;
|
||||
|
||||
?>
|
||||
|
||||
12
xmlrpc.php
12
xmlrpc.php
@@ -535,7 +535,9 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$post_content = $post_content . "\n<!--more-->\n" . $post_more;
|
||||
}
|
||||
|
||||
$to_ping = $content_struct['mt_tb_ping_urls'];
|
||||
$to_ping = $content_struct['mt_tb_ping_urls'];
|
||||
if ( is_array($to_ping) )
|
||||
$to_ping = implode(' ', $to_ping);
|
||||
|
||||
// Do some timestamp voodoo
|
||||
$dateCreatedd = $content_struct['dateCreated'];
|
||||
@@ -633,8 +635,10 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
$post_content = $post_content . "\n<!--more-->\n" . $post_more;
|
||||
}
|
||||
|
||||
$to_ping = $content_struct['mt_tb_ping_urls'];
|
||||
|
||||
$to_ping = $content_struct['mt_tb_ping_urls'];
|
||||
if ( is_array($to_ping) )
|
||||
$to_ping = implode(' ', $to_ping);
|
||||
|
||||
$comment_status = (empty($content_struct['mt_allow_comments'])) ?
|
||||
get_option('default_comment_status')
|
||||
: $content_struct['mt_allow_comments'];
|
||||
@@ -977,7 +981,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
||||
foreach($catids as $catid) {
|
||||
$categories[] = array(
|
||||
'categoryName' => get_cat_name($catid),
|
||||
'categoryId' => $catid,
|
||||
'categoryId' => (string) $catid,
|
||||
'isPrimary' => $isPrimary
|
||||
);
|
||||
$isPrimary = false;
|
||||
|
||||
Reference in New Issue
Block a user