Trailing whitespace cleanup

git-svn-id: http://svn.automattic.com/wordpress/trunk@12733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-15 22:11:12 +00:00
parent 439d50d655
commit 6da55f7792
59 changed files with 246 additions and 246 deletions

View File

@ -14,7 +14,7 @@ do_action("activate_header");
function wpmu_activate_stylesheet() {
?>
<style type="text/css">
<style type="text/css">
form { margin-top: 2em; }
#submit, #key { width: 90%; font-size: 24px; }
#language { margin-top: .5em; }
@ -30,7 +30,7 @@ get_header();
<div id="content" class="widecolumn">
<?php if ( empty($_GET['key']) && empty($_POST['key']) ) { ?>
<h2><?php _e('Activation Key Required') ?></h2>
<form name="activateform" id="activateform" method="post" action="<?php echo 'http://' . $current_site->domain . $current_site->path ?>wp-activate.php">
<p>
@ -41,11 +41,11 @@ get_header();
<input id="submit" type="submit" name="Submit" class="submit" value="<?php esc_attr_e('Activate') ?>" />
</p>
</form>
<?php } else {
$key = !empty($_GET['key']) ? $_GET['key'] : $_POST['key'];
$result = wpmu_activate_signup($key);
$result = wpmu_activate_signup($key);
if ( is_wp_error($result) ) {
if ( 'already_active' == $result->get_error_code() || 'blog_taken' == $result->get_error_code() ) {
$signup = $result->get_error_data();
@ -69,18 +69,18 @@ get_header();
$user = new WP_User( (int) $user_id);
?>
<h2><?php _e('Your account is now active!'); ?></h2>
<div id="signup-welcome">
<p><span class="h3"><?php _e('Username:'); ?></span> <?php echo $user->user_login ?></p>
<p><span class="h3"><?php _e('Password:'); ?></span> <?php echo $password; ?></p>
</div>
<?php if( $url != 'http://' . $current_site->domain . $current_site->path ) : ?>
<p class="view"><?php printf(__('Your account is now activated. <a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, $url . 'wp-login.php' ); ?></p>
<?php else: ?>
<p class="view"><?php printf( __( 'Your account is now activated. <a href="%1$s">Login</a> or go back to the <a href="%2$s">homepage</a>.' ), 'http://' . $current_site->domain . $current_site->path . 'wp-login.php', 'http://' . $current_site->domain . $current_site->path ); ?></p>
<?php endif;
}
}
}
?>
</div>

View File

@ -32,7 +32,7 @@ if ( get_option('db_upgraded') ) {
exit;
} elseif ( apply_filters( 'do_mu_upgrade', true ) ) {
/**
* On really small MU installs run the upgrader every time,
* On really small MU installs run the upgrader every time,
* else run it less often to reduce load.
*
* @since 2.8.4b

View File

@ -27,7 +27,7 @@ if ( 'post' != $post_type ) {
$submenu_file = "categories.php?taxonomy=$taxonomy&amp;post_type=$post_type";
} else {
$parent_file = 'edit.php';
$submenu_file = "categories.php?taxonomy=$taxonomy";
$submenu_file = "categories.php?taxonomy=$taxonomy";
}

View File

@ -9,7 +9,7 @@ td.available-theme {
margin-left: 1em;
}
.quicktags, .search {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
/* 200 - 500
=================================== */
@ -51,10 +51,10 @@ td.available-theme {
.button-secondary,
.button-highlighted,
#postcustomstuff .submit input {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
#wpcontent select {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
#quicktags {
background-position: right top;
@ -69,7 +69,7 @@ td.available-theme {
margin-left: 0;
}
#your-profile legend {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
#ajax-response.alignleft {
margin-left: 0;
@ -93,7 +93,7 @@ td.available-theme {
.tablenav .displaying-num {
margin-right: 0;
margin-left: 10px;
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
#postcustomstuff table input,
#postcustomstuff table select,
@ -115,22 +115,22 @@ td.available-theme {
margin: 7px 15px 0 0;
}
#wphead h1 {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
float: right;
}
#wphead h1.long-title {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
#adminmenu .wp-submenu a {
padding-left: 0;
padding-right: 12px;
border-width: 0 0 0 1px;
border-style: none none none solid;
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
#adminmenu a.menu-top,
#adminmenu .wp-submenu-head {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
#adminmenu img.wp-menu-image {
float: right;
@ -177,7 +177,7 @@ td.available-theme {
#adminmenu #awaiting-mod,
#adminmenu span.update-plugins,
#sidemenu li a span.update-plugins {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
margin-left: 0;
margin-right: 2px;
}
@ -187,7 +187,7 @@ td.available-theme {
float: right;
}
.post-com-count-wrapper {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
.column-response .post-com-count {
float: right;
@ -249,7 +249,7 @@ td.available-theme {
clear: right;
}
.description, .form-wrap p {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
/* 1500 - 1800
=================================== */
@ -257,7 +257,7 @@ td.available-theme {
float: left;
}
.howto {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
.postarea h3 label {
float: right;
@ -372,7 +372,7 @@ td.action-links, th.action-links {
margin-right: 10px;
}
.tool-box .title {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
.settings-toggle {
text-align: left;
@ -413,7 +413,7 @@ td.action-links, th.action-links {
#screen-options-link-wrap,
#contextual-help-link-wrap {
float: left;
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
margin: 0 0 0 6px;
}
.metabox-prefs label {
@ -476,7 +476,7 @@ td.action-links, th.action-links {
.inline-edit-row .catshow,
.inline-edit-row .cathide,
.inline-edit-row #bulk-titles div {
font-family: Tahoma, Arial, sans-serif;
font-family: Tahoma, Arial, sans-serif;
}
.quick-edit-row-post fieldset label.inline-edit-status {
float: right;

View File

@ -27,7 +27,7 @@ if ( 'post' != $post_type ) {
$submenu_file = "edit-tags.php?taxonomy=$taxonomy&amp;post_type=$post_type";
} else {
$parent_file = 'edit.php';
$submenu_file = "edit-tags.php?taxonomy=$taxonomy";
$submenu_file = "edit-tags.php?taxonomy=$taxonomy";
}
if ( isset( $_GET['action'] ) && isset($_GET['delete_tags']) && ( 'delete' == $_GET['action'] || 'delete' == $_GET['action2'] ) )

View File

@ -111,7 +111,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
function get_contents_array($file) {
return explode("\n", $this->get_contents($file));
}
function put_contents($file, $contents, $mode = false ) {
$temp = tmpfile();
if ( ! $temp )

View File

@ -125,9 +125,9 @@ function get_pending_comments_num( $post_id ) {
else
return absint($pending[0]['num_comments']);
}
$pending_keyed = array();
// Default to zero pending for all posts in request
foreach ( $post_id_array as $id )
$pending_keyed[$id] = 0;

View File

@ -636,7 +636,7 @@ function wp_dashboard_incoming_links_output() {
if ( !$rss->get_item_quantity() ) {
echo '<p>' . __('This dashboard widget queries <a href="http://blogsearch.google.com/">Google Blog Search</a> so that when another blog links to your site it will show up here. It has found no incoming links&hellip; yet. It&#8217;s okay &#8212; there is no rush.') . "</p>\n";
$rss->__destruct();
$rss->__destruct();
unset($rss);
return;
}
@ -691,7 +691,7 @@ function wp_dashboard_incoming_links_output() {
}
echo "</ul>\n";
$rss->__destruct();
$rss->__destruct();
unset($rss);
}
@ -748,14 +748,14 @@ function wp_dashboard_secondary_output() {
echo '</p></div>';
}
} elseif ( !$rss->get_item_quantity() ) {
$rss->__destruct();
$rss->__destruct();
unset($rss);
return false;
} else {
echo '<div class="rss-widget">';
wp_widget_rss_output( $rss, $widgets['dashboard_secondary'] );
echo '</div>';
$rss->__destruct();
$rss->__destruct();
unset($rss);
}
}
@ -839,7 +839,7 @@ function wp_dashboard_plugins_output() {
echo "<h4>$label</h4>\n";
echo "<h5><a href='$link'>$title</a></h5>&nbsp;<span>(<a href='$ilink' class='thickbox' title='$title'>" . __( 'Install' ) . "</a>)</span>\n";
echo "<p>$description</p>\n";
$$feed->__destruct();
unset($$feed);
}
@ -938,9 +938,9 @@ function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) {
if ( is_wp_error($rss) ) {
$widget_options[$widget_id]['title'] = htmlentities(__('Unknown Feed'));
} else {
$widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title()));
$widget_options[$widget_id]['title'] = htmlentities(strip_tags($rss->get_title()));
$rss->__destruct();
unset($rss);
unset($rss);
}
}
update_option( 'dashboard_widget_options', $widget_options );

View File

@ -155,7 +155,7 @@ function get_temp_dir() {
if ( function_exists('sys_get_temp_dir') )
return trailingslashit(sys_get_temp_dir());
$temp = ini_get('upload_tmp_dir');
if ( is_dir($temp) ) // always writable
return trailingslashit($temp);

View File

@ -39,7 +39,7 @@ function wp_image_editor($post_id, $msg = false) {
<div class="imgedit-menu">
<div onclick="imageEdit.crop(<?php echo "$post_id, '$nonce'"; ?>, this)" class="imgedit-crop disabled" title="<?php esc_attr_e( 'Crop' ); ?>"></div><?php
// On some setups GD library does not provide imagerotate() - Ticket #11536
// On some setups GD library does not provide imagerotate() - Ticket #11536
if ( function_exists('imagerotate') ) { ?>
<div class="imgedit-rleft" onclick="imageEdit.rotate( 90, <?php echo "$post_id, '$nonce'"; ?>, this)" title="<?php esc_attr_e( 'Rotate counter-clockwise' ); ?>"></div>
<div class="imgedit-rright" onclick="imageEdit.rotate(-90, <?php echo "$post_id, '$nonce'"; ?>, this)" title="<?php esc_attr_e( 'Rotate clockwise' ); ?>"></div>
@ -96,7 +96,7 @@ function wp_image_editor($post_id, $msg = false) {
<div class="imgedit-group-top">
<a class="imgedit-help-toggle" onclick="imageEdit.toggleHelp(this);return false;" href="#"><strong><?php _e('Restore Original Image'); ?></strong></a>
<div class="imgedit-help">
<p><?php _e('Discard any changes and restore the original image.');
<p><?php _e('Discard any changes and restore the original image.');
if ( !defined('IMAGE_EDIT_OVERWRITE') || !IMAGE_EDIT_OVERWRITE )
_e(' Previously edited copies of the image will not be deleted.');

View File

@ -1019,7 +1019,7 @@ function get_attachment_fields_to_edit($post, $errors = null) {
$edit_post = sanitize_post($post, 'edit');
$form_fields = array(
'post_title' => array(
@ -1223,10 +1223,10 @@ function get_media_item( $attachment_id, $args = null ) {
<p><strong>" . __('Upload date:') . "</strong> " . mysql2date( get_option('date_format'), $post->post_date ). '</p>';
if ( !empty( $media_dims ) )
$item .= "<p><strong>" . __('Dimensions:') . "</strong> $media_dims</p>\n";
echo "</td></tr>\n";
$item .= "
</thead>
@ -1248,12 +1248,12 @@ function get_media_item( $attachment_id, $args = null ) {
$delete = "<a href='" . wp_nonce_url( "post.php?action=delete&amp;post=$attachment_id", 'delete-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Delete Permanently' ) . '</a>';
} elseif ( !MEDIA_TRASH ) {
$delete = "<a href='#' class='del-link' onclick=\"document.getElementById('del_attachment_$attachment_id').style.display='block';return false;\">" . __( 'Delete' ) . "</a>
<div id='del_attachment_$attachment_id' class='del-attachment' style='display:none;'>" . sprintf( __( 'You are about to delete <strong>%s</strong>.' ), $filename ) . "
<a href='" . wp_nonce_url( "post.php?action=delete&amp;post=$attachment_id", 'delete-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='button'>" . __( 'Continue' ) . "</a>
<div id='del_attachment_$attachment_id' class='del-attachment' style='display:none;'>" . sprintf( __( 'You are about to delete <strong>%s</strong>.' ), $filename ) . "
<a href='" . wp_nonce_url( "post.php?action=delete&amp;post=$attachment_id", 'delete-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='button'>" . __( 'Continue' ) . "</a>
<a href='#' class='button' onclick=\"this.parentNode.style.display='none';return false;\">" . __( 'Cancel' ) . "</a>
</div>";
} else {
$delete = "<a href='" . wp_nonce_url( "post.php?action=trash&amp;post=$attachment_id", 'trash-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Move to Trash' ) . "</a>
$delete = "<a href='" . wp_nonce_url( "post.php?action=trash&amp;post=$attachment_id", 'trash-post_' . $attachment_id ) . "' id='del[$attachment_id]' class='delete'>" . __( 'Move to Trash' ) . "</a>
<a href='" . wp_nonce_url( "post.php?action=untrash&amp;post=$attachment_id", 'untrash-post_' . $attachment_id ) . "' id='undo[$attachment_id]' class='undo hidden'>" . __( 'Undo' ) . "</a>";
}
} else {

View File

@ -231,7 +231,7 @@ function url_shorten( $url ) {
/**
* Resets global variables based on $_GET and $_POST
*
*
* This function resets global variables based on the names passed
* in the $vars array to the value of $_POST[$var] or $_GET[$var] or ''
* if neither is defined.

View File

@ -67,15 +67,15 @@
*/
function get_plugin_data( $plugin_file, $markup = true, $translate = true ) {
$default_headers = array(
'Name' => 'Plugin Name',
'PluginURI' => 'Plugin URI',
'Version' => 'Version',
'Description' => 'Description',
'Author' => 'Author',
'AuthorURI' => 'Author URI',
'TextDomain' => 'Text Domain',
'DomainPath' => 'Domain Path'
$default_headers = array(
'Name' => 'Plugin Name',
'PluginURI' => 'Plugin URI',
'Version' => 'Version',
'Description' => 'Description',
'Author' => 'Author',
'AuthorURI' => 'Author URI',
'TextDomain' => 'Text Domain',
'DomainPath' => 'Domain Path'
);
$plugin_data = get_file_data( $plugin_file, $default_headers, 'plugin' );

View File

@ -958,10 +958,10 @@ function postbox_classes( $id, $page ) {
*
* @since unknown
*
* @param int|object $id Post ID or post object.
* @param string $title (optional) Title
* @param string $name (optional) Name
* @return array With two entries of type string
* @param int|object $id Post ID or post object.
* @param string $title (optional) Title
* @param string $name (optional) Name
* @return array With two entries of type string
*/
function get_sample_permalink($id, $title = null, $name = null) {
$post = &get_post($id);
@ -1015,13 +1015,13 @@ function get_sample_permalink($id, $title = null, $name = null) {
* sample permalink html
*
* intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor.
*
*
* @since unknown
*
* @param int|object $id Post ID or post object.
* @param string $new_title (optional) New title
* @param string $new_slug (optional) New slug
* @return string intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor.
* @param int|object $id Post ID or post object.
* @param string $new_title (optional) New title
* @param string $new_slug (optional) New slug
* @return string intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor.
*/
function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
$post = &get_post($id);
@ -1185,7 +1185,7 @@ function _admin_notice_post_locked() {
*
* @uses _wp_translate_postdata()
* @uses _wp_post_revision_fields()
*
*
* @return unknown
*/
function wp_create_post_autosave( $post_id ) {

View File

@ -351,7 +351,7 @@ function populate_options() {
'page_uris', 'update_core', 'update_plugins', 'update_themes', 'doing_cron', 'random_seed', 'rss_excerpt_length');
foreach ($unusedoptions as $option)
delete_option($option);
// delete obsolete magpie stuff
$wpdb->query("DELETE FROM $wpdb->options WHERE option_name REGEXP '^rss_[0-9a-f]{32}(_ts)?$'");
}

View File

@ -156,10 +156,10 @@ function get_page_templates() {
/**
* Tidies a filename for url display by the theme editor.
*
*
* @since 2.9.0
* @private
*
*
* @param string $fullpath Full path to the theme file
* @param string $containingfolder Path of the theme parent folder
* @return string

View File

@ -68,7 +68,7 @@ function wp_list_widget_controls( $sidebar ) {
if ( !empty( $description ) ) {
echo "<div class='sidebar-description'>\n";
echo "\t<p class='description'>$description</p>";
echo "\t<p class='description'>$description</p>";
echo "</div>\n";
}

View File

@ -29,7 +29,7 @@ wpWidgets = {
$('a.widget-action').live('click', function(){
var css = {}, widget = $(this).closest('div.widget'), inside = widget.children('.widget-inside'), w = parseInt( widget.find('input.widget-width').val(), 10 );
if ( inside.is(':hidden') ) {
if ( w > 250 && inside.closest('div.widgets-sortables').length ) {
css['width'] = w + 30 + 'px';

View File

@ -32,7 +32,7 @@ var wpGears = {
if ( host.match(/[^a-z0-9._-]/i) )
host = encodeURIComponent(host);
name = window.location.protocol + host;
name = name.replace(/[^a-z0-9._-]+/gi, '_');
name = 'wp_' + name.substring(0, 60); // max length of name is 64 chars

View File

@ -18,7 +18,7 @@ $self = preg_replace('|^.*/plugins/|i', '', $self);
$self = preg_replace('|^.*/mu-plugins/|i', '', $self);
global $menu, $submenu, $parent_file; //For when admin-header is included from within a function.
$parent_file = apply_filters("parent_file", $parent_file); // For plugins to move submenu tabs around.
$parent_file = apply_filters("parent_file", $parent_file); // For plugins to move submenu tabs around.
get_admin_page_parent();

View File

@ -137,7 +137,7 @@ if ( current_user_can('edit_users') ) {
$submenu['users.php'][10] = array(_x('Add New', 'user'), 'create_users', 'user-new.php');
elseif ( is_super_admin() || get_site_option( 'add_new_users' ) )
$submenu['users.php'][10] = array(__('Add New') . ' <strong>*</strong>', 'create_users', 'ms-options.php#addnewusers');
$submenu['users.php'][15] = array(__('Your Profile'), 'read', 'profile.php');
} else {
$_wp_real_parent_file['users.php'] = 'profile.php';

View File

@ -309,11 +309,11 @@ switch( $_GET['action'] ) {
// List blogs
default:
$apage = ( isset($_GET['apage'] ) && intval( $_GET['apage'] ) ) ? absint( $_GET['apage'] ) : 1;
$num = ( isset($_GET['num'] ) && intval( $_GET['num'] ) ) ? absint( $_GET['num'] ) : 15;
$apage = ( isset($_GET['apage'] ) && intval( $_GET['apage'] ) ) ? absint( $_GET['apage'] ) : 1;
$num = ( isset($_GET['num'] ) && intval( $_GET['num'] ) ) ? absint( $_GET['num'] ) : 15;
$s = wp_specialchars( trim( $_GET[ 's' ] ) );
$like_s = like_escape($s);
$query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' ";
if( isset($_GET['blog_name']) ) {

View File

@ -300,14 +300,14 @@ $lang = get_option('WPLANG');
if( is_array($lang_files) && !empty($lang_files) ) {
?>
<tr valign="top">
<th width="33%" scope="row"><?php _e('Blog language:') ?></th>
<tr valign="top">
<th width="33%" scope="row"><?php _e('Blog language:') ?></th>
<td>
<select name="WPLANG" id="WPLANG">
<?php mu_dropdown_languages( $lang_files, get_option('WPLANG') ); ?>
</select>
</td>
</tr>
</tr>
<?php
} // languages
?>

View File

@ -236,7 +236,7 @@ $structures = array(
</form>
<?php if ( !is_multisite || is_super_admin() ) { ?>
<?php if ($iis7_permalinks) :
if ( isset($_POST['submit']) && $permalink_structure && ! $usingpi && ! $writable ) :
if ( isset($_POST['submit']) && $permalink_structure && ! $usingpi && ! $writable ) :
if ( file_exists($home_path . 'web.config') ) : ?>
<p><?php _e('If your <code>web.config</code> file were <a href="http://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn&#8217;t so this is the url rewrite rule you should have in your <code>web.config</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this rule inside of the <code>/&lt;configuration&gt;/&lt;system.webServer&gt;/&lt;rewrite&gt;/&lt;rules&gt;</code> element in <code>web.config</code> file.') ?></p>
<form action="options-permalink.php" method="post">
@ -250,7 +250,7 @@ $structures = array(
<?php wp_nonce_field('update-permalink') ?>
<p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_html($wp_rewrite->iis7_url_rewrite_rules(true)); ?></textarea></p>
</form>
<p><?php _e('If you temporarily make your site&#8217;s root directory writable for us to generate the <code>web.config</code> file automatically, do not forget to revert the permissions after the file has been created.') ?></p>
<p><?php _e('If you temporarily make your site&#8217;s root directory writable for us to generate the <code>web.config</code> file automatically, do not forget to revert the permissions after the file has been created.') ?></p>
<?php endif; ?>
<?php endif; ?>
<?php else :

View File

@ -69,7 +69,7 @@ case 'update':
if ( 'options' == $option_page ) {
$options = explode(',', stripslashes( $_POST[ 'page_options' ] ));
if ( !is_super_admin() )
if ( !is_super_admin() )
wp_die( __( 'Not allowed here' ) );
} else {
$options = $whitelist_options[ $option_page ];

View File

@ -28,7 +28,7 @@ function press_it() {
$quick['post_category'] = isset($_POST['post_category']) ? $_POST['post_category'] : null;
$quick['tax_input'] = isset($_POST['tax_input']) ? $_POST['tax_input'] : null;
$quick['post_title'] = ( trim($_POST['title']) != '' ) ? $_POST['title'] : ' ';
$quick['post_content'] = isset($_POST['post_content']) ? $_POST['post_content'] : '';
$quick['post_content'] = isset($_POST['post_content']) ? $_POST['post_content'] : '';
// insert the post with nothing in it, to get an ID
$post_ID = wp_insert_post($quick, true);
@ -400,7 +400,7 @@ var photostorage = false;
jQuery('#extra-fields').show();
}
jQuery('#extra-fields').before('<div id="waiting"><img src="images/wpspin_light.gif" alt="" /> <?php echo esc_js( __( 'Loading...' ) ); ?></div>');
if(photostorage == false) {
jQuery.ajax({
type: "GET",

View File

@ -37,9 +37,9 @@ if (empty($file)) {
} else {
$file = stripslashes($file);
if ( 'theme' == $dir ) {
$file = dirname(dirname($themes[$theme]['Template Dir'])) . $file ;
$file = dirname(dirname($themes[$theme]['Template Dir'])) . $file ;
} else if ( 'style' == $dir) {
$file = dirname(dirname($themes[$theme]['Stylesheet Dir'])) . $file ;
$file = dirname(dirname($themes[$theme]['Stylesheet Dir'])) . $file ;
}
}

View File

@ -15,7 +15,7 @@ if ( !current_user_can('switch_themes') )
if ( is_multisite() ) {
$themes = get_themes();
$ct = current_theme_info();
$allowed_themes = apply_filters("allowed_themes", get_site_allowed_themes() );
$allowed_themes = apply_filters("allowed_themes", get_site_allowed_themes() );
if( $allowed_themes == false )
$allowed_themes = array();

View File

@ -61,10 +61,10 @@ function use_ssl_preference($user) {
}
// Only allow site admins to edit every user.
if ( is_multisite() && !defined( "EDIT_ANY_USER" ) && !is_super_admin() && $user_id != $current_user->ID )
wp_die( __( 'You do not have permission to edit this user.' ) );
// Only allow site admins to edit every user.
if ( is_multisite() && !defined( "EDIT_ANY_USER" ) && !is_super_admin() && $user_id != $current_user->ID )
wp_die( __( 'You do not have permission to edit this user.' ) );
switch ($action) {
case 'switchposts':

View File

@ -1,5 +1,5 @@
<?php
/**
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,

View File

@ -124,7 +124,7 @@ class WP_Roles {
*
* The capabilities are defined in the following format `array( 'read' => true );`
* To explicitly deny a role a capability you set the value for that capability to false.
*
*
* @since 2.0.0
* @access public
*
@ -716,7 +716,7 @@ class WP_User {
_deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
$cap = $this->translate_level_to_cap( $cap );
}
$args = array_slice( func_get_args(), 1 );
$args = array_merge( array( $cap, $this->ID ), $args );
$caps = call_user_func_array( 'map_meta_cap', $args );

View File

@ -189,14 +189,14 @@ function get_comments( $args = '' ) {
'author_email' => '',
'ID' => '',
'karma' => '',
'number' => '',
'offset' => '',
'orderby' => '',
'order' => 'DESC',
'number' => '',
'offset' => '',
'orderby' => '',
'order' => 'DESC',
'parent' => '',
'post_ID' => '',
'post_id' => 0,
'status' => '',
'status' => '',
'type' => '',
'user_id' => '',
);
@ -235,7 +235,7 @@ function get_comments( $args = '' ) {
if ( ! empty( $orderby ) ) {
$ordersby = is_array($orderby) ? $orderby : preg_split('/[,\s]/', $orderby);
$ordersby = array_intersect(
$ordersby,
$ordersby,
array(
'comment_agent',
'comment_approved',
@ -276,13 +276,13 @@ function get_comments( $args = '' ) {
if ( ! empty($post_id) )
$post_where .= $wpdb->prepare( 'comment_post_ID = %d AND ', $post_id );
if ( '' !== $author_email )
if ( '' !== $author_email )
$post_where .= $wpdb->prepare( 'comment_author_email = %s AND ', $author_email );
if ( '' !== $karma )
$post_where .= $wpdb->prepare( 'comment_karma = %d AND ', $karma );
if ( 'comment' == $type )
$post_where .= "comment_type = '' AND ";
elseif ( ! empty( $type ) )
elseif ( ! empty( $type ) )
$post_where .= $wpdb->prepare( 'comment_type = %s AND ', $type );
if ( '' !== $parent )
$post_where .= $wpdb->prepare( 'comment_parent = %d AND ', $parent );

View File

@ -26,7 +26,7 @@ function wp_default_constants( $context ) {
define('WP_MEMORY_LIMIT', '32M');
}
}
/**
* The $blog_id global, which you can change in the config allows you to create a simple
* multiple blog installation using just one WordPress and changing $blog_id around.
@ -36,35 +36,35 @@ function wp_default_constants( $context ) {
*/
if ( ! isset($blog_id) )
$blog_id = 1;
// set memory limits.
if ( function_exists('memory_get_usage') && ( (int) @ini_get('memory_limit') < abs(intval(WP_MEMORY_LIMIT)) ) )
@ini_set('memory_limit', WP_MEMORY_LIMIT);
if ( !defined('WP_CONTENT_DIR') )
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down
// Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development.
if ( !defined('WP_DEBUG') )
define( 'WP_DEBUG', false );
// Add define('WP_DEBUG_DISPLAY', false); to wp-config.php to use the globally configured setting for display_errors and not force it to On
if ( !defined('WP_DEBUG_DISPLAY') )
define( 'WP_DEBUG_DISPLAY', true );
// Add define('WP_DEBUG_LOG', true); to enable php debug logging to WP_CONTENT_DIR/debug.log
if ( !defined('WP_DEBUG_LOG') )
define('WP_DEBUG_LOG', false);
if ( !defined('WP_CACHE') )
define('WP_CACHE', false);
/**
* Private
*/
if ( !defined('MEDIA_TRASH') )
define('MEDIA_TRASH', false);
if ( !defined('SHORTINIT') )
define('SHORTINIT', false);
break;
@ -73,7 +73,7 @@ function wp_default_constants( $context ) {
if ( !defined('WP_CONTENT_URL') )
define( 'WP_CONTENT_URL', get_option('siteurl') . '/wp-content'); // full url - WP_CONTENT_DIR is defined further up
/**
* Allows for the plugins directory to be moved from the default location.
*
@ -81,7 +81,7 @@ function wp_default_constants( $context ) {
*/
if ( !defined('WP_PLUGIN_DIR') )
define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR . '/plugins' ); // full path, no trailing slash
/**
* Allows for the plugins directory to be moved from the default location.
*
@ -89,7 +89,7 @@ function wp_default_constants( $context ) {
*/
if ( !defined('WP_PLUGIN_URL') )
define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/plugins' ); // full url, no trailing slash
/**
* Allows for the plugins directory to be moved from the default location.
*
@ -108,7 +108,7 @@ function wp_default_constants( $context ) {
*/
if ( !defined('WPMU_PLUGIN_DIR') )
define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '/mu-plugins' ); // full path, no trailing slash
/**
* Allows for the mu-plugins directory to be moved from the default location.
*
@ -116,7 +116,7 @@ function wp_default_constants( $context ) {
*/
if ( !defined('WPMU_PLUGIN_URL') )
define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '/mu-plugins' ); // full url, no trailing slash
/**
* Allows for the mu-plugins directory to be moved from the default location.
*
@ -129,97 +129,97 @@ function wp_default_constants( $context ) {
case 'ms_loaded';
global $wp_default_secret_key;
/**
* Used to guarantee unique hash cookies
* @since 1.5
*/
if( !defined('COOKIEHASH') )
define('COOKIEHASH', md5(get_option('siteurl')));
/**
* Should be exactly the same as the default value of SECRET_KEY in wp-config-sample.php
* @since 2.5.0
*/
$wp_default_secret_key = 'put your unique phrase here';
/**
* It is possible to define this in wp-config.php
* @since 2.0.0
*/
if ( !defined('USER_COOKIE') )
define('USER_COOKIE', 'wordpressuser_' . COOKIEHASH);
/**
* It is possible to define this in wp-config.php
* @since 2.0.0
*/
if ( !defined('PASS_COOKIE') )
define('PASS_COOKIE', 'wordpresspass_' . COOKIEHASH);
/**
* It is possible to define this in wp-config.php
* @since 2.5.0
*/
if ( !defined('AUTH_COOKIE') )
define('AUTH_COOKIE', 'wordpress_' . COOKIEHASH);
/**
* It is possible to define this in wp-config.php
* @since 2.6.0
*/
if ( !defined('SECURE_AUTH_COOKIE') )
define('SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH);
/**
* It is possible to define this in wp-config.php
* @since 2.6.0
*/
if ( !defined('LOGGED_IN_COOKIE') )
define('LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH);
/**
* It is possible to define this in wp-config.php
* @since 2.3.0
*/
if ( !defined('TEST_COOKIE') )
define('TEST_COOKIE', 'wordpress_test_cookie');
/**
* It is possible to define this in wp-config.php
* @since 1.2.0
*/
if ( !defined('COOKIEPATH') )
define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home') . '/' ) );
/**
* It is possible to define this in wp-config.php
* @since 1.5.0
*/
if ( !defined('SITECOOKIEPATH') )
define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl') . '/' ) );
/**
* It is possible to define this in wp-config.php
* @since 2.6.0
*/
if ( !defined('ADMIN_COOKIE_PATH') )
define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . 'wp-admin' );
/**
* It is possible to define this in wp-config.php
* @since 2.6.0
*/
if ( !defined('PLUGINS_COOKIE_PATH') )
define( 'PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL) );
/**
* It is possible to define this in wp-config.php
* @since 2.0.0
*/
if ( !defined('COOKIE_DOMAIN') )
define('COOKIE_DOMAIN', false);
/**
* It is possible to define this in wp-config.php
* @since 2.6.0
@ -227,7 +227,7 @@ function wp_default_constants( $context ) {
if ( !defined('FORCE_SSL_ADMIN') )
define('FORCE_SSL_ADMIN', false);
force_ssl_admin(FORCE_SSL_ADMIN);
/**
* It is possible to define this in wp-config.php
* @since 2.6.0
@ -235,14 +235,14 @@ function wp_default_constants( $context ) {
if ( !defined('FORCE_SSL_LOGIN') )
define('FORCE_SSL_LOGIN', false);
force_ssl_login(FORCE_SSL_LOGIN);
/**
* It is possible to define this in wp-config.php
* @since 2.5.0
*/
if ( !defined( 'AUTOSAVE_INTERVAL' ) )
define( 'AUTOSAVE_INTERVAL', 60 );
/**
* It is possible to define this in wp-config.php
* @since 2.9.0
@ -264,7 +264,7 @@ function wp_default_constants( $context ) {
* @since 1.5.0
*/
define('TEMPLATEPATH', get_template_directory());
/**
* Web Path to the current active template stylesheet directory
* @since 2.1.0

View File

@ -790,7 +790,7 @@ function wp_widget_rss_output( $rss, $args = array() ) {
if ( !$rss->get_item_quantity() ) {
echo '<ul><li>' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '</li></ul>';
$rss->__destruct();
$rss->__destruct();
unset($rss);
return;
}
@ -843,7 +843,7 @@ function wp_widget_rss_output( $rss, $args = array() ) {
}
}
echo '</ul>';
$rss->__destruct();
$rss->__destruct();
unset($rss);
}

View File

@ -507,7 +507,7 @@ function wp_get_linksbyname($category, $args = '') {
'show_description' => 1,
'title_li' => '',
);
$r = wp_parse_args( $args, $defaults );
return wp_list_bookmarks($r);
@ -973,23 +973,23 @@ function wp_get_links($args = '') {
}
$defaults = array(
'after' => '<br />',
'after' => '<br />',
'before' => '',
'between' => ' ',
'categorize' => 0,
'category' => '',
'category' => '',
'echo' => true,
'limit' => -1,
'limit' => -1,
'orderby' => 'name',
'show_description' => true,
'show_images' => true,
'show_description' => true,
'show_images' => true,
'show_rating' => false,
'show_updated' => true,
'title_li' => '',
);
$r = wp_parse_args( $args, $defaults );
return wp_list_bookmarks($r);
}

View File

@ -33,7 +33,7 @@ function wptexturize($text) {
$curl = '';
$textarr = preg_split('/(<.*>|\[.*\])/Us', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
$stop = count($textarr);
// No need to setup these variables more than once
if (!$static_setup) {
/* translators: opening curly quote */
@ -74,7 +74,7 @@ function wptexturize($text) {
$curl = $textarr[$i];
if ( !empty($curl) && '<' != $curl{0} && '[' != $curl{0}
&& empty($no_texturize_shortcodes_stack) && empty($no_texturize_tags_stack)) {
&& empty($no_texturize_shortcodes_stack) && empty($no_texturize_tags_stack)) {
// This is not a tag, nor is the texturization disabled
// static strings
$curl = str_replace($static_characters, $static_replacements, $curl);
@ -120,7 +120,7 @@ function _wptexturize_pushpop_element($text, &$stack, $disabled_elements, $openi
/*
* This disables texturize until we find a closing tag of our type
* (e.g. <pre>) even if there was invalid nesting before that
*
*
* Example: in the case <pre>sadsadasd</code>"baba"</pre>
* "baba" won't be texturize
*/
@ -690,7 +690,7 @@ function sanitize_file_name( $filename ) {
// long alpha string not in the extension whitelist.
foreach ( (array) $parts as $part) {
$filename .= '.' . $part;
if ( preg_match("/^[a-zA-Z]{2,5}\d?$/", $part) ) {
$allowed = false;
foreach ( $mimes as $ext_preg => $mime_match ) {
@ -2413,7 +2413,7 @@ function tag_escape($tag_name) {
* @return string text, safe for inclusion in LIKE query.
*/
function like_escape($text) {
return addcslashes($text, '\\%_');
return addcslashes($text, '\\%_');
}
/**

View File

@ -576,7 +576,7 @@ function add_option( $name, $value = '', $deprecated = '', $autoload = 'yes' ) {
do_action( "add_option_{$name}", $name, $value );
do_action( 'added_option', $name, $value );
return;
}
@ -2307,8 +2307,8 @@ function get_allowed_mime_types() {
'ogg' => 'audio/ogg',
'mid|midi' => 'audio/midi',
'wma' => 'audio/wma',
'mka' => 'audio/x-matroska',
'mkv' => 'video/x-matroska',
'mka' => 'audio/x-matroska',
'mkv' => 'video/x-matroska',
'rtf' => 'application/rtf',
'js' => 'application/javascript',
'pdf' => 'application/pdf',
@ -3392,7 +3392,7 @@ function delete_site_transient($transient) {
*
* If the transient does not exist or does not have a value, then the return value
* will be false.
*
*
* @since 2.9.0
* @package WordPress
* @subpackage Transient
@ -3678,7 +3678,7 @@ function wp_timezone_choice( $selected_zone ) {
if ( $offset_value === $selected_zone )
$selected = 'selected="selected" ';
$structure[] = '<option ' . $selected . 'value="' . esc_attr( $offset_value ) . '">' . esc_html( $offset_name ) . "</option>";
}
$structure[] = '</optgroup>';
@ -3745,7 +3745,7 @@ function wp_scheduled_delete() {
/**
* Parse the file contents to retrieve its metadata.
*
* Searches for metadata for a file, such as a plugin or theme. Each piece of
* Searches for metadata for a file, such as a plugin or theme. Each piece of
* metadata must be on its own line. For a field spanning multple lines, it
* must not have any newlines or only parts of it will be displayed.
*
@ -3765,7 +3765,7 @@ function wp_scheduled_delete() {
*
* @param string $file Path to the file
* @param bool $markup If the returned data should have HTML markup applied
* @param string $context If specified adds filter hook "extra_<$context>_headers"
* @param string $context If specified adds filter hook "extra_<$context>_headers"
*/
function get_file_data( $file, $default_headers, $context = '' ) {
// We don't need to write to the file, so just open for reading.
@ -3789,7 +3789,7 @@ function get_file_data( $file, $default_headers, $context = '' ) {
$all_headers = $default_headers;
}
foreach ( $all_headers as $field => $regex ) {
preg_match( '/' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field});
if ( !empty( ${$field} ) )
@ -3799,12 +3799,12 @@ function get_file_data( $file, $default_headers, $context = '' ) {
}
$file_data = compact( array_keys( $all_headers ) );
return $file_data;
}
/*
* Used internally to tidy up the search terms
*
*
* @private
* @since 2.9.0
*/

View File

@ -210,18 +210,18 @@ function wp_login_form( $args = array() ) {
'form_id' => 'loginform',
'label_username' => __( 'Username' ),
'label_password' => __( 'Password' ),
'label_remember' => __( 'Remember Me' ),
'label_log_in' => __( 'Log In' ),
'id_username' => 'user_login',
'id_password' => 'user_pass',
'id_remember' => 'rememberme',
'id_submit' => 'wp-submit',
'remember' => true,
'label_remember' => __( 'Remember Me' ),
'label_log_in' => __( 'Log In' ),
'id_username' => 'user_login',
'id_password' => 'user_pass',
'id_remember' => 'rememberme',
'id_submit' => 'wp-submit',
'remember' => true,
'value_username' => '',
'value_remember' => false, // Set this to true to default the "Remember me" checkbox to checked
);
$args = wp_parse_args( $args, apply_filters( 'login_form_defaults', $defaults ) );
$form = '
<form name="' . $args['form_id'] . '" id="' . $args['form_id'] . '" action="' . site_url( 'wp-login.php', 'login' ) . '" method="post">
' . do_action( 'login_form_top' ) . '
@ -241,7 +241,7 @@ function wp_login_form( $args = array() ) {
</p>
' . do_action( 'login_form_bottom' ) . '
</form>';
if ( $args['echo'] )
echo $form;
else
@ -1301,15 +1301,15 @@ function the_date($d='', $before='', $after='', $echo = true) {
* @return string|null Null if displaying, string if retrieving.
*/
function the_modified_date($d = '', $before='', $after='', $echo = true) {
$the_modified_date = $before . get_the_modified_date($d) . $after;
$the_modified_date = apply_filters('the_modified_date', $the_modified_date, $d, $before, $after);
if ( $echo )
echo $the_modified_date;
else
return $the_modified_date;
}
/**

View File

@ -2,7 +2,7 @@ var autosave, autosaveLast = '', autosavePeriodical, autosaveOldMessage = '', au
jQuery(document).ready( function($) {
var dotabkey = true;
autosaveLast = $('#post #title').val() + $('#post #content').val();
autosavePeriodical = $.schedule({time: autosaveL10n.autosaveInterval * 1000, func: function() { autosave(); }, repeat: true, protect: true});

View File

@ -333,7 +333,7 @@ function edInsertTag(myField, i) {
function edInsertContent(myField, myValue) {
var sel, startPos, endPos, scrollTop;
//IE support
if (document.selection) {
myField.focus();

View File

@ -7,17 +7,17 @@
for ( i = 0; i < inputs.length; i++ ) {
checkCount += inputs[i].checked ? 1 : 0;
side = inputs[i].getAttribute('name');
if ( ! inputs[i].checked &&
if ( ! inputs[i].checked &&
( 'left' == side && 1 > checkCount || 'right' == side && 1 < checkCount && ( ! inputs[i-1] || ! inputs[i-1].checked ) ) &&
! ( inputs[i+1] && inputs[i+1].checked && 'right' == inputs[i+1].getAttribute('name') ) )
inputs[i].style.visibility = 'hidden';
inputs[i].style.visibility = 'hidden';
else if ( 'left' == side || 'right' == side )
inputs[i].style.visibility = 'visible';
}
}
pr.onclick();
}
if ( w && w.addEventListener )
if ( w && w.addEventListener )
w.addEventListener('load', init, false);
else if ( w && w.attachEvent )
w.attachEvent('onload', init);

View File

@ -313,15 +313,15 @@ function _nx_noop( $single, $plural, $context ) {
*/
function load_textdomain( $domain, $mofile ) {
global $l10n;
$plugin_override = apply_filters( 'override_load_textdomain', false, $domain, $mofile );
if ( true == $plugin_override ) {
return true;
}
do_action( 'load_textdomain', $domain, $mofile );
$mofile = apply_filters( 'load_textdomain_mofile', $mofile, $domain );
if ( !is_readable( $mofile ) ) return false;
@ -333,7 +333,7 @@ function load_textdomain( $domain, $mofile ) {
$mo->merge_with( $l10n[$domain] );
$l10n[$domain] = &$mo;
return true;
}
@ -377,7 +377,7 @@ function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_pat
} else {
$path = WP_PLUGIN_DIR;
}
$mofile = $path . '/'. $domain . '-' . $locale . '.mo';
return load_textdomain( $domain, $mofile );
}

View File

@ -682,7 +682,7 @@ function get_edit_post_link( $id = 0, $context = 'display' ) {
else
$action = '&action=edit';
$post_type_object = get_post_type_object( $post->post_type );
$post_type_object = get_post_type_object( $post->post_type );
if ( !$post_type_object )
return;
@ -1098,7 +1098,7 @@ function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $ex
// If there is no post stop.
if ( empty($posts) )
return;
// Even though we limited get_posts to return only 1 item it still returns an array of objects.
$post = $posts[0];

View File

@ -745,8 +745,8 @@ function gallery_shortcode($attr) {
$captiontag = tag_escape($captiontag);
$columns = intval($columns);
$itemwidth = $columns > 0 ? floor(100/$columns) : 100;
$float = $wp_locale->text_direction == 'rtl' ? 'right' : 'left';
$float = $wp_locale->text_direction == 'rtl' ? 'right' : 'left';
$selector = "gallery-{$instance}";
$output = apply_filters('gallery_style', "

View File

@ -11,7 +11,7 @@
/*
* Deprecated functions come here to die.
*/
/**
* @since unknown
* @deprecated 3.0

View File

@ -1373,7 +1373,7 @@ function install_blog($blog_id, $blog_title = '') {
if ( $wpdb->get_results("SELECT ID FROM $wpdb->posts") )
die(__('<h1>Already Installed</h1><p>You appear to have already installed WordPress. To reinstall please clear your old database tables first.</p>') . '</body></html>');
$wpdb->suppress_errors(false);
$url = get_blogaddress_by_id($blog_id);
@ -1402,7 +1402,7 @@ function install_blog($blog_id, $blog_title = '') {
$cat_slug = sanitize_title($cat_name);
$blogroll_id = $wpdb->get_var( $wpdb->prepare( "SELECT cat_ID FROM {$wpdb->sitecategories} WHERE category_nicename = %s", $cat_slug ) );
if ( $blogroll_id == null ) {
$wpdb->insert( $wpdb->sitecategories, array('cat_ID' => 0, 'cat_name' => $cat_name, 'category_nicename' => $cat_slug, 'last_updated' => current_time('mysql', true)) );
$blogroll_id = $wpdb->insert_id;

View File

@ -976,7 +976,7 @@ function wp_notify_postauthor($comment_id, $comment_type='') {
if ('' == $user->user_email) return false; // If there's no email to send the comment to
$comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
// we want to reverse this for the plain text arena of emails.
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
@ -1072,11 +1072,11 @@ function wp_notify_moderator($comment_id) {
$comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
$comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
// we want to reverse this for the plain text arena of emails.
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
switch ($comment->comment_type)
{
case 'trackback':
@ -1164,7 +1164,7 @@ function wp_new_user_notification($user_id, $plaintext_pass = '') {
$user_login = stripslashes($user->user_login);
$user_email = stripslashes($user->user_email);
// The blogname option is escaped with esc_html on the way into the database in sanitize_option
// we want to reverse this for the plain text arena of emails.
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);

View File

@ -301,7 +301,7 @@ function do_action($tag, $arg = '') {
if ( ! isset($wp_actions) )
$wp_actions = array();
if ( ! isset($wp_actions[$tag]) )
$wp_actions[$tag] = 1;
else
@ -387,7 +387,7 @@ function do_action_ref_array($tag, $args) {
if ( ! isset($wp_actions) )
$wp_actions = array();
if ( ! isset($wp_actions[$tag]) )
$wp_actions[$tag] = 1;
else

View File

@ -11,7 +11,7 @@
/**
* Check if post has an image attached.
*
*
* @since 2.9.0
*
* @param int $post_id Optional. Post ID.
@ -25,7 +25,7 @@ function has_post_thumbnail( $post_id = NULL ) {
/**
* Retrieve Post Thumbnail ID.
*
*
* @since 2.9.0
*
* @param int $post_id Optional. Post ID.
@ -39,7 +39,7 @@ function get_post_thumbnail_id( $post_id = NULL ) {
/**
* Display Post Thumbnail.
*
*
* @since 2.9.0
*
* @param int $size Optional. Image size. Defaults to 'post-thumbnail', which theme sets using set_post_thumbnail_size( $width, $height, $crop_flag );.
@ -51,7 +51,7 @@ function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) {
/**
* Retrieve Post Thumbnail.
*
*
* @since 2.9.0
*
* @param int $post_id Optional. Post ID.

View File

@ -683,7 +683,7 @@ function register_post_type($post_type, $args = array()) {
/**
* Register support of certain features for a post type.
*
*
* @since 3.0
* @param string $post_type The post type for which to add the feature
* @param string|array $feature the feature being added, can be an array of feature strings or a single string
@ -2151,8 +2151,8 @@ function check_and_publish_future_post($post_id) {
/**
* Given the desired slug and some post details computes a unique slug for the post.
*
* @global wpdb $wpdb
* @global WP_Rewrite $wp_rewrite
* @global wpdb $wpdb
* @global WP_Rewrite $wp_rewrite
* @param string $slug the desired slug (post_name)
* @param integer $post_ID
* @param string $post_status no uniqueness checks are made if the post is still draft or pending

View File

@ -332,10 +332,10 @@ function is_front_page () {
/**
* Whether current page view is the blog homepage.
*
*
* This is the page which is showing the time based blog content of your site
* so if you set a static page for the front page of your site then this will
* only be true on the page which you set as the "Posts page" in Reading Settings.
* only be true on the page which you set as the "Posts page" in Reading Settings.
*
* @since 1.5.0
* @uses $wp_query
@ -2065,7 +2065,7 @@ class WP_Query {
else {
$post_type_object = get_post_type_object ( $post_type );
if ( !empty($post_type_object) )
$post_type_cap = $post_type_object->capability_type;
$post_type_cap = $post_type_object->capability_type;
else
$post_type_cap = $post_type;
}
@ -2077,7 +2077,7 @@ class WP_Query {
if ( 'any' == $post_type ) {
$where .= $exclude_post_types;
} elseif ( !empty( $post_type ) && is_array( $post_type ) ) {
$where .= " AND $wpdb->posts.post_type IN ('" . join("', '", $post_type) . "')";
$where .= " AND $wpdb->posts.post_type IN ('" . join("', '", $post_type) . "')";
} elseif ( ! empty( $post_type ) ) {
$where .= " AND $wpdb->posts.post_type = '$post_type'";
} elseif ( $this->is_attachment ) {

View File

@ -118,14 +118,14 @@ function wp_insert_user($userdata) {
$user_login = sanitize_user($user_login, true);
$user_login = apply_filters('pre_user_login', $user_login);
//Remove any non-printable chars from the login string to see if we have ended up with an empty username
$user_login = trim($user_login);
if ( empty($user_login) ) {
return new WP_Error('empty_user_login', __('Cannot create a user with an empty login name.') );
}
if ( empty($user_nicename) )
$user_nicename = sanitize_title( $user_login );
$user_nicename = apply_filters('pre_user_nicename', $user_nicename);

View File

@ -786,7 +786,7 @@ class WP_Rewrite {
//get pages in order of hierarchy, i.e. children after parents
$posts = get_page_hierarchy($wpdb->get_results("SELECT ID, post_name, post_parent FROM $wpdb->posts WHERE post_type = 'page'"));
// If we have no pages get out quick
if ( !$posts )
return array( array(), array() );
@ -1735,7 +1735,7 @@ class WP_Rewrite {
$rules .= $indent.$indent.$indent."<rules>".$end_of_line;
$extra_indent = $indent.$indent.$indent.$indent;
}
$rules .= $extra_indent."<rule name=\"wordpress\" patternSyntax=\"Wildcard\">".$end_of_line;
$rules .= $extra_indent.$indent."<match url=\"*\" />".$end_of_line;
$rules .= $extra_indent.$indent.$indent."<conditions>".$end_of_line;
@ -1744,7 +1744,7 @@ class WP_Rewrite {
$rules .= $extra_indent.$indent.$indent."</conditions>".$end_of_line;
$rules .= $extra_indent.$indent."<action type=\"Rewrite\" url=\"index.php\" />".$end_of_line;
$rules .= $extra_indent."</rule>";
if ( $add_parent_tags ) {
$rules .= $end_of_line.$indent.$indent.$indent."</rules>".$end_of_line;
$rules .= $indent.$indent."</rewrite>".$end_of_line;

View File

@ -176,7 +176,7 @@ function wp_default_scripts( &$scripts ) {
'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'),
'l10n_print_after' => 'try{convertEntities(thickboxL10n);}catch(e){};'
) );
$scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop$suffix.js", array('jquery'), '0.9.8');

View File

@ -575,9 +575,9 @@ function get_term_to_edit( $id, $taxonomy ) {
* of term ids to exclude from the return array. If 'include' is non-empty,
* 'exclude' is ignored.
*
* exclude_tree - Default is an empty array. An array, comma- or space-delimited
* string of term ids to exclude from the return array, along with all of their
* descendant terms according to the primary taxonomy. If 'include' is non-empty,
* exclude_tree - Default is an empty array. An array, comma- or space-delimited
* string of term ids to exclude from the return array, along with all of their
* descendant terms according to the primary taxonomy. If 'include' is non-empty,
* 'exclude_tree' is ignored.
*
* include - Default is an empty array. An array, comma- or space-delimited string

View File

@ -170,15 +170,15 @@ function get_template_directory_uri() {
* @return array Theme data.
*/
function get_theme_data( $theme_file ) {
$default_headers = array(
'Name' => 'Theme Name',
'URI' => 'Theme URI',
'Description' => 'Description',
'Author' => 'Author',
$default_headers = array(
'Name' => 'Theme Name',
'URI' => 'Theme URI',
'Description' => 'Description',
'Author' => 'Author',
'AuthorURI' => 'Author URI',
'Version' => 'Version',
'Template' => 'Template',
'Status' => 'Status',
'Version' => 'Version',
'Template' => 'Template',
'Status' => 'Status',
'Tags' => 'Tags'
);
@ -370,7 +370,7 @@ function get_themes() {
//Make unique and remove duplicates when stylesheet and template are the same i.e. most themes
$template_files = array_unique($template_files);
$stylesheet_files = array_unique($stylesheet_files);
$template_dir = dirname($template_files[0]);
$stylesheet_dir = dirname($stylesheet_files[0]);
@ -1313,7 +1313,7 @@ function add_custom_image_header($header_callback, $admin_header_callback) {
/**
* Allows a theme to register its support of a certain feature
*
*
* Must be called in the themes functions.php file to work.
*
* @author Mark Jaquith

View File

@ -640,7 +640,7 @@ function sanitize_user_object($user, $context = 'display') {
else
$vars = get_object_vars($user);
foreach ( array_keys($vars) as $field ) {
if ( is_string($user->$field) || is_numeric($user->$field) )
if ( is_string($user->$field) || is_numeric($user->$field) )
$user->$field = sanitize_user_field($field, $user->$field, $user->ID, $context);
}
$user->filter = $context;

View File

@ -805,7 +805,7 @@ class wpdb {
// Perform the query via std mysql_query function..
if ( defined('SAVEQUERIES') && SAVEQUERIES )
$this->timer_start();
// use $this->dbh for read ops, and $this->dbhwrite for write ops
// use $this->dbhglobal for gloal table ops
unset( $dbh );

View File

@ -29,17 +29,17 @@ if( $current_blog->domain . $current_blog->path != $current_site->domain . $curr
function wpmu_signup_stylesheet() {
?>
<style type="text/css">
<style type="text/css">
.mu_register { width: 90%; margin:0 auto; }
.mu_register form { margin-top: 2em; }
.mu_register .error { font-weight:700; padding:10px; color:#333333; background:#FFEBE8; border:1px solid #CC0000; }
.mu_register input[type="submit"],
.mu_register #blog_title,
.mu_register #user_email,
.mu_register #user_email,
.mu_register #blogname,
.mu_register #user_name { width:100%; font-size: 24px; margin:5px 0; }
.mu_register #user_name { width:100%; font-size: 24px; margin:5px 0; }
.mu_register .prefix_address,
.mu_register .suffix_address {font-size: 18px;display:inline; }
.mu_register .suffix_address {font-size: 18px;display:inline; }
.mu_register label { font-weight:700; font-size:15px; display:block; margin:10px 0; }
.mu_register label.checkbox { display:inline; }
.mu_register .mu_alert { font-weight:700; padding:10px; color:#333333; background:#ffffe0; border:1px solid #e6db55; }
@ -82,7 +82,7 @@ function show_blog_form($blogname = '', $blog_title = '', $errors = '') {
// Blog Title
?>
<label for="blog_title"><?php _e('Blog Title:') ?></label>
<label for="blog_title"><?php _e('Blog Title:') ?></label>
<?php if ( $errmsg = $errors->get_error_message('blog_title') ) { ?>
<p class="error"><?php echo $errmsg ?></p>
<?php }
@ -92,7 +92,7 @@ function show_blog_form($blogname = '', $blog_title = '', $errors = '') {
<div id="privacy">
<p class="privacy-intro">
<label for="blog_public_on"><?php _e('Privacy:') ?></label>
<?php _e('I would like my blog to appear in search engines like Google and Technorati, and in public listings around this site.'); ?>
<?php _e('I would like my blog to appear in search engines like Google and Technorati, and in public listings around this site.'); ?>
<div style="clear:both;"></div>
<label class="checkbox" for="blog_public_on">
<input type="radio" id="blog_public_on" name="blog_public" value="1" <?php if( !isset( $_POST['blog_public'] ) || $_POST['blog_public'] == '1' ) { ?>checked="checked"<?php } ?> />
@ -104,7 +104,7 @@ function show_blog_form($blogname = '', $blog_title = '', $errors = '') {
</label>
</p>
</div>
<?php
do_action('signup_blogform', $errors);
}
@ -130,7 +130,7 @@ function show_user_form($user_name = '', $user_email = '', $errors = '') {
<label for="user_email"><?php _e('Email&nbsp;Address:') ?></label>
<?php if ( $errmsg = $errors->get_error_message('user_email') ) { ?>
<p class="error"><?php echo $errmsg ?></p>
<?php } ?>
<?php } ?>
<input name="user_email" type="text" id="user_email" value="<?php echo esc_attr($user_email) ?>" maxlength="200" /><br /><?php _e('(We&#8217;ll send your password to this address, so <strong>triple-check it</strong>.)') ?>
<?php
if ( $errmsg = $errors->get_error_message('generic') ) {
@ -145,7 +145,7 @@ function validate_user_form() {
function signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
global $current_user, $current_site;
if ( ! is_wp_error($errors) ) {
$errors = new WP_Error();
}
@ -163,9 +163,9 @@ function signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
}
?>
<p><?php printf(__("Welcome back, %s. By filling out the form below, you can <strong>add another blog to your account</strong>. There is no limit to the number of blogs you can have, so create to your heart's content, but blog responsibly."), $current_user->display_name) ?></p>
<?php
$blogs = get_blogs_of_user($current_user->ID);
$blogs = get_blogs_of_user($current_user->ID);
if ( !empty($blogs) ) { ?>
<p>
<?php _e('Blogs you are already a member of:') ?>
@ -176,7 +176,7 @@ function signup_another_blog($blogname = '', $blog_title = '', $errors = '') {
</ul>
</p>
<?php } ?>
<p><?php _e("If you&#8217;re not going to use a great blog domain, leave it for a new user. Now have at it!") ?></p>
<form id="setupform" method="post" action="wp-signup.php">
<input type="hidden" name="stage" value="gimmeanotherblog" />
@ -238,13 +238,13 @@ function signup_user($user_name = '', $user_email = '', $errors = '') {
$errors = $filtered_results['errors'];
?>
<h2><?php printf( __('Get your own %s account in seconds'), $current_site->site_name ) ?></h2>
<form id="setupform" method="post" action="wp-signup.php">
<input type="hidden" name="stage" value="validate-user-signup" />
<?php do_action( "signup_hidden_fields" ); ?>
<?php show_user_form($user_name, $user_email, $errors); ?>
<p>
<?php if( $active_signup == 'blog' ) { ?>
<input id="signupblog" type="hidden" name="signup_for" value="blog" />
@ -252,13 +252,13 @@ function signup_user($user_name = '', $user_email = '', $errors = '') {
<input id="signupblog" type="hidden" name="signup_for" value="user" />
<?php } else { ?>
<input id="signupblog" type="radio" name="signup_for" value="blog" <?php echo $signup['blog'] ?> />
<label class="checkbox" for="signupblog"><?php _e('Gimme a blog!') ?></label>
<br />
<input id="signupuser" type="radio" name="signup_for" value="user" <?php echo $signup['user'] ?> />
<label class="checkbox" for="signupblog"><?php _e('Gimme a blog!') ?></label>
<br />
<input id="signupuser" type="radio" name="signup_for" value="user" <?php echo $signup['user'] ?> />
<label class="checkbox" for="signupuser"><?php _e('Just a username, please.') ?></label>
<?php } ?>
</p>
<p class="submit"><input type="submit" name="submit" class="submit" value="<?php esc_attr_e('Next') ?>" /></p>
</form>
<?php
@ -350,7 +350,7 @@ function validate_blog_signup() {
function confirm_blog_signup($domain, $path, $blog_title, $user_name = '', $user_email = '', $meta) {
?>
<h2><?php printf(__('Congratulations! Your new blog, %s, is almost ready.'), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) ?></h2>
<p><?php _e('But, before you can start using your blog, <strong>you must activate it</strong>.') ?></p>
<p><?php printf(__('Check your inbox at <strong>%s</strong> and click the link given. It should arrive within 30 minutes.'), $user_email) ?></p>
<p><?php _e('If you do not activate your blog within two days, you will have to sign up again.'); ?></p>