Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
756ec87fd7 | ||
|
|
fcdac4e218 | ||
|
|
47ede9401b | ||
|
|
18799ba194 | ||
|
|
a9af4600f2 | ||
|
|
e85d6dd1aa | ||
|
|
b82bf6bdcc | ||
|
|
3f7a182e4a | ||
|
|
b38d55e624 | ||
|
|
7dc7fcfcd9 | ||
|
|
91218306b8 | ||
|
|
9e887aeb62 | ||
|
|
7e2f6d83a9 | ||
|
|
0e66497ecb | ||
|
|
899892a3ce | ||
|
|
7ad0c5ca60 | ||
|
|
bba9715b3c | ||
|
|
ec273e08e3 | ||
|
|
5b79e15243 | ||
|
|
d42ebe4443 | ||
|
|
b1bf2eaa03 |
@@ -57,7 +57,7 @@
|
||||
<h1>System Recommendations</h1>
|
||||
<ul>
|
||||
<li>PHP version <strong>4.3</strong> or higher.</li>
|
||||
<li>MySQL version <strong>4.0</strong> or higher.</li>
|
||||
<li>MySQL version <strong>4.1.2</strong> or higher.</li>
|
||||
<li>... and a link to <a href="http://wordpress.org/">http://wordpress.org</a> on your site.</li>
|
||||
</ul>
|
||||
<p>WordPress is the official continuation of <a href="http://cafelog.com/">b2/cafélog</a>, which came from Michel V. The work has been continued by the <a href="http://wordpress.org/about/">WordPress developers</a>. If you would like to support WordPress, please consider <a href="http://wordpress.org/donate/">donating</a>.</p>
|
||||
|
||||
@@ -636,7 +636,7 @@ case 'get-tagcloud' :
|
||||
break;
|
||||
case 'add-comment' :
|
||||
check_ajax_referer( $action );
|
||||
if ( !current_user_can( 'edit_post', $id ) )
|
||||
if ( !current_user_can( 'edit_posts' ) )
|
||||
die('-1');
|
||||
$search = isset($_POST['s']) ? $_POST['s'] : false;
|
||||
$status = isset($_POST['comment_status']) ? $_POST['comment_status'] : 'all';
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,7 +8,12 @@ html {
|
||||
}
|
||||
|
||||
textarea,
|
||||
input,
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
input[type="file"],
|
||||
input[type="button"],
|
||||
input[type="submit"],
|
||||
input[type="reset"],
|
||||
select {
|
||||
border-color: #dfdfdf;
|
||||
background-color: #fff;
|
||||
@@ -242,11 +247,6 @@ strong .post-com-count span {
|
||||
border-top-color: #dfdfdf;
|
||||
}
|
||||
|
||||
.describe input[type="text"],
|
||||
.describe textarea {
|
||||
border-color: #dfdfdf;
|
||||
}
|
||||
|
||||
.media-upload-form label.form-help,
|
||||
td.help {
|
||||
color: #9a9a9a;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,7 +8,12 @@ html {
|
||||
}
|
||||
|
||||
textarea,
|
||||
input,
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
input[type="file"],
|
||||
input[type="button"],
|
||||
input[type="submit"],
|
||||
input[type="reset"],
|
||||
select {
|
||||
border-color: #dfdfdf;
|
||||
background-color: #fff;
|
||||
@@ -242,11 +247,6 @@ strong .post-com-count span {
|
||||
border-top-color: #dfdfdf;
|
||||
}
|
||||
|
||||
.describe input[type="text"],
|
||||
.describe textarea {
|
||||
border-color: #dfdfdf;
|
||||
}
|
||||
|
||||
.media-upload-form label.form-help,
|
||||
td.help {
|
||||
color: #9a9a9a;
|
||||
|
||||
@@ -1 +1 @@
|
||||
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;background:transparent;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}ins{text-decoration:none;}del{text-decoration:line-through;}#wpwrap{height:auto;min-height:100%;width:100%;}#wpcontent{height:100%;padding-bottom:50px;}#wpbody{clear:both;margin-left:175px;}.folded #wpbody{margin-left:60px;}#wpbody-content{float:left;width:100%;}#adminmenu{float:left;clear:left;width:145px;margin-top:15px;margin-right:5px;margin-bottom:15px;margin-left:-160px;position:relative;padding:0;list-style:none;}.folded #adminmenu{margin-left:-45px;}.folded #adminmenu,.folded #adminmenu li.menu-top{width:28px;}#footer{clear:both;position:relative;width:100%;}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative;}.inner-sidebar #side-sortables{width:280px;min-height:300px;}.has-right-sidebar .inner-sidebar{display:block;}.has-right-sidebar #post-body{float:left;clear:left;width:100%;margin-right:-340px;}.has-right-sidebar #post-body-content{margin-right:300px;}#col-container{overflow:hidden;padding:0;margin:0;}#col-left{padding:0;margin:0;overflow:hidden;width:39%;}#col-right{float:right;clear:right;overflow:hidden;padding:0;margin:0;width:59%;}.alignleft{float:left;}.alignright{float:right;}.textleft{text-align:left;}.textright{text-align:right;}.clear{clear:both;}.screen-reader-text,.screen-reader-text span{position:absolute;left:-1000em;height:1px;width:1px;overflow:hidden;}.hidden,.js .closed .inside,.js .hide-if-js,.no-js .hide-if-no-js{display:none;}input[type="text"],input[type="password"],textarea{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}input[type="checkbox"],input[type="radio"]{vertical-align:middle;}html,body{height:100%;}body,td,textarea,input,select{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:13px;}body,textarea{line-height:1.4em;}input,select{line-height:1em;}p{margin:1em 0;}blockquote{margin:1em;}label{cursor:pointer;}li,dd{margin-bottom:6px;}p,li,dl,dd,dt{line-height:140%;}textarea,input,select{margin:1px;padding:3px;}h1{display:block;font-size:2em;font-weight:bold;margin:.67em 0;}h2{display:block;font-size:1.5em;font-weight:bold;margin:.83em 0;}h3{display:block;font-size:1.17em;font-weight:bold;margin:1em 0;}h4{display:block;font-size:1em;font-weight:bold;margin:1.33em 0;}h5{display:block;font-size:.83em;font-weight:bold;margin:1.67em 0;}h6{display:block;font-size:.67em;font-weight:bold;margin:2.33em 0;}ul.ul-disc{list-style:disc outside;}ul.ul-square{list-style:square outside;}ol.ol-decimal{list-style:decimal outside;}ul.ul-disc,ul.ul-square,ol.ol-decimal{margin-left:1.8em;}ul.ul-disc>li,ul.ul-square>li,ol.ol-decimal>li{margin:0 0 .5em;}.subsubsub{list-style:none;margin:8px 0 5px;padding:0;white-space:nowrap;font-size:11px;float:left;}.subsubsub a{line-height:2;padding:.2em;text-decoration:none;}.subsubsub a .count,.subsubsub a.current .count{color:#999;font-weight:normal;}.subsubsub a.current{font-weight:bold;background:none;border:none;}.subsubsub li{display:inline;margin:0;padding:0;}.widefat{border-width:1px;border-style:solid;border-spacing:0;width:100%;clear:both;margin:0;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;}.widefat *{word-wrap:break-word;}.widefat a{text-decoration:none;}.widefat td,.widefat th{border-bottom-width:1px;border-bottom-style:solid;font-size:11px;vertical-align:text-top;}.widefat td{padding:3px 7px;vertical-align:top;}.widefat td p,.widefat td ol,.widefat td ul{font-size:11px;}.widefat th{padding:7px 7px 8px;text-align:left;line-height:1.3em;}.widefat th input{margin:0 0 0 8px;padding:0;vertical-align:text-top;}.widefat .check-column{width:2.2em;padding:0;}.widefat tbody th.check-column{padding:7px 0 22px;}.widefat .num,.column-comments,.column-links,.column-posts{text-align:center;}.widefat th#comments{vertical-align:middle;}.wrap{margin:0 15px 0 5px;}.updated,.error{border-width:1px;border-style:solid;padding:0 .6em;margin:5px 15px 2px;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}.updated p,.error p{margin:.5em 0;line-height:1;padding:2px;}.wrap .updated,.wrap .error{margin:5px 0 15px;}.wrap h2{font:italic normal normal 24px/29px Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin:0;padding:14px 15px 3px 0;line-height:35px;text-shadow:rgba(255,255,255,1) 0 1px 0;}.wrap h2.long-header{padding-right:0;}
|
||||
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;background:transparent;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}ins{text-decoration:none;}del{text-decoration:line-through;}#wpwrap{height:auto;min-height:100%;width:100%;}#wpcontent{height:100%;padding-bottom:50px;}#wpbody{clear:both;margin-left:175px;}.folded #wpbody{margin-left:60px;}#wpbody-content{float:left;width:100%;}#adminmenu{float:left;clear:left;width:145px;margin-top:15px;margin-right:5px;margin-bottom:15px;margin-left:-160px;position:relative;padding:0;list-style:none;}.folded #adminmenu{margin-left:-45px;}.folded #adminmenu,.folded #adminmenu li.menu-top{width:28px;}#footer{clear:both;position:relative;width:100%;}.inner-sidebar{float:right;clear:right;display:none;width:281px;position:relative;}.inner-sidebar #side-sortables{width:280px;min-height:300px;}.has-right-sidebar .inner-sidebar{display:block;}.has-right-sidebar #post-body{float:left;clear:left;width:100%;margin-right:-340px;}.has-right-sidebar #post-body-content{margin-right:300px;}#col-container{overflow:hidden;padding:0;margin:0;}#col-left{padding:0;margin:0;overflow:hidden;width:39%;}#col-right{float:right;clear:right;overflow:hidden;padding:0;margin:0;width:59%;}.alignleft{float:left;}.alignright{float:right;}.textleft{text-align:left;}.textright{text-align:right;}.clear{clear:both;}.screen-reader-text,.screen-reader-text span{position:absolute;left:-1000em;height:1px;width:1px;overflow:hidden;}.hidden,.js .closed .inside,.js .hide-if-js,.no-js .hide-if-no-js{display:none;}input[type="text"],input[type="password"],textarea{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;}input[type="checkbox"],input[type="radio"]{vertical-align:middle;}html,body{height:100%;}body,td,textarea,input,select{font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:13px;}body,textarea{line-height:1.4em;}input,select{line-height:1em;}p{margin:1em 0;}blockquote{margin:1em;}label{cursor:pointer;}li,dd{margin-bottom:6px;}p,li,dl,dd,dt{line-height:140%;}textarea,input,select{margin:1px;padding:3px;}h1{display:block;font-size:2em;font-weight:bold;margin:.67em 0;}h2{display:block;font-size:1.5em;font-weight:bold;margin:.83em 0;}h3{display:block;font-size:1.17em;font-weight:bold;margin:1em 0;}h4{display:block;font-size:1em;font-weight:bold;margin:1.33em 0;}h5{display:block;font-size:.83em;font-weight:bold;margin:1.67em 0;}h6{display:block;font-size:.67em;font-weight:bold;margin:2.33em 0;}ul.ul-disc{list-style:disc outside;}ul.ul-square{list-style:square outside;}ol.ol-decimal{list-style:decimal outside;}ul.ul-disc,ul.ul-square,ol.ol-decimal{margin-left:1.8em;}ul.ul-disc>li,ul.ul-square>li,ol.ol-decimal>li{margin:0 0 .5em;}.subsubsub{list-style:none;margin:8px 0 5px;padding:0;white-space:nowrap;font-size:11px;float:left;}.subsubsub a{line-height:2;padding:.2em;text-decoration:none;}.subsubsub a .count,.subsubsub a.current .count{color:#999;font-weight:normal;}.subsubsub a.current{font-weight:bold;background:none;border:none;}.subsubsub li{display:inline;margin:0;padding:0;}.widefat{border-width:1px;border-style:solid;border-spacing:0;width:100%;clear:both;margin:0;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;}.widefat *{word-wrap:break-word;}.widefat a{text-decoration:none;}.widefat td,.widefat th{border-bottom-width:1px;border-bottom-style:solid;font-size:11px;}.widefat td{padding:3px 7px;vertical-align:top;}.widefat td p,.widefat td ol,.widefat td ul{font-size:11px;}.widefat th{padding:7px 7px 8px;text-align:left;line-height:1.3em;}.widefat th input{margin:0 0 0 8px;padding:0;vertical-align:text-top;}.widefat .check-column{width:2.2em;padding:0;}.widefat tbody th.check-column{padding:7px 0 22px;}.widefat .num,.column-comments,.column-links,.column-posts{text-align:center;}.widefat th#comments{vertical-align:middle;}.wrap{margin:0 15px 0 5px;}.updated,.error{border-width:1px;border-style:solid;padding:0 .6em;margin:5px 15px 2px;-moz-border-radius:3px;-khtml-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}.updated p,.error p{margin:.5em 0;line-height:1;padding:2px;}.wrap .updated,.wrap .error{margin:5px 0 15px;}.wrap h2{font:italic normal normal 24px/29px Georgia,"Times New Roman","Bitstream Charter",Times,serif;margin:0;padding:14px 15px 3px 0;line-height:35px;text-shadow:rgba(255,255,255,1) 0 1px 0;}.wrap h2.long-header{padding-right:0;}
|
||||
@@ -398,7 +398,6 @@ ol.ol-decimal > li {
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
font-size: 11px;
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
.widefat td {
|
||||
|
||||
@@ -438,3 +438,7 @@ table.ie-fixed {
|
||||
.imgedit-submit {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
* html input {
|
||||
border: 1px solid #dfdfdf;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ if ( isset( $_GET['action'] ) && isset($_GET['delete_tags']) && ( 'delete' == $_
|
||||
|
||||
switch($action) {
|
||||
|
||||
case 'addtag':
|
||||
case 'add-tag':
|
||||
|
||||
check_admin_referer('add-tag');
|
||||
|
||||
|
||||
@@ -509,7 +509,8 @@ function wp_save_image($post_id) {
|
||||
$sY = imagesy($img);
|
||||
|
||||
// check if it has roughly the same w / h ratio
|
||||
if ( round($sX / $sY, 2) == round($fwidth / $fheight, 2) ) {
|
||||
$diff = round($sX / $sY, 2) - round($fwidth / $fheight, 2);
|
||||
if ( -0.1 < $diff && $diff < 0.1 ) {
|
||||
// scale the full size image
|
||||
$dst = wp_imagecreatetruecolor($fwidth, $fheight);
|
||||
if ( imagecopyresampled( $dst, $img, 0, 0, 0, 0, $fwidth, $fheight, $sX, $sY ) ) {
|
||||
|
||||
@@ -215,10 +215,25 @@ $_old_files = array(
|
||||
* @return WP_Error|null WP_Error on failure, null on success.
|
||||
*/
|
||||
function update_core($from, $to) {
|
||||
global $wp_filesystem, $_old_files;
|
||||
global $wp_filesystem, $_old_files, $wpdb;
|
||||
|
||||
@set_time_limit( 300 );
|
||||
|
||||
$php_version = phpversion();
|
||||
$mysql_version = $wpdb->db_version();
|
||||
$required_php_version = '4.3';
|
||||
$required_mysql_version = '4.1.2';
|
||||
$wp_version = '2.9';
|
||||
$php_compat = version_compare( $php_version, $required_php_version, '>=' );
|
||||
$mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' );
|
||||
|
||||
if ( !$mysql_compat && !$php_compat )
|
||||
return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher and MySQL version %3$s or higher. You are running PHP version %4$s and MySQL version %5$s.'), $wp_version, $required_php_version, $required_mysql_version, $php_version, $mysql_version ) );
|
||||
elseif ( !$php_compat )
|
||||
return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires PHP version %2$s or higher. You are running version %3$s.'), $wp_version, $required_php_version, $php_version ) );
|
||||
elseif ( !$mysql_compat )
|
||||
return new WP_Error( 'mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress %1$s requires MySQL version %2$s or higher. You are running version %3$s.'), $wp_version, $required_mysql_version, $mysql_version ) );
|
||||
|
||||
// Sanity check the unzipped distribution
|
||||
apply_filters('update_feedback', __('Verifying the unpacked files'));
|
||||
if ( !$wp_filesystem->exists($from . '/wordpress/wp-settings.php') || !$wp_filesystem->exists($from . '/wordpress/wp-admin/admin.php') ||
|
||||
|
||||
@@ -95,12 +95,20 @@ function dismissed_updates() {
|
||||
* @return null
|
||||
*/
|
||||
function core_upgrade_preamble() {
|
||||
global $upgrade_error;
|
||||
|
||||
$updates = get_core_updates();
|
||||
?>
|
||||
<div class="wrap">
|
||||
<?php screen_icon(); ?>
|
||||
<h2><?php _e('Upgrade WordPress'); ?></h2>
|
||||
<?php
|
||||
if ( $upgrade_error ) {
|
||||
echo '<div class="error"><p>';
|
||||
_e('Please select one or more plugins to upgrade.');
|
||||
echo '</p></div>';
|
||||
}
|
||||
|
||||
if ( !isset($updates[0]->response) || 'latest' == $updates[0]->response ) {
|
||||
echo '<h3>';
|
||||
_e('You have the latest version of WordPress. You do not need to upgrade');
|
||||
@@ -175,12 +183,12 @@ function list_plugin_updates() {
|
||||
$info = plugins_api('plugin_information', array('slug' => $plugin_data->update->slug ));
|
||||
// Get plugin compat for running version of WordPress.
|
||||
if ( isset($info->tested) && version_compare($info->tested, $cur_wp_version, '>=') ) {
|
||||
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: 100% (according to its author)'), $cur_wp_version);
|
||||
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: 100%% (according to its author)'), $cur_wp_version);
|
||||
} elseif ( isset($info->compatibility[$cur_wp_version][$plugin_data->update->new_version]) ) {
|
||||
$compat = $info->compatibility[$cur_wp_version][$plugin_data->update->new_version];
|
||||
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)'), $cur_wp_version, $compat[0], $compat[2], $compat[1]);
|
||||
} else {
|
||||
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: Unknown)'), $cur_wp_version);
|
||||
$compat = '<br />' . sprintf(__('Compatibility with WordPress %1$s: Unknown'), $cur_wp_version);
|
||||
}
|
||||
// Get plugin compat for updated version of WordPress.
|
||||
if ( $core_update_version ) {
|
||||
@@ -331,8 +339,11 @@ function do_plugin_upgrade() {
|
||||
|
||||
if ( isset($_GET['plugins']) ) {
|
||||
$plugins = explode(',', $_GET['plugins']);
|
||||
} else {
|
||||
} elseif ( isset($_POST['checked']) ) {
|
||||
$plugins = (array) $_POST['checked'];
|
||||
} else {
|
||||
// Nothing to do.
|
||||
return;
|
||||
}
|
||||
$url = 'update-core.php?action=do-plugin-upgrade&plugins=' . urlencode(join(',', $plugins));
|
||||
$title = __('Upgrade Plugins');
|
||||
@@ -343,6 +354,12 @@ function do_plugin_upgrade() {
|
||||
|
||||
$action = isset($_GET['action']) ? $_GET['action'] : 'upgrade-core';
|
||||
|
||||
$upgrade_error = false;
|
||||
if ( 'do-plugin-upgrade' == $action && !isset($_GET['plugins']) && !isset($_POST['checked']) ) {
|
||||
$upgrade_error = true;
|
||||
$action = 'upgrade-core';
|
||||
}
|
||||
|
||||
$title = __('Upgrade WordPress');
|
||||
$parent_file = 'tools.php';
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,10 @@
|
||||
textarea,
|
||||
input,
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
input[type="file"],
|
||||
input[type="button"],
|
||||
input[type="submit"],
|
||||
input[type="reset"],
|
||||
select {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
@@ -9,12 +14,6 @@ select {
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"],
|
||||
input[type="image"] {
|
||||
border: 0 none;
|
||||
}
|
||||
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
@@ -1311,14 +1310,6 @@ strong .post-com-count {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.form-table input,
|
||||
.form-table textarea,
|
||||
#wpbody-content .describe input,
|
||||
#wpbody-content .describe textarea {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
.form-table div.color-option {
|
||||
display: block;
|
||||
clear: both;
|
||||
|
||||
@@ -371,13 +371,11 @@ function get_comment_count( $post_id = 0 ) {
|
||||
/**
|
||||
* Add meta data field to a comment.
|
||||
*
|
||||
* Post meta data is called "Custom Fields" on the Administration Panels.
|
||||
*
|
||||
* @since 2.9
|
||||
* @uses add_metadata
|
||||
* @link http://codex.wordpress.org/Function_Reference/add_comment_meta
|
||||
*
|
||||
* @param int $comment_id Post ID.
|
||||
* @param int $comment_id Comment ID.
|
||||
* @param string $key Metadata name.
|
||||
* @param mixed $value Metadata value.
|
||||
* @param bool $unique Optional, default is false. Whether the same key should not be added.
|
||||
@@ -414,7 +412,7 @@ function delete_comment_meta($comment_id, $meta_key, $meta_value = '') {
|
||||
* @uses get_metadata
|
||||
* @link http://codex.wordpress.org/Function_Reference/get_comment_meta
|
||||
*
|
||||
* @param int $comment_id Post ID.
|
||||
* @param int $comment_id Comment ID.
|
||||
* @param string $key The meta key to retrieve.
|
||||
* @param bool $single Whether to return a single value.
|
||||
* @return mixed Will be an array if $single is false. Will be value of meta data field if $single
|
||||
@@ -436,7 +434,7 @@ function get_comment_meta($comment_id, $key, $single = false) {
|
||||
* @uses update_metadata
|
||||
* @link http://codex.wordpress.org/Function_Reference/update_comment_meta
|
||||
*
|
||||
* @param int $comment_id Post ID.
|
||||
* @param int $comment_id Comment ID.
|
||||
* @param string $key Metadata key.
|
||||
* @param mixed $value Metadata value.
|
||||
* @param mixed $prev_value Optional. Previous value to check before removing.
|
||||
@@ -808,6 +806,7 @@ function wp_count_comments( $post_id = 0 ) {
|
||||
* @since 2.0.0
|
||||
* @uses $wpdb
|
||||
* @uses do_action() Calls 'delete_comment' hook on comment ID
|
||||
* @uses do_action() Calls 'deleted_comment' hook on comment ID after deletion, on success
|
||||
* @uses do_action() Calls 'wp_set_comment_status' hook on comment ID with 'delete' set for the second parameter
|
||||
* @uses wp_transition_comment_status() Passes new and old comment status along with $comment object
|
||||
*
|
||||
@@ -824,12 +823,6 @@ function wp_delete_comment($comment_id) {
|
||||
|
||||
do_action('delete_comment', $comment_id);
|
||||
|
||||
delete_comment_meta($comment_id,'_wp_trash_meta_status');
|
||||
delete_comment_meta($comment_id,'_wp_trash_meta_time');
|
||||
|
||||
if ( ! $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment_id) ) )
|
||||
return false;
|
||||
|
||||
// Move children up a level.
|
||||
$children = $wpdb->get_col( $wpdb->prepare("SELECT comment_ID FROM $wpdb->comments WHERE comment_parent = %d", $comment_id) );
|
||||
if ( !empty($children) ) {
|
||||
@@ -837,6 +830,19 @@ function wp_delete_comment($comment_id) {
|
||||
clean_comment_cache($children);
|
||||
}
|
||||
|
||||
// Delete metadata
|
||||
$meta_ids = $wpdb->get_col( $wpdb->prepare( "SELECT meta_id FROM $wpdb->commentmeta WHERE comment_id = %d ", $comment_id ) );
|
||||
if ( !empty($meta_ids) ) {
|
||||
do_action( 'delete_commentmeta', $meta_ids );
|
||||
$in_meta_ids = "'" . implode("', '", $meta_ids) . "'";
|
||||
$wpdb->query( "DELETE FROM $wpdb->commentmeta WHERE meta_id IN ($in_meta_ids)" );
|
||||
do_action( 'deleted_commentmeta', $meta_ids );
|
||||
}
|
||||
|
||||
if ( ! $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment_id) ) )
|
||||
return false;
|
||||
do_action('deleted_comment', $comment_id);
|
||||
|
||||
$post_id = $comment->comment_post_ID;
|
||||
if ( $post_id && $comment->comment_approved == 1 )
|
||||
wp_update_comment_count($post_id);
|
||||
|
||||
@@ -678,7 +678,9 @@ class WP_Http_Fsockopen {
|
||||
if ( false === $handle )
|
||||
return new WP_Error('http_request_failed', $iError . ': ' . $strError);
|
||||
|
||||
stream_set_timeout($handle, $r['timeout'] );
|
||||
$timeout = (int) floor( $r['timeout'] );
|
||||
$utimeout = $timeout == $r['timeout'] ? 0 : 1000000 * $r['timeout'] % 1000000;
|
||||
stream_set_timeout( $handle, $timeout, $utimeout );
|
||||
|
||||
if ( $proxy->is_enabled() && $proxy->send_through_proxy( $url ) ) //Some proxies require full URL in this field.
|
||||
$requestPath = $url;
|
||||
@@ -834,7 +836,9 @@ class WP_Http_Fopen {
|
||||
if (! $handle)
|
||||
return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url));
|
||||
|
||||
stream_set_timeout($handle, $r['timeout'] );
|
||||
$timeout = (int) floor( $r['timeout'] );
|
||||
$utimeout = $timeout == $r['timeout'] ? 0 : 1000000 * $r['timeout'] % 1000000;
|
||||
stream_set_timeout( $handle, $timeout, $utimeout );
|
||||
|
||||
if ( ! $r['blocking'] ) {
|
||||
fclose($handle);
|
||||
@@ -1007,9 +1011,9 @@ class WP_Http_Streams {
|
||||
if ( ! $handle)
|
||||
return new WP_Error('http_request_failed', sprintf(__('Could not open handle for fopen() to %s'), $url));
|
||||
|
||||
// WordPress supports PHP 4.3, which has this function. Removed sanity checking for
|
||||
// performance reasons.
|
||||
stream_set_timeout($handle, $r['timeout'] );
|
||||
$timeout = (int) floor( $r['timeout'] );
|
||||
$utimeout = $timeout == $r['timeout'] ? 0 : 1000000 * $r['timeout'] % 1000000;
|
||||
stream_set_timeout( $handle, $timeout, $utimeout );
|
||||
|
||||
if ( ! $r['blocking'] ) {
|
||||
stream_set_blocking($handle, 0);
|
||||
@@ -1141,6 +1145,8 @@ class WP_Http_ExtHTTP {
|
||||
elseif ( ! $is_local )
|
||||
$ssl_verify = apply_filters('https_ssl_verify', $ssl_verify);
|
||||
|
||||
$r['timeout'] = (int) ceil( $r['timeout'] );
|
||||
|
||||
$options = array(
|
||||
'timeout' => $r['timeout'],
|
||||
'connecttimeout' => $r['timeout'],
|
||||
@@ -1255,11 +1261,6 @@ class WP_Http_Curl {
|
||||
// Construct Cookie: header if any cookies are set.
|
||||
WP_Http::buildCookieHeader( $r );
|
||||
|
||||
// cURL extension will sometimes fail when the timeout is less than 1 as it may round down
|
||||
// to 0, which gives it unlimited timeout.
|
||||
if ( $r['timeout'] > 0 && $r['timeout'] < 1 )
|
||||
$r['timeout'] = 1;
|
||||
|
||||
$handle = curl_init();
|
||||
|
||||
// cURL offers really easy proxy support.
|
||||
@@ -1292,13 +1293,25 @@ class WP_Http_Curl {
|
||||
elseif ( ! $is_local )
|
||||
$ssl_verify = apply_filters('https_ssl_verify', $ssl_verify);
|
||||
|
||||
|
||||
// CURLOPT_TIMEOUT and CURLOPT_CONNECTTIMEOUT expect integers. Have to use ceil since
|
||||
// a value of 0 will allow an ulimited timeout.
|
||||
// Use _MS if available.
|
||||
if ( defined( 'CURLOPT_TIMEOUT_MS' ) ) {
|
||||
$timeout_ms = (int) ceil( 1000 * $r['timeout'] );
|
||||
curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT_MS, $timeout_ms );
|
||||
curl_setopt( $handle, CURLOPT_TIMEOUT_MS, $timeout_ms );
|
||||
} else {
|
||||
$timeout = (int) ceil( $r['timeout'] );
|
||||
curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $timeout );
|
||||
curl_setopt( $handle, CURLOPT_TIMEOUT, $timeout );
|
||||
}
|
||||
|
||||
curl_setopt( $handle, CURLOPT_URL, $url);
|
||||
curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true );
|
||||
curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, $ssl_verify );
|
||||
curl_setopt( $handle, CURLOPT_SSL_VERIFYPEER, $ssl_verify );
|
||||
curl_setopt( $handle, CURLOPT_USERAGENT, $r['user-agent'] );
|
||||
curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, $r['timeout'] );
|
||||
curl_setopt( $handle, CURLOPT_TIMEOUT, $r['timeout'] );
|
||||
curl_setopt( $handle, CURLOPT_MAXREDIRS, $r['redirection'] );
|
||||
|
||||
switch ( $r['method'] ) {
|
||||
|
||||
@@ -426,12 +426,12 @@ function wp_default_styles( &$styles ) {
|
||||
$rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'plugin-install', 'farbtastic' );
|
||||
|
||||
// all colors stylesheets need to have the same query strings (cache manifest compat)
|
||||
$colors_version = '20091214';
|
||||
$colors_version = '20091217';
|
||||
|
||||
$styles->add( 'wp-admin', "/wp-admin/wp-admin$suffix.css", array(), '20091214' );
|
||||
$styles->add( 'wp-admin', "/wp-admin/wp-admin$suffix.css", array(), '20091217' );
|
||||
$styles->add_data( 'wp-admin', 'rtl', "/wp-admin/rtl$suffix.css" );
|
||||
|
||||
$styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20091128' );
|
||||
$styles->add( 'ie', '/wp-admin/css/ie.css', array(), '20091217' );
|
||||
$styles->add_data( 'ie', 'conditional', 'lte IE 7' );
|
||||
|
||||
// Register "meta" stylesheet for admin colors. All colors-* style sheets should have the same version string.
|
||||
@@ -443,7 +443,7 @@ function wp_default_styles( &$styles ) {
|
||||
$styles->add( 'colors-classic', "/wp-admin/css/colors-classic$suffix.css", array(), $colors_version);
|
||||
$styles->add_data( 'colors-classic', 'rtl', true );
|
||||
|
||||
$styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20091212' );
|
||||
$styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20091217' );
|
||||
$styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20091029' );
|
||||
$styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array(), '20091118' );
|
||||
$styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20091211' );
|
||||
|
||||
@@ -353,6 +353,8 @@ function get_themes() {
|
||||
$template_files[] = "$template_directory/$file";
|
||||
} elseif ( is_dir("$template_directory/$file") ) {
|
||||
$template_subdir = @ dir("$template_directory/$file");
|
||||
if ( !$template_subdir )
|
||||
continue;
|
||||
while ( ($subfile = $template_subdir->read()) !== false ) {
|
||||
if ( preg_match('|^\.+$|', $subfile) )
|
||||
continue;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '2.9-RC1';
|
||||
$wp_version = '2.9';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
@@ -30,3 +30,17 @@ $tinymce_version = '327-1235';
|
||||
* @global string $manifest_version
|
||||
*/
|
||||
$manifest_version = '20090616';
|
||||
|
||||
/**
|
||||
* Holds the required PHP version
|
||||
*
|
||||
* @global string $required_php_version
|
||||
*/
|
||||
$required_php_version = '4.3';
|
||||
|
||||
/**
|
||||
* Holds the required MySQL version
|
||||
*
|
||||
* @global string $required_mysql_version
|
||||
*/
|
||||
$required_mysql_version = '4.1.2';
|
||||
|
||||
Reference in New Issue
Block a user