Remove trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@6026 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
87c4f3a17f
commit
321c310717
|
@ -1,9 +1,9 @@
|
|||
|
||||
<div id="footer">
|
||||
<p><?php
|
||||
<p><?php
|
||||
|
||||
$upgrade = apply_filters( 'update_footer', '' );
|
||||
echo __('Thank you for creating with <a href="http://wordpress.org/">WordPress</a>').' | '.__('<a href="http://codex.wordpress.org/">Documentation</a>').' | '.__('<a href="http://wordpress.org/support/forum/4">Feedback</a>').' '.$upgrade;
|
||||
echo __('Thank you for creating with <a href="http://wordpress.org/">WordPress</a>').' | '.__('<a href="http://codex.wordpress.org/">Documentation</a>').' | '.__('<a href="http://wordpress.org/support/forum/4">Feedback</a>').' '.$upgrade;
|
||||
|
||||
?></p>
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@ get_admin_page_title();
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
|
||||
<title><?php bloginfo('name') ?> › <?php echo wp_specialchars( strip_tags( $title ) ); ?> — WordPress</title>
|
||||
<?php wp_admin_css(); ?>
|
||||
<?php wp_admin_css(); ?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}
|
||||
|
|
|
@ -60,9 +60,9 @@ case 'editedcat':
|
|||
wp_die(__('Cheatin’ uh?'));
|
||||
|
||||
if ( wp_update_category($_POST) )
|
||||
wp_redirect('categories.php?message=3');
|
||||
wp_redirect('categories.php?message=3');
|
||||
else
|
||||
wp_redirect('categories.php?message=5');
|
||||
wp_redirect('categories.php?message=5');
|
||||
|
||||
exit;
|
||||
break;
|
||||
|
|
|
@ -34,7 +34,7 @@ if ( ! empty($cat_ID) ) {
|
|||
</tr>
|
||||
<tr>
|
||||
<th scope="row" valign="top"><label for="category_parent"><?php _e('Category parent:') ?></label></th>
|
||||
<td>
|
||||
<td>
|
||||
<?php wp_dropdown_categories('hide_empty=0&name=category_parent&orderby=name&selected=' . $category->parent . '&hierarchical=1&show_option_none=' . __('None')); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -39,14 +39,14 @@ function getNumChecked(form)
|
|||
</script>
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Comments'); ?></h2>
|
||||
<form name="searchform" action="" method="get" id="editcomments">
|
||||
<fieldset>
|
||||
<legend><?php _e('Show Comments That Contain...') ?></legend>
|
||||
<input type="text" name="s" value="<?php if (isset($_GET['s'])) echo attribute_escape($_GET['s']); ?>" size="17" />
|
||||
<input type="submit" name="submit" value="<?php _e('Search') ?>" />
|
||||
<form name="searchform" action="" method="get" id="editcomments">
|
||||
<fieldset>
|
||||
<legend><?php _e('Show Comments That Contain...') ?></legend>
|
||||
<input type="text" name="s" value="<?php if (isset($_GET['s'])) echo attribute_escape($_GET['s']); ?>" size="17" />
|
||||
<input type="submit" name="submit" value="<?php _e('Search') ?>" />
|
||||
<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
|
||||
<?php _e('(Searches within comment text, e-mail, URL, and IP address.)') ?>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</form>
|
||||
<p><a href="?mode=view"><?php _e('View Mode') ?></a> | <a href="?mode=edit"><?php _e('Mass Edit Mode') ?></a></p>
|
||||
<?php
|
||||
|
@ -88,7 +88,7 @@ $comments = array_slice($_comments, 0, 20);
|
|||
$extra_comments = array_slice($_comments, 20);
|
||||
|
||||
$page_links = paginate_links( array(
|
||||
'base' => add_query_arg( 'apage', '%#%' ),
|
||||
'base' => add_query_arg( 'apage', '%#%' ),
|
||||
'format' => '',
|
||||
'total' => ceil($total / 20),
|
||||
'current' => $page
|
||||
|
@ -176,7 +176,7 @@ if ( $extra_comments ) : ?>
|
|||
echo "<a href=\"comment.php?action=deletecomment&p=".$comment->comment_post_ID."&c=".$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 );\" class='delete'>" . __('Delete') . "</a> ";
|
||||
} ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
<?php
|
||||
} // end foreach
|
||||
?></table>
|
||||
<p class="submit"><input type="submit" name="delete_button" class="delete" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to delete")); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to delete %s comments permanently \n 'Cancel' to stop, 'OK' to delete.")), "' + numchecked + '"); ?>')" />
|
||||
|
|
|
@ -84,23 +84,23 @@ addLoadEvent(focusit);
|
|||
<input name="advanced_view" type="hidden" value="1" />
|
||||
<label for="comment_status" class="selectit">
|
||||
<input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> />
|
||||
<?php _e('Allow Comments') ?></label>
|
||||
<?php _e('Allow Comments') ?></label>
|
||||
<label for="ping_status" class="selectit"><input name="ping_status" type="checkbox" id="ping_status" value="open" <?php checked($post->ping_status, 'open'); ?> /> <?php _e('Allow Pings') ?></label>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="passworddiv" class="dbx-box">
|
||||
<h3 class="dbx-handle"><?php _e('Post Password') ?></h3>
|
||||
<h3 class="dbx-handle"><?php _e('Post Password') ?></h3>
|
||||
<div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="slugdiv" class="dbx-box">
|
||||
<h3 class="dbx-handle"><?php _e('Post Slug') ?></h3>
|
||||
<h3 class="dbx-handle"><?php _e('Post Slug') ?></h3>
|
||||
<div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" /></div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="poststatusdiv" class="dbx-box">
|
||||
<h3 class="dbx-handle"><?php _e('Post Status') ?></h3>
|
||||
<h3 class="dbx-handle"><?php _e('Post Status') ?></h3>
|
||||
<div class="dbx-content">
|
||||
<?php if ( current_user_can('publish_posts') ) : ?>
|
||||
<label for="post_status_publish" class="selectit"><input id="post_status_publish" name="post_status" type="radio" value="publish" <?php checked($post->post_status, 'publish'); checked($post->post_status, 'future'); ?> /> <?php _e('Published') ?></label>
|
||||
|
@ -117,7 +117,7 @@ addLoadEvent(focusit);
|
|||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
$authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM
|
||||
if ( $authors && count( $authors ) > 1 ) :
|
||||
?>
|
||||
|
@ -163,19 +163,19 @@ if ( $authors && count( $authors ) > 1 ) :
|
|||
<p class="submit">
|
||||
<span id="autosave"></span>
|
||||
<?php echo $saveasdraft; ?>
|
||||
<input type="submit" name="submit" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" />
|
||||
<?php
|
||||
<input type="submit" name="submit" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" />
|
||||
<?php
|
||||
if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) {
|
||||
?>
|
||||
<?php if ( current_user_can('publish_posts') ) : ?>
|
||||
<input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" />
|
||||
<input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" />
|
||||
<?php else : ?>
|
||||
<input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" />
|
||||
<input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" />
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<input name="referredby" type="hidden" id="referredby" value="<?php
|
||||
<input name="referredby" type="hidden" id="referredby" value="<?php
|
||||
if ( !empty($_REQUEST['popupurl']) )
|
||||
echo clean_url(stripslashes($_REQUEST['popupurl']));
|
||||
else if ( url_to_postid(wp_get_referer()) == $post_ID )
|
||||
|
|
|
@ -54,8 +54,8 @@ addLoadEvent(focusit);
|
|||
<table width="100%" cellspacing="2" cellpadding="5" class="editform">
|
||||
<tr>
|
||||
<th scope="row" valign="top"><?php _e('Comment Status') ?>:</th>
|
||||
<td><label for="comment_status_approved" class="selectit"><input id="comment_status_approved" name="comment_status" type="radio" value="1" <?php checked($comment->comment_approved, '1'); ?> /> <?php _e('Approved') ?></label>
|
||||
<label for="comment_status_moderated" class="selectit"><input id="comment_status_moderated" name="comment_status" type="radio" value="0" <?php checked($comment->comment_approved, '0'); ?> /> <?php _e('Moderated') ?></label>
|
||||
<td><label for="comment_status_approved" class="selectit"><input id="comment_status_approved" name="comment_status" type="radio" value="1" <?php checked($comment->comment_approved, '1'); ?> /> <?php _e('Approved') ?></label>
|
||||
<label for="comment_status_moderated" class="selectit"><input id="comment_status_moderated" name="comment_status" type="radio" value="0" <?php checked($comment->comment_approved, '0'); ?> /> <?php _e('Moderated') ?></label>
|
||||
<label for="comment_status_spam" class="selectit"><input id="comment_status_spam" name="comment_status" type="radio" value="spam" <?php checked($comment->comment_approved, 'spam'); ?> /> <?php _e('Spam') ?></label></td>
|
||||
</tr>
|
||||
|
||||
|
@ -68,7 +68,7 @@ addLoadEvent(focusit);
|
|||
|
||||
<tr>
|
||||
<th scope="row" valign="top"> </th>
|
||||
<td><input name="deletecomment" class="button delete" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { document.forms.post._wpnonce.value = '" . wp_create_nonce( 'delete-comment_' . $comment->comment_ID ) . "'; return true; } return false;\""; ?> />
|
||||
<td><input name="deletecomment" class="button delete" type="submit" id="deletecomment" tabindex="10" value="<?php _e('Delete this comment') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n 'Cancel' to stop, 'OK' to delete.")) . "') ) { document.forms.post._wpnonce.value = '" . wp_create_nonce( 'delete-comment_' . $comment->comment_ID ) . "'; return true; } return false;\""; ?> />
|
||||
<input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" />
|
||||
<input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" />
|
||||
<input type="hidden" name="noredir" value="1" />
|
||||
|
|
|
@ -20,12 +20,12 @@ addLoadEvent(focusit);
|
|||
|
||||
<div id="poststuff">
|
||||
<fieldset id="titlediv">
|
||||
<legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>
|
||||
<legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend>
|
||||
<div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" /></div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset id="categorydiv">
|
||||
<legend><a href="http://wordpress.org/docs/reference/post/#category" title="<?php _e('Help on categories') ?>"><?php _e('Categories') ?></a></legend>
|
||||
<legend><a href="http://wordpress.org/docs/reference/post/#category" title="<?php _e('Help on categories') ?>"><?php _e('Categories') ?></a></legend>
|
||||
<div><?php dropdown_categories($post->post_category); ?></div>
|
||||
</fieldset>
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ $all = !( $h2_search || $post_status_q );
|
|||
|
||||
if ($posts) {
|
||||
?>
|
||||
<table class="widefat">
|
||||
<table class="widefat">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col" style="text-align: center"><?php _e('ID') ?></th>
|
||||
|
|
|
@ -102,14 +102,14 @@ foreach($posts_columns as $column_name=>$column_display_name) {
|
|||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php
|
||||
endwhile;
|
||||
} else {
|
||||
?>
|
||||
<tr style='background-color: <?php echo $bgcolor; ?>'>
|
||||
<td colspan="8"><?php _e('No posts found.') ?></td>
|
||||
</tr>
|
||||
<tr style='background-color: <?php echo $bgcolor; ?>'>
|
||||
<td colspan="8"><?php _e('No posts found.') ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
} // end if ( have_posts() )
|
||||
?>
|
||||
|
|
|
@ -83,7 +83,7 @@ if ( is_single() ) {
|
|||
$h2_author = ' ' . __('by other authors');
|
||||
} else {
|
||||
$author_user = get_userdata( get_query_var( 'author' ) );
|
||||
$h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name ));
|
||||
$h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name ));
|
||||
}
|
||||
}
|
||||
$h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching “%s”'), wp_specialchars( get_search_query() ) ) : '';
|
||||
|
@ -94,11 +94,11 @@ if ( is_single() ) {
|
|||
?></h2>
|
||||
|
||||
<form name="searchform" id="searchform" action="" method="get">
|
||||
<fieldset><legend><?php _e('Search terms…'); ?></legend>
|
||||
<input type="text" name="s" id="s" value="<?php the_search_query(); ?>" size="17" />
|
||||
<fieldset><legend><?php _e('Search terms…'); ?></legend>
|
||||
<input type="text" name="s" id="s" value="<?php the_search_query(); ?>" size="17" />
|
||||
</fieldset>
|
||||
|
||||
<fieldset><legend><?php _e('Status…'); ?></legend>
|
||||
<fieldset><legend><?php _e('Status…'); ?></legend>
|
||||
<select name='post_status'>
|
||||
<option<?php selected( @$_GET['post_status'], 0 ); ?> value='0'><?php _e('Any'); ?></option>
|
||||
<?php foreach ( $post_stati as $status => $label ) : if ( !in_array($status, $avail_post_stati) ) continue; ?>
|
||||
|
@ -107,7 +107,7 @@ if ( is_single() ) {
|
|||
</select>
|
||||
</fieldset>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
$editable_ids = get_editable_user_ids( $user_ID );
|
||||
if ( $editable_ids && count( $editable_ids ) > 1 ) :
|
||||
?>
|
||||
|
@ -153,7 +153,7 @@ if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ?
|
|||
<fieldset><legend><?php _e('Category…') ?></legend>
|
||||
<?php wp_dropdown_categories('show_option_all='.__('All').'&hide_empty=1&hierarchical=1&show_count=1&selected='.$cat);?>
|
||||
</fieldset>
|
||||
<input type="submit" id="post-query-submit" value="<?php _e('Filter »'); ?>" class="button" />
|
||||
<input type="submit" id="post-query-submit" value="<?php _e('Filter »'); ?>" class="button" />
|
||||
</form>
|
||||
|
||||
<?php do_action('restrict_manage_posts'); ?>
|
||||
|
|
|
@ -919,7 +919,7 @@ class AtomParser {
|
|||
array_push($this->in_content, "<". $this->ns_to_prefix($name) ."{$xmlns_str}{$attrs_str}");
|
||||
} else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) {
|
||||
$this->in_content = array();
|
||||
$this->is_xhtml = $attrs['type'] == 'xhtml';
|
||||
$this->is_xhtml = $attrs['type'] == 'xhtml';
|
||||
array_push($this->in_content, array($tag,$this->depth));
|
||||
} else if($tag == 'link') {
|
||||
array_push($this->entry->links, $attrs);
|
||||
|
@ -935,7 +935,7 @@ class AtomParser {
|
|||
$tag = array_pop(split(":", $name));
|
||||
|
||||
if(!empty($this->in_content)) {
|
||||
if($this->in_content[0][0] == $tag &&
|
||||
if($this->in_content[0][0] == $tag &&
|
||||
$this->in_content[0][1] == $this->depth) {
|
||||
array_shift($this->in_content);
|
||||
if($this->is_xhtml) {
|
||||
|
@ -998,14 +998,14 @@ class AtomParser {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $name;
|
||||
}
|
||||
|
||||
function xml_escape($string)
|
||||
{
|
||||
return str_replace(array('&','"',"'",'<','>'),
|
||||
array('&','"',''','<','>'),
|
||||
return str_replace(array('&','"',"'",'<','>'),
|
||||
array('&','"',''','<','>'),
|
||||
$string );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,19 +109,19 @@ function textconv ($s) {
|
|||
**/
|
||||
class Dotclear_Import {
|
||||
|
||||
function header()
|
||||
function header()
|
||||
{
|
||||
echo '<div class="wrap">';
|
||||
echo '<h2>'.__('Import DotClear').'</h2>';
|
||||
echo '<p>'.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'</p>';
|
||||
}
|
||||
|
||||
function footer()
|
||||
function footer()
|
||||
{
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
function greet()
|
||||
function greet()
|
||||
{
|
||||
echo '<div class="narrow"><p>'.__('Howdy! This importer allows you to extract posts from a DotClear database into your blog. Mileage may vary.').'</p>';
|
||||
echo '<p>'.__('Your DotClear Configuration settings are as follows:').'</p>';
|
||||
|
|
|
@ -357,9 +357,9 @@ class MT_Import {
|
|||
$post->post_date = $date;
|
||||
$post->post_date_gmt = $date_gmt;
|
||||
} else if ( 'comment' == $context ) {
|
||||
$comment->comment_date = $date;
|
||||
$comment->comment_date = $date;
|
||||
} else if ( 'ping' == $context ) {
|
||||
$ping->comment_date = $date;
|
||||
$ping->comment_date = $date;
|
||||
}
|
||||
} else if ( 0 === strpos($line, "EMAIL:") ) {
|
||||
$email = trim( substr($line, strlen("EMAIL:")) );
|
||||
|
|
|
@ -19,7 +19,7 @@ class STP_Import {
|
|||
echo '<p>'.__('To accommodate larger databases for those tag-crazy authors out there, we have made this into an easy 4-step program to help you kick that nasty Simple Tagging habit. Just keep clicking along and we will let you know when you are in the clear!').'</p>';
|
||||
echo '<p><strong>'.__('Don’t be stupid - backup your database before proceeding!').'</strong></p>';
|
||||
echo '<form action="admin.php?import=stp&step=1" method="post">';
|
||||
wp_nonce_field('import-utw');
|
||||
wp_nonce_field('import-utw');
|
||||
echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 1 »').'" /></p>';
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
|
@ -88,7 +88,7 @@ class STP_Import {
|
|||
}
|
||||
|
||||
echo '<form action="admin.php?import=stp&step=2" method="post">';
|
||||
wp_nonce_field('import-utw');
|
||||
wp_nonce_field('import-utw');
|
||||
echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 2 »').'" /></p>';
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
|
@ -107,7 +107,7 @@ class STP_Import {
|
|||
echo '<p>' . sprintf( __('Done! <strong>%s</strong> tags where added!'), $tags_added ) . '<br /></p>';
|
||||
|
||||
echo '<form action="admin.php?import=stp&step=3" method="post">';
|
||||
wp_nonce_field('import-utw');
|
||||
wp_nonce_field('import-utw');
|
||||
echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 3 »').'" /></p>';
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
|
@ -139,7 +139,7 @@ class STP_Import {
|
|||
$tags_added = 0;
|
||||
|
||||
// loop through each post and add its tags to the db
|
||||
foreach ( $posts as $this_post ) {
|
||||
foreach ( $posts as $this_post ) {
|
||||
$the_post = (int) $this_post->post_id;
|
||||
$the_tag = $wpdb->escape($this_post->tag_name);
|
||||
|
||||
|
|
|
@ -26,14 +26,14 @@ if(!function_exists('link_exists'))
|
|||
**/
|
||||
class Textpattern_Import {
|
||||
|
||||
function header()
|
||||
function header()
|
||||
{
|
||||
echo '<div class="wrap">';
|
||||
echo '<h2>'.__('Import Textpattern').'</h2>';
|
||||
echo '<p>'.__('Steps may take a few minutes depending on the size of your database. Please be patient.').'</p>';
|
||||
}
|
||||
|
||||
function footer()
|
||||
function footer()
|
||||
{
|
||||
echo '</div>';
|
||||
}
|
||||
|
|
|
@ -104,12 +104,12 @@ class WP_Import {
|
|||
if ( false !== strpos($importline, '<item>') ) {
|
||||
$this->posts[$num] = '';
|
||||
$doing_entry = true;
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
if ( false !== strpos($importline, '</item>') ) {
|
||||
$num++;
|
||||
$doing_entry = false;
|
||||
continue;
|
||||
continue;
|
||||
}
|
||||
if ( $doing_entry ) {
|
||||
$this->posts[$num] .= $importline . "\n";
|
||||
|
@ -335,7 +335,7 @@ class WP_Import {
|
|||
$post_cats[] = $cat_ID;
|
||||
}
|
||||
wp_set_post_categories($post_id, $post_cats);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Now for comments
|
||||
|
|
|
@ -261,8 +261,8 @@ function get_admin_page_title() {
|
|||
} else {
|
||||
foreach (array_keys( $submenu ) as $parent) {
|
||||
foreach ( $submenu[$parent] as $submenu_array ) {
|
||||
if ( isset( $plugin_page ) &&
|
||||
($plugin_page == $submenu_array[2] ) &&
|
||||
if ( isset( $plugin_page ) &&
|
||||
($plugin_page == $submenu_array[2] ) &&
|
||||
(($parent == $pagenow ) || ($parent == $plugin_page ) || ($plugin_page == $hook ) || (($pagenow == 'admin.php' ) && ($parent1 != $submenu_array[2] ) ) )
|
||||
) {
|
||||
$title = $submenu_array[3];
|
||||
|
|
|
@ -334,7 +334,7 @@ function add_meta( $post_ID ) {
|
|||
$metavalue = $wpdb->escape( $metavalue );
|
||||
|
||||
if ( ('0' === $metavalue || !empty ( $metavalue ) ) && ((('#NONE#' != $metakeyselect) && !empty ( $metakeyselect) ) || !empty ( $metakeyinput) ) ) {
|
||||
// We have a key/value pair. If both the select and the
|
||||
// We have a key/value pair. If both the select and the
|
||||
// input for the key have data, the input takes precedence:
|
||||
|
||||
if ('#NONE#' != $metakeyselect)
|
||||
|
@ -347,8 +347,8 @@ function add_meta( $post_ID ) {
|
|||
return false;
|
||||
|
||||
$result = $wpdb->query( "
|
||||
INSERT INTO $wpdb->postmeta
|
||||
(post_id,meta_key,meta_value )
|
||||
INSERT INTO $wpdb->postmeta
|
||||
(post_id,meta_key,meta_value )
|
||||
VALUES ('$post_ID','$metakey','$metavalue' )
|
||||
" );
|
||||
return $wpdb->insert_id;
|
||||
|
|
|
@ -151,7 +151,7 @@ function wp_create_tag($tag_name) {
|
|||
if ( $id = tag_exists($tag_name) )
|
||||
return $id;
|
||||
|
||||
return wp_insert_term($tag_name, 'post_tag');
|
||||
return wp_insert_term($tag_name, 'post_tag');
|
||||
}
|
||||
|
||||
?>
|
|
@ -180,17 +180,17 @@ function page_rows( $parent = 0, $level = 0, $pages = 0, $hierarchy = true ) {
|
|||
$id = (int) $post->ID;
|
||||
$class = ('alternate' == $class ) ? '' : 'alternate';
|
||||
?>
|
||||
<tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
|
||||
<th scope="row" style="text-align: center"><?php echo $post->ID; ?></th>
|
||||
<tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'>
|
||||
<th scope="row" style="text-align: center"><?php echo $post->ID; ?></th>
|
||||
<td>
|
||||
<?php echo $pad; ?><?php the_title() ?>
|
||||
</td>
|
||||
</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="view"><?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>
|
||||
</tr>
|
||||
<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>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if ( $hierarchy ) page_rows( $id, $level + 1, $pages );
|
||||
|
|
|
@ -62,9 +62,9 @@ function wp_update_plugins() {
|
|||
$plugin_changed = true;
|
||||
}
|
||||
|
||||
if (
|
||||
isset( $current->last_checked ) &&
|
||||
43200 > ( time() - $current->last_checked ) &&
|
||||
if (
|
||||
isset( $current->last_checked ) &&
|
||||
43200 > ( time() - $current->last_checked ) &&
|
||||
!$plugin_changed
|
||||
)
|
||||
return false;
|
||||
|
|
|
@ -624,7 +624,7 @@ function upgrade_230() {
|
|||
|
||||
if ( empty($term_id) ) {
|
||||
$wpdb->query("INSERT INTO $wpdb->terms (name, slug, term_group) VALUES ('$name', '$slug', '$term_group')");
|
||||
$term_id = (int) $wpdb->insert_id;
|
||||
$term_id = (int) $wpdb->insert_id;
|
||||
}
|
||||
|
||||
$link_cat_id_map[$cat_id] = $term_id;
|
||||
|
|
|
@ -39,7 +39,7 @@ function edit_user( $user_id = 0 ) {
|
|||
if ( isset( $_POST['pass2'] ))
|
||||
$pass2 = $_POST['pass2'];
|
||||
|
||||
if ( isset( $_POST['role'] ) && current_user_can( 'edit_users' ) ) {
|
||||
if ( isset( $_POST['role'] ) && current_user_can( 'edit_users' ) ) {
|
||||
if( $user_id != $current_user->id || $wp_roles->role_objects[$_POST['role']]->has_cap( 'edit_users' ))
|
||||
$user->role = $_POST['role'];
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ switch ( $_GET['jax'] ) {
|
|||
|
||||
case 'incominglinks' :
|
||||
|
||||
$rss_feed = apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?hl=en&scoring=d&ie=utf-8&num=10&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) );
|
||||
$rss_feed = apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?hl=en&scoring=d&ie=utf-8&num=10&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) );
|
||||
$more_link = apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?hl=en&scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) );
|
||||
|
||||
$rss = @fetch_rss( $rss_feed );
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
require_once('admin.php');
|
||||
require_once('admin.php');
|
||||
|
||||
function index_js() {
|
||||
?>
|
||||
|
@ -16,7 +16,7 @@ add_action( 'admin_head', 'index_js' );
|
|||
|
||||
wp_enqueue_script( 'jquery' );
|
||||
|
||||
$title = __('Dashboard');
|
||||
$title = __('Dashboard');
|
||||
$parent_file = 'index.php';
|
||||
require_once('admin-header.php');
|
||||
|
||||
|
@ -39,7 +39,7 @@ $numcomments = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE commen
|
|||
if ( $comments || $numcomments ) :
|
||||
?>
|
||||
<div>
|
||||
<h3><?php printf( __( 'Comments <a href="%s" title="More comments…">»</a>' ), 'edit-comments.php' ); ?></h3>
|
||||
<h3><?php printf( __( 'Comments <a href="%s" title="More comments…">»</a>' ), 'edit-comments.php' ); ?></h3>
|
||||
|
||||
<?php if ( $numcomments ) : ?>
|
||||
<p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s) »'), number_format_i18n($numcomments) ); ?></a></strong></p>
|
||||
|
|
|
@ -60,9 +60,9 @@ case 'editedcat':
|
|||
wp_die(__('Cheatin’ uh?'));
|
||||
|
||||
if ( wp_update_term($cat_ID, 'link_category', $_POST) )
|
||||
wp_redirect('edit-link-categories.php?message=3');
|
||||
wp_redirect('edit-link-categories.php?message=3');
|
||||
else
|
||||
wp_redirect('edit-link-categories.php?message=5');
|
||||
wp_redirect('edit-link-categories.php?message=5');
|
||||
|
||||
exit;
|
||||
break;
|
||||
|
|
|
@ -123,7 +123,7 @@ else
|
|||
} // end else
|
||||
|
||||
if ( ! $blogrolling )
|
||||
apply_filters( 'wp_delete_file', $opml_url);
|
||||
apply_filters( 'wp_delete_file', $opml_url);
|
||||
@unlink($opml_url);
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -96,7 +96,7 @@ foreach ($submenu as $parent => $sub) {
|
|||
// Menus for which the original parent is not acessible due to lack of privs will have the next
|
||||
// submenu in line be assigned as the new menu parent.
|
||||
foreach ( $menu as $id => $data ) {
|
||||
if ( empty($submenu[$data[2]]) )
|
||||
if ( empty($submenu[$data[2]]) )
|
||||
continue;
|
||||
$subs = $submenu[$data[2]];
|
||||
$first_sub = array_shift($subs);
|
||||
|
|
|
@ -124,12 +124,12 @@ if ( isset( $_GET['paged'] ) ) {
|
|||
$start = ( $page * $per ) - $per;
|
||||
$stop = $start + $per;
|
||||
|
||||
$page_links = paginate_links( array(
|
||||
'base' => add_query_arg( 'paged', '%#%' ),
|
||||
'format' => '',
|
||||
'total' => ceil( $total / $per ),
|
||||
'current' => $page,
|
||||
'prev_text' => '«',
|
||||
$page_links = paginate_links( array(
|
||||
'base' => add_query_arg( 'paged', '%#%' ),
|
||||
'format' => '',
|
||||
'total' => ceil( $total / $per ),
|
||||
'current' => $page,
|
||||
'prev_text' => '«',
|
||||
'next_text' => '»'
|
||||
) );
|
||||
|
||||
|
@ -160,7 +160,7 @@ $comments = array_slice( $comments, $start, $stop );
|
|||
?>
|
||||
<li id="comment-<?php comment_ID(); ?>" class="<?php echo $class; ?>">
|
||||
<p>
|
||||
<strong><?php comment_author(); ?></strong>
|
||||
<strong><?php comment_author(); ?></strong>
|
||||
<?php if ( !empty( $comment->comment_author_email ) ) { ?>| <?php comment_author_email_link(); ?> <?php } ?>
|
||||
<?php if ( !empty( $comment->comment_author_url ) && $comment->comment_author_url != 'http://' ) { ?>| <?php comment_author_url_link(); ?> <?php } ?>
|
||||
| <?php _e( 'IP:' ); ?> <a href="http://ws.arin.net/cgi-bin/whois.pl?queryinput=<?php comment_author_IP(); ?>"><?php comment_author_IP(); ?></a>
|
||||
|
@ -171,9 +171,9 @@ $comments = array_slice( $comments, $start, $stop );
|
|||
</p>
|
||||
|
||||
<p><small>
|
||||
<?php comment_date( __( 'M j, g:i A' ) ); ?> —
|
||||
[ <a href="comment.php?action=editcomment&c=<?php comment_ID(); ?>" title="<?php _e( 'Edit this comment' ); ?>"><?php _e( 'Edit' ); ?></a> |
|
||||
<a href="post.php?action=deletecomment&p=<?php echo $comment->comment_post_ID; ?>" title="<?php _e( 'Delete this comment' ); ?>" onclick="return deleteSomething( 'comment', <?php comment_ID(); ?>, '<?php echo js_escape( sprintf( __( "You are about to delete this comment by '%s'.\n'OK' to delete, 'Cancel' to stop." ), get_comment_author() ) ); ?>', theCommentList );"><?php _e( 'Delete' ); ?></a> ] —
|
||||
<?php comment_date( __( 'M j, g:i A' ) ); ?> —
|
||||
[ <a href="comment.php?action=editcomment&c=<?php comment_ID(); ?>" title="<?php _e( 'Edit this comment' ); ?>"><?php _e( 'Edit' ); ?></a> |
|
||||
<a href="post.php?action=deletecomment&p=<?php echo $comment->comment_post_ID; ?>" title="<?php _e( 'Delete this comment' ); ?>" onclick="return deleteSomething( 'comment', <?php comment_ID(); ?>, '<?php echo js_escape( sprintf( __( "You are about to delete this comment by '%s'.\n'OK' to delete, 'Cancel' to stop." ), get_comment_author() ) ); ?>', theCommentList );"><?php _e( 'Delete' ); ?></a> ] —
|
||||
<a href="<?php echo get_permalink( $comment->comment_post_ID ); ?>" title="<?php _e( 'View the post' ); ?>"><?php printf( __( 'View post “%s”' ), get_the_title( $comment->comment_post_ID ) ); ?></a>
|
||||
</small></p>
|
||||
|
||||
|
|
|
@ -7,78 +7,78 @@ $parent_file = 'options-general.php';
|
|||
include('admin-header.php');
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Discussion Options') ?></h2>
|
||||
<form method="post" action="options.php">
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Discussion Options') ?></h2>
|
||||
<form method="post" action="options.php">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p>
|
||||
<fieldset class="options">
|
||||
<legend><?php echo __('Usual settings for an article:').'<br /><small><em>('.__('These settings may be overridden for individual articles.').')</em></small>'; ?></legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label for="default_pingback_flag">
|
||||
<input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_option('default_pingback_flag')); ?> />
|
||||
<?php _e('Attempt to notify any blogs linked to from the article (slows down posting.)') ?></label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="default_ping_status">
|
||||
<input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> />
|
||||
<?php _e('Allow link notifications from other blogs (pingbacks and trackbacks.)') ?></label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="default_comment_status">
|
||||
<input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_option('default_comment_status')); ?> />
|
||||
<?php _e('Allow people to post comments on the article') ?></label>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('E-mail me whenever:') ?></legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label for="comments_notify">
|
||||
<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> />
|
||||
<?php _e('Anyone posts a comment') ?> </label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="moderation_notify">
|
||||
<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> />
|
||||
<?php _e('A comment is held for moderation') ?> </label>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Before a comment appears:') ?></legend>
|
||||
<legend><?php echo __('Usual settings for an article:').'<br /><small><em>('.__('These settings may be overridden for individual articles.').')</em></small>'; ?></legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label for="comment_moderation">
|
||||
<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> />
|
||||
<?php _e('An administrator must always approve the comment') ?> </label>
|
||||
</li>
|
||||
<li><label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_option('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label></li>
|
||||
<li><label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_option('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label></li>
|
||||
</ul>
|
||||
<label for="default_pingback_flag">
|
||||
<input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_option('default_pingback_flag')); ?> />
|
||||
<?php _e('Attempt to notify any blogs linked to from the article (slows down posting.)') ?></label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="default_ping_status">
|
||||
<input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> />
|
||||
<?php _e('Allow link notifications from other blogs (pingbacks and trackbacks.)') ?></label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="default_comment_status">
|
||||
<input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_option('default_comment_status')); ?> />
|
||||
<?php _e('Allow people to post comments on the article') ?></label>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('E-mail me whenever:') ?></legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label for="comments_notify">
|
||||
<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> />
|
||||
<?php _e('Anyone posts a comment') ?> </label>
|
||||
</li>
|
||||
<li>
|
||||
<label for="moderation_notify">
|
||||
<input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> />
|
||||
<?php _e('A comment is held for moderation') ?> </label>
|
||||
</li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Before a comment appears:') ?></legend>
|
||||
<ul>
|
||||
<li>
|
||||
<label for="comment_moderation">
|
||||
<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> />
|
||||
<?php _e('An administrator must always approve the comment') ?> </label>
|
||||
</li>
|
||||
<li><label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked('1', get_option('require_name_email')); ?> /> <?php _e('Comment author must fill out name and e-mail') ?></label></li>
|
||||
<li><label for="comment_whitelist"><input type="checkbox" name="comment_whitelist" id="comment_whitelist" value="1" <?php checked('1', get_option('comment_whitelist')); ?> /> <?php _e('Comment author must have a previously approved comment') ?></label></li>
|
||||
</ul>
|
||||
</fieldset>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Comment Moderation') ?></legend>
|
||||
<p><?php printf(__('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="text" id="comment_max_links" size="3" value="' . get_option('comment_max_links'). '" />' ) ?></p>
|
||||
|
||||
<p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be held in the <a href="moderation.php">moderation queue</a>. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></p>
|
||||
<p>
|
||||
<textarea name="moderation_keys" cols="60" rows="4" id="moderation_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('moderation_keys'); ?></textarea>
|
||||
</p>
|
||||
<p>
|
||||
<textarea name="moderation_keys" cols="60" rows="4" id="moderation_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('moderation_keys'); ?></textarea>
|
||||
</p>
|
||||
</fieldset>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Comment Blacklist') ?></legend>
|
||||
<p><?php _e('When a comment contains any of these words in its content, name, URL, e-mail, or IP, it will be marked as spam. One word or IP per line. It will match inside words, so "press" will match "WordPress".') ?></p>
|
||||
<p>
|
||||
<textarea name="blacklist_keys" cols="60" rows="4" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('blacklist_keys'); ?></textarea>
|
||||
<p>
|
||||
<textarea name="blacklist_keys" cols="60" rows="4" id="blacklist_keys" style="width: 98%; font-size: 12px;" class="code"><?php form_option('blacklist_keys'); ?></textarea>
|
||||
</p>
|
||||
</fieldset>
|
||||
<p class="submit">
|
||||
<input type="hidden" name="action" value="update" />
|
||||
<input type="hidden" name="page_options" value="default_pingback_flag,default_ping_status,default_comment_status,comments_notify,moderation_notify,comment_moderation,require_name_email,comment_whitelist,comment_max_links,moderation_keys,blacklist_keys" />
|
||||
<input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" />
|
||||
<input type="hidden" name="action" value="update" />
|
||||
<input type="hidden" name="page_options" value="default_pingback_flag,default_ping_status,default_comment_status,comments_notify,moderation_notify,comment_moderation,require_name_email,comment_whitelist,comment_max_links,moderation_keys,blacklist_keys" />
|
||||
<input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -9,62 +9,62 @@ include('./admin-header.php');
|
|||
|
||||
<div class="wrap">
|
||||
<h2><?php _e('General Options') ?></h2>
|
||||
<form method="post" action="options.php">
|
||||
<form method="post" action="options.php">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p>
|
||||
<table class="optiontable">
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Blog title:') ?></th>
|
||||
<td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Tagline:') ?></th>
|
||||
<table class="optiontable">
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Blog title:') ?></th>
|
||||
<td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Tagline:') ?></th>
|
||||
<td><input name="blogdescription" type="text" id="blogdescription" style="width: 95%" value="<?php form_option('blogdescription'); ?>" size="45" />
|
||||
<br />
|
||||
<?php _e('In a few words, explain what this blog is about.') ?></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('WordPress address (URL):') ?></th>
|
||||
<td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td>
|
||||
</tr>
|
||||
<?php _e('In a few words, explain what this blog is about.') ?></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('WordPress address (URL):') ?></th>
|
||||
<td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Blog address (URL):') ?></th>
|
||||
<td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" size="40" class="code<?php if ( defined( 'WP_HOME' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /><br /><?php _e('Enter the address here if you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different from the directory</a> you installed WordPress.'); ?></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('E-mail address:') ?> </th>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('E-mail address:') ?> </th>
|
||||
<td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" size="40" class="code" />
|
||||
<br />
|
||||
<?php _e('This address is used only for admin purposes.') ?></td>
|
||||
<?php _e('This address is used only for admin purposes.') ?></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Membership:') ?></th>
|
||||
<td> <label for="users_can_register">
|
||||
<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> />
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Membership:') ?></th>
|
||||
<td> <label for="users_can_register">
|
||||
<input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> />
|
||||
<?php _e('Anyone can register') ?></label><br />
|
||||
<label for="comment_registration">
|
||||
<input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
|
||||
<input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
|
||||
<?php _e('Users must be registered and logged in to comment') ?>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('New User Default Role:') ?></th>
|
||||
<td><label for="default_role">
|
||||
</td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('New User Default Role:') ?></th>
|
||||
<td><label for="default_role">
|
||||
<select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option('default_role') ); ?></select></label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Date and Time') ?></legend>
|
||||
<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>
|
||||
</tr>
|
||||
</table>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Date and Time') ?></legend>
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><?php _e('Times in the blog should differ by:') ?> </th>
|
||||
<td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" />
|
||||
<td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" />
|
||||
<?php _e('hours') ?> (<?php _e('Your timezone offset, for example <code>-6</code> for Central Time.'); ?>)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -76,7 +76,7 @@ include('./admin-header.php');
|
|||
<th scope="row"><?php _e('Default time format:') ?></th>
|
||||
<td><input name="time_format" type="text" id="time_format" size="30" value="<?php form_option('time_format'); ?>" /><br />
|
||||
<?php _e('Output:') ?> <strong><?php echo gmdate(get_option('time_format'), current_time('timestamp')); ?></strong></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"> </th>
|
||||
<td><?php _e('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>. Click "Update options" to update sample output.') ?> </td>
|
||||
|
@ -93,14 +93,14 @@ endfor;
|
|||
</select></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
|
||||
<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" />
|
||||
<input type="hidden" name="action" value="update" />
|
||||
<input type="hidden" name="page_options" value="<?php if ( ! defined( 'WP_SITEURL' ) ) echo 'siteurl,'; if ( ! defined( 'WP_HOME' ) ) echo 'home,'; ?>blogname,blogdescription,admin_email,users_can_register,gmt_offset,date_format,time_format,start_of_week,comment_registration,default_role" />
|
||||
<input type="hidden" name="action" value="update" />
|
||||
<input type="hidden" name="page_options" value="<?php if ( ! defined( 'WP_SITEURL' ) ) echo 'siteurl,'; if ( ! defined( 'WP_HOME' ) ) echo 'home,'; ?>blogname,blogdescription,admin_email,users_can_register,gmt_offset,date_format,time_format,start_of_week,comment_registration,default_role" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include('./admin-footer.php') ?>
|
||||
|
|
|
@ -108,9 +108,9 @@ else
|
|||
?></p></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Customize Permalink Structure') ?></h2>
|
||||
<form name="form" action="options-permalink.php" method="post">
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Customize Permalink Structure') ?></h2>
|
||||
<form name="form" action="options-permalink.php" method="post">
|
||||
<?php wp_nonce_field('update-permalink') ?>
|
||||
<p class="submit"><input type="submit" name="submit" value="<?php _e('Update Permalink Structure »') ?>" /></p>
|
||||
<p><?php _e('By default WordPress uses web <abbr title="Universal Resource Locator">URL</abbr>s which have question marks and lots of numbers in them, however WordPress offers you the ability to create a custom URL structure for your permalinks and archives. This can improve the aesthetics, usability, and forward-compatibility of your links. A <a href="http://codex.wordpress.org/Using_Permalinks">number of tags are available</a>, and here are some examples to get you started.'); ?></p>
|
||||
|
@ -130,19 +130,19 @@ $structures = array(
|
|||
<h3><?php _e('Common options:'); ?></h3>
|
||||
<p>
|
||||
<label>
|
||||
<input name="selection" type="radio" value="" class="tog" <?php checked('', $permalink_structure); ?> />
|
||||
<input name="selection" type="radio" value="" class="tog" <?php checked('', $permalink_structure); ?> />
|
||||
<?php _e('Default'); ?><br /> <span> <?php echo _c('»|Used as a list bullet'); ?> <code><?php echo get_option('home'); ?>/?p=123</code></span>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
<input name="selection" type="radio" value="<?php echo $structures[1]; ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> />
|
||||
<input name="selection" type="radio" value="<?php echo $structures[1]; ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> />
|
||||
<?php _e('Date and name based'); ?><br /> <span> <?php echo _c('»|Used as a list bullet'); ?> <code><?php echo get_option('home') . $prefix . '/' . date('Y') . '/' . date('m') . '/' . date('d') . '/sample-post/'; ?></code></span>
|
||||
</label>
|
||||
</p>
|
||||
<p>
|
||||
<label>
|
||||
<input name="selection" type="radio" value="<?php echo $structures[2]; ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> />
|
||||
<input name="selection" type="radio" value="<?php echo $structures[2]; ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> />
|
||||
<?php _e('Numeric'); ?><br /> <span> <?php echo _c('»|Used as a list bullet'); ?> <code><?php echo get_option('home') . $prefix ; ?>/archives/123</code></span>
|
||||
</label>
|
||||
</p>
|
||||
|
@ -165,16 +165,16 @@ checked="checked"
|
|||
<?php else : ?>
|
||||
<p><?php _e('If you like, you may enter custom bases for your category and tag <abbr title="Universal Resource Locator">URL</abbr>s here. For example, using <code>/topics/</code> as your category base would make your category links like <code>http://example.org/index.php/topics/uncategorized/</code>. If you leave these blank the defaults will be used.') ?></p>
|
||||
<?php endif; ?>
|
||||
<p>
|
||||
<?php _e('Category base'); ?>: <input name="category_base" id="category_base" type="text" class="code" value="<?php echo attribute_escape($category_base); ?>" size="30" />
|
||||
<p>
|
||||
<?php _e('Category base'); ?>: <input name="category_base" id="category_base" type="text" class="code" value="<?php echo attribute_escape($category_base); ?>" size="30" />
|
||||
</p>
|
||||
<p>
|
||||
<?php _e('Tag base'); ?>: <input name="tag_base" id="tag_base" type="text" class="code" value="<?php echo attribute_escape($tag_base); ?>" size="30" />
|
||||
</p>
|
||||
<p class="submit">
|
||||
<input type="submit" name="submit" value="<?php _e('Update Permalink Structure »') ?>" />
|
||||
</p>
|
||||
</form>
|
||||
<?php _e('Tag base'); ?>: <input name="tag_base" id="tag_base" type="text" class="code" value="<?php echo attribute_escape($tag_base); ?>" size="30" />
|
||||
</p>
|
||||
<p class="submit">
|
||||
<input type="submit" name="submit" value="<?php _e('Update Permalink Structure »') ?>" />
|
||||
</p>
|
||||
</form>
|
||||
<?php if ( $permalink_structure && !$usingpi && !$writable ) : ?>
|
||||
<p><?php _e('If your <code>.htaccess</code> file were <a href="http://codex.wordpress.org/Make_a_Directory_Writable">writable</a>, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your <code>.htaccess</code> file. Click in the field and press <kbd>CTRL + a</kbd> to select all.') ?></p>
|
||||
<form action="options-permalink.php" method="post">
|
||||
|
|
|
@ -7,25 +7,25 @@ $parent_file = 'options-general.php';
|
|||
include('admin-header.php');
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Reading Options') ?></h2>
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Reading Options') ?></h2>
|
||||
<form name="form1" method="post" action="options.php">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p>
|
||||
<?php if ( get_pages() ): ?>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Front Page') ?></legend>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
|
||||
<tr valign="top">
|
||||
<th width="33%" scope="row"><?php _e('Front page displays:')?></th>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Front Page') ?></legend>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
|
||||
<tr valign="top">
|
||||
<th width="33%" scope="row"><?php _e('Front page displays:')?></th>
|
||||
<td>
|
||||
<p><label>
|
||||
<input name="show_on_front" type="radio" value="posts" class="tog" <?php checked('posts', get_option('show_on_front')); ?> />
|
||||
<input name="show_on_front" type="radio" value="posts" class="tog" <?php checked('posts', get_option('show_on_front')); ?> />
|
||||
<?php _e('Your latest posts'); ?>
|
||||
</label>
|
||||
</p>
|
||||
<p><label>
|
||||
<input name="show_on_front" type="radio" value="page" class="tog" <?php checked('page', get_option('show_on_front')); ?> />
|
||||
<input name="show_on_front" type="radio" value="page" class="tog" <?php checked('page', get_option('show_on_front')); ?> />
|
||||
<?php printf(__('A <a href="%s">static page</a> (select below)'), 'edit-pages.php'); ?>
|
||||
</label>
|
||||
</p>
|
||||
|
@ -40,30 +40,30 @@ include('admin-header.php');
|
|||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<?php endif; ?>
|
||||
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Blog Pages') ?></legend>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
|
||||
<tr valign="top">
|
||||
<th width="33%" scope="row"><?php _e('Show at most:') ?></th>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Blog Pages') ?></legend>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
|
||||
<tr valign="top">
|
||||
<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') ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Syndication Feeds') ?></legend>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
|
||||
<tr valign="top">
|
||||
<th width="33%" scope="row"><?php _e('Show the most recent:') ?></th>
|
||||
<td><input name="posts_per_rss" type="text" id="posts_per_rss" value="<?php form_option('posts_per_rss'); ?>" size="3" /> <?php _e('posts') ?></td>
|
||||
<fieldset class="options">
|
||||
<legend><?php _e('Syndication Feeds') ?></legend>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
|
||||
<tr valign="top">
|
||||
<th width="33%" scope="row"><?php _e('Show the most recent:') ?></th>
|
||||
<td><input name="posts_per_rss" type="text" id="posts_per_rss" value="<?php form_option('posts_per_rss'); ?>" size="3" /> <?php _e('posts') ?></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('For each article, show:') ?> </th>
|
||||
|
@ -72,25 +72,25 @@ include('admin-header.php');
|
|||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
|
||||
<tr valign="top">
|
||||
<th width="33%" scope="row"><?php _e('Encoding for pages and feeds:') ?></th>
|
||||
<td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option('blog_charset'); ?>" size="20" class="code" /><br />
|
||||
<?php _e('The character encoding you write your blog in (UTF-8 is <a href="http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html">recommended</a>)') ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</fieldset>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
|
||||
<tr valign="top">
|
||||
<th width="33%" scope="row"><?php _e('Encoding for pages and feeds:') ?></th>
|
||||
<td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option('blog_charset'); ?>" size="20" class="code" /><br />
|
||||
<?php _e('The character encoding you write your blog in (UTF-8 is <a href="http://developer.apple.com/documentation/macos8/TextIntlSvcs/TextEncodingConversionManager/TEC1.5/TEC.b0.html">recommended</a>)') ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<label><input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_option('gzipcompression')); ?> />
|
||||
<label><input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_option('gzipcompression')); ?> />
|
||||
<?php _e('WordPress should compress articles (gzip) if browsers ask for them') ?></label>
|
||||
</p>
|
||||
<p class="submit">
|
||||
<input type="hidden" name="action" value="update" />
|
||||
<input type="hidden" name="page_options" value="posts_per_page,posts_per_rss,rss_use_excerpt,blog_charset,gzipcompression,show_on_front,page_on_front,page_for_posts" />
|
||||
<input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<input type="hidden" name="action" value="update" />
|
||||
<input type="hidden" name="page_options" value="posts_per_page,posts_per_rss,rss_use_excerpt,blog_charset,gzipcompression,show_on_front,page_on_front,page_for_posts" />
|
||||
<input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" />
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<?php include('./admin-footer.php'); ?>
|
|
@ -7,17 +7,17 @@ $parent_file = 'options-general.php';
|
|||
include('admin-header.php');
|
||||
?>
|
||||
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Writing Options') ?></h2>
|
||||
<form method="post" action="options.php">
|
||||
<div class="wrap">
|
||||
<h2><?php _e('Writing Options') ?></h2>
|
||||
<form method="post" action="options.php">
|
||||
<?php wp_nonce_field('update-options') ?>
|
||||
<p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
|
||||
<tr valign="top">
|
||||
<th width="33%" scope="row"> <?php _e('Size of the post box:') ?></th>
|
||||
<td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php form_option('default_post_edit_rows'); ?>" size="2" style="width: 1.5em; " />
|
||||
<?php _e('lines') ?></td>
|
||||
</tr>
|
||||
<table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform">
|
||||
<tr valign="top">
|
||||
<th width="33%" scope="row"> <?php _e('Size of the post box:') ?></th>
|
||||
<td><input name="default_post_edit_rows" type="text" id="default_post_edit_rows" value="<?php form_option('default_post_edit_rows'); ?>" size="2" style="width: 1.5em; " />
|
||||
<?php _e('lines') ?></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<th scope="row"><?php _e('Formatting:') ?></th>
|
||||
<td>
|
||||
|
|
|
@ -23,4 +23,4 @@ if ( current_user_can('edit_pages') ) {
|
|||
}
|
||||
?>
|
||||
|
||||
<?php include('admin-footer.php'); ?>
|
||||
<?php include('admin-footer.php'); ?>
|
||||
|
|
|
@ -139,7 +139,7 @@ case 'delete':
|
|||
if ( ! wp_delete_attachment($page_id) )
|
||||
wp_die( __('Error in deleting...') );
|
||||
} else {
|
||||
if ( !wp_delete_post($page_id) )
|
||||
if ( !wp_delete_post($page_id) )
|
||||
wp_die( __('Error in deleting...') );
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ include('edit-form-advanced.php');
|
|||
<?php
|
||||
if ($is_NS4 || $is_gecko) {
|
||||
?>
|
||||
<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), wp_specialchars(get_option('blogname'))); ?></a>
|
||||
<a href="javascript:if(navigator.userAgent.indexOf('Safari') >= 0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href='<?php echo get_option('siteurl') ?>/wp-admin/post-new.php?text='+encodeURIComponent(Q)+'&popupurl='+encodeURIComponent(location.href)+'&popuptitle='+encodeURIComponent(document.title);"><?php printf(__('Press It - %s'), wp_specialchars(get_option('blogname'))); ?></a>
|
||||
<?php
|
||||
} else if ($is_winIE) {
|
||||
?>
|
||||
|
@ -109,15 +109,15 @@ window.open ("profile.php?action=IErightclick", "oneclickbookmarklet", "width=50
|
|||
<br />
|
||||
<br />
|
||||
<?php _e('One-click bookmarklet:') ?><br />
|
||||
<a href="javascript:oneclickbookmarklet(0);"><?php _e('click here') ?></a>
|
||||
<a href="javascript:oneclickbookmarklet(0);"><?php _e('click here') ?></a>
|
||||
<?php
|
||||
} else if ($is_opera) {
|
||||
?>
|
||||
<a href="javascript:location.href='<?php echo get_option('siteurl'); ?>/wp-admin/post-new.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a>
|
||||
<a href="javascript:location.href='<?php echo get_option('siteurl'); ?>/wp-admin/post-new.php?popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a>
|
||||
<?php
|
||||
} else if ($is_macIE) {
|
||||
?>
|
||||
<a href="javascript:Q='';location.href='<?php echo get_option('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a>
|
||||
<a href="javascript:Q='';location.href='<?php echo get_option('siteurl'); ?>/wp-admin/bookmarklet.php?text='+escape(document.getSelection())+'&popupurl='+escape(location.href)+'&popuptitle='+escape(document.title);"><?php printf(__('Press it - %s'), get_option('blogname')); ?></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -154,7 +154,7 @@ case 'delete':
|
|||
if ( ! wp_delete_attachment($post_id) )
|
||||
wp_die( __('Error in deleting...') );
|
||||
} else {
|
||||
if ( !wp_delete_post($post_id) )
|
||||
if ( !wp_delete_post($post_id) )
|
||||
wp_die( __('Error in deleting...') );
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ default:
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div class="wrap">
|
||||
<div class="wrap">
|
||||
<?php
|
||||
if ( is_writeable($real_file) ) {
|
||||
echo '<h2>' . sprintf(__('Editing <code>%s</code>'), $file_show) . '</h2>';
|
||||
|
|
|
@ -36,7 +36,7 @@ switch($step) :
|
|||
?>
|
||||
<h2><?php _e('Database Upgrade Required'); ?></h2>
|
||||
<p><?php _e('Your WordPress database is out-of-date, and must be upgraded before you can continue.'); ?></p>
|
||||
<p><?php _e('The upgrade process may take a while, so please be patient.'); ?></p>
|
||||
<p><?php _e('The upgrade process may take a while, so please be patient.'); ?></p>
|
||||
<h2 class="step"><a href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress »'); ?></a></h2>
|
||||
<?php
|
||||
break;
|
||||
|
@ -47,7 +47,7 @@ switch($step) :
|
|||
$backto = __get_option('home') . '/';
|
||||
else
|
||||
$backto = clean_url(stripslashes($_GET['backto']));
|
||||
?>
|
||||
?>
|
||||
<h2><?php _e('Upgrade Complete'); ?></h2>
|
||||
<p><?php _e('Your WordPress database has been successfully upgraded!'); ?></p>
|
||||
<h2 class="step"><a href="<?php echo $backto; ?>"><?php _e('Continue »'); ?></a></h2>
|
||||
|
|
|
@ -359,7 +359,7 @@ default:
|
|||
<p><a href="users.php"><?php _e('« Back to All Users'); ?></a></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<h3><?php
|
||||
<h3><?php
|
||||
if ( 0 == $wp_user_search->first_user && $wp_user_search->total_users_for_query <= 50 )
|
||||
printf(__('%3$s shown below'), $wp_user_search->first_user + 1, min($wp_user_search->first_user + $wp_user_search->users_per_page, $wp_user_search->total_users_for_query), $wp_user_search->total_users_for_query);
|
||||
else
|
||||
|
@ -450,11 +450,11 @@ foreach ( (array) $roleclass as $user_object ) {
|
|||
|
||||
<div class="narrow">
|
||||
|
||||
<?php
|
||||
if ( get_option('users_can_register') )
|
||||
echo '<p>' . sprintf(__('Users can <a href="%1$s">register themselves</a> or you can manually create users here.'), get_option('siteurl').'/wp-register.php') . '</p>';
|
||||
else
|
||||
echo '<p>' . sprintf(__('Users cannot currently <a href="%1$s">register themselves</a>, but you can manually create users here.'), get_option('siteurl').'/wp-admin/options-general.php#users_can_register') . '</p>';
|
||||
<?php
|
||||
if ( get_option('users_can_register') )
|
||||
echo '<p>' . sprintf(__('Users can <a href="%1$s">register themselves</a> or you can manually create users here.'), get_option('siteurl').'/wp-register.php') . '</p>';
|
||||
else
|
||||
echo '<p>' . sprintf(__('Users cannot currently <a href="%1$s">register themselves</a>, but you can manually create users here.'), get_option('siteurl').'/wp-admin/options-general.php#users_can_register') . '</p>';
|
||||
?>
|
||||
<form action="#add-new-user" method="post" name="adduser" id="adduser">
|
||||
<?php wp_nonce_field('add-user') ?>
|
||||
|
|
|
@ -91,11 +91,11 @@ function wp_widgets_admin_head() {
|
|||
var elHeight = parseInt( jQuery(o).css('height') );
|
||||
var elLeft = parseInt( jQuery(o).css('left') );
|
||||
var elTop = parseInt( jQuery(o).css('top') );
|
||||
if ( screenWidth < ( parseInt(elLeft) + parseInt(elWidth) ) )
|
||||
if ( screenWidth < ( parseInt(elLeft) + parseInt(elWidth) ) )
|
||||
jQuery(o).css('left', ( screenWidth - elWidth ) + 'px' );
|
||||
if ( screenHeight < ( parseInt(elTop) + parseInt(elHeight) ) )
|
||||
if ( screenHeight < ( parseInt(elTop) + parseInt(elHeight) ) )
|
||||
jQuery(o).css('top', ( screenHeight - elHeight ) + 'px' );
|
||||
if ( elLeft < 1 )
|
||||
if ( elLeft < 1 )
|
||||
jQuery(o).css('left', '1px');
|
||||
if ( elTop < 1 )
|
||||
jQuery(o).css('top', '1px');
|
||||
|
@ -129,10 +129,10 @@ function wp_widgets_admin_head() {
|
|||
<?php endforeach; ?>
|
||||
}
|
||||
function updateAll() {
|
||||
jQuery.map(cols, function(o) {
|
||||
jQuery.map(cols, function(o) {
|
||||
if ( jQuery('#' + o + ' li').length )
|
||||
jQuery('#'+o+'placemat span.handle').hide();
|
||||
else
|
||||
else
|
||||
jQuery('#'+o+'placemat span.handle').show();
|
||||
});
|
||||
resetDroppableHeights();
|
||||
|
@ -157,7 +157,7 @@ function wp_widget_draggable( $name ) {
|
|||
|
||||
$sanitized_name = sanitize_title( $wp_registered_widgets[$name]['id'] );
|
||||
$link_title = __( 'Configure' );
|
||||
$popper = ( isset( $wp_registered_widget_controls[$name] ) )
|
||||
$popper = ( isset( $wp_registered_widget_controls[$name] ) )
|
||||
? ' <div class="popper" id="' . $sanitized_name . 'popper" title="' . $link_title . '">≡</div>'
|
||||
: '';
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ class AtomServer {
|
|||
|
||||
// authenticate regardless of the operation and set the current
|
||||
// user. each handler will decide if auth is required or not.
|
||||
$this->authenticate();
|
||||
$this->authenticate();
|
||||
$u = wp_get_current_user();
|
||||
if(!isset($u) || $u->ID == 0) {
|
||||
if ($always_authenticate) {
|
||||
|
@ -322,7 +322,7 @@ EOD;
|
|||
$post_excerpt = $parsed->summary[1];
|
||||
$pubtimes = $this->get_publish_time($entry);
|
||||
$post_date = $pubtimes[0];
|
||||
$post_date_gmt = $pubtimes[1];
|
||||
$post_date_gmt = $pubtimes[1];
|
||||
|
||||
// let's not go backwards and make something draft again.
|
||||
if(!$publish && $post_status == 'draft') {
|
||||
|
@ -721,7 +721,7 @@ EOD;
|
|||
$next_page = (($page + 1) > $last_page) ? NULL : $page + 1;
|
||||
$prev_page = ($page - 1) < 1 ? NULL : $page - 1;
|
||||
$last_page = ((int)$last_page == 1 || (int)$last_page == 0) ? NULL : (int) $last_page;
|
||||
$self_page = $page > 1 ? $page : NULL;
|
||||
$self_page = $page > 1 ? $page : NULL;
|
||||
?><feed xmlns="<?php echo $this->ATOM_NS ?>" xmlns:app="<?php echo $this->ATOMPUB_NS ?>" xml:lang="<?php echo get_option('rss_language'); ?>">
|
||||
<id><?php $this->the_entries_url() ?></id>
|
||||
<updated><?php echo mysql2date('Y-m-d\TH:i:s\Z', get_lastpostmodified('GMT')); ?></updated>
|
||||
|
@ -1122,7 +1122,7 @@ EOD;
|
|||
$match[3] == '+0000';
|
||||
|
||||
return strtotime($match[1] . " " . $match[2] . " " . $match[3]);
|
||||
}
|
||||
}
|
||||
|
||||
function get_publish_time($entry) {
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ Description: This is not just a plugin, it symbolizes the hope and enthusiasm of
|
|||
Author: Matt Mullenweg
|
||||
Version: 1.5
|
||||
Author URI: http://photomatt.net/
|
||||
*/
|
||||
*/
|
||||
|
||||
// These are the lyrics to Hello Dolly
|
||||
$lyrics = "Hello, Dolly
|
||||
|
|
|
@ -56,9 +56,9 @@ if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH
|
|||
<p><?php _e("Line and paragraph breaks automatic, e-mail address never displayed, <acronym title=\"Hypertext Markup Language\">HTML</acronym> allowed:"); ?> <code><?php echo allowed_tags(); ?></code></p>
|
||||
|
||||
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
||||
<?php if ( $user_ID ) : ?>
|
||||
<?php if ( $user_ID ) : ?>
|
||||
<p><?php printf(__('Logged in as %s.'), '<a href="'.get_option('siteurl').'/wp-admin/profile.php">'.$user_identity.'</a>'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php echo attribute_escape(__('Log out of this account')); ?>"><?php _e('Logout »'); ?></a></p>
|
||||
<?php else : ?>
|
||||
<?php else : ?>
|
||||
<p>
|
||||
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
||||
<label for="author"><?php _e("Name"); ?></label>
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
<?php /* This is commented, because it requires a little adjusting sometimes.
|
||||
You'll need to download this plugin, and follow the instructions:
|
||||
http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
|
||||
/* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
|
||||
/* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?>
|
||||
on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
|
||||
and is filed under <?php the_category(', ') ?>.
|
||||
You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed.
|
||||
You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed.
|
||||
|
||||
<?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
|
||||
// Both Comments and Pings are open ?>
|
||||
|
|
|
@ -56,9 +56,9 @@ if (!empty($post->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $pos
|
|||
<p>Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
|
||||
|
||||
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
|
||||
<?php if ( $user_ID ) : ?>
|
||||
<?php if ( $user_ID ) : ?>
|
||||
<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="Log out of this account">Logout »</a></p>
|
||||
<?php else : ?>
|
||||
<?php else : ?>
|
||||
<p>
|
||||
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
|
||||
<label for="author">Name</label>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
/*
|
||||
* atomlib.php - Atom Syndication Format PHP Library
|
||||
/*
|
||||
* atomlib.php - Atom Syndication Format PHP Library
|
||||
*
|
||||
* Project: http://code.google.com/p/phpatomlib/
|
||||
*
|
||||
* Author: Elias Torres <elias@torrez.us>
|
||||
* Version: 0.4
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
class AtomFeed {
|
||||
|
@ -165,8 +165,8 @@ class AtomParser {
|
|||
|
||||
} else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) {
|
||||
$this->in_content = array();
|
||||
$this->is_xhtml = $attrs['type'] == 'xhtml';
|
||||
$this->is_html = $attrs['type'] == 'html' || $attrs['type'] == 'text/html';
|
||||
$this->is_xhtml = $attrs['type'] == 'xhtml';
|
||||
$this->is_html = $attrs['type'] == 'html' || $attrs['type'] == 'text/html';
|
||||
$this->is_text = !in_array('type',array_keys($attrs)) || $attrs['type'] == 'text';
|
||||
$type = $this->is_xhtml ? 'XHTML' : ($this->is_html ? 'HTML' : ($this->is_text ? 'TEXT' : $attrs['type']));
|
||||
|
||||
|
@ -194,7 +194,7 @@ class AtomParser {
|
|||
if(!empty($this->in_content)) {
|
||||
# if we are ending the original content element
|
||||
# then let's finalize the content
|
||||
if($this->in_content[0][0] == $tag &&
|
||||
if($this->in_content[0][0] == $tag &&
|
||||
$this->in_content[0][1] == $this->depth) {
|
||||
$origtype = $this->in_content[0][2];
|
||||
array_shift($this->in_content);
|
||||
|
@ -276,7 +276,7 @@ class AtomParser {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($attr) {
|
||||
return array(null, $name);
|
||||
|
@ -304,8 +304,8 @@ class AtomParser {
|
|||
|
||||
function xml_escape($string)
|
||||
{
|
||||
return str_replace(array('&','"',"'",'<','>'),
|
||||
array('&','"',''','<','>'),
|
||||
return str_replace(array('&','"',"'",'<','>'),
|
||||
array('&','"',''','<','>'),
|
||||
$string );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -300,10 +300,10 @@ function the_author_posts() {
|
|||
/* the_author_posts_link() requires no get_, use get_author_posts_url() */
|
||||
function the_author_posts_link($deprecated = '') {
|
||||
global $authordata;
|
||||
printf(
|
||||
'<a href="%1$s" title="%2$s">%3$s</a>',
|
||||
get_author_posts_url( $authordata->ID, $authordata->user_nicename ),
|
||||
sprintf( __( 'Posts by %s' ), attribute_escape( get_the_author() ) ),
|
||||
printf(
|
||||
'<a href="%1$s" title="%2$s">%3$s</a>',
|
||||
get_author_posts_url( $authordata->ID, $authordata->user_nicename ),
|
||||
sprintf( __( 'Posts by %s' ), attribute_escape( get_the_author() ) ),
|
||||
get_the_author()
|
||||
);
|
||||
}
|
||||
|
@ -363,9 +363,9 @@ function get_author_name( $auth_id ) {
|
|||
function wp_list_authors($args = '') {
|
||||
global $wpdb;
|
||||
|
||||
$defaults = array(
|
||||
'optioncount' => false, 'exclude_admin' => true,
|
||||
'show_fullname' => false, 'hide_empty' => true,
|
||||
$defaults = array(
|
||||
'optioncount' => false, 'exclude_admin' => true,
|
||||
'show_fullname' => false, 'hide_empty' => true,
|
||||
'feed' => '', 'feed_image' => '', 'echo' => true
|
||||
);
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@ function wp_get_links($args = '') {
|
|||
}
|
||||
|
||||
$defaults = array(
|
||||
'category' => -1, 'before' => '',
|
||||
'after' => '<br />', 'between' => ' ',
|
||||
'show_images' => true, 'orderby' => 'name',
|
||||
'show_description' => true, 'show_rating' => false,
|
||||
'limit' => -1, 'show_updated' => true,
|
||||
'category' => -1, 'before' => '',
|
||||
'after' => '<br />', 'between' => ' ',
|
||||
'show_images' => true, 'orderby' => 'name',
|
||||
'show_description' => true, 'show_rating' => false,
|
||||
'limit' => -1, 'show_updated' => true,
|
||||
'echo' => true
|
||||
);
|
||||
|
||||
|
@ -241,8 +241,8 @@ function get_links_list($order = 'name', $hide_if_empty = 'obsolete') {
|
|||
|
||||
function _walk_bookmarks($bookmarks, $args = '' ) {
|
||||
$defaults = array(
|
||||
'show_updated' => 0, 'show_description' => 0,
|
||||
'show_images' => 1, 'before' => '<li>',
|
||||
'show_updated' => 0, 'show_description' => 0,
|
||||
'show_images' => 1, 'before' => '<li>',
|
||||
'after' => '</li>', 'between' => "\n"
|
||||
);
|
||||
|
||||
|
@ -264,8 +264,8 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
|
|||
if ( '' != $rel )
|
||||
$rel = ' rel="' . $rel . '"';
|
||||
|
||||
$desc = attribute_escape(apply_filters('link_description', $bookmark->link_description));
|
||||
$name = attribute_escape(apply_filters('link_title', $bookmark->link_name));
|
||||
$desc = attribute_escape(apply_filters('link_description', $bookmark->link_description));
|
||||
$name = attribute_escape(apply_filters('link_title', $bookmark->link_name));
|
||||
$title = $desc;
|
||||
|
||||
if ( $show_updated )
|
||||
|
@ -315,14 +315,14 @@ function _walk_bookmarks($bookmarks, $args = '' ) {
|
|||
|
||||
function wp_list_bookmarks($args = '') {
|
||||
$defaults = array(
|
||||
'orderby' => 'name', 'order' => 'ASC',
|
||||
'limit' => -1, 'category' => '',
|
||||
'category_name' => '', 'hide_invisible' => 1,
|
||||
'show_updated' => 0, 'echo' => 1,
|
||||
'categorize' => 1, 'title_li' => __('Bookmarks'),
|
||||
'title_before' => '<h2>', 'title_after' => '</h2>',
|
||||
'category_orderby' => 'name', 'category_order' => 'ASC',
|
||||
'class' => 'linkcat', 'category_before' => '<li id="%id" class="%class">',
|
||||
'orderby' => 'name', 'order' => 'ASC',
|
||||
'limit' => -1, 'category' => '',
|
||||
'category_name' => '', 'hide_invisible' => 1,
|
||||
'show_updated' => 0, 'echo' => 1,
|
||||
'categorize' => 1, 'title_li' => __('Bookmarks'),
|
||||
'title_before' => '<h2>', 'title_after' => '</h2>',
|
||||
'category_orderby' => 'name', 'category_order' => 'ASC',
|
||||
'class' => 'linkcat', 'category_before' => '<li id="%id" class="%class">',
|
||||
'category_after' => '</li>'
|
||||
);
|
||||
|
||||
|
|
|
@ -45,10 +45,10 @@ function get_bookmarks($args = '') {
|
|||
global $wpdb;
|
||||
|
||||
$defaults = array(
|
||||
'orderby' => 'name', 'order' => 'ASC',
|
||||
'limit' => -1, 'category' => '',
|
||||
'category_name' => '', 'hide_invisible' => 1,
|
||||
'show_updated' => 0, 'include' => '',
|
||||
'orderby' => 'name', 'order' => 'ASC',
|
||||
'limit' => -1, 'category' => '',
|
||||
'category_name' => '', 'hide_invisible' => 1,
|
||||
'show_updated' => 0, 'include' => '',
|
||||
'exclude' => ''
|
||||
);
|
||||
|
||||
|
@ -94,7 +94,7 @@ function get_bookmarks($args = '') {
|
|||
$exclusions .= ')';
|
||||
|
||||
if ( ! empty($category_name) ) {
|
||||
if ( $category = get_term_by('name', $category_name, 'link_category') )
|
||||
if ( $category = get_term_by('name', $category_name, 'link_category') )
|
||||
$category = $category->term_id;
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,7 @@ function sanitize_bookmark($bookmark, $context = 'display') {
|
|||
if ( $do_object )
|
||||
$bookmark->$field = sanitize_bookmark_field($field, $bookmark->$field, $bookmark->link_id, $context);
|
||||
else
|
||||
$bookmark[$field] = sanitize_bookmark_field($field, $bookmark[$field], $bookmark['link_id'], $context);
|
||||
$bookmark[$field] = sanitize_bookmark_field($field, $bookmark[$field], $bookmark['link_id'], $context);
|
||||
}
|
||||
|
||||
return $bookmark;
|
||||
|
@ -191,7 +191,7 @@ function sanitize_bookmark_field($field, $value, $bookmark_id, $context) {
|
|||
if ( 'link_target' == $field ) {
|
||||
$targets = array('_top', '_blank');
|
||||
if ( ! in_array($value, $targets) )
|
||||
$value = '';
|
||||
$value = '';
|
||||
}
|
||||
|
||||
if ( 'raw' == $context )
|
||||
|
|
|
@ -46,7 +46,7 @@ function redirect_canonical() {
|
|||
if ( $redirect_url )
|
||||
$redirect['query'] = remove_query_arg('m', $redirect['query']);
|
||||
// now moving on to non ?m=X year/month/day links
|
||||
} elseif ( is_day() && get_query_var('year') && get_query_var('monthnum') && isset($_GET['day']) ) {
|
||||
} elseif ( is_day() && get_query_var('year') && get_query_var('monthnum') && isset($_GET['day']) ) {
|
||||
if ( $redirect_url = get_day_link(get_query_var('year'), get_query_var('monthnum'), get_query_var('day')) )
|
||||
$redirect['query'] = remove_query_arg(array('year', 'monthnum', 'day'), $redirect['query']);
|
||||
} elseif ( is_month() && get_query_var('year') && isset($_GET['monthnum']) ) {
|
||||
|
|
|
@ -86,13 +86,13 @@ function _usort_terms_by_name($a, $b) {
|
|||
return strcmp($a->name, $b->name);
|
||||
}
|
||||
|
||||
function _usort_terms_by_ID($a, $b) {
|
||||
if ( $a->term_id > $b->term_id )
|
||||
return 1;
|
||||
elseif ( $a->term_id < $b->term_id )
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
function _usort_terms_by_ID($a, $b) {
|
||||
if ( $a->term_id > $b->term_id )
|
||||
return 1;
|
||||
elseif ( $a->term_id < $b->term_id )
|
||||
return -1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
function get_the_category_by_ID($cat_ID) {
|
||||
|
@ -185,12 +185,12 @@ function category_description($category = 0) {
|
|||
|
||||
function wp_dropdown_categories($args = '') {
|
||||
$defaults = array(
|
||||
'show_option_all' => '', 'show_option_none' => '',
|
||||
'orderby' => 'ID', 'order' => 'ASC',
|
||||
'show_last_update' => 0, 'show_count' => 0,
|
||||
'hide_empty' => 1, 'child_of' => 0,
|
||||
'exclude' => '', 'echo' => 1,
|
||||
'selected' => 0, 'hierarchical' => 0,
|
||||
'show_option_all' => '', 'show_option_none' => '',
|
||||
'orderby' => 'ID', 'order' => 'ASC',
|
||||
'show_last_update' => 0, 'show_count' => 0,
|
||||
'hide_empty' => 1, 'child_of' => 0,
|
||||
'exclude' => '', 'echo' => 1,
|
||||
'selected' => 0, 'hierarchical' => 0,
|
||||
'name' => 'cat', 'class' => 'postform'
|
||||
);
|
||||
|
||||
|
@ -235,12 +235,12 @@ function wp_dropdown_categories($args = '') {
|
|||
|
||||
function wp_list_categories($args = '') {
|
||||
$defaults = array(
|
||||
'show_option_all' => '', 'orderby' => 'name',
|
||||
'order' => 'ASC', 'show_last_update' => 0,
|
||||
'style' => 'list', 'show_count' => 0,
|
||||
'hide_empty' => 1, 'use_desc_for_title' => 1,
|
||||
'child_of' => 0, 'feed' => '',
|
||||
'feed_image' => '', 'exclude' => '',
|
||||
'show_option_all' => '', 'orderby' => 'name',
|
||||
'order' => 'ASC', 'show_last_update' => 0,
|
||||
'style' => 'list', 'show_count' => 0,
|
||||
'hide_empty' => 1, 'use_desc_for_title' => 1,
|
||||
'child_of' => 0, 'feed' => '',
|
||||
'feed_image' => '', 'exclude' => '',
|
||||
'hierarchical' => true, 'title_li' => __('Categories')
|
||||
);
|
||||
|
||||
|
@ -271,7 +271,7 @@ function wp_list_categories($args = '') {
|
|||
global $wp_query;
|
||||
|
||||
if( !empty($show_option_all) )
|
||||
if ('list' == $style )
|
||||
if ('list' == $style )
|
||||
$output .= '<li><a href="' . get_bloginfo('url') . '">' . $show_option_all . '</a></li>';
|
||||
else
|
||||
$output .= '<a href="' . get_bloginfo('url') . '">' . $show_option_all . '</a>';
|
||||
|
@ -295,7 +295,7 @@ function wp_list_categories($args = '') {
|
|||
|
||||
function wp_tag_cloud( $args = '' ) {
|
||||
$defaults = array(
|
||||
'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
|
||||
'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45,
|
||||
'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC',
|
||||
'exclude' => '', 'include' => ''
|
||||
);
|
||||
|
@ -417,14 +417,14 @@ function get_tag_link( $tag_id ) {
|
|||
}
|
||||
|
||||
function get_the_tags( $id = 0 ) {
|
||||
global $post;
|
||||
global $post;
|
||||
|
||||
$id = (int) $id;
|
||||
|
||||
if ( ! $id && ! in_the_loop() )
|
||||
return false; // in-the-loop function
|
||||
if ( ! $id && ! in_the_loop() )
|
||||
return false; // in-the-loop function
|
||||
|
||||
if ( !$id )
|
||||
if ( !$id )
|
||||
$id = (int) $post->ID;
|
||||
|
||||
$tags = get_object_term_cache($id, 'post_tag');
|
||||
|
@ -432,9 +432,9 @@ function get_the_tags( $id = 0 ) {
|
|||
$tags = wp_get_object_terms($id, 'post_tag');
|
||||
|
||||
$tags = apply_filters( 'get_the_tags', $tags );
|
||||
if ( empty( $tags ) )
|
||||
return false;
|
||||
return $tags;
|
||||
if ( empty( $tags ) )
|
||||
return false;
|
||||
return $tags;
|
||||
}
|
||||
|
||||
function get_the_tag_list( $before = '', $sep = '', $after = '' ) {
|
||||
|
|
|
@ -102,20 +102,20 @@ function get_cat_name($cat_id) {
|
|||
return $category->name;
|
||||
}
|
||||
|
||||
function cat_is_ancestor_of($cat1, $cat2) {
|
||||
if ( is_int($cat1) )
|
||||
$cat1 = & get_category($cat1);
|
||||
if ( is_int($cat2) )
|
||||
$cat2 = & get_category($cat2);
|
||||
function cat_is_ancestor_of($cat1, $cat2) {
|
||||
if ( is_int($cat1) )
|
||||
$cat1 = & get_category($cat1);
|
||||
if ( is_int($cat2) )
|
||||
$cat2 = & get_category($cat2);
|
||||
|
||||
if ( !$cat1->term_id || !$cat2->parent )
|
||||
return false;
|
||||
if ( !$cat1->term_id || !$cat2->parent )
|
||||
return false;
|
||||
|
||||
if ( $cat2->parent == $cat1->term_id )
|
||||
return true;
|
||||
if ( $cat2->parent == $cat1->term_id )
|
||||
return true;
|
||||
|
||||
return cat_is_ancestor_of($cat1, get_category($cat2->parent));
|
||||
}
|
||||
return cat_is_ancestor_of($cat1, get_category($cat2->parent));
|
||||
}
|
||||
|
||||
function sanitize_category($category, $context = 'display') {
|
||||
return sanitize_term($category, 'category', $context);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/*
|
||||
/*
|
||||
IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002-2005
|
||||
Version 1.7 (beta) - Simon Willison, 23rd May 2005
|
||||
Site: http://scripts.incutio.com/xmlrpc/
|
||||
|
@ -254,7 +254,7 @@ class IXR_Message {
|
|||
}
|
||||
}
|
||||
$this->_currentTagContents = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -379,7 +379,7 @@ EOD;
|
|||
'specUrl' => 'http://www.xmlrpc.com/discuss/msgReader$1208',
|
||||
'specVersion' => 1
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
function getCapabilities($args) {
|
||||
return $this->capabilities;
|
||||
|
@ -584,7 +584,7 @@ class IXR_Error {
|
|||
</struct>
|
||||
</value>
|
||||
</fault>
|
||||
</methodResponse>
|
||||
</methodResponse>
|
||||
|
||||
EOD;
|
||||
return $xml;
|
||||
|
@ -658,27 +658,27 @@ class IXR_IntrospectionServer extends IXR_Server {
|
|||
'specVersion' => 1
|
||||
);
|
||||
$this->addCallback(
|
||||
'system.methodSignature',
|
||||
'this:methodSignature',
|
||||
array('array', 'string'),
|
||||
'system.methodSignature',
|
||||
'this:methodSignature',
|
||||
array('array', 'string'),
|
||||
'Returns an array describing the return type and required parameters of a method'
|
||||
);
|
||||
$this->addCallback(
|
||||
'system.getCapabilities',
|
||||
'this:getCapabilities',
|
||||
array('struct'),
|
||||
'system.getCapabilities',
|
||||
'this:getCapabilities',
|
||||
array('struct'),
|
||||
'Returns a struct describing the XML-RPC specifications supported by this server'
|
||||
);
|
||||
$this->addCallback(
|
||||
'system.listMethods',
|
||||
'this:listMethods',
|
||||
array('array'),
|
||||
'system.listMethods',
|
||||
'this:listMethods',
|
||||
array('array'),
|
||||
'Returns an array of available methods on this server'
|
||||
);
|
||||
$this->addCallback(
|
||||
'system.methodHelp',
|
||||
'this:methodHelp',
|
||||
array('string', 'string'),
|
||||
'system.methodHelp',
|
||||
'this:methodHelp',
|
||||
array('string', 'string'),
|
||||
'Returns a documentation string for the specified method'
|
||||
);
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ class PHPMailer
|
|||
var $AltBody = "";
|
||||
|
||||
/**
|
||||
* Sets word wrapping on the body of the message to a given number of
|
||||
* Sets word wrapping on the body of the message to a given number of
|
||||
* characters.
|
||||
* @var int
|
||||
*/
|
||||
|
@ -115,8 +115,8 @@ class PHPMailer
|
|||
var $Sendmail = "/usr/sbin/sendmail";
|
||||
|
||||
/**
|
||||
* Path to PHPMailer plugins. This is now only useful if the SMTP class
|
||||
* is in a different directory than the PHP include path.
|
||||
* Path to PHPMailer plugins. This is now only useful if the SMTP class
|
||||
* is in a different directory than the PHP include path.
|
||||
* @var string
|
||||
*/
|
||||
var $PluginDir = "";
|
||||
|
@ -186,7 +186,7 @@ class PHPMailer
|
|||
var $Password = "";
|
||||
|
||||
/**
|
||||
* Sets the SMTP server timeout in seconds. This function will not
|
||||
* Sets the SMTP server timeout in seconds. This function will not
|
||||
* work with the win32 version.
|
||||
* @var int
|
||||
*/
|
||||
|
@ -199,9 +199,9 @@ class PHPMailer
|
|||
var $SMTPDebug = false;
|
||||
|
||||
/**
|
||||
* Prevents the SMTP connection from being closed after each mail
|
||||
* sending. If this is set to true then to close the connection
|
||||
* requires an explicit call to SmtpClose().
|
||||
* Prevents the SMTP connection from being closed after each mail
|
||||
* sending. If this is set to true then to close the connection
|
||||
* requires an explicit call to SmtpClose().
|
||||
* @var bool
|
||||
*/
|
||||
var $SMTPKeepAlive = false;
|
||||
|
@ -228,7 +228,7 @@ class PHPMailer
|
|||
/////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Sets message type to HTML.
|
||||
* Sets message type to HTML.
|
||||
* @param bool $bool
|
||||
* @return void
|
||||
*/
|
||||
|
@ -264,7 +264,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets Mailer to send message using the qmail MTA.
|
||||
* Sets Mailer to send message using the qmail MTA.
|
||||
* @return void
|
||||
*/
|
||||
function IsQmail() {
|
||||
|
@ -278,7 +278,7 @@ class PHPMailer
|
|||
/////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Adds a "To" address.
|
||||
* Adds a "To" address.
|
||||
* @param string $address
|
||||
* @param string $name
|
||||
* @return void
|
||||
|
@ -292,7 +292,7 @@ class PHPMailer
|
|||
/**
|
||||
* Adds a "Cc" address. Note: this function works
|
||||
* with the SMTP mailer on win32, not with the "mail"
|
||||
* mailer.
|
||||
* mailer.
|
||||
* @param string $address
|
||||
* @param string $name
|
||||
* @return void
|
||||
|
@ -306,7 +306,7 @@ class PHPMailer
|
|||
/**
|
||||
* Adds a "Bcc" address. Note: this function works
|
||||
* with the SMTP mailer on win32, not with the "mail"
|
||||
* mailer.
|
||||
* mailer.
|
||||
* @param string $address
|
||||
* @param string $name
|
||||
* @return void
|
||||
|
@ -318,7 +318,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds a "Reply-to" address.
|
||||
* Adds a "Reply-to" address.
|
||||
* @param string $address
|
||||
* @param string $name
|
||||
* @return void
|
||||
|
@ -337,7 +337,7 @@ class PHPMailer
|
|||
/**
|
||||
* Creates message and assigns Mailer. If the message is
|
||||
* not sent successfully then it returns false. Use the ErrorInfo
|
||||
* variable to view description of the error.
|
||||
* variable to view description of the error.
|
||||
* @return bool
|
||||
*/
|
||||
function Send() {
|
||||
|
@ -384,7 +384,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Sends mail using the $Sendmail program.
|
||||
* Sends mail using the $Sendmail program.
|
||||
* @access private
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -414,7 +414,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Sends mail using the PHP mail() function.
|
||||
* Sends mail using the PHP mail() function.
|
||||
* @access private
|
||||
* @return bool
|
||||
*/
|
||||
|
@ -431,7 +431,7 @@ class PHPMailer
|
|||
$old_from = ini_get("sendmail_from");
|
||||
ini_set("sendmail_from", $this->Sender);
|
||||
$params = sprintf("-oi -f %s", $this->Sender);
|
||||
$rt = @mail($to, $this->EncodeHeader($this->Subject), $body,
|
||||
$rt = @mail($to, $this->EncodeHeader($this->Subject), $body,
|
||||
$header, $params);
|
||||
}
|
||||
else
|
||||
|
@ -518,7 +518,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Initiates a connection to an SMTP server. Returns false if the
|
||||
* Initiates a connection to an SMTP server. Returns false if the
|
||||
* operation failed.
|
||||
* @access private
|
||||
* @return bool
|
||||
|
@ -529,7 +529,7 @@ class PHPMailer
|
|||
$this->smtp->do_debug = $this->SMTPDebug;
|
||||
$hosts = explode(";", $this->Host);
|
||||
$index = 0;
|
||||
$connection = ($this->smtp->Connected());
|
||||
$connection = ($this->smtp->Connected());
|
||||
|
||||
// Retry while there is no connection
|
||||
while($index < count($hosts) && $connection == false)
|
||||
|
@ -551,7 +551,7 @@ class PHPMailer
|
|||
|
||||
if($this->SMTPAuth)
|
||||
{
|
||||
if(!$this->smtp->Authenticate($this->Username,
|
||||
if(!$this->smtp->Authenticate($this->Username,
|
||||
$this->Password))
|
||||
{
|
||||
$this->SetError($this->Lang("authenticate"));
|
||||
|
@ -585,7 +585,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the language for all class error messages. Returns false
|
||||
* Sets the language for all class error messages. Returns false
|
||||
* if it cannot load the language file. The default language type
|
||||
* is English.
|
||||
* @param string $lang_type Type of language (e.g. Portuguese: "br")
|
||||
|
@ -613,7 +613,7 @@ class PHPMailer
|
|||
/////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Creates recipient headers.
|
||||
* Creates recipient headers.
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
|
@ -631,7 +631,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Formats an address correctly.
|
||||
* Formats an address correctly.
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
|
@ -640,7 +640,7 @@ class PHPMailer
|
|||
$formatted = $addr[0];
|
||||
else
|
||||
{
|
||||
$formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" .
|
||||
$formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" .
|
||||
$addr[0] . ">";
|
||||
}
|
||||
|
||||
|
@ -650,7 +650,7 @@ class PHPMailer
|
|||
/**
|
||||
* Wraps message for use with mailers that do not
|
||||
* automatically perform wrapping and for quoted-printable.
|
||||
* Original written by philippe.
|
||||
* Original written by philippe.
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
|
@ -712,7 +712,7 @@ class PHPMailer
|
|||
else
|
||||
{
|
||||
$buf_o = $buf;
|
||||
$buf .= ($e == 0) ? $word : (" " . $word);
|
||||
$buf .= ($e == 0) ? $word : (" " . $word);
|
||||
|
||||
if (strlen($buf) > $length and $buf_o != "")
|
||||
{
|
||||
|
@ -750,7 +750,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Assembles message header.
|
||||
* Assembles message header.
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
|
@ -782,7 +782,7 @@ class PHPMailer
|
|||
$from = array();
|
||||
$from[0][0] = trim($this->From);
|
||||
$from[0][1] = $this->FromName;
|
||||
$result .= $this->AddrAppend("From", $from);
|
||||
$result .= $this->AddrAppend("From", $from);
|
||||
|
||||
// sendmail and mail() extract Bcc from the header before sending
|
||||
if((($this->Mailer == "sendmail") || ($this->Mailer == "mail")) && (count($this->bcc) > 0))
|
||||
|
@ -800,14 +800,14 @@ class PHPMailer
|
|||
|
||||
if($this->ConfirmReadingTo != "")
|
||||
{
|
||||
$result .= $this->HeaderLine("Disposition-Notification-To",
|
||||
$result .= $this->HeaderLine("Disposition-Notification-To",
|
||||
"<" . trim($this->ConfirmReadingTo) . ">");
|
||||
}
|
||||
|
||||
// Add custom headers
|
||||
for($index = 0; $index < count($this->CustomHeader); $index++)
|
||||
{
|
||||
$result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]),
|
||||
$result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]),
|
||||
$this->EncodeHeader(trim($this->CustomHeader[$index][1])));
|
||||
}
|
||||
$result .= $this->HeaderLine("MIME-Version", "1.0");
|
||||
|
@ -824,8 +824,8 @@ class PHPMailer
|
|||
case "alt_attachments":
|
||||
if($this->InlineImageExists())
|
||||
{
|
||||
$result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s",
|
||||
"multipart/related", $this->LE, $this->LE,
|
||||
$result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s",
|
||||
"multipart/related", $this->LE, $this->LE,
|
||||
$this->boundary[1], $this->LE);
|
||||
}
|
||||
else
|
||||
|
@ -859,11 +859,11 @@ class PHPMailer
|
|||
switch($this->message_type)
|
||||
{
|
||||
case "alt":
|
||||
$result .= $this->GetBoundary($this->boundary[1], "",
|
||||
$result .= $this->GetBoundary($this->boundary[1], "",
|
||||
"text/plain", "");
|
||||
$result .= $this->EncodeString($this->AltBody, $this->Encoding);
|
||||
$result .= $this->LE.$this->LE;
|
||||
$result .= $this->GetBoundary($this->boundary[1], "",
|
||||
$result .= $this->GetBoundary($this->boundary[1], "",
|
||||
"text/html", "");
|
||||
|
||||
$result .= $this->EncodeString($this->Body, $this->Encoding);
|
||||
|
@ -885,18 +885,18 @@ class PHPMailer
|
|||
$result .= sprintf("--%s%s", $this->boundary[1], $this->LE);
|
||||
$result .= sprintf("Content-Type: %s;%s" .
|
||||
"\tboundary=\"%s\"%s",
|
||||
"multipart/alternative", $this->LE,
|
||||
"multipart/alternative", $this->LE,
|
||||
$this->boundary[2], $this->LE.$this->LE);
|
||||
|
||||
// Create text body
|
||||
$result .= $this->GetBoundary($this->boundary[2], "",
|
||||
$result .= $this->GetBoundary($this->boundary[2], "",
|
||||
"text/plain", "") . $this->LE;
|
||||
|
||||
$result .= $this->EncodeString($this->AltBody, $this->Encoding);
|
||||
$result .= $this->LE.$this->LE;
|
||||
|
||||
// Create the HTML body
|
||||
$result .= $this->GetBoundary($this->boundary[2], "",
|
||||
$result .= $this->GetBoundary($this->boundary[2], "",
|
||||
"text/html", "") . $this->LE;
|
||||
|
||||
$result .= $this->EncodeString($this->Body, $this->Encoding);
|
||||
|
@ -924,7 +924,7 @@ class PHPMailer
|
|||
if($encoding == "") { $encoding = $this->Encoding; }
|
||||
|
||||
$result .= $this->TextLine("--" . $boundary);
|
||||
$result .= sprintf("Content-Type: %s; charset = \"%s\"",
|
||||
$result .= sprintf("Content-Type: %s; charset = \"%s\"",
|
||||
$contentType, $charSet);
|
||||
$result .= $this->LE;
|
||||
$result .= $this->HeaderLine("Content-Transfer-Encoding", $encoding);
|
||||
|
@ -938,7 +938,7 @@ class PHPMailer
|
|||
* @access private
|
||||
*/
|
||||
function EndBoundary($boundary) {
|
||||
return $this->LE . "--" . $boundary . "--" . $this->LE;
|
||||
return $this->LE . "--" . $boundary . "--" . $this->LE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -992,7 +992,7 @@ class PHPMailer
|
|||
* @param string $type File extension (MIME) type.
|
||||
* @return bool
|
||||
*/
|
||||
function AddAttachment($path, $name = "", $encoding = "base64",
|
||||
function AddAttachment($path, $name = "", $encoding = "base64",
|
||||
$type = "application/octet-stream") {
|
||||
if(!@is_file($path))
|
||||
{
|
||||
|
@ -1051,7 +1051,7 @@ class PHPMailer
|
|||
if($disposition == "inline")
|
||||
$mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE);
|
||||
|
||||
$mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s",
|
||||
$mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s",
|
||||
$disposition, $name, $this->LE.$this->LE);
|
||||
|
||||
// Encode as string attachment
|
||||
|
@ -1063,7 +1063,7 @@ class PHPMailer
|
|||
}
|
||||
else
|
||||
{
|
||||
$mime[] = $this->EncodeFile($path, $encoding);
|
||||
$mime[] = $this->EncodeFile($path, $encoding);
|
||||
if($this->IsError()) { return ""; }
|
||||
$mime[] = $this->LE.$this->LE;
|
||||
}
|
||||
|
@ -1129,7 +1129,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Encode a header string to best of Q, B, quoted or none.
|
||||
* Encode a header string to best of Q, B, quoted or none.
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
|
@ -1182,7 +1182,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Encode string to quoted-printable.
|
||||
* Encode string to quoted-printable.
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
|
@ -1205,7 +1205,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Encode string to q encoding.
|
||||
* Encode string to q encoding.
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
|
@ -1243,7 +1243,7 @@ class PHPMailer
|
|||
* @param string $type File extension (MIME) type.
|
||||
* @return void
|
||||
*/
|
||||
function AddStringAttachment($string, $filename, $encoding = "base64",
|
||||
function AddStringAttachment($string, $filename, $encoding = "base64",
|
||||
$type = "application/octet-stream") {
|
||||
// Append to $attachment array
|
||||
$cur = count($this->attachment);
|
||||
|
@ -1258,19 +1258,19 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds an embedded attachment. This can include images, sounds, and
|
||||
* just about any other document. Make sure to set the $type to an
|
||||
* image type. For JPEG images use "image/jpeg" and for GIF images
|
||||
* Adds an embedded attachment. This can include images, sounds, and
|
||||
* just about any other document. Make sure to set the $type to an
|
||||
* image type. For JPEG images use "image/jpeg" and for GIF images
|
||||
* use "image/gif".
|
||||
* @param string $path Path to the attachment.
|
||||
* @param string $cid Content ID of the attachment. Use this to identify
|
||||
* @param string $cid Content ID of the attachment. Use this to identify
|
||||
* the Id for accessing the image in an HTML form.
|
||||
* @param string $name Overrides the attachment name.
|
||||
* @param string $encoding File encoding (see $Encoding).
|
||||
* @param string $type File extension (MIME) type.
|
||||
* @param string $type File extension (MIME) type.
|
||||
* @return bool
|
||||
*/
|
||||
function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64",
|
||||
function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64",
|
||||
$type = "application/octet-stream") {
|
||||
|
||||
if(!@is_file($path))
|
||||
|
@ -1397,7 +1397,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the proper RFC 822 formatted date.
|
||||
* Returns the proper RFC 822 formatted date.
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
|
@ -1412,8 +1412,8 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns the appropriate server variable. Should work with both
|
||||
* PHP 4.1.0+ as well as older versions. Returns an empty string
|
||||
* Returns the appropriate server variable. Should work with both
|
||||
* PHP 4.1.0+ as well as older versions. Returns an empty string
|
||||
* if nothing is found.
|
||||
* @access private
|
||||
* @return mixed
|
||||
|
@ -1475,7 +1475,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Changes every end of line from CR or LF to CRLF.
|
||||
* Changes every end of line from CR or LF to CRLF.
|
||||
* @access private
|
||||
* @return string
|
||||
*/
|
||||
|
@ -1487,7 +1487,7 @@ class PHPMailer
|
|||
}
|
||||
|
||||
/**
|
||||
* Adds a custom header.
|
||||
* Adds a custom header.
|
||||
* @return void
|
||||
*/
|
||||
function AddCustomHeader($custom_header) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* mail_fetch/setup.php
|
||||
|
|
|
@ -816,7 +816,7 @@ class Snoopy
|
|||
$cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; ";
|
||||
}
|
||||
$headers .= substr($cookie_headers,0,-2) . "\r\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!empty($this->rawheaders))
|
||||
{
|
||||
|
|
|
@ -289,7 +289,7 @@ function comments_template( $file = '/comments.php' ) {
|
|||
// TODO: Use API instead of SELECTs.
|
||||
if ( $user_ID) {
|
||||
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND (comment_approved = '1' OR ( user_id = '$user_ID' AND comment_approved = '0' ) ) ORDER BY comment_date");
|
||||
} else if ( empty($comment_author) ) {
|
||||
} else if ( empty($comment_author) ) {
|
||||
$comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date");
|
||||
} else {
|
||||
$author_db = $wpdb->escape($comment_author);
|
||||
|
|
|
@ -7,7 +7,7 @@ echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '" ?' . '>'
|
|||
xml:lang="<?php echo get_option('rss_language'); ?>"
|
||||
<?php do_action('atom_ns'); ?>
|
||||
>
|
||||
<title type="text"><?php
|
||||
<title type="text"><?php
|
||||
if ( is_singular() )
|
||||
printf(__('Comments on: %s'), get_the_title_rss());
|
||||
elseif ( is_search() )
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
header('Content-Type: text/xml;charset=' . get_option('blog_charset'), true);
|
||||
|
||||
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||
echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>';
|
||||
?>
|
||||
<!-- generator="wordpress/<?php echo $wp_version ?>" -->
|
||||
<rss version="2.0"
|
||||
<rss version="2.0"
|
||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
>
|
||||
|
|
|
@ -156,11 +156,11 @@ function get_the_category_rss($type = 'rss') {
|
|||
$filter = 'raw';
|
||||
|
||||
if ( !empty($categories) ) foreach ( (array) $categories as $category ) {
|
||||
$cat_names[] = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter);
|
||||
$cat_names[] = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter);
|
||||
}
|
||||
|
||||
if ( !empty($tags) ) foreach ( (array) $tags as $tag ) {
|
||||
$cat_names[] = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter);
|
||||
$cat_names[] = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter);
|
||||
}
|
||||
|
||||
$cat_names = array_unique($cat_names);
|
||||
|
|
|
@ -17,7 +17,7 @@ function wptexturize($text) {
|
|||
$cockneyreplace = array("’tain’t","’twere","’twas","’tis","’twill","’til","’bout","’nuff","’round","’cause");
|
||||
}
|
||||
|
||||
$static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney);
|
||||
$static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney);
|
||||
$static_replacements = array_merge(array('—', ' — ', '–', 'xn--', '…', '“', '’s', '”', ' ™'), $cockneyreplace);
|
||||
|
||||
$dynamic_characters = array('/\'(\d\d(?:’|\')?s)/', '/(\s|\A|")\'/', '/(\d+)"/', '/(\d+)\'/', '/(\S)\'([^\'\s])/', '/(\s|\A)"(?!\s)/', '/"(\s|\S|\Z)/', '/\'([\s.]|\Z)/', '/(\d+)x(\d+)/');
|
||||
|
@ -131,7 +131,7 @@ function utf8_uri_encode( $utf8_string, $length = 0 ) {
|
|||
|
||||
if ( $value < 128 ) {
|
||||
if ( $length && ( strlen($unicode) + 1 > $length ) )
|
||||
break;
|
||||
break;
|
||||
$unicode .= chr($value);
|
||||
} else {
|
||||
if ( count( $values ) == 0 ) $num_octets = ( $value < 224 ) ? 2 : 3;
|
||||
|
@ -650,13 +650,13 @@ function convert_smilies($text) {
|
|||
if (get_option('use_smilies')) {
|
||||
// HTML loop taken from texturize function, could possible be consolidated
|
||||
$textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between
|
||||
$stop = count($textarr);// loop stuff
|
||||
for ($i = 0; $i < $stop; $i++) {
|
||||
$content = $textarr[$i];
|
||||
if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag
|
||||
$content = preg_replace($wp_smiliessearch, $wp_smiliesreplace, $content);
|
||||
}
|
||||
$output .= $content;
|
||||
$stop = count($textarr);// loop stuff
|
||||
for ($i = 0; $i < $stop; $i++) {
|
||||
$content = $textarr[$i];
|
||||
if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag
|
||||
$content = preg_replace($wp_smiliessearch, $wp_smiliesreplace, $content);
|
||||
}
|
||||
$output .= $content;
|
||||
}
|
||||
} else {
|
||||
// return default text.
|
||||
|
@ -1085,7 +1085,7 @@ function clean_url( $url, $protocols = null ) {
|
|||
$url = str_replace($strip, '', $url);
|
||||
$url = str_replace(';//', '://', $url);
|
||||
/* If the URL doesn't appear to contain a scheme, we
|
||||
* presume it needs http:// appended (unless a relative
|
||||
* presume it needs http:// appended (unless a relative
|
||||
* link starting with / or a php file).
|
||||
*/
|
||||
if ( strpos($url, ':') === false &&
|
||||
|
@ -1094,7 +1094,7 @@ function clean_url( $url, $protocols = null ) {
|
|||
|
||||
$url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url);
|
||||
if ( !is_array($protocols) )
|
||||
$protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet');
|
||||
$protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet');
|
||||
if ( wp_kses_bad_protocol( $url, $protocols ) != $url )
|
||||
return '';
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@ function mysql2date($dateformatstring, $mysqlstring, $translate = true) {
|
|||
if ( empty($m) ) {
|
||||
return false;
|
||||
}
|
||||
$i = mktime(
|
||||
(int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ),
|
||||
(int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 )
|
||||
$i = mktime(
|
||||
(int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ),
|
||||
(int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 )
|
||||
);
|
||||
|
||||
if( 'U' == $dateformatstring )
|
||||
|
@ -182,9 +182,9 @@ function get_option($setting) {
|
|||
global $wpdb;
|
||||
|
||||
// Allow plugins to short-circuit options.
|
||||
$pre = apply_filters( 'pre_option_' . $setting, false );
|
||||
if ( false !== $pre )
|
||||
return $pre;
|
||||
$pre = apply_filters( 'pre_option_' . $setting, false );
|
||||
if ( false !== $pre )
|
||||
return $pre;
|
||||
|
||||
// prevent non-existent options from triggering multiple queries
|
||||
$notoptions = wp_cache_get('notoptions', 'options');
|
||||
|
@ -1203,7 +1203,7 @@ function wp_die( $message, $title = '' ) {
|
|||
<title><?php echo $title ?></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install.css" type="text/css" />
|
||||
<?php
|
||||
<?php
|
||||
if ( ( $wp_locale ) && ('rtl' == $wp_locale->text_direction) ) : ?>
|
||||
<link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install-rtl.css" type="text/css" />
|
||||
<?php endif; ?>
|
||||
|
@ -1220,13 +1220,13 @@ if ( ( $wp_locale ) && ('rtl' == $wp_locale->text_direction) ) : ?>
|
|||
}
|
||||
|
||||
function _config_wp_home($url = '') {
|
||||
if ( defined( 'WP_HOME' ) )
|
||||
if ( defined( 'WP_HOME' ) )
|
||||
return WP_HOME;
|
||||
else return $url;
|
||||
}
|
||||
|
||||
function _config_wp_siteurl($url = '') {
|
||||
if ( defined( 'WP_SITEURL' ) )
|
||||
if ( defined( 'WP_SITEURL' ) )
|
||||
return WP_SITEURL;
|
||||
else return $url;
|
||||
}
|
||||
|
|
|
@ -64,9 +64,9 @@ function bloginfo($show='') {
|
|||
}
|
||||
|
||||
/**
|
||||
* Note: some of these values are DEPRECATED. Meaning they could be
|
||||
* taken out at any time and shouldn't be relied upon. Options
|
||||
* without "// DEPRECATED" are the preferred and recommended ways
|
||||
* Note: some of these values are DEPRECATED. Meaning they could be
|
||||
* taken out at any time and shouldn't be relied upon. Options
|
||||
* without "// DEPRECATED" are the preferred and recommended ways
|
||||
* to get the information.
|
||||
*/
|
||||
function get_bloginfo($show = '', $filter = 'raw') {
|
||||
|
@ -341,8 +341,8 @@ function wp_get_archives($args = '') {
|
|||
global $wpdb, $wp_locale;
|
||||
|
||||
$defaults = array(
|
||||
'type' => 'monthly', 'limit' => '',
|
||||
'format' => 'html', 'before' => '',
|
||||
'type' => 'monthly', 'limit' => '',
|
||||
'format' => 'html', 'before' => '',
|
||||
'after' => '', 'show_post_count' => false
|
||||
);
|
||||
|
||||
|
@ -390,7 +390,7 @@ function wp_get_archives($args = '') {
|
|||
foreach ( $arcresults as $arcresult ) {
|
||||
$url = get_month_link($arcresult->year, $arcresult->month);
|
||||
$text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year);
|
||||
if ( $show_post_count )
|
||||
if ( $show_post_count )
|
||||
$after = ' ('.$arcresult->posts.')' . $afterafter;
|
||||
echo get_archives_link($url, $text, $format, $before, $after);
|
||||
}
|
||||
|
@ -836,8 +836,8 @@ function user_can_richedit() {
|
|||
global $wp_rich_edit, $pagenow;
|
||||
|
||||
if ( !isset( $wp_rich_edit) ) {
|
||||
if ( get_user_option( 'rich_editing' ) == 'true' &&
|
||||
( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) ||
|
||||
if ( get_user_option( 'rich_editing' ) == 'true' &&
|
||||
( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) ||
|
||||
!preg_match( '!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT'] ) )
|
||||
&& 'comment.php' != $pagenow ) {
|
||||
$wp_rich_edit = true;
|
||||
|
@ -901,7 +901,7 @@ function the_editor($content, $id = 'content', $prev_id = 'title') {
|
|||
var startPos = myField.selectionStart;
|
||||
var endPos = myField.selectionEnd;
|
||||
myField.value = myField.value.substring(0, startPos)
|
||||
+ myValue
|
||||
+ myValue
|
||||
+ myField.value.substring(endPos, myField.value.length);
|
||||
myField.focus();
|
||||
myField.selectionStart = startPos + myValue.length;
|
||||
|
@ -987,7 +987,7 @@ function language_attributes() {
|
|||
}
|
||||
|
||||
function paginate_links( $args = '' ) {
|
||||
$defaults = array(
|
||||
$defaults = array(
|
||||
'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below)
|
||||
'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number
|
||||
'total' => 1,
|
||||
|
@ -1072,7 +1072,7 @@ function wp_admin_css_uri( $file = 'wp-admin' ) {
|
|||
$_file = add_query_arg( 'version', get_bloginfo( 'version' ), "./$file.css" );
|
||||
} else {
|
||||
$_file = add_query_arg( 'version', get_bloginfo( 'version' ), get_option( 'siteurl' ) . "/wp-admin/$file.css" );
|
||||
}
|
||||
}
|
||||
return apply_filters( 'wp_admin_css_uri', $_file, $file );
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
|
|||
#keys .right { text-align: left; }
|
||||
td b { font-family: Tahoma, "Times New Roman", Times, serif }
|
||||
</style>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<script type="text/javascript">
|
||||
window.onkeydown = window.onkeypress = function (e) {
|
||||
e = e ? e : window.event;
|
||||
|
|
|
@ -19,181 +19,181 @@ if (!defined('CUSTOM_TAGS'))
|
|||
// You can override this in your my-hacks.php file
|
||||
if (!CUSTOM_TAGS) {
|
||||
$allowedposttags = array(
|
||||
'address' => array(),
|
||||
'address' => array(),
|
||||
'a' => array(
|
||||
'href' => array(), 'title' => array(),
|
||||
'rel' => array(), 'rev' => array(),
|
||||
'href' => array(), 'title' => array(),
|
||||
'rel' => array(), 'rev' => array(),
|
||||
'name' => array()
|
||||
),
|
||||
),
|
||||
'abbr' => array(
|
||||
'title' => array(), 'class' => array()
|
||||
),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array()
|
||||
),
|
||||
'b' => array(),
|
||||
'big' => array(),
|
||||
),
|
||||
'b' => array(),
|
||||
'big' => array(),
|
||||
'blockquote' => array(
|
||||
'cite' => array(), 'xml:lang' => array(),
|
||||
'cite' => array(), 'xml:lang' => array(),
|
||||
'lang' => array()
|
||||
),
|
||||
'br' => array(),
|
||||
),
|
||||
'br' => array(),
|
||||
'button' => array(
|
||||
'disabled' => array(), 'name' => array(),
|
||||
'disabled' => array(), 'name' => array(),
|
||||
'type' => array(), 'value' => array()
|
||||
),
|
||||
),
|
||||
'caption' => array(
|
||||
'align' => array()
|
||||
),
|
||||
'code' => array(),
|
||||
),
|
||||
'code' => array(),
|
||||
'col' => array(
|
||||
'align' => array(), 'char' => array(),
|
||||
'charoff' => array(), 'span' => array(),
|
||||
'align' => array(), 'char' => array(),
|
||||
'charoff' => array(), 'span' => array(),
|
||||
'valign' => array(), 'width' => array()
|
||||
),
|
||||
),
|
||||
'del' => array(
|
||||
'datetime' => array()
|
||||
),
|
||||
'dd' => array(),
|
||||
),
|
||||
'dd' => array(),
|
||||
'div' => array(
|
||||
'align' => array(), 'xml:lang' => array(),
|
||||
'align' => array(), 'xml:lang' => array(),
|
||||
'lang' => array()
|
||||
),
|
||||
'dl' => array(),
|
||||
'dt' => array(),
|
||||
'em' => array(),
|
||||
'fieldset' => array(),
|
||||
),
|
||||
'dl' => array(),
|
||||
'dt' => array(),
|
||||
'em' => array(),
|
||||
'fieldset' => array(),
|
||||
'font' => array(
|
||||
'color' => array(), 'face' => array(),
|
||||
'color' => array(), 'face' => array(),
|
||||
'size' => array()
|
||||
),
|
||||
),
|
||||
'form' => array(
|
||||
'action' => array(), 'accept' => array(),
|
||||
'accept-charset' => array(), 'enctype' => array(),
|
||||
'method' => array(), 'name' => array(),
|
||||
'action' => array(), 'accept' => array(),
|
||||
'accept-charset' => array(), 'enctype' => array(),
|
||||
'method' => array(), 'name' => array(),
|
||||
'target' => array()
|
||||
),
|
||||
),
|
||||
'h1' => array(
|
||||
'align' => array()
|
||||
),
|
||||
),
|
||||
'h2' => array(
|
||||
'align' => array()
|
||||
),
|
||||
),
|
||||
'h3' => array(
|
||||
'align' => array()
|
||||
),
|
||||
),
|
||||
'h4' => array(
|
||||
'align' => array()
|
||||
),
|
||||
),
|
||||
'h5' => array(
|
||||
'align' => array()
|
||||
),
|
||||
),
|
||||
'h6' => array(
|
||||
'align' => array()
|
||||
),
|
||||
),
|
||||
'hr' => array(
|
||||
'align' => array(), 'noshade' => array(),
|
||||
'align' => array(), 'noshade' => array(),
|
||||
'size' => array(), 'width' => array()
|
||||
),
|
||||
'i' => array(),
|
||||
),
|
||||
'i' => array(),
|
||||
'img' => array(
|
||||
'alt' => array(), 'align' => array(),
|
||||
'border' => array(), 'height' => array(),
|
||||
'hspace' => array(), 'longdesc' => array(),
|
||||
'vspace' => array(), 'src' => array(),
|
||||
'alt' => array(), 'align' => array(),
|
||||
'border' => array(), 'height' => array(),
|
||||
'hspace' => array(), 'longdesc' => array(),
|
||||
'vspace' => array(), 'src' => array(),
|
||||
'width' => array()
|
||||
),
|
||||
),
|
||||
'ins' => array(
|
||||
'datetime' => array(), 'cite' => array()
|
||||
),
|
||||
'kbd' => array(),
|
||||
),
|
||||
'kbd' => array(),
|
||||
'label' => array(
|
||||
'for' => array()
|
||||
),
|
||||
),
|
||||
'legend' => array(
|
||||
'align' => array()
|
||||
),
|
||||
'li' => array(),
|
||||
),
|
||||
'li' => array(),
|
||||
'p' => array(
|
||||
'align' => array(), 'xml:lang' => array(),
|
||||
'align' => array(), 'xml:lang' => array(),
|
||||
'lang' => array()
|
||||
),
|
||||
),
|
||||
'pre' => array(
|
||||
'width' => array()
|
||||
),
|
||||
),
|
||||
'q' => array(
|
||||
'cite' => array()
|
||||
),
|
||||
's' => array(),
|
||||
'strike' => array(),
|
||||
'strong' => array(),
|
||||
'sub' => array(),
|
||||
'sup' => array(),
|
||||
),
|
||||
's' => array(),
|
||||
'strike' => array(),
|
||||
'strong' => array(),
|
||||
'sub' => array(),
|
||||
'sup' => array(),
|
||||
'table' => array(
|
||||
'align' => array(), 'bgcolor' => array(),
|
||||
'border' => array(), 'cellpadding' => array(),
|
||||
'cellspacing' => array(), 'rules' => array(),
|
||||
'align' => array(), 'bgcolor' => array(),
|
||||
'border' => array(), 'cellpadding' => array(),
|
||||
'cellspacing' => array(), 'rules' => array(),
|
||||
'summary' => array(), 'width' => array()
|
||||
),
|
||||
),
|
||||
'tbody' => array(
|
||||
'align' => array(), 'char' => array(),
|
||||
'align' => array(), 'char' => array(),
|
||||
'charoff' => array(), 'valign' => array()
|
||||
),
|
||||
),
|
||||
'td' => array(
|
||||
'abbr' => array(), 'align' => array(),
|
||||
'axis' => array(), 'bgcolor' => array(),
|
||||
'char' => array(), 'charoff' => array(),
|
||||
'colspan' => array(), 'headers' => array(),
|
||||
'height' => array(), 'nowrap' => array(),
|
||||
'rowspan' => array(), 'scope' => array(),
|
||||
'abbr' => array(), 'align' => array(),
|
||||
'axis' => array(), 'bgcolor' => array(),
|
||||
'char' => array(), 'charoff' => array(),
|
||||
'colspan' => array(), 'headers' => array(),
|
||||
'height' => array(), 'nowrap' => array(),
|
||||
'rowspan' => array(), 'scope' => array(),
|
||||
'valign' => array(), 'width' => array()
|
||||
),
|
||||
),
|
||||
'textarea' => array(
|
||||
'cols' => array(), 'rows' => array(),
|
||||
'disabled' => array(), 'name' => array(),
|
||||
'cols' => array(), 'rows' => array(),
|
||||
'disabled' => array(), 'name' => array(),
|
||||
'readonly' => array()
|
||||
),
|
||||
),
|
||||
'tfoot' => array(
|
||||
'align' => array(), 'char' => array(),
|
||||
'align' => array(), 'char' => array(),
|
||||
'charoff' => array(), 'valign' => array()
|
||||
),
|
||||
),
|
||||
'th' => array(
|
||||
'abbr' => array(), 'align' => array(),
|
||||
'axis' => array(), 'bgcolor' => array(),
|
||||
'char' => array(), 'charoff' => array(),
|
||||
'colspan' => array(), 'headers' => array(),
|
||||
'height' => array(), 'nowrap' => array(),
|
||||
'rowspan' => array(), 'scope' => array(),
|
||||
'abbr' => array(), 'align' => array(),
|
||||
'axis' => array(), 'bgcolor' => array(),
|
||||
'char' => array(), 'charoff' => array(),
|
||||
'colspan' => array(), 'headers' => array(),
|
||||
'height' => array(), 'nowrap' => array(),
|
||||
'rowspan' => array(), 'scope' => array(),
|
||||
'valign' => array(), 'width' => array()
|
||||
),
|
||||
),
|
||||
'thead' => array(
|
||||
'align' => array(), 'char' => array(),
|
||||
'align' => array(), 'char' => array(),
|
||||
'charoff' => array(), 'valign' => array()
|
||||
),
|
||||
'title' => array(),
|
||||
),
|
||||
'title' => array(),
|
||||
'tr' => array(
|
||||
'align' => array(), 'bgcolor' => array(),
|
||||
'char' => array(), 'charoff' => array(),
|
||||
'align' => array(), 'bgcolor' => array(),
|
||||
'char' => array(), 'charoff' => array(),
|
||||
'valign' => array()
|
||||
),
|
||||
'tt' => array(),
|
||||
'u' => array(),
|
||||
'ul' => array(),
|
||||
'ol' => array(),
|
||||
),
|
||||
'tt' => array(),
|
||||
'u' => array(),
|
||||
'ul' => array(),
|
||||
'ol' => array(),
|
||||
'var' => array()
|
||||
);
|
||||
|
||||
$allowedtags = array(
|
||||
'a' => array(
|
||||
'href' => array(), 'title' => array()
|
||||
),
|
||||
),
|
||||
'abbr' => array(
|
||||
'title' => array()
|
||||
),
|
||||
),
|
||||
'acronym' => array(
|
||||
'title' => array()
|
||||
),
|
||||
'b' => array(),
|
||||
),
|
||||
'b' => array(),
|
||||
'blockquote' => array(
|
||||
'cite' => array()
|
||||
),
|
||||
|
@ -203,14 +203,14 @@ if (!CUSTOM_TAGS) {
|
|||
// 'dd' => array(),
|
||||
// 'dl' => array(),
|
||||
// 'dt' => array(),
|
||||
'em' => array(),
|
||||
'em' => array(),
|
||||
'i' => array(),
|
||||
// 'ins' => array('datetime' => array(), 'cite' => array()),
|
||||
// 'li' => array(),
|
||||
// 'ol' => array(),
|
||||
// 'p' => array(),
|
||||
// 'q' => array(),
|
||||
'strike' => array(),
|
||||
'strike' => array(),
|
||||
'strong' => array(),
|
||||
// 'sub' => array(),
|
||||
// 'sup' => array(),
|
||||
|
|
|
@ -90,14 +90,14 @@ class WP_Locale {
|
|||
// Numbers formatting
|
||||
// See http://php.net/number_format
|
||||
|
||||
$trans = __('number_format_decimals');
|
||||
$trans = __('number_format_decimals');
|
||||
$this->number_format['decimals'] = ('number_format_decimals' == $trans) ? 0 : $trans;
|
||||
|
||||
$trans = __('number_format_decimal_point');
|
||||
$this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans;
|
||||
|
||||
$trans = __('number_format_thousands_sep');
|
||||
$this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans;
|
||||
$trans = __('number_format_thousands_sep');
|
||||
$this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans;
|
||||
|
||||
// Import global locale vars set during inclusion of $locale.php.
|
||||
foreach ( $this->locale_vars as $var ) {
|
||||
|
|
|
@ -174,7 +174,7 @@ function wp_mail( $to, $subject, $message, $headers = '' ) {
|
|||
if ( empty( $headers ) ) {
|
||||
$headers = array();
|
||||
} elseif ( !is_array( $headers ) ) {
|
||||
// Explode the headers out, so this function can take both
|
||||
// Explode the headers out, so this function can take both
|
||||
// string headers and an array of headers.
|
||||
$tempheaders = (array) explode( "\n", $headers );
|
||||
$headers = array();
|
||||
|
@ -396,7 +396,7 @@ function wp_redirect($location, $status = 302) {
|
|||
$location = apply_filters('wp_redirect', $location, $status);
|
||||
|
||||
if ( !$location ) // allows the wp_redirect filter to cancel a redirect
|
||||
return false;
|
||||
return false;
|
||||
|
||||
$location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location);
|
||||
$location = wp_kses_no_null($location);
|
||||
|
@ -558,7 +558,7 @@ function wp_notify_moderator($comment_id) {
|
|||
global $wpdb;
|
||||
|
||||
if( get_option( "moderation_notify" ) == 0 )
|
||||
return true;
|
||||
return true;
|
||||
|
||||
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
|
||||
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
/**
|
||||
* Hooks a function to a specific filter action.
|
||||
*
|
||||
*
|
||||
* Filters are the hooks that WordPress launches to modify text of various types
|
||||
* before adding it to the database or sending it to the browser screen. Plugins
|
||||
* can specify that one or more of its PHP functions is executed to
|
||||
* before adding it to the database or sending it to the browser screen. Plugins
|
||||
* can specify that one or more of its PHP functions is executed to
|
||||
* modify specific types of text at these times, using the Filter API.
|
||||
* See the [Plugin API] for a list of filter hooks.
|
||||
* See the [Plugin API] for a list of filter hooks.
|
||||
*
|
||||
* @param string $tag The name of the filter to hook the <tt>$function_to_add</tt> to.
|
||||
* @param callback $function_to_add The name of the function to be called when the filter is applied.
|
||||
|
@ -28,7 +28,7 @@ function add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1)
|
|||
|
||||
/**
|
||||
* Call the functions added to a filter hook.
|
||||
*
|
||||
*
|
||||
* The callback functions attached to filter hook <tt>$tag</tt> are invoked by
|
||||
* calling this function. This function can be used to create a new filter hook
|
||||
* by simply calling this function with the name of the new hook specified using
|
||||
|
@ -66,9 +66,9 @@ function apply_filters($tag, $string) {
|
|||
|
||||
/**
|
||||
* Merge the filter functions of a specific filter hook with generic filter functions.
|
||||
*
|
||||
* It is possible to defined generic filter functions using the filter hook
|
||||
* <em>all</e>. These functions are called for every filter tag. This function
|
||||
*
|
||||
* It is possible to defined generic filter functions using the filter hook
|
||||
* <em>all</e>. These functions are called for every filter tag. This function
|
||||
* merges the functions attached to the <em>all</em> hook with the functions
|
||||
* of a specific hoook defined by <tt>$tag</tt>.
|
||||
* @param string $tag The filter hook of which the functions should be merged.
|
||||
|
@ -87,10 +87,10 @@ function merge_filters($tag) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Removes a function from a specified filter hook.
|
||||
*
|
||||
* This function removes a function attached to a specified filter hook. This
|
||||
* method can be used to remove default functions attached to a specific filter
|
||||
* Removes a function from a specified filter hook.
|
||||
*
|
||||
* This function removes a function attached to a specified filter hook. This
|
||||
* method can be used to remove default functions attached to a specific filter
|
||||
* hook and possibly replace them with a substitute.
|
||||
* @param string $tag The filter hook to which the function to be removed is hooked.
|
||||
* @param callback $function_to_remove The name of the function which should be removed.
|
||||
|
@ -111,16 +111,16 @@ function remove_filter($tag, $function_to_remove, $priority = 10, $accepted_args
|
|||
|
||||
/**
|
||||
* Hooks a function on to a specific action.
|
||||
*
|
||||
* Actions are the hooks that the WordPress core launches at specific points
|
||||
*
|
||||
* Actions are the hooks that the WordPress core launches at specific points
|
||||
* during execution, or when specific events occur. Plugins can specify that
|
||||
* one or more of its PHP functions are executed at these points, using the
|
||||
* one or more of its PHP functions are executed at these points, using the
|
||||
* Action API.
|
||||
*
|
||||
*
|
||||
* @param string $tag The name of the action to which the <tt>$function_to-add</tt> is hooked.
|
||||
* @param callback $function_to_add The name of the function you wish to be called. Note: any of the syntaxes explained in the PHP documentation for the 'callback' type (http://us2.php.net/manual/en/language.pseudo-types.php#language.types.callback) are valid.
|
||||
* @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action.
|
||||
* @param int $accepted_args optional. The number of arguments the function accept (default 1). In WordPress 1.5.1+, hooked functions can take extra arguments that are set when the matching do_action() or apply_filters() call is run.
|
||||
* @param int $accepted_args optional. The number of arguments the function accept (default 1). In WordPress 1.5.1+, hooked functions can take extra arguments that are set when the matching do_action() or apply_filters() call is run.
|
||||
* @return boolean Always true.
|
||||
*/
|
||||
function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) {
|
||||
|
@ -129,13 +129,13 @@ function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1)
|
|||
|
||||
/**
|
||||
* Execute functions hooked on a specific action hook.
|
||||
*
|
||||
*
|
||||
* This function invokes all functions attached to action hook <tt>$tag</tt>.
|
||||
* It is possible to create new action hooks by simply calling this function,
|
||||
* specifying the name of the new hook using the <tt>$tag</tt> parameter.
|
||||
* @uses merge_filters
|
||||
* @param string $tag The name of the action to be executed.
|
||||
* @param mixed $arg,... Optional additional arguments which are passed on to the functions hooked to the action.
|
||||
* @param mixed $arg,... Optional additional arguments which are passed on to the functions hooked to the action.
|
||||
*/
|
||||
function do_action($tag, $arg = '') {
|
||||
global $wp_filter, $wp_actions;
|
||||
|
@ -183,8 +183,8 @@ function did_action($tag) {
|
|||
|
||||
/**
|
||||
* Execute functions hooked on a specific action hook, specifying arguments in a array.
|
||||
*
|
||||
* This function is identical to {@link do_action}, but the argumetns passe to
|
||||
*
|
||||
* This function is identical to {@link do_action}, but the argumetns passe to
|
||||
* the functions hooked to <tt>$tag</tt> are supplied using an array.
|
||||
* @param string $tag The name of the action to be executed.
|
||||
* @param array $args The arguments supplied to the functions hooked to <tt>$tag</tt>
|
||||
|
@ -212,10 +212,10 @@ function do_action_ref_array($tag, $args) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Removes a function from a specified action hook.
|
||||
*
|
||||
* This function removes a function attached to a specified action hook. This
|
||||
* method can be used to remove default functions attached to a specific filter
|
||||
* Removes a function from a specified action hook.
|
||||
*
|
||||
* This function removes a function attached to a specified action hook. This
|
||||
* method can be used to remove default functions attached to a specific filter
|
||||
* hook and possibly replace them with a substitute.
|
||||
* @param string $tag The action hook to which the function to be removed is hooked.
|
||||
* @param callback $function_to_remove The name of the function which should be removed.
|
||||
|
@ -233,7 +233,7 @@ function remove_action($tag, $function_to_remove, $priority = 10, $accepted_args
|
|||
|
||||
/**
|
||||
* Gets the basename of a plugin.
|
||||
*
|
||||
*
|
||||
* This method extract the name of a plugin from its filename.
|
||||
* @param string $file The filename of plugin.
|
||||
* @return string The name of a plugin.
|
||||
|
@ -247,14 +247,14 @@ function plugin_basename($file) {
|
|||
|
||||
/**
|
||||
* Hook a function on a plugin activation action hook.
|
||||
*
|
||||
*
|
||||
* When a plugin is activated, the action 'activate_PLUGINNAME' hook is
|
||||
* activated. In the name of this hook, PLUGINNAME is replaced with the name of
|
||||
* the plugin, including the optional subdirectory. For example, when the plugin
|
||||
* is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the
|
||||
* name of this hook will become 'activate_sampleplugin/sample.php'.
|
||||
* When the plugin consists of only one file and is (as by default) located at
|
||||
* <tt>wp-content/plugin/sample.php</tt> the name of this hook will be
|
||||
* is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the
|
||||
* name of this hook will become 'activate_sampleplugin/sample.php'.
|
||||
* When the plugin consists of only one file and is (as by default) located at
|
||||
* <tt>wp-content/plugin/sample.php</tt> the name of this hook will be
|
||||
* 'activate_sample.php'.
|
||||
* @param string $file The filename of the plugin including the path.
|
||||
* @param string $function the function hooked to the 'activate_PLUGIN' action.
|
||||
|
@ -266,14 +266,14 @@ function register_activation_hook($file, $function) {
|
|||
|
||||
/**
|
||||
* Hook a function on a plugin deactivation action hook.
|
||||
*
|
||||
*
|
||||
* When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is
|
||||
* deactivated. In the name of this hook, PLUGINNAME is replaced with the name of
|
||||
* the plugin, including the optional subdirectory. For example, when the plugin
|
||||
* is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the
|
||||
* name of this hook will become 'activate_sampleplugin/sample.php'.
|
||||
* When the plugin consists of only one file and is (as by default) located at
|
||||
* <tt>wp-content/plugin/sample.php</tt> the name of this hook will be
|
||||
* is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the
|
||||
* name of this hook will become 'activate_sampleplugin/sample.php'.
|
||||
* When the plugin consists of only one file and is (as by default) located at
|
||||
* <tt>wp-content/plugin/sample.php</tt> the name of this hook will be
|
||||
* 'activate_sample.php'.
|
||||
* @param string $file The filename of the plugin including the path.
|
||||
* @param string $function the function hooked to the 'activate_PLUGIN' action.
|
||||
|
|
|
@ -139,9 +139,9 @@ function has_excerpt( $id = 0 ) {
|
|||
|
||||
function wp_link_pages($args = '') {
|
||||
$defaults = array(
|
||||
'before' => '<p>' . __('Pages:'), 'after' => '</p>',
|
||||
'next_or_number' => 'number', 'nextpagelink' => __('Next page'),
|
||||
'previouspagelink' => __('Previous page'), 'pagelink' => '%',
|
||||
'before' => '<p>' . __('Pages:'), 'after' => '</p>',
|
||||
'next_or_number' => 'number', 'nextpagelink' => __('Next page'),
|
||||
'previouspagelink' => __('Previous page'), 'pagelink' => '%',
|
||||
'more_file' => '', 'echo' => 1
|
||||
);
|
||||
|
||||
|
@ -253,8 +253,8 @@ function the_meta() {
|
|||
|
||||
function wp_dropdown_pages($args = '') {
|
||||
$defaults = array(
|
||||
'depth' => 0, 'child_of' => 0,
|
||||
'selected' => 0, 'echo' => 1,
|
||||
'depth' => 0, 'child_of' => 0,
|
||||
'selected' => 0, 'echo' => 1,
|
||||
'name' => 'page_id', 'show_option_none' => ''
|
||||
);
|
||||
|
||||
|
@ -282,10 +282,10 @@ function wp_dropdown_pages($args = '') {
|
|||
|
||||
function wp_list_pages($args = '') {
|
||||
$defaults = array(
|
||||
'depth' => 0, 'show_date' => '',
|
||||
'date_format' => get_option('date_format'),
|
||||
'child_of' => 0, 'exclude' => '',
|
||||
'title_li' => __('Pages'), 'echo' => 1,
|
||||
'depth' => 0, 'show_date' => '',
|
||||
'date_format' => get_option('date_format'),
|
||||
'child_of' => 0, 'exclude' => '',
|
||||
'title_li' => __('Pages'), 'echo' => 1,
|
||||
'authors' => '', 'sort_column' => 'menu_order, post_title'
|
||||
);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ function &get_children($args = '', $output = OBJECT) {
|
|||
}
|
||||
|
||||
$defaults = array(
|
||||
'numberposts' => -1, 'post_type' => '',
|
||||
'numberposts' => -1, 'post_type' => '',
|
||||
'post_status' => '', 'post_parent' => 0
|
||||
);
|
||||
|
||||
|
@ -194,11 +194,11 @@ function get_posts($args) {
|
|||
global $wpdb;
|
||||
|
||||
$defaults = array(
|
||||
'numberposts' => 5, 'offset' => 0,
|
||||
'category' => 0, 'orderby' => 'post_date',
|
||||
'order' => 'DESC', 'include' => '',
|
||||
'exclude' => '', 'meta_key' => '',
|
||||
'meta_value' =>'', 'post_type' => 'post',
|
||||
'numberposts' => 5, 'offset' => 0,
|
||||
'category' => 0, 'orderby' => 'post_date',
|
||||
'order' => 'DESC', 'include' => '',
|
||||
'exclude' => '', 'meta_key' => '',
|
||||
'meta_value' =>'', 'post_type' => 'post',
|
||||
'post_status' => 'publish', 'post_parent' => 0
|
||||
);
|
||||
|
||||
|
@ -248,7 +248,7 @@ function get_posts($args) {
|
|||
$exclusions .= ')';
|
||||
|
||||
$query = "SELECT DISTINCT * FROM $wpdb->posts ";
|
||||
$query .= empty( $category ) ? '' : ", $wpdb->term_relationships, $wpdb->term_taxonomy ";
|
||||
$query .= empty( $category ) ? '' : ", $wpdb->term_relationships, $wpdb->term_taxonomy ";
|
||||
$query .= empty( $meta_key ) ? '' : ", $wpdb->postmeta ";
|
||||
$query .= " WHERE 1=1 ";
|
||||
$query .= empty( $post_type ) ? '' : "AND post_type = '$post_type' ";
|
||||
|
@ -439,7 +439,7 @@ function sanitize_post($post, $context = 'display') {
|
|||
if ( $do_object )
|
||||
$post->$field = sanitize_post_field($field, $post->$field, $post->ID, $context);
|
||||
else
|
||||
$post[$field] = sanitize_post_field($field, $post[$field], $post['ID'], $context);
|
||||
$post[$field] = sanitize_post_field($field, $post[$field], $post['ID'], $context);
|
||||
}
|
||||
|
||||
return $post;
|
||||
|
@ -1114,10 +1114,10 @@ function &get_pages($args = '') {
|
|||
global $wpdb;
|
||||
|
||||
$defaults = array(
|
||||
'child_of' => 0, 'sort_order' => 'ASC',
|
||||
'sort_column' => 'post_title', 'hierarchical' => 1,
|
||||
'exclude' => '', 'include' => '',
|
||||
'meta_key' => '', 'meta_value' => '',
|
||||
'child_of' => 0, 'sort_order' => 'ASC',
|
||||
'sort_column' => 'post_title', 'hierarchical' => 1,
|
||||
'exclude' => '', 'include' => '',
|
||||
'meta_key' => '', 'meta_value' => '',
|
||||
'authors' => ''
|
||||
);
|
||||
|
||||
|
@ -1131,7 +1131,7 @@ function &get_pages($args = '') {
|
|||
|
||||
$inclusions = '';
|
||||
if ( !empty($include) ) {
|
||||
$child_of = 0; //ignore child_of, exclude, meta_key, and meta_value params if using include
|
||||
$child_of = 0; //ignore child_of, exclude, meta_key, and meta_value params if using include
|
||||
$exclude = '';
|
||||
$meta_key = '';
|
||||
$meta_value = '';
|
||||
|
@ -1160,7 +1160,7 @@ function &get_pages($args = '') {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!empty($exclusions))
|
||||
if (!empty($exclusions))
|
||||
$exclusions .= ')';
|
||||
|
||||
$author_query = '';
|
||||
|
@ -1190,7 +1190,7 @@ function &get_pages($args = '') {
|
|||
}
|
||||
|
||||
$query = "SELECT * FROM $wpdb->posts " ;
|
||||
$query .= ( empty( $meta_key ) ? "" : ", $wpdb->postmeta " ) ;
|
||||
$query .= ( empty( $meta_key ) ? "" : ", $wpdb->postmeta " ) ;
|
||||
$query .= " WHERE (post_type = 'page' AND post_status = 'publish') $exclusions $inclusions " ;
|
||||
$query .= ( empty( $meta_key ) | empty($meta_value) ? "" : " AND ($wpdb->posts.ID = $wpdb->postmeta.post_id AND $wpdb->postmeta.meta_key = '$meta_key' AND $wpdb->postmeta.meta_value = '$meta_value' )" ) ;
|
||||
$query .= $author_query;
|
||||
|
@ -1621,7 +1621,7 @@ function wp_check_for_changed_slugs($post_id) {
|
|||
* SQL code that can be added to a WHERE clause; this SQL is constructed
|
||||
* to allow all published posts, and all private posts to which the user
|
||||
* has access.
|
||||
*
|
||||
*
|
||||
* @param string $post_type currently only supports 'post' or 'page'.
|
||||
* @return string SQL code that can be added to a where clause.
|
||||
*/
|
||||
|
|
|
@ -275,18 +275,18 @@ function the_post() {
|
|||
}
|
||||
|
||||
/*
|
||||
* Comments loop.
|
||||
*/
|
||||
* Comments loop.
|
||||
*/
|
||||
|
||||
function have_comments() {
|
||||
global $wp_query;
|
||||
return $wp_query->have_comments();
|
||||
}
|
||||
function have_comments() {
|
||||
global $wp_query;
|
||||
return $wp_query->have_comments();
|
||||
}
|
||||
|
||||
function the_comment() {
|
||||
global $wp_query;
|
||||
return $wp_query->the_comment();
|
||||
}
|
||||
function the_comment() {
|
||||
global $wp_query;
|
||||
return $wp_query->the_comment();
|
||||
}
|
||||
|
||||
/*
|
||||
* WP_Query
|
||||
|
@ -565,7 +565,7 @@ class WP_Query {
|
|||
$qv['category__in'] = array();
|
||||
} else {
|
||||
$qv['category__in'] = array_map('intval', $qv['category__in']);
|
||||
$this->is_category = true;
|
||||
$this->is_category = true;
|
||||
}
|
||||
|
||||
if ( !is_array($qv['category___not_in']) || empty($qv['category__not_in']) ) {
|
||||
|
@ -578,7 +578,7 @@ class WP_Query {
|
|||
$qv['category__and'] = array();
|
||||
} else {
|
||||
$qv['category__and'] = array_map('intval', $qv['category__and']);
|
||||
$this->is_category = true;
|
||||
$this->is_category = true;
|
||||
}
|
||||
|
||||
if ( '' != $qv['tag'] )
|
||||
|
@ -592,7 +592,7 @@ class WP_Query {
|
|||
$qv['tag__in'] = array();
|
||||
} else {
|
||||
$qv['tag__in'] = array_map('intval', $qv['tag__in']);
|
||||
$this->is_tag = true;
|
||||
$this->is_tag = true;
|
||||
}
|
||||
|
||||
if ( !is_array($qv['tag___not_in']) || empty($qv['tag__not_in']) ) {
|
||||
|
@ -605,21 +605,21 @@ class WP_Query {
|
|||
$qv['tag__and'] = array();
|
||||
} else {
|
||||
$qv['tag__and'] = array_map('intval', $qv['tag__and']);
|
||||
$this->is_category = true;
|
||||
$this->is_category = true;
|
||||
}
|
||||
|
||||
if ( !is_array($qv['tag_slug__in']) || empty($qv['tag_slug__in']) ) {
|
||||
$qv['tag_slug__in'] = array();
|
||||
} else {
|
||||
$qv['tag_slug__in'] = array_map('sanitize_title', $qv['tag_slug__in']);
|
||||
$this->is_tag = true;
|
||||
$this->is_tag = true;
|
||||
}
|
||||
|
||||
if ( !is_array($qv['tag_slug__and']) || empty($qv['tag_slug__amd']) ) {
|
||||
$qv['tag_slug__and'] = array();
|
||||
} else {
|
||||
$qv['tag_slug__and'] = array_map('sanitize_title', $qv['tag_slug__and']);
|
||||
$this->is_tag = true;
|
||||
$this->is_tag = true;
|
||||
}
|
||||
|
||||
if ( empty($qv['author']) || ($qv['author'] == '0') ) {
|
||||
|
@ -902,7 +902,7 @@ class WP_Query {
|
|||
$search .= "{$searchand}((post_title LIKE '{$n}{$term}{$n}') OR (post_content LIKE '{$n}{$term}{$n}'))";
|
||||
$searchand = ' AND ';
|
||||
}
|
||||
$term = addslashes_gpc($q['s']);
|
||||
$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}')";
|
||||
|
||||
|
@ -1224,7 +1224,7 @@ class WP_Query {
|
|||
}
|
||||
|
||||
// Apply post-paging filters on where and join. Only plugins that
|
||||
// manipulate paging queries should use these hooks.
|
||||
// manipulate paging queries should use these hooks.
|
||||
|
||||
// Announce current selection parameters. For use by caching plugins.
|
||||
do_action( 'posts_selection', $where . $groupby . $q['orderby'] . $limits . $join );
|
||||
|
|
|
@ -834,9 +834,9 @@ function wp_rss( $url, $num_items = -1 ) {
|
|||
|
||||
foreach ( $rss->items as $item ) {
|
||||
printf(
|
||||
'<li><a href="%1$s" title="%2$s">%3$s</a></li>',
|
||||
clean_url( $item['link'] ),
|
||||
attribute_escape( strip_tags( $item['description'] ) ),
|
||||
'<li><a href="%1$s" title="%2$s">%3$s</a></li>',
|
||||
clean_url( $item['link'] ),
|
||||
attribute_escape( strip_tags( $item['description'] ) ),
|
||||
htmlentities( $item['title'] )
|
||||
);
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ class FileReader {
|
|||
|
||||
}
|
||||
|
||||
// Preloads entire file in memory first, then creates a StringReader
|
||||
// Preloads entire file in memory first, then creates a StringReader
|
||||
// over it (it assumes knowledge of StringReader internals)
|
||||
class CachedFileReader extends StringReader {
|
||||
function CachedFileReader($filename) {
|
||||
|
|
|
@ -18,7 +18,7 @@ $wp_taxonomies['link_category'] = (object) array('name' => 'link_category', 'obj
|
|||
* It appears that this function can be used to find all of the names inside of
|
||||
* $wp_taxonomies global variable.
|
||||
*
|
||||
* @example
|
||||
* @example
|
||||
* <?php $taxonomies = get_object_taxonomies('post'); ?>
|
||||
* Should result in <pre>Array(
|
||||
* 'category',
|
||||
|
@ -85,7 +85,7 @@ function get_taxonomy( $taxonomy ) {
|
|||
function is_taxonomy( $taxonomy ) {
|
||||
global $wp_taxonomies;
|
||||
|
||||
return isset($wp_taxonomies[$taxonomy]);
|
||||
return isset($wp_taxonomies[$taxonomy]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -115,7 +115,7 @@ function is_taxonomy_hierarchical($taxonomy) {
|
|||
* register_taxonomy() - Create or modify a taxonomy object.
|
||||
*
|
||||
* A simple function for creating or modifying a taxonomy object based on the parameters given.
|
||||
* The function will accept an array (third optional parameter), along with strings for the
|
||||
* The function will accept an array (third optional parameter), along with strings for the
|
||||
* taxonomy name and another string for the object type.
|
||||
*
|
||||
* The function keeps a default set, allowing for the $args to be optional but allow the other
|
||||
|
@ -163,7 +163,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
|
|||
* The $terms aren't checked the same as $taxonomies, but still need to exist for $object_ids to
|
||||
* be returned.
|
||||
*
|
||||
* It is possible to change the order that object_ids is returned by either using PHP sort family
|
||||
* It is possible to change the order that object_ids is returned by either using PHP sort family
|
||||
* functions or using the database by using $args with either ASC or DESC array. The value should
|
||||
* be in the key named 'order'.
|
||||
*
|
||||
|
@ -213,9 +213,9 @@ function get_objects_in_term( $terms, $taxonomies, $args = array() ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* get_term() -
|
||||
* get_term() -
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package Taxonomy
|
||||
* @subpackage Term
|
||||
|
@ -265,16 +265,16 @@ function &get_term($term, $taxonomy, $output = OBJECT, $filter = 'raw') {
|
|||
}
|
||||
|
||||
/**
|
||||
* get_term_by() -
|
||||
* get_term_by() -
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @package Taxonomy
|
||||
* @subpackage Term
|
||||
* @global object $wpdb Database Query
|
||||
* @param string $field
|
||||
* @param string $value
|
||||
* @param string $taxonomy
|
||||
* @param string $field
|
||||
* @param string $value
|
||||
* @param string $taxonomy
|
||||
* @param string $output Either OBJECT, ARRAY_A, or ARRAY_N
|
||||
* @return mixed Term Row from database
|
||||
*
|
||||
|
@ -574,7 +574,7 @@ function sanitize_term($term, $taxonomy, $context = 'display') {
|
|||
if ( $do_object )
|
||||
$term->$field = sanitize_term_field($field, $term->$field, $term->term_id, $taxonomy, $context);
|
||||
else
|
||||
$term[$field] = sanitize_term_field($field, $term[$field], $term['term_id'], $taxonomy, $context);
|
||||
$term[$field] = sanitize_term_field($field, $term[$field], $term['term_id'], $taxonomy, $context);
|
||||
}
|
||||
|
||||
return $term;
|
||||
|
@ -700,7 +700,7 @@ function wp_delete_term( $term, $taxonomy, $args = array() ) {
|
|||
* Returns the terms associated with the given object(s), in the supplied taxonomies.
|
||||
* @param int|array $object_id The id of the object(s)) to retrieve for.
|
||||
* @param string|array $taxonomies The taxonomies to retrieve terms from.
|
||||
* @return array The requested term data.
|
||||
* @return array The requested term data.
|
||||
*/
|
||||
function wp_get_object_terms($object_ids, $taxonomies, $args = array()) {
|
||||
global $wpdb;
|
||||
|
@ -777,7 +777,7 @@ function wp_insert_term( $term, $taxonomy, $args = array() ) {
|
|||
if ( empty($slug) )
|
||||
$slug = sanitize_title($name);
|
||||
|
||||
$term_group = 0;
|
||||
$term_group = 0;
|
||||
if ( $alias_of ) {
|
||||
$alias = $wpdb->fetch_row("SELECT term_id, term_group FROM $wpdb->terms WHERE slug = '$alias_of'");
|
||||
if ( $alias->term_group ) {
|
||||
|
@ -1003,7 +1003,7 @@ function clean_term_cache($ids, $taxonomy = '') {
|
|||
$taxonomies = array($taxonomy);
|
||||
}
|
||||
|
||||
foreach ( $taxonomies as $taxonomy ) {
|
||||
foreach ( $taxonomies as $taxonomy ) {
|
||||
wp_cache_delete('all_ids', $taxonomy);
|
||||
wp_cache_delete('get', $taxonomy);
|
||||
delete_option("{$taxonomy}_children");
|
||||
|
|
|
@ -72,7 +72,7 @@ function get_theme_data( $theme_file ) {
|
|||
);
|
||||
|
||||
$theme_data = implode( '', file( $theme_file ) );
|
||||
$theme_data = str_replace ( '\r', '\n', $theme_data );
|
||||
$theme_data = str_replace ( '\r', '\n', $theme_data );
|
||||
preg_match( '|Theme Name:(.*)$|mi', $theme_data, $theme_name );
|
||||
preg_match( '|Theme URI:(.*)$|mi', $theme_data, $theme_uri );
|
||||
preg_match( '|Description:(.*)$|mi', $theme_data, $description );
|
||||
|
@ -209,7 +209,7 @@ function get_themes() {
|
|||
if ( !file_exists("$theme_root/$template/index.php") ) {
|
||||
$parent_dir = dirname(dirname($theme_file));
|
||||
if ( file_exists("$theme_root/$parent_dir/$template/index.php") ) {
|
||||
$template = "$parent_dir/$template";
|
||||
$template = "$parent_dir/$template";
|
||||
} else {
|
||||
$wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.'));
|
||||
continue;
|
||||
|
|
|
@ -12,9 +12,9 @@ function wp_version_check() {
|
|||
$current = get_option( 'update_core' );
|
||||
$locale = get_locale();
|
||||
|
||||
if (
|
||||
isset( $current->last_checked ) &&
|
||||
43200 > ( time() - $current->last_checked ) &&
|
||||
if (
|
||||
isset( $current->last_checked ) &&
|
||||
43200 > ( time() - $current->last_checked ) &&
|
||||
$current->version_checked == $wp_version
|
||||
)
|
||||
return false;
|
||||
|
|
|
@ -375,7 +375,7 @@ function wp_widget_pages_control() {
|
|||
$exclude = attribute_escape( $options['exclude'] );
|
||||
?>
|
||||
<p><label for="pages-title"><?php _e('Title:'); ?> <input style="width: 250px;" id="pages-title" name="pages-title" type="text" value="<?php echo $title; ?>" /></label></p>
|
||||
<p><label for="pages-sortby"><?php _e( 'Sort by:' ); ?>
|
||||
<p><label for="pages-sortby"><?php _e( 'Sort by:' ); ?>
|
||||
<select name="pages-sortby" id="pages-sortby">
|
||||
<option value="post_title"<?php selected( $options['sortby'], 'post_title' ); ?>><?php _e('Page title'); ?></option>
|
||||
<option value="menu_order"<?php selected( $options['sortby'], 'menu_order' ); ?>><?php _e('Page order'); ?></option>
|
||||
|
@ -390,8 +390,8 @@ function wp_widget_pages_control() {
|
|||
function wp_widget_links($args) {
|
||||
extract($args, EXTR_SKIP);
|
||||
wp_list_bookmarks(array(
|
||||
'title_before' => $before_title, 'title_after' => $after_title,
|
||||
'category_before' => $before_widget, 'category_after' => $after_widget,
|
||||
'title_before' => $before_title, 'title_after' => $after_title,
|
||||
'category_before' => $before_widget, 'category_after' => $after_widget,
|
||||
'show_images' => true, 'class' => 'linkcat widget'
|
||||
));
|
||||
}
|
||||
|
@ -417,14 +417,14 @@ function wp_widget_archives($args) {
|
|||
$d = $options['dropdown'] ? '1' : '0';
|
||||
$title = empty($options['title']) ? __('Archives') : $options['title'];
|
||||
|
||||
echo $before_widget;
|
||||
echo $before_widget;
|
||||
echo $before_title . $title . $after_title;
|
||||
|
||||
if($d) {
|
||||
if($d) {
|
||||
?>
|
||||
<select name="archive-dropdown" onChange='document.location.href=this.options[this.selectedIndex].value;'> <option value=""><?php echo attribute_escape(__('Select Month')); ?></option> <?php wp_get_archives("type=monthly&format=option&show_post_count=$c"); ?> </select>
|
||||
<?php
|
||||
} else {
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<ul>
|
||||
<?php wp_get_archives("type=monthly&show_post_count=$c"); ?>
|
||||
|
@ -432,7 +432,7 @@ function wp_widget_archives($args) {
|
|||
<?php
|
||||
}
|
||||
|
||||
echo $after_widget;
|
||||
echo $after_widget;
|
||||
}
|
||||
|
||||
function wp_widget_archives_control() {
|
||||
|
@ -614,7 +614,7 @@ function wp_widget_categories($args, $number = 1) {
|
|||
$title = empty($options[$number]['title']) ? __('Categories') : $options[$number]['title'];
|
||||
|
||||
echo $before_widget;
|
||||
echo $before_title . $title . $after_title;
|
||||
echo $before_title . $title . $after_title;
|
||||
|
||||
$cat_args = "orderby=name&show_count={$c}&hierarchical={$h}";
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ class wpdb {
|
|||
}
|
||||
|
||||
function __destruct() {
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -214,7 +214,7 @@ case 'register' :
|
|||
require_once( ABSPATH . WPINC . '/registration.php');
|
||||
|
||||
$user_login = sanitize_user( $_POST['user_login'] );
|
||||
$user_email = apply_filters( 'user_registration_email', $_POST['user_email'] );
|
||||
$user_email = apply_filters( 'user_registration_email', $_POST['user_email'] );
|
||||
|
||||
// Check the username
|
||||
if ( $user_login == '' )
|
||||
|
|
|
@ -11,14 +11,14 @@ function wp_unregister_GLOBALS() {
|
|||
$noUnset = array('GLOBALS', '_GET', '_POST', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES', 'table_prefix');
|
||||
|
||||
$input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array());
|
||||
foreach ( $input as $k => $v )
|
||||
foreach ( $input as $k => $v )
|
||||
if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) ) {
|
||||
$GLOBALS[$k] = NULL;
|
||||
unset($GLOBALS[$k]);
|
||||
}
|
||||
}
|
||||
|
||||
wp_unregister_GLOBALS();
|
||||
wp_unregister_GLOBALS();
|
||||
|
||||
unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories );
|
||||
|
||||
|
@ -158,7 +158,7 @@ require_once (ABSPATH . WPINC . '/l10n.php');
|
|||
|
||||
if ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === false && !defined('WP_INSTALLING')) ) {
|
||||
if ( defined('WP_SITEURL') )
|
||||
$link = WP_SITEURL . '/wp-admin/install.php';
|
||||
$link = WP_SITEURL . '/wp-admin/install.php';
|
||||
elseif (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false)
|
||||
$link = preg_replace('|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php';
|
||||
else
|
||||
|
@ -199,7 +199,7 @@ require (ABSPATH . WPINC . '/canonical.php');
|
|||
if (strpos($_SERVER['PHP_SELF'], 'install.php') === false) {
|
||||
// Used to guarantee unique hash cookies
|
||||
$cookiehash = md5(get_option('siteurl'));
|
||||
define('COOKIEHASH', $cookiehash);
|
||||
define('COOKIEHASH', $cookiehash);
|
||||
}
|
||||
|
||||
if ( !defined('USER_COOKIE') )
|
||||
|
|
10
xmlrpc.php
10
xmlrpc.php
|
@ -5,7 +5,7 @@ define('XMLRPC_REQUEST', true);
|
|||
// Some browser-embedded clients send cookies. We don't want them.
|
||||
$_COOKIE = array();
|
||||
|
||||
// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
|
||||
// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
|
||||
// but we can do it ourself.
|
||||
if ( !isset( $HTTP_RAW_POST_DATA ) ) {
|
||||
$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
|
||||
|
@ -17,7 +17,7 @@ if ( isset($HTTP_RAW_POST_DATA) )
|
|||
|
||||
include('./wp-config.php');
|
||||
|
||||
if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd
|
||||
if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd
|
||||
header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);
|
||||
|
||||
?>
|
||||
|
@ -723,7 +723,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
fclose($f);
|
||||
|
||||
/* so it is actually editable with a windows/mac client */
|
||||
// FIXME: (or delete me) do we really want to cater to bad clients at the expense of good ones by BEEPing up their line breaks? commented. $content = str_replace("\n", "\r\n", $content);
|
||||
// FIXME: (or delete me) do we really want to cater to bad clients at the expense of good ones by BEEPing up their line breaks? commented. $content = str_replace("\n", "\r\n", $content);
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
@ -1028,7 +1028,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
switch($content_struct['mt_allow_pings']) {
|
||||
case "closed":
|
||||
$ping_status = "closed";
|
||||
break;
|
||||
break;
|
||||
case "open":
|
||||
$ping_status = "open";
|
||||
break;
|
||||
|
@ -1238,7 +1238,7 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||
switch($content_struct["mt_allow_pings"]) {
|
||||
case "closed":
|
||||
$ping_status = "closed";
|
||||
break;
|
||||
break;
|
||||
case "open":
|
||||
$ping_status = "open";
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue