Changeset 6026
- Timestamp:
- 09/03/2007 11:32:58 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 84 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-footer.php
r5955 r6026 1 1 2 2 <div id="footer"> 3 <p><?php 3 <p><?php 4 4 5 5 $upgrade = apply_filters( 'update_footer', '' ); 6 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; 6 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; 7 7 8 8 ?></p> -
trunk/wp-admin/admin-header.php
r5965 r6026 18 18 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" /> 19 19 <title><?php bloginfo('name') ?> › <?php echo wp_specialchars( strip_tags( $title ) ); ?> — WordPress</title> 20 <?php wp_admin_css(); ?> 20 <?php wp_admin_css(); ?> 21 21 <script type="text/javascript"> 22 22 //<![CDATA[ -
trunk/wp-admin/categories.php
r5654 r6026 61 61 62 62 if ( wp_update_category($_POST) ) 63 wp_redirect('categories.php?message=3'); 63 wp_redirect('categories.php?message=3'); 64 64 else 65 wp_redirect('categories.php?message=5'); 65 wp_redirect('categories.php?message=5'); 66 66 67 67 exit; -
trunk/wp-admin/edit-category-form.php
r5529 r6026 35 35 <tr> 36 36 <th scope="row" valign="top"><label for="category_parent"><?php _e('Category parent:') ?></label></th> 37 <td> 37 <td> 38 38 <?php wp_dropdown_categories('hide_empty=0&name=category_parent&orderby=name&selected=' . $category->parent . '&hierarchical=1&show_option_none=' . __('None')); ?> 39 39 </td> -
trunk/wp-admin/edit-comments.php
r5909 r6026 40 40 <div class="wrap"> 41 41 <h2><?php _e('Comments'); ?></h2> 42 <form name="searchform" action="" method="get" id="editcomments"> 43 <fieldset> 44 <legend><?php _e('Show Comments That Contain...') ?></legend> 45 <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo attribute_escape($_GET['s']); ?>" size="17" /> 46 <input type="submit" name="submit" value="<?php _e('Search') ?>" /> 42 <form name="searchform" action="" method="get" id="editcomments"> 43 <fieldset> 44 <legend><?php _e('Show Comments That Contain...') ?></legend> 45 <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo attribute_escape($_GET['s']); ?>" size="17" /> 46 <input type="submit" name="submit" value="<?php _e('Search') ?>" /> 47 47 <input type="hidden" name="mode" value="<?php echo $mode; ?>" /> 48 48 <?php _e('(Searches within comment text, e-mail, URL, and IP address.)') ?> 49 </fieldset> 49 </fieldset> 50 50 </form> 51 51 <p><a href="?mode=view"><?php _e('View Mode') ?></a> | <a href="?mode=edit"><?php _e('Mass Edit Mode') ?></a></p> … … 89 89 90 90 $page_links = paginate_links( array( 91 'base' => add_query_arg( 'apage', '%#%' ), 91 'base' => add_query_arg( 'apage', '%#%' ), 92 92 'format' => '', 93 93 'total' => ceil($total / 20), … … 177 177 } ?></td> 178 178 </tr> 179 <?php 179 <?php 180 180 } // end foreach 181 181 ?></table> -
trunk/wp-admin/edit-form-advanced.php
r5786 r6026 85 85 <label for="comment_status" class="selectit"> 86 86 <input name="comment_status" type="checkbox" id="comment_status" value="open" <?php checked($post->comment_status, 'open'); ?> /> 87 <?php _e('Allow Comments') ?></label> 87 <?php _e('Allow Comments') ?></label> 88 88 <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> 89 89 </div> … … 91 91 92 92 <fieldset id="passworddiv" class="dbx-box"> 93 <h3 class="dbx-handle"><?php _e('Post Password') ?></h3> 93 <h3 class="dbx-handle"><?php _e('Post Password') ?></h3> 94 94 <div class="dbx-content"><input name="post_password" type="text" size="13" id="post_password" value="<?php echo attribute_escape( $post->post_password ); ?>" /></div> 95 95 </fieldset> 96 96 97 97 <fieldset id="slugdiv" class="dbx-box"> 98 <h3 class="dbx-handle"><?php _e('Post Slug') ?></h3> 98 <h3 class="dbx-handle"><?php _e('Post Slug') ?></h3> 99 99 <div class="dbx-content"><input name="post_name" type="text" size="13" id="post_name" value="<?php echo attribute_escape( $post->post_name ); ?>" /></div> 100 100 </fieldset> 101 101 102 102 <fieldset id="poststatusdiv" class="dbx-box"> 103 <h3 class="dbx-handle"><?php _e('Post Status') ?></h3> 103 <h3 class="dbx-handle"><?php _e('Post Status') ?></h3> 104 104 <div class="dbx-content"> 105 105 <?php if ( current_user_can('publish_posts') ) : ?> … … 118 118 <?php endif; ?> 119 119 120 <?php 120 <?php 121 121 $authors = get_editable_user_ids( $current_user->id ); // TODO: ROLE SYSTEM 122 122 if ( $authors && count( $authors ) > 1 ) : … … 164 164 <span id="autosave"></span> 165 165 <?php echo $saveasdraft; ?> 166 <input type="submit" name="submit" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" /> 167 <?php 166 <input type="submit" name="submit" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" /> 167 <?php 168 168 if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) { 169 169 ?> 170 170 <?php if ( current_user_can('publish_posts') ) : ?> 171 <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 171 <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Publish') ?>" /> 172 172 <?php else : ?> 173 <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" /> 174 <?php endif; ?> 175 <?php 176 } 177 ?> 178 <input name="referredby" type="hidden" id="referredby" value="<?php 173 <input name="publish" type="submit" id="publish" tabindex="5" accesskey="p" value="<?php _e('Submit for Review') ?>" /> 174 <?php endif; ?> 175 <?php 176 } 177 ?> 178 <input name="referredby" type="hidden" id="referredby" value="<?php 179 179 if ( !empty($_REQUEST['popupurl']) ) 180 180 echo clean_url(stripslashes($_REQUEST['popupurl'])); -
trunk/wp-admin/edit-form-comment.php
r6003 r6026 55 55 <tr> 56 56 <th scope="row" valign="top"><?php _e('Comment Status') ?>:</th> 57 <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> 58 <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> 57 <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> 58 <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> 59 59 <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> 60 60 </tr> … … 69 69 <tr> 70 70 <th scope="row" valign="top"> </th> 71 <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;\""; ?> /> 71 <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;\""; ?> /> 72 72 <input type="hidden" name="c" value="<?php echo $comment->comment_ID ?>" /> 73 73 <input type="hidden" name="p" value="<?php echo $comment->comment_post_ID ?>" /> -
trunk/wp-admin/edit-form.php
r5543 r6026 21 21 <div id="poststuff"> 22 22 <fieldset id="titlediv"> 23 <legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend> 23 <legend><a href="http://wordpress.org/docs/reference/post/#title" title="<?php _e('Help on titles') ?>"><?php _e('Title') ?></a></legend> 24 24 <div><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" /></div> 25 25 </fieldset> 26 26 27 27 <fieldset id="categorydiv"> 28 <legend><a href="http://wordpress.org/docs/reference/post/#category" title="<?php _e('Help on categories') ?>"><?php _e('Categories') ?></a></legend> 28 <legend><a href="http://wordpress.org/docs/reference/post/#category" title="<?php _e('Help on categories') ?>"><?php _e('Categories') ?></a></legend> 29 29 <div><?php dropdown_categories($post->post_category); ?></div> 30 30 </fieldset> -
trunk/wp-admin/edit-pages.php
r5963 r6026 72 72 if ($posts) { 73 73 ?> 74 <table class="widefat"> 74 <table class="widefat"> 75 75 <thead> 76 76 <tr> -
trunk/wp-admin/edit-post-rows.php
r5933 r6026 103 103 } 104 104 ?> 105 </tr> 105 </tr> 106 106 <?php 107 107 endwhile; 108 108 } else { 109 109 ?> 110 <tr style='background-color: <?php echo $bgcolor; ?>'> 111 <td colspan="8"><?php _e('No posts found.') ?></td> 112 </tr> 110 <tr style='background-color: <?php echo $bgcolor; ?>'> 111 <td colspan="8"><?php _e('No posts found.') ?></td> 112 </tr> 113 113 <?php 114 114 } // end if ( have_posts() ) -
trunk/wp-admin/edit.php
r5963 r6026 84 84 } else { 85 85 $author_user = get_userdata( get_query_var( 'author' ) ); 86 $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name )); 86 $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name )); 87 87 } 88 88 } … … 95 95 96 96 <form name="searchform" id="searchform" action="" method="get"> 97 <fieldset><legend><?php _e('Search terms…'); ?></legend> 98 <input type="text" name="s" id="s" value="<?php the_search_query(); ?>" size="17" /> 99 </fieldset> 100 101 <fieldset><legend><?php _e('Status…'); ?></legend> 97 <fieldset><legend><?php _e('Search terms…'); ?></legend> 98 <input type="text" name="s" id="s" value="<?php the_search_query(); ?>" size="17" /> 99 </fieldset> 100 101 <fieldset><legend><?php _e('Status…'); ?></legend> 102 102 <select name='post_status'> 103 103 <option<?php selected( @$_GET['post_status'], 0 ); ?> value='0'><?php _e('Any'); ?></option> … … 108 108 </fieldset> 109 109 110 <?php 110 <?php 111 111 $editable_ids = get_editable_user_ids( $user_ID ); 112 112 if ( $editable_ids && count( $editable_ids ) > 1 ) : … … 154 154 <?php wp_dropdown_categories('show_option_all='.__('All').'&hide_empty=1&hierarchical=1&show_count=1&selected='.$cat);?> 155 155 </fieldset> 156 <input type="submit" id="post-query-submit" value="<?php _e('Filter »'); ?>" class="button" /> 156 <input type="submit" id="post-query-submit" value="<?php _e('Filter »'); ?>" class="button" /> 157 157 </form> 158 158 -
trunk/wp-admin/import/blogger.php
r5966 r6026 920 920 } else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) { 921 921 $this->in_content = array(); 922 $this->is_xhtml = $attrs['type'] == 'xhtml'; 922 $this->is_xhtml = $attrs['type'] == 'xhtml'; 923 923 array_push($this->in_content, array($tag,$this->depth)); 924 924 } else if($tag == 'link') { … … 936 936 937 937 if(!empty($this->in_content)) { 938 if($this->in_content[0][0] == $tag && 938 if($this->in_content[0][0] == $tag && 939 939 $this->in_content[0][1] == $this->depth) { 940 940 array_shift($this->in_content); … … 999 999 } 1000 1000 } 1001 } 1001 } 1002 1002 return $name; 1003 1003 } … … 1005 1005 function xml_escape($string) 1006 1006 { 1007 return str_replace(array('&','"',"'",'<','>'), 1008 array('&','"',''','<','>'), 1007 return str_replace(array('&','"',"'",'<','>'), 1008 array('&','"',''','<','>'), 1009 1009 $string ); 1010 1010 } -
trunk/wp-admin/import/dotclear.php
r5953 r6026 110 110 class Dotclear_Import { 111 111 112 function header() 112 function header() 113 113 { 114 114 echo '<div class="wrap">'; … … 117 117 } 118 118 119 function footer() 119 function footer() 120 120 { 121 121 echo '</div>'; 122 122 } 123 123 124 function greet() 124 function greet() 125 125 { 126 126 echo '<div class="narrow"><p>'.__('Howdy! This importer allows you to extract posts from a DotClear database into your blog. Mileage may vary.').'</p>'; -
trunk/wp-admin/import/mt.php
r5962 r6026 358 358 $post->post_date_gmt = $date_gmt; 359 359 } else if ( 'comment' == $context ) { 360 $comment->comment_date = $date; 360 $comment->comment_date = $date; 361 361 } else if ( 'ping' == $context ) { 362 $ping->comment_date = $date; 362 $ping->comment_date = $date; 363 363 } 364 364 } else if ( 0 === strpos($line, "EMAIL:") ) { -
trunk/wp-admin/import/stp.php
r5977 r6026 20 20 echo '<p><strong>'.__('Don’t be stupid - backup your database before proceeding!').'</strong></p>'; 21 21 echo '<form action="admin.php?import=stp&step=1" method="post">'; 22 wp_nonce_field('import-utw'); 22 wp_nonce_field('import-utw'); 23 23 echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 1 »').'" /></p>'; 24 24 echo '</form>'; … … 89 89 90 90 echo '<form action="admin.php?import=stp&step=2" method="post">'; 91 wp_nonce_field('import-utw'); 91 wp_nonce_field('import-utw'); 92 92 echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 2 »').'" /></p>'; 93 93 echo '</form>'; … … 108 108 109 109 echo '<form action="admin.php?import=stp&step=3" method="post">'; 110 wp_nonce_field('import-utw'); 110 wp_nonce_field('import-utw'); 111 111 echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 3 »').'" /></p>'; 112 112 echo '</form>'; … … 140 140 141 141 // loop through each post and add its tags to the db 142 foreach ( $posts as $this_post ) { 142 foreach ( $posts as $this_post ) { 143 143 $the_post = (int) $this_post->post_id; 144 144 $the_tag = $wpdb->escape($this_post->tag_name); -
trunk/wp-admin/import/textpattern.php
r5953 r6026 27 27 class Textpattern_Import { 28 28 29 function header() 29 function header() 30 30 { 31 31 echo '<div class="wrap">'; … … 34 34 } 35 35 36 function footer() 36 function footer() 37 37 { 38 38 echo '</div>'; -
trunk/wp-admin/import/wordpress.php
r5937 r6026 105 105 $this->posts[$num] = ''; 106 106 $doing_entry = true; 107 continue; 107 continue; 108 108 } 109 109 if ( false !== strpos($importline, '</item>') ) { 110 110 $num++; 111 111 $doing_entry = false; 112 continue; 112 continue; 113 113 } 114 114 if ( $doing_entry ) { … … 336 336 } 337 337 wp_set_post_categories($post_id, $post_cats); 338 } 338 } 339 339 } 340 340 -
trunk/wp-admin/includes/plugin.php
r6020 r6026 262 262 foreach (array_keys( $submenu ) as $parent) { 263 263 foreach ( $submenu[$parent] as $submenu_array ) { 264 if ( isset( $plugin_page ) && 265 ($plugin_page == $submenu_array[2] ) && 264 if ( isset( $plugin_page ) && 265 ($plugin_page == $submenu_array[2] ) && 266 266 (($parent == $pagenow ) || ($parent == $plugin_page ) || ($plugin_page == $hook ) || (($pagenow == 'admin.php' ) && ($parent1 != $submenu_array[2] ) ) ) 267 267 ) { -
trunk/wp-admin/includes/post.php
r5967 r6026 335 335 336 336 if ( ('0' === $metavalue || !empty ( $metavalue ) ) && ((('#NONE#' != $metakeyselect) && !empty ( $metakeyselect) ) || !empty ( $metakeyinput) ) ) { 337 // We have a key/value pair. If both the select and the 337 // We have a key/value pair. If both the select and the 338 338 // input for the key have data, the input takes precedence: 339 339 … … 348 348 349 349 $result = $wpdb->query( " 350 INSERT INTO $wpdb->postmeta 351 (post_id,meta_key,meta_value ) 350 INSERT INTO $wpdb->postmeta 351 (post_id,meta_key,meta_value ) 352 352 VALUES ('$post_ID','$metakey','$metavalue' ) 353 353 " ); -
trunk/wp-admin/includes/taxonomy.php
r5938 r6026 152 152 return $id; 153 153 154 return wp_insert_term($tag_name, 'post_tag'); 154 return wp_insert_term($tag_name, 'post_tag'); 155 155 } 156 156 -
trunk/wp-admin/includes/template.php
r5998 r6026 181 181 $class = ('alternate' == $class ) ? '' : 'alternate'; 182 182 ?> 183 <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'> 184 <th scope="row" style="text-align: center"><?php echo $post->ID; ?></th> 183 <tr id='page-<?php echo $id; ?>' class='<?php echo $class; ?>'> 184 <th scope="row" style="text-align: center"><?php echo $post->ID; ?></th> 185 185 <td> 186 186 <?php echo $pad; ?><?php the_title() ?> 187 </td> 187 </td> 188 188 <td><?php the_author() ?></td> 189 <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> 189 <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> 190 190 <td><a href="<?php the_permalink(); ?>" rel="permalink" class="view"><?php _e( 'View' ); ?></a></td> 191 <td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&post=$id' class='edit'>" . __( 'Edit' ) . "</a>"; } ?></td> 192 <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> 193 </tr> 191 <td><?php if ( current_user_can( 'edit_page', $id ) ) { echo "<a href='page.php?action=edit&post=$id' class='edit'>" . __( 'Edit' ) . "</a>"; } ?></td> 192 <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> 193 </tr> 194 194 195 195 <?php -
trunk/wp-admin/includes/update.php
r5994 r6026 63 63 } 64 64 65 if ( 66 isset( $current->last_checked ) && 67 43200 > ( time() - $current->last_checked ) && 65 if ( 66 isset( $current->last_checked ) && 67 43200 > ( time() - $current->last_checked ) && 68 68 !$plugin_changed 69 69 ) -
trunk/wp-admin/includes/upgrade.php
r6025 r6026 625 625 if ( empty($term_id) ) { 626 626 $wpdb->query("INSERT INTO $wpdb->terms (name, slug, term_group) VALUES ('$name', '$slug', '$term_group')"); 627 $term_id = (int) $wpdb->insert_id; 627 $term_id = (int) $wpdb->insert_id; 628 628 } 629 629 -
trunk/wp-admin/includes/user.php
r5750 r6026 40 40 $pass2 = $_POST['pass2']; 41 41 42 if ( isset( $_POST['role'] ) && current_user_can( 'edit_users' ) ) { 42 if ( isset( $_POST['role'] ) && current_user_can( 'edit_users' ) ) { 43 43 if( $user_id != $current_user->id || $wp_roles->role_objects[$_POST['role']]->has_cap( 'edit_users' )) 44 44 $user->role = $_POST['role']; -
trunk/wp-admin/index-extra.php
r5893 r6026 9 9 case 'incominglinks' : 10 10 11 $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') ) ); 11 $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') ) ); 12 12 $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') ) ); 13 13 -
trunk/wp-admin/index.php
r6002 r6026 1 1 <?php 2 require_once('admin.php'); 2 require_once('admin.php'); 3 3 4 4 function index_js() { … … 17 17 wp_enqueue_script( 'jquery' ); 18 18 19 $title = __('Dashboard'); 19 $title = __('Dashboard'); 20 20 $parent_file = 'index.php'; 21 21 require_once('admin-header.php'); … … 40 40 ?> 41 41 <div> 42 <h3><?php printf( __( 'Comments <a href="%s" title="More comments…">»</a>' ), 'edit-comments.php' ); ?></h3> 42 <h3><?php printf( __( 'Comments <a href="%s" title="More comments…">»</a>' ), 'edit-comments.php' ); ?></h3> 43 43 44 44 <?php if ( $numcomments ) : ?> -
trunk/wp-admin/link-category.php
r5654 r6026 61 61 62 62 if ( wp_update_term($cat_ID, 'link_category', $_POST) ) 63 wp_redirect('edit-link-categories.php?message=3'); 63 wp_redirect('edit-link-categories.php?message=3'); 64 64 else 65 wp_redirect('edit-link-categories.php?message=5'); 65 wp_redirect('edit-link-categories.php?message=5'); 66 66 67 67 exit; -
trunk/wp-admin/link-import.php
r5835 r6026 124 124 125 125 if ( ! $blogrolling ) 126 apply_filters( 'wp_delete_file', $opml_url); 126 apply_filters( 'wp_delete_file', $opml_url); 127 127 @unlink($opml_url); 128 128 ?> -
trunk/wp-admin/menu.php
r5654 r6026 97 97 // submenu in line be assigned as the new menu parent. 98 98 foreach ( $menu as $id => $data ) { 99 if ( empty($submenu[$data[2]]) ) 99 if ( empty($submenu[$data[2]]) ) 100 100 continue; 101 101 $subs = $submenu[$data[2]]; -
trunk/wp-admin/moderation.php
r5773 r6026 125 125 $stop = $start + $per; 126 126 127 $page_links = paginate_links( array( 128 'base' => add_query_arg( 'paged', '%#%' ), 129 'format' => '', 130 'total' => ceil( $total / $per ), 131 'current' => $page, 132 'prev_text' => '«', 127 $page_links = paginate_links( array( 128 'base' => add_query_arg( 'paged', '%#%' ), 129 'format' => '', 130 'total' => ceil( $total / $per ), 131 'current' => $page, 132 'prev_text' => '«', 133 133 'next_text' => '»' 134 134 ) ); … … 161 161 <li id="comment-<?php comment_ID(); ?>" class="<?php echo $class; ?>"> 162 162 <p> 163 <strong><?php comment_author(); ?></strong> 163 <strong><?php comment_author(); ?></strong> 164 164 <?php if ( !empty( $comment->comment_author_email ) ) { ?>| <?php comment_author_email_link(); ?> <?php } ?> 165 165 <?php if ( !empty( $comment->comment_author_url ) && $comment->comment_author_url != 'http://' ) { ?>| <?php comment_author_url_link(); ?> <?php } ?> … … 172 172 173 173 <p><small> 174 <?php comment_date( __( 'M j, g:i A' ) ); ?> — 175 [ <a href="comment.php?action=editcomment&c=<?php comment_ID(); ?>" title="<?php _e( 'Edit this comment' ); ?>"><?php _e( 'Edit' ); ?></a> | 176 <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> ] — 174 <?php comment_date( __( 'M j, g:i A' ) ); ?> — 175 [ <a href="comment.php?action=editcomment&c=<?php comment_ID(); ?>" title="<?php _e( 'Edit this comment' ); ?>"><?php _e( 'Edit' ); ?></a> | 176 <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> ] — 177 177 <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> 178 178 </small></p> -
trunk/wp-admin/options-discussion.php
r5825 r6026 8 8 ?> 9 9 10 <div class="wrap"> 11 <h2><?php _e('Discussion Options') ?></h2> 12 <form method="post" action="options.php"> 10 <div class="wrap"> 11 <h2><?php _e('Discussion Options') ?></h2> 12 <form method="post" action="options.php"> 13 13 <?php wp_nonce_field('update-options') ?> 14 14 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 15 15 <fieldset class="options"> 16 <legend><?php echo __('Usual settings for an article:').'<br /><small><em>('.__('These settings may be overridden for individual articles.').')</em></small>'; ?></legend> 17 <ul> 18 <li> 19 <label for="default_pingback_flag"> 20 <input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_option('default_pingback_flag')); ?> /> 21 <?php _e('Attempt to notify any blogs linked to from the article (slows down posting.)') ?></label> 22 </li> 23 <li> 24 <label for="default_ping_status"> 25 <input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> /> 26 <?php _e('Allow link notifications from other blogs (pingbacks and trackbacks.)') ?></label> 27 </li> 28 <li> 29 <label for="default_comment_status"> 30 <input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_option('default_comment_status')); ?> /> 31 <?php _e('Allow people to post comments on the article') ?></label> 32 </li> 33 </ul> 16 <legend><?php echo __('Usual settings for an article:').'<br /><small><em>('.__('These settings may be overridden for individual articles.').')</em></small>'; ?></legend> 17 <ul> 18 <li> 19 <label for="default_pingback_flag"> 20 <input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked('1', get_option('default_pingback_flag')); ?> /> 21 <?php _e('Attempt to notify any blogs linked to from the article (slows down posting.)') ?></label> 22 </li> 23 <li> 24 <label for="default_ping_status"> 25 <input name="default_ping_status" type="checkbox" id="default_ping_status" value="open" <?php checked('open', get_option('default_ping_status')); ?> /> 26 <?php _e('Allow link notifications from other blogs (pingbacks and trackbacks.)') ?></label> 27 </li> 28 <li> 29 <label for="default_comment_status"> 30 <input name="default_comment_status" type="checkbox" id="default_comment_status" value="open" <?php checked('open', get_option('default_comment_status')); ?> /> 31 <?php _e('Allow people to post comments on the article') ?></label> 32 </li> 33 </ul> 34 34 </fieldset> 35 35 <fieldset class="options"> 36 <legend><?php _e('E-mail me whenever:') ?></legend> 37 <ul> 38 <li> 39 <label for="comments_notify"> 40 <input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> /> 41 <?php _e('Anyone posts a comment') ?> </label> 42 </li> 43 <li> 44 <label for="moderation_notify"> 45 <input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> /> 46 <?php _e('A comment is held for moderation') ?> </label> 47 </li> 48 </ul> 36 <legend><?php _e('E-mail me whenever:') ?></legend> 37 <ul> 38 <li> 39 <label for="comments_notify"> 40 <input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked('1', get_option('comments_notify')); ?> /> 41 <?php _e('Anyone posts a comment') ?> </label> 42 </li> 43 <li> 44 <label for="moderation_notify"> 45 <input name="moderation_notify" type="checkbox" id="moderation_notify" value="1" <?php checked('1', get_option('moderation_notify')); ?> /> 46 <?php _e('A comment is held for moderation') ?> </label> 47 </li> 48 </ul> 49 49 </fieldset> 50 50 <fieldset class="options"> 51 <legend><?php _e('Before a comment appears:') ?></legend> 51 <legend><?php _e('Before a comment appears:') ?></legend> 52 52 <ul> 53 53 <li> 54 <label for="comment_moderation"> 55 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> /> 56 <?php _e('An administrator must always approve the comment') ?> </label> 57 </li> 58 <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> 59 <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> 60 </ul> 54 <label for="comment_moderation"> 55 <input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked('1', get_option('comment_moderation')); ?> /> 56 <?php _e('An administrator must always approve the comment') ?> </label> 57 </li> 58 <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> 59 <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> 60 </ul> 61 61 </fieldset> 62 62 <fieldset class="options"> … … 65 65 66 66 <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> 67 <p> 68 <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> 69 </p> 67 <p> 68 <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> 69 </p> 70 70 </fieldset> 71 71 <fieldset class="options"> 72 72 <legend><?php _e('Comment Blacklist') ?></legend> 73 73 <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> 74 <p> 75 <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> 74 <p> 75 <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> 76 76 </p> 77 77 </fieldset> 78 78 <p class="submit"> 79 <input type="hidden" name="action" value="update" /> 80 <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" /> 81 <input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /> 79 <input type="hidden" name="action" value="update" /> 80 <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" /> 81 <input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /> 82 82 </p> 83 83 </form> -
trunk/wp-admin/options-general.php
r5825 r6026 10 10 <div class="wrap"> 11 11 <h2><?php _e('General Options') ?></h2> 12 <form method="post" action="options.php"> 12 <form method="post" action="options.php"> 13 13 <?php wp_nonce_field('update-options') ?> 14 14 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 15 <table class="optiontable"> 16 <tr valign="top"> 17 <th scope="row"><?php _e('Blog title:') ?></th> 18 <td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td> 19 </tr> 20 <tr valign="top"> 21 <th scope="row"><?php _e('Tagline:') ?></th> 15 <table class="optiontable"> 16 <tr valign="top"> 17 <th scope="row"><?php _e('Blog title:') ?></th> 18 <td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td> 19 </tr> 20 <tr valign="top"> 21 <th scope="row"><?php _e('Tagline:') ?></th> 22 22 <td><input name="blogdescription" type="text" id="blogdescription" style="width: 95%" value="<?php form_option('blogdescription'); ?>" size="45" /> 23 23 <br /> 24 <?php _e('In a few words, explain what this blog is about.') ?></td> 25 </tr> 26 <tr valign="top"> 27 <th scope="row"><?php _e('WordPress address (URL):') ?></th> 28 <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> 29 </tr> 24 <?php _e('In a few words, explain what this blog is about.') ?></td> 25 </tr> 26 <tr valign="top"> 27 <th scope="row"><?php _e('WordPress address (URL):') ?></th> 28 <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> 29 </tr> 30 30 <tr valign="top"> 31 31 <th scope="row"><?php _e('Blog address (URL):') ?></th> 32 32 <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> 33 33 </tr> 34 <tr valign="top"> 35 <th scope="row"><?php _e('E-mail address:') ?> </th> 34 <tr valign="top"> 35 <th scope="row"><?php _e('E-mail address:') ?> </th> 36 36 <td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" size="40" class="code" /> 37 37 <br /> 38 <?php _e('This address is used only for admin purposes.') ?></td> 38 <?php _e('This address is used only for admin purposes.') ?></td> 39 39 </tr> 40 <tr valign="top"> 41 <th scope="row"><?php _e('Membership:') ?></th> 42 <td> <label for="users_can_register"> 43 <input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> /> 40 <tr valign="top"> 41 <th scope="row"><?php _e('Membership:') ?></th> 42 <td> <label for="users_can_register"> 43 <input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> /> 44 44 <?php _e('Anyone can register') ?></label><br /> 45 45 <label for="comment_registration"> 46 <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> /> 46 <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> /> 47 47 <?php _e('Users must be registered and logged in to comment') ?> 48 48 </label> 49 </td> 50 </tr> 51 <tr valign="top"> 52 <th scope="row"><?php _e('New User Default Role:') ?></th> 53 <td><label for="default_role"> 49 </td> 50 </tr> 51 <tr valign="top"> 52 <th scope="row"><?php _e('New User Default Role:') ?></th> 53 <td><label for="default_role"> 54 54 <select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option('default_role') ); ?></select></label> 55 </td> 56 </tr> 57 </table> 58 <fieldset class="options"> 59 <legend><?php _e('Date and Time') ?></legend> 60 <table class="optiontable"> 61 <tr> 62 <th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th> 63 <td><code><?php echo gmdate(__('Y-m-d g:i:s a')); ?></code></td> 55 </td> 56 </tr> 57 </table> 58 <fieldset class="options"> 59 <legend><?php _e('Date and Time') ?></legend> 60 <table class="optiontable"> 61 <tr> 62 <th scope="row"><?php _e('<abbr title="Coordinated Universal Time">UTC</abbr> time is:') ?> </th> 63 <td><code><?php echo gmdate(__('Y-m-d g:i:s a')); ?></code></td> 64 64 </tr> 65 65 <tr> 66 66 <th scope="row"><?php _e('Times in the blog should differ by:') ?> </th> 67 <td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" /> 67 <td><input name="gmt_offset" type="text" id="gmt_offset" size="2" value="<?php form_option('gmt_offset'); ?>" /> 68 68 <?php _e('hours') ?> (<?php _e('Your timezone offset, for example <code>-6</code> for Central Time.'); ?>)</td> 69 69 </tr> … … 77 77 <td><input name="time_format" type="text" id="time_format" size="30" value="<?php form_option('time_format'); ?>" /><br /> 78 78 <?php _e('Output:') ?> <strong><?php echo gmdate(get_option('time_format'), current_time('timestamp')); ?></strong></td> 79 </tr> 79 </tr> 80 80 <tr> 81 81 <th scope="row"> </th> … … 94 94 </tr> 95 95 </table> 96 </fieldset> 96 </fieldset> 97 97 98 98 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /> 99 <input type="hidden" name="action" value="update" /> 100 <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" /> 99 <input type="hidden" name="action" value="update" /> 100 <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" /> 101 101 </p> 102 102 </form> 103 103 104 </div> 104 </div> 105 105 106 106 <?php include('./admin-footer.php') ?> -
trunk/wp-admin/options-permalink.php
r5854 r6026 109 109 <?php endif; ?> 110 110 111 <div class="wrap"> 112 <h2><?php _e('Customize Permalink Structure') ?></h2> 113 <form name="form" action="options-permalink.php" method="post"> 111 <div class="wrap"> 112 <h2><?php _e('Customize Permalink Structure') ?></h2> 113 <form name="form" action="options-permalink.php" method="post"> 114 114 <?php wp_nonce_field('update-permalink') ?> 115 115 <p class="submit"><input type="submit" name="submit" value="<?php _e('Update Permalink Structure »') ?>" /></p> … … 131 131 <p> 132 132 <label> 133 <input name="selection" type="radio" value="" class="tog" <?php checked('', $permalink_structure); ?> /> 133 <input name="selection" type="radio" value="" class="tog" <?php checked('', $permalink_structure); ?> /> 134 134 <?php _e('Default'); ?><br /> <span> <?php echo _c('»|Used as a list bullet'); ?> <code><?php echo get_option('home'); ?>/?p=123</code></span> 135 135 </label> … … 137 137 <p> 138 138 <label> 139 <input name="selection" type="radio" value="<?php echo $structures[1]; ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> /> 139 <input name="selection" type="radio" value="<?php echo $structures[1]; ?>" class="tog" <?php checked($structures[1], $permalink_structure); ?> /> 140 140 <?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> 141 141 </label> … … 143 143 <p> 144 144 <label> 145 <input name="selection" type="radio" value="<?php echo $structures[2]; ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> /> 145 <input name="selection" type="radio" value="<?php echo $structures[2]; ?>" class="tog" <?php checked($structures[2], $permalink_structure); ?> /> 146 146 <?php _e('Numeric'); ?><br /> <span> <?php echo _c('»|Used as a list bullet'); ?> <code><?php echo get_option('home') . $prefix ; ?>/archives/123</code></span> 147 147 </label> … … 166 166 <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> 167 167 <?php endif; ?> 168 <p> 169 <?php _e('Category base'); ?>: <input name="category_base" id="category_base" type="text" class="code" value="<?php echo attribute_escape($category_base); ?>" size="30" /> 168 <p> 169 <?php _e('Category base'); ?>: <input name="category_base" id="category_base" type="text" class="code" value="<?php echo attribute_escape($category_base); ?>" size="30" /> 170 170 </p> 171 171 <p> 172 <?php _e('Tag base'); ?>: <input name="tag_base" id="tag_base" type="text" class="code" value="<?php echo attribute_escape($tag_base); ?>" size="30" /> 173 </p> 174 <p class="submit"> 175 <input type="submit" name="submit" value="<?php _e('Update Permalink Structure »') ?>" /> 176 </p> 177 </form> 172 <?php _e('Tag base'); ?>: <input name="tag_base" id="tag_base" type="text" class="code" value="<?php echo attribute_escape($tag_base); ?>" size="30" /> 173 </p> 174 <p class="submit"> 175 <input type="submit" name="submit" value="<?php _e('Update Permalink Structure »') ?>" /> 176 </p> 177 </form> 178 178 <?php if ( $permalink_structure && !$usingpi && !$writable ) : ?> 179 179 <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> -
trunk/wp-admin/options-reading.php
r4828 r6026 8 8 ?> 9 9 10 <div class="wrap"> 11 <h2><?php _e('Reading Options') ?></h2> 10 <div class="wrap"> 11 <h2><?php _e('Reading Options') ?></h2> 12 12 <form name="form1" method="post" action="options.php"> 13 13 <?php wp_nonce_field('update-options') ?> 14 14 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 15 15 <?php if ( get_pages() ): ?> 16 <fieldset class="options"> 17 <legend><?php _e('Front Page') ?></legend> 18 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 19 <tr valign="top"> 20 <th width="33%" scope="row"><?php _e('Front page displays:')?></th> 16 <fieldset class="options"> 17 <legend><?php _e('Front Page') ?></legend> 18 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 19 <tr valign="top"> 20 <th width="33%" scope="row"><?php _e('Front page displays:')?></th> 21 21 <td> 22 22 <p><label> 23 <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked('posts', get_option('show_on_front')); ?> /> 23 <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked('posts', get_option('show_on_front')); ?> /> 24 24 <?php _e('Your latest posts'); ?> 25 25 </label> 26 26 </p> 27 27 <p><label> 28 <input name="show_on_front" type="radio" value="page" class="tog" <?php checked('page', get_option('show_on_front')); ?> /> 28 <input name="show_on_front" type="radio" value="page" class="tog" <?php checked('page', get_option('show_on_front')); ?> /> 29 29 <?php printf(__('A <a href="%s">static page</a> (select below)'), 'edit-pages.php'); ?> 30 30 </label> … … 41 41 </div> 42 42 <?php endif; ?> 43 </td> 44 </tr> 45 </table> 43 </td> 44 </tr> 45 </table> 46 46 </fieldset> 47 47 <?php endif; ?> 48 48 49 <fieldset class="options"> 50 <legend><?php _e('Blog Pages') ?></legend> 51 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 52 <tr valign="top"> 53 <th width="33%" scope="row"><?php _e('Show at most:') ?></th> 49 <fieldset class="options"> 50 <legend><?php _e('Blog Pages') ?></legend> 51 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 52 <tr valign="top"> 53 <th width="33%" scope="row"><?php _e('Show at most:') ?></th> 54 54 <td> 55 55 <input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option('posts_per_page'); ?>" size="3" /> <?php _e('posts') ?> 56 </td> 57 </tr> 58 </table> 59 </fieldset> 56 </td> 57 </tr> 58 </table> 59 </fieldset> 60 60 61 <fieldset class="options"> 62 <legend><?php _e('Syndication Feeds') ?></legend> 63 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 64 <tr valign="top"> 65 <th width="33%" scope="row"><?php _e('Show the most recent:') ?></th> 66 <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> 61 <fieldset class="options"> 62 <legend><?php _e('Syndication Feeds') ?></legend> 63 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 64 <tr valign="top"> 65 <th width="33%" scope="row"><?php _e('Show the most recent:') ?></th> 66 <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> 67 67 </tr> 68 68 <tr valign="top"> … … 73 73 <p><?php _e('Note: If you use the <code><!--more--></code> feature, it will cut off posts in RSS feeds.'); ?></p> 74 74 </td> 75 </tr> 76 </table> 77 </fieldset> 78 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 79 <tr valign="top"> 80 <th width="33%" scope="row"><?php _e('Encoding for pages and feeds:') ?></th> 75 </tr> 76 </table> 77 </fieldset> 78 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 79 <tr valign="top"> 80 <th width="33%" scope="row"><?php _e('Encoding for pages and feeds:') ?></th> 81 81 <td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option('blog_charset'); ?>" size="20" class="code" /><br /> 82 <?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> 82 <?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> 83 83 </tr> 84 </table> 84 </table> 85 85 <p> 86 <label><input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_option('gzipcompression')); ?> /> 86 <label><input type="checkbox" name="gzipcompression" value="1" <?php checked('1', get_option('gzipcompression')); ?> /> 87 87 <?php _e('WordPress should compress articles (gzip) if browsers ask for them') ?></label> 88 88 </p> 89 89 <p class="submit"> 90 <input type="hidden" name="action" value="update" /> 91 <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" /> 92 <input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /> 93 </p> 94 </form> 95 </div> 90 <input type="hidden" name="action" value="update" /> 91 <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" /> 92 <input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /> 93 </p> 94 </form> 95 </div> 96 96 <?php include('./admin-footer.php'); ?> -
trunk/wp-admin/options-writing.php
r5998 r6026 8 8 ?> 9 9 10 <div class="wrap"> 11 <h2><?php _e('Writing Options') ?></h2> 12 <form method="post" action="options.php"> 10 <div class="wrap"> 11 <h2><?php _e('Writing Options') ?></h2> 12 <form method="post" action="options.php"> 13 13 <?php wp_nonce_field('update-options') ?> 14 14 <p class="submit"><input type="submit" name="Submit" value="<?php _e('Update Options »') ?>" /></p> 15 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 16 <tr valign="top"> 17 <th width="33%" scope="row"> <?php _e('Size of the post box:') ?></th> 18 <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; " /> 19 <?php _e('lines') ?></td> 20 </tr> 15 <table width="100%" cellspacing="2" cellpadding="5" class="optiontable editform"> 16 <tr valign="top"> 17 <th width="33%" scope="row"> <?php _e('Size of the post box:') ?></th> 18 <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; " /> 19 <?php _e('lines') ?></td> 20 </tr> 21 21 <tr valign="top"> 22 22 <th scope="row"><?php _e('Formatting:') ?></th> -
trunk/wp-admin/page-new.php
r5676 r6026 24 24 ?> 25 25 26 <?php include('admin-footer.php'); ?> 26 <?php include('admin-footer.php'); ?> -
trunk/wp-admin/page.php
r5875 r6026 140 140 wp_die( __('Error in deleting...') ); 141 141 } else { 142 if ( !wp_delete_post($page_id) ) 142 if ( !wp_delete_post($page_id) ) 143 143 wp_die( __('Error in deleting...') ); 144 144 } -
trunk/wp-admin/post-new.php
r5808 r6026 95 95 if ($is_NS4 || $is_gecko) { 96 96 ?> 97 <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> 97 <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> 98 98 <?php 99 99 } else if ($is_winIE) { … … 110 110 <br /> 111 111 <?php _e('One-click bookmarklet:') ?><br /> 112 <a href="javascript:oneclickbookmarklet(0);"><?php _e('click here') ?></a> 112 <a href="javascript:oneclickbookmarklet(0);"><?php _e('click here') ?></a> 113 113 <?php 114 114 } else if ($is_opera) { 115 115 ?> 116 <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> 116 <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> 117 117 <?php 118 118 } else if ($is_macIE) { 119 119 ?> 120 <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> 120 <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> 121 121 <?php 122 122 } -
trunk/wp-admin/post.php
r5967 r6026 155 155 wp_die( __('Error in deleting...') ); 156 156 } else { 157 if ( !wp_delete_post($post_id) ) 157 if ( !wp_delete_post($post_id) ) 158 158 wp_die( __('Error in deleting...') ); 159 159 } -
trunk/wp-admin/theme-editor.php
r4656 r6026 98 98 </div> 99 99 100 <div class="wrap"> 100 <div class="wrap"> 101 101 <?php 102 102 if ( is_writeable($real_file) ) { -
trunk/wp-admin/upgrade.php
r5965 r6026 37 37 <h2><?php _e('Database Upgrade Required'); ?></h2> 38 38 <p><?php _e('Your WordPress database is out-of-date, and must be upgraded before you can continue.'); ?></p> 39 <p><?php _e('The upgrade process may take a while, so please be patient.'); ?></p> 39 <p><?php _e('The upgrade process may take a while, so please be patient.'); ?></p> 40 40 <h2 class="step"><a href="upgrade.php?step=1&backto=<?php echo $goback; ?>"><?php _e('Upgrade WordPress »'); ?></a></h2> 41 41 <?php … … 48 48 else 49 49 $backto = clean_url(stripslashes($_GET['backto'])); 50 ?> 50 ?> 51 51 <h2><?php _e('Upgrade Complete'); ?></h2> 52 52 <p><?php _e('Your WordPress database has been successfully upgraded!'); ?></p> -
trunk/wp-admin/users.php
r5720 r6026 360 360 <?php endif; ?> 361 361 362 <h3><?php 362 <h3><?php 363 363 if ( 0 == $wp_user_search->first_user && $wp_user_search->total_users_for_query <= 50 ) 364 364 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); … … 451 451 <div class="narrow"> 452 452 453 <?php 454 if ( get_option('users_can_register') ) 455 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>'; 456 else 457 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>'; 453 <?php 454 if ( get_option('users_can_register') ) 455 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>'; 456 else 457 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>'; 458 458 ?> 459 459 <form action="#add-new-user" method="post" name="adduser" id="adduser"> -
trunk/wp-admin/widgets.php
r5965 r6026 92 92 var elLeft = parseInt( jQuery(o).css('left') ); 93 93 var elTop = parseInt( jQuery(o).css('top') ); 94 if ( screenWidth < ( parseInt(elLeft) + parseInt(elWidth) ) ) 94 if ( screenWidth < ( parseInt(elLeft) + parseInt(elWidth) ) ) 95 95 jQuery(o).css('left', ( screenWidth - elWidth ) + 'px' ); 96 if ( screenHeight < ( parseInt(elTop) + parseInt(elHeight) ) ) 96 if ( screenHeight < ( parseInt(elTop) + parseInt(elHeight) ) ) 97 97 jQuery(o).css('top', ( screenHeight - elHeight ) + 'px' ); 98 if ( elLeft < 1 ) 98 if ( elLeft < 1 ) 99 99 jQuery(o).css('left', '1px'); 100 100 if ( elTop < 1 ) … … 130 130 } 131 131 function updateAll() { 132 jQuery.map(cols, function(o) { 132 jQuery.map(cols, function(o) { 133 133 if ( jQuery('#' + o + ' li').length ) 134 134 jQuery('#'+o+'placemat span.handle').hide(); 135 else 135 else 136 136 jQuery('#'+o+'placemat span.handle').show(); 137 137 }); … … 158 158 $sanitized_name = sanitize_title( $wp_registered_widgets[$name]['id'] ); 159 159 $link_title = __( 'Configure' ); 160 $popper = ( isset( $wp_registered_widget_controls[$name] ) ) 160 $popper = ( isset( $wp_registered_widget_controls[$name] ) ) 161 161 ? ' <div class="popper" id="' . $sanitized_name . 'popper" title="' . $link_title . '">≡</div>' 162 162 : ''; -
trunk/wp-app.php
r6025 r6026 136 136 // authenticate regardless of the operation and set the current 137 137 // user. each handler will decide if auth is required or not. 138 $this->authenticate(); 138 $this->authenticate(); 139 139 $u = wp_get_current_user(); 140 140 if(!isset($u) || $u->ID == 0) { … … 323 323 $pubtimes = $this->get_publish_time($entry); 324 324 $post_date = $pubtimes[0]; 325 $post_date_gmt = $pubtimes[1]; 325 $post_date_gmt = $pubtimes[1]; 326 326 327 327 // let's not go backwards and make something draft again. … … 722 722 $prev_page = ($page - 1) < 1 ? NULL : $page - 1; 723 723 $last_page = ((int)$last_page == 1 || (int)$last_page == 0) ? NULL : (int) $last_page; 724 $self_page = $page > 1 ? $page : NULL; 724 $self_page = $page > 1 ? $page : NULL; 725 725 ?><feed xmlns="<?php echo $this->ATOM_NS ?>" xmlns:app="<?php echo $this->ATOMPUB_NS ?>" xml:lang="<?php echo get_option('rss_language'); ?>"> 726 726 <id><?php $this->the_entries_url() ?></id> … … 1123 1123 1124 1124 return strtotime($match[1] . " " . $match[2] . " " . $match[3]); 1125 } 1125 } 1126 1126 1127 1127 function get_publish_time($entry) { -
trunk/wp-content/plugins/hello.php
r4423 r6026 7 7 Version: 1.5 8 8 Author URI: http://photomatt.net/ 9 */ 9 */ 10 10 11 11 // These are the lyrics to Hello Dolly -
trunk/wp-content/themes/classic/comments-popup.php
r5697 r6026 57 57 58 58 <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> 59 <?php if ( $user_ID ) : ?> 59 <?php if ( $user_ID ) : ?> 60 60 <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> 61 <?php else : ?> 61 <?php else : ?> 62 62 <p> 63 63 <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" /> -
trunk/wp-content/themes/default/attachment.php
r5982 r6026 26 26 You'll need to download this plugin, and follow the instructions: 27 27 http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */ 28 /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?> 28 /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?> 29 29 on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> 30 30 and is filed under <?php the_category(', ') ?>. 31 You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed. 31 You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed. 32 32 33 33 <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) { -
trunk/wp-content/themes/default/comments-popup.php
r4929 r6026 57 57 58 58 <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform"> 59 <?php if ( $user_ID ) : ?> 59 <?php if ( $user_ID ) : ?> 60 60 <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> 61 <?php else : ?> 61 <?php else : ?> 62 62 <p> 63 63 <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" /> -
trunk/wp-includes/atomlib.php
r6025 r6026 1 1 <?php 2 /* 3 * atomlib.php - Atom Syndication Format PHP Library 2 /* 3 * atomlib.php - Atom Syndication Format PHP Library 4 4 * 5 5 * Project: http://code.google.com/p/phpatomlib/ … … 7 7 * Author: Elias Torres <elias@torrez.us> 8 8 * Version: 0.4 9 * 9 * 10 10 */ 11 11 … … 166 166 } else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) { 167 167 $this->in_content = array(); 168 $this->is_xhtml = $attrs['type'] == 'xhtml'; 169 $this->is_html = $attrs['type'] == 'html' || $attrs['type'] == 'text/html'; 168 $this->is_xhtml = $attrs['type'] == 'xhtml'; 169 $this->is_html = $attrs['type'] == 'html' || $attrs['type'] == 'text/html'; 170 170 $this->is_text = !in_array('type',array_keys($attrs)) || $attrs['type'] == 'text'; 171 171 $type = $this->is_xhtml ? 'XHTML' : ($this->is_html ? 'HTML' : ($this->is_text ? 'TEXT' : $attrs['type'])); … … 195 195 # if we are ending the original content element 196 196 # then let's finalize the content 197 if($this->in_content[0][0] == $tag && 197 if($this->in_content[0][0] == $tag && 198 198 $this->in_content[0][1] == $this->depth) { 199 199 $origtype = $this->in_content[0][2]; … … 277 277 } 278 278 } 279 } 279 } 280 280 281 281 if($attr) { … … 305 305 function xml_escape($string) 306 306 { 307 return str_replace(array('&','"',"'",'<','>'), 308 array('&','"',''','<','>'), 307 return str_replace(array('&','"',"'",'<','>'), 308 array('&','"',''','<','>'), 309 309 $string ); 310 310 } -
trunk/wp-includes/author-template.php
r5767 r6026 301 301 function the_author_posts_link($deprecated = '') { 302 302 global $authordata; 303 printf( 304 '<a href="%1$s" title="%2$s">%3$s</a>', 305 get_author_posts_url( $authordata->ID, $authordata->user_nicename ), 306 sprintf( __( 'Posts by %s' ), attribute_escape( get_the_author() ) ), 303 printf( 304 '<a href="%1$s" title="%2$s">%3$s</a>', 305 get_author_posts_url( $authordata->ID, $authordata->user_nicename ), 306 sprintf( __( 'Posts by %s' ), attribute_escape( get_the_author() ) ), 307 307 get_the_author() 308 308 ); … … 364 364 global $wpdb; 365 365 366 $defaults = array( 367 'optioncount' => false, 'exclude_admin' => true, 368 'show_fullname' => false, 'hide_empty' => true, 366 $defaults = array( 367 'optioncount' => false, 'exclude_admin' => true, 368 'show_fullname' => false, 'hide_empty' => true, 369 369 'feed' => '', 'feed_image' => '', 'echo' => true 370 370 ); -
trunk/wp-includes/bookmark-template.php
r5708 r6026 17 17 18 18 $defaults = array( 19 'category' => -1, 'before' => '', 20 'after' => '<br />', 'between' => ' ', 21 'show_images' => true, 'orderby' => 'name', 22 'show_description' => true, 'show_rating' => false, 23 'limit' => -1, 'show_updated' => true, 19 'category' => -1, 'before' => '', 20 'after' => '<br />', 'between' => ' ', 21 'show_images' => true, 'orderby' => 'name', 22 'show_description' => true, 'show_rating' => false, 23 'limit' => -1, 'show_updated' => true, 24 24 'echo' => true 25 25 ); … … 242 242 function _walk_bookmarks($bookmarks, $args = '' ) { 243 243 $defaults = array( 244 'show_updated' => 0, 'show_description' => 0, 245 'show_images' => 1, 'before' => '<li>', 244 'show_updated' => 0, 'show_description' => 0, 245 'show_images' => 1, 'before' => '<li>', 246 246 'after' => '</li>', 'between' => "\n" 247 247 ); … … 265 265 $rel = ' rel="' . $rel . '"'; 266 266 267 $desc = attribute_escape(apply_filters('link_description', $bookmark->link_description)); 268 $name = attribute_escape(apply_filters('link_title', $bookmark->link_name)); 267 $desc = attribute_escape(apply_filters('link_description', $bookmark->link_description)); 268 $name = attribute_escape(apply_filters('link_title', $bookmark->link_name)); 269 269 $title = $desc; 270 270 … … 316 316 function wp_list_bookmarks($args = '') { 317 317 $defaults = array( 318 'orderby' => 'name', 'order' => 'ASC', 319 'limit' => -1, 'category' => '', 320 'category_name' => '', 'hide_invisible' => 1, 321 'show_updated' => 0, 'echo' => 1, 322 'categorize' => 1, 'title_li' => __('Bookmarks'), 323 'title_before' => '<h2>', 'title_after' => '</h2>', 324 'category_orderby' => 'name', 'category_order' => 'ASC', 325 'class' => 'linkcat', 'category_before' => '<li id="%id" class="%class">', 318 'orderby' => 'name', 'order' => 'ASC', 319 'limit' => -1, 'category' => '', 320 'category_name' => '', 'hide_invisible' => 1, 321 'show_updated' => 0, 'echo' => 1, 322 'categorize' => 1, 'title_li' => __('Bookmarks'), 323 'title_before' => '<h2>', 'title_after' => '</h2>', 324 'category_orderby' => 'name', 'category_order' => 'ASC', 325 'class' => 'linkcat', 'category_before' => '<li id="%id" class="%class">', 326 326 'category_after' => '</li>' 327 327 ); -
trunk/wp-includes/bookmark.php
r6025 r6026 46 46 47 47 $defaults = array( 48 'orderby' => 'name', 'order' => 'ASC', 49 'limit' => -1, 'category' => '', 50 'category_name' => '', 'hide_invisible' => 1, 51 'show_updated' => 0, 'include' => '', 48 'orderby' => 'name', 'order' => 'ASC', 49 'limit' => -1, 'category' => '', 50 'category_name' => '', 'hide_invisible' => 1, 51 'show_updated' => 0, 'include' => '', 52 52 'exclude' => '' 53 53 ); … … 95 95 96 96 if ( ! empty($category_name) ) { 97 if ( $category = get_term_by('name', $category_name, 'link_category') ) 97 if ( $category = get_term_by('name', $category_name, 'link_category') ) 98 98 $category = $category->term_id; 99 99 } … … 174 174 $bookmark->$field = sanitize_bookmark_field($field, $bookmark->$field, $bookmark->link_id, $context); 175 175 else 176 $bookmark[$field] = sanitize_bookmark_field($field, $bookmark[$field], $bookmark['link_id'], $context); 176 $bookmark[$field] = sanitize_bookmark_field($field, $bookmark[$field], $bookmark['link_id'], $context); 177 177 } 178 178 … … 192 192 $targets = array('_top', '_blank'); 193 193 if ( ! in_array($value, $targets) ) 194 $value = ''; 194 $value = ''; 195 195 } 196 196 -
trunk/wp-includes/canonical.php
r5978 r6026 47 47 $redirect['query'] = remove_query_arg('m', $redirect['query']); 48 48 // now moving on to non ?m=X year/month/day links 49 } elseif ( is_day() && get_query_var('year') && get_query_var('monthnum') && isset($_GET['day']) ) { 49 } elseif ( is_day() && get_query_var('year') && get_query_var('monthnum') && isset($_GET['day']) ) { 50 50 if ( $redirect_url = get_day_link(get_query_var('year'), get_query_var('monthnum'), get_query_var('day')) ) 51 51 $redirect['query'] = remove_query_arg(array('year', 'monthnum', 'day'), $redirect['query']); -
trunk/wp-includes/category-template.php
r5917 r6026 87 87 } 88 88 89 function _usort_terms_by_ID($a, $b) { 90 if ( $a->term_id > $b->term_id ) 91 return 1; 92 elseif ( $a->term_id < $b->term_id ) 93 return -1; 94 else 95 return 0; 89 function _usort_terms_by_ID($a, $b) { 90 if ( $a->term_id > $b->term_id ) 91 return 1; 92 elseif ( $a->term_id < $b->term_id ) 93 return -1; 94 else 95 return 0; 96 96 } 97 97 … … 186 186 function wp_dropdown_categories($args = '') { 187 187 $defaults = array( 188 'show_option_all' => '', 'show_option_none' => '', 189 'orderby' => 'ID', 'order' => 'ASC', 190 'show_last_update' => 0, 'show_count' => 0, 191 'hide_empty' => 1, 'child_of' => 0, 192 'exclude' => '', 'echo' => 1, 193 'selected' => 0, 'hierarchical' => 0, 188 'show_option_all' => '', 'show_option_none' => '', 189 'orderby' => 'ID', 'order' => 'ASC', 190 'show_last_update' => 0, 'show_count' => 0, 191 'hide_empty' => 1, 'child_of' => 0, 192 'exclude' => '', 'echo' => 1, 193 'selected' => 0, 'hierarchical' => 0, 194 194 'name' => 'cat', 'class' => 'postform' 195 195 ); … … 236 236 function wp_list_categories($args = '') { 237 237 $defaults = array( 238 'show_option_all' => '', 'orderby' => 'name', 239 'order' => 'ASC', 'show_last_update' => 0, 240 'style' => 'list', 'show_count' => 0, 241 'hide_empty' => 1, 'use_desc_for_title' => 1, 242 'child_of' => 0, 'feed' => '', 243 'feed_image' => '', 'exclude' => '', 238 'show_option_all' => '', 'orderby' => 'name', 239 'order' => 'ASC', 'show_last_update' => 0, 240 'style' => 'list', 'show_count' => 0, 241 'hide_empty' => 1, 'use_desc_for_title' => 1, 242 'child_of' => 0, 'feed' => '', 243 'feed_image' => '', 'exclude' => '', 244 244 'hierarchical' => true, 'title_li' => __('Categories') 245 245 ); … … 272 272 273 273 if( !empty($show_option_all) ) 274 if ('list' == $style ) 274 if ('list' == $style ) 275 275 $output .= '<li><a href="' . get_bloginfo('url') . '">' . $show_option_all . '</a></li>'; 276 276 else … … 296 296 function wp_tag_cloud( $args = '' ) { 297 297 $defaults = array( 298 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45, 298 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'number' => 45, 299 299 'format' => 'flat', 'orderby' => 'name', 'order' => 'ASC', 300 300 'exclude' => '', 'include' => '' … … 418 418 419 419 function get_the_tags( $id = 0 ) { 420 global $post; 420 global $post; 421 421 422 422 $id = (int) $id; 423 423 424 if ( ! $id && ! in_the_loop() ) 425 return false; // in-the-loop function 426 427 if ( !$id ) 424 if ( ! $id && ! in_the_loop() ) 425 return false; // in-the-loop function 426 427 if ( !$id ) 428 428 $id = (int) $post->ID; 429 429 … … 433 433 434 434 $tags = apply_filters( 'get_the_tags', $tags ); 435 if ( empty( $tags ) ) 436 return false; 437 return $tags; 435 if ( empty( $tags ) ) 436 return false; 437 return $tags; 438 438 } 439 439 -
trunk/wp-includes/category.php
r6000 r6026 103 103 } 104 104 105 function cat_is_ancestor_of($cat1, $cat2) { 106 if ( is_int($cat1) ) 107 $cat1 = & get_category($cat1); 108 if ( is_int($cat2) ) 109 $cat2 = & get_category($cat2); 105 function cat_is_ancestor_of($cat1, $cat2) { 106 if ( is_int($cat1) ) 107 $cat1 = & get_category($cat1); 108 if ( is_int($cat2) ) 109 $cat2 = & get_category($cat2); 110 110 111 if ( !$cat1->term_id || !$cat2->parent ) 112 return false; 111 if ( !$cat1->term_id || !$cat2->parent ) 112 return false; 113 113 114 if ( $cat2->parent == $cat1->term_id ) 115 return true; 114 if ( $cat2->parent == $cat1->term_id ) 115 return true; 116 116 117 return cat_is_ancestor_of($cat1, get_category($cat2->parent)); 118 } 117 return cat_is_ancestor_of($cat1, get_category($cat2->parent)); 118 } 119 119 120 120 function sanitize_category($category, $context = 'display') { -
trunk/wp-includes/class-IXR.php
r5700 r6026 1 1 <?php 2 /* 2 /* 3 3 IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002-2005 4 4 Version 1.7 (beta) - Simon Willison, 23rd May 2005 … … 255 255 } 256 256 $this->_currentTagContents = ''; 257 } 257 } 258 258 } 259 259 … … 380 380 'specVersion' => 1 381 381 ), 382 ); 382 ); 383 383 } 384 384 function getCapabilities($args) { … … 585 585 </value> 586 586 </fault> 587 </methodResponse> 587 </methodResponse> 588 588 589 589 EOD; … … 659 659 ); 660 660 $this->addCallback( 661 'system.methodSignature', 662 'this:methodSignature', 663 array('array', 'string'), 661 'system.methodSignature', 662 'this:methodSignature', 663 array('array', 'string'), 664 664 'Returns an array describing the return type and required parameters of a method' 665 665 ); 666 666 $this->addCallback( 667 'system.getCapabilities', 668 'this:getCapabilities', 669 array('struct'), 667 'system.getCapabilities', 668 'this:getCapabilities', 669 array('struct'), 670 670 'Returns a struct describing the XML-RPC specifications supported by this server' 671 671 ); 672 672 $this->addCallback( 673 'system.listMethods', 674 'this:listMethods', 675 array('array'), 673 'system.listMethods', 674 'this:listMethods', 675 array('array'), 676 676 'Returns an array of available methods on this server' 677 677 ); 678 678 $this->addCallback( 679 'system.methodHelp', 680 'this:methodHelp', 681 array('string', 'string'), 679 'system.methodHelp', 680 'this:methodHelp', 681 array('string', 'string'), 682 682 'Returns a documentation string for the specified method' 683 683 ); -
trunk/wp-includes/class-phpmailer.php
r5852 r6026 97 97 98 98 /** 99 * Sets word wrapping on the body of the message to a given number of 99 * Sets word wrapping on the body of the message to a given number of 100 100 * characters. 101 101 * @var int … … 116 116 117 117 /** 118 * Path to PHPMailer plugins. This is now only useful if the SMTP class 119 * is in a different directory than the PHP include path. 118 * Path to PHPMailer plugins. This is now only useful if the SMTP class 119 * is in a different directory than the PHP include path. 120 120 * @var string 121 121 */ … … 187 187 188 188 /** 189 * Sets the SMTP server timeout in seconds. This function will not 189 * Sets the SMTP server timeout in seconds. This function will not 190 190 * work with the win32 version. 191 191 * @var int … … 200 200 201 201 /** 202 * Prevents the SMTP connection from being closed after each mail 203 * sending. If this is set to true then to close the connection 204 * requires an explicit call to SmtpClose(). 202 * Prevents the SMTP connection from being closed after each mail 203 * sending. If this is set to true then to close the connection 204 * requires an explicit call to SmtpClose(). 205 205 * @var bool 206 206 */ … … 229 229 230 230 /** 231 * Sets message type to HTML. 231 * Sets message type to HTML. 232 232 * @param bool $bool 233 233 * @return void … … 265 265 266 266 /** 267 * Sets Mailer to send message using the qmail MTA. 267 * Sets Mailer to send message using the qmail MTA. 268 268 * @return void 269 269 */ … … 279 279 280 280 /** 281 * Adds a "To" address. 281 * Adds a "To" address. 282 282 * @param string $address 283 283 * @param string $name … … 293 293 * Adds a "Cc" address. Note: this function works 294 294 * with the SMTP mailer on win32, not with the "mail" 295 * mailer. 295 * mailer. 296 296 * @param string $address 297 297 * @param string $name … … 307 307 * Adds a "Bcc" address. Note: this function works 308 308 * with the SMTP mailer on win32, not with the "mail" 309 * mailer. 309 * mailer. 310 310 * @param string $address 311 311 * @param string $name … … 319 319 320 320 /** 321 * Adds a "Reply-to" address. 321 * Adds a "Reply-to" address. 322 322 * @param string $address 323 323 * @param string $name … … 338 338 * Creates message and assigns Mailer. If the message is 339 339 * not sent successfully then it returns false. Use the ErrorInfo 340 * variable to view description of the error. 340 * variable to view description of the error. 341 341 * @return bool 342 342 */ … … 385 385 386 386 /** 387 * Sends mail using the $Sendmail program. 387 * Sends mail using the $Sendmail program. 388 388 * @access private 389 389 * @return bool … … 415 415 416 416 /** 417 * Sends mail using the PHP mail() function. 417 * Sends mail using the PHP mail() function. 418 418 * @access private 419 419 * @return bool … … 432 432 ini_set("sendmail_from", $this->Sender); 433 433 $params = sprintf("-oi -f %s", $this->Sender); 434 $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, 434 $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, 435 435 $header, $params); 436 436 } … … 519 519 520 520 /** 521 * Initiates a connection to an SMTP server. Returns false if the 521 * Initiates a connection to an SMTP server. Returns false if the 522 522 * operation failed. 523 523 * @access private … … 530 530 $hosts = explode(";", $this->Host); 531 531 $index = 0; 532 $connection = ($this->smtp->Connected()); 532 $connection = ($this->smtp->Connected()); 533 533 534 534 // Retry while there is no connection … … 552 552 if($this->SMTPAuth) 553 553 { 554 if(!$this->smtp->Authenticate($this->Username, 554 if(!$this->smtp->Authenticate($this->Username, 555 555 $this->Password)) 556 556 { … … 586 586 587 587 /** 588 * Sets the language for all class error messages. Returns false 588 * Sets the language for all class error messages. Returns false 589 589 * if it cannot load the language file. The default language type 590 590 * is English. … … 614 614 615 615 /** 616 * Creates recipient headers. 616 * Creates recipient headers. 617 617 * @access private 618 618 * @return string … … 632 632 633 633 /** 634 * Formats an address correctly. 634 * Formats an address correctly. 635 635 * @access private 636 636 * @return string … … 641 641 else 642 642 { 643 $formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" . 643 $formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" . 644 644 $addr[0] . ">"; 645 645 } … … 651 651 * Wraps message for use with mailers that do not 652 652 * automatically perform wrapping and for quoted-printable. 653 * Original written by philippe. 653 * Original written by philippe. 654 654 * @access private 655 655 * @return string … … 713 713 { 714 714 $buf_o = $buf; 715 $buf .= ($e == 0) ? $word : (" " . $word); 715 $buf .= ($e == 0) ? $word : (" " . $word); 716 716 717 717 if (strlen($buf) > $length and $buf_o != "") … … 751 751 752 752 /** 753 * Assembles message header. 753 * Assembles message header. 754 754 * @access private 755 755 * @return string … … 783 783 $from[0][0] = trim($this->From); 784 784 $from[0][1] = $this->FromName; 785 $result .= $this->AddrAppend("From", $from); 785 $result .= $this->AddrAppend("From", $from); 786 786 787 787 // sendmail and mail() extract Bcc from the header before sending … … 801 801 if($this->ConfirmReadingTo != "") 802 802 { 803 $result .= $this->HeaderLine("Disposition-Notification-To", 803 $result .= $this->HeaderLine("Disposition-Notification-To", 804 804 "<" . trim($this->ConfirmReadingTo) . ">"); 805 805 } … … 808 808 for($index = 0; $index < count($this->CustomHeader); $index++) 809 809 { 810 $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), 810 $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), 811 811 $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); 812 812 } … … 825 825 if($this->InlineImageExists()) 826 826 { 827 $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", 828 "multipart/related", $this->LE, $this->LE, 827 $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", 828 "multipart/related", $this->LE, $this->LE, 829 829 $this->boundary[1], $this->LE); 830 830 } … … 860 860 { 861 861 case "alt": 862 $result .= $this->GetBoundary($this->boundary[1], "", 862 $result .= $this->GetBoundary($this->boundary[1], "", 863 863 "text/plain", ""); 864 864 $result .= $this->EncodeString($this->AltBody, $this->Encoding); 865 865 $result .= $this->LE.$this->LE; 866 $result .= $this->GetBoundary($this->boundary[1], "", 866 $result .= $this->GetBoundary($this->boundary[1], "", 867 867 "text/html", ""); 868 868 … … 886 886 $result .= sprintf("Content-Type: %s;%s" . 887 887 "\tboundary=\"%s\"%s", 888 "multipart/alternative", $this->LE, 888 "multipart/alternative", $this->LE, 889 889 $this->boundary[2], $this->LE.$this->LE); 890 890 891 891 // Create text body 892 $result .= $this->GetBoundary($this->boundary[2], "", 892 $result .= $this->GetBoundary($this->boundary[2], "", 893 893 "text/plain", "") . $this->LE; 894 894 … … 897 897 898 898 // Create the HTML body 899 $result .= $this->GetBoundary($this->boundary[2], "", 899 $result .= $this->GetBoundary($this->boundary[2], "", 900 900 "text/html", "") . $this->LE; 901 901 … … 925 925 926 926 $result .= $this->TextLine("--" . $boundary); 927 $result .= sprintf("Content-Type: %s; charset = \"%s\"", 927 $result .= sprintf("Content-Type: %s; charset = \"%s\"", 928 928 $contentType, $charSet); 929 929 $result .= $this->LE; … … 939 939 */ 940 940 function EndBoundary($boundary) { 941 return $this->LE . "--" . $boundary . "--" . $this->LE; 941 return $this->LE . "--" . $boundary . "--" . $this->LE; 942 942 } 943 943 … … 993 993 * @return bool 994 994 */ 995 function AddAttachment($path, $name = "", $encoding = "base64", 995 function AddAttachment($path, $name = "", $encoding = "base64", 996 996 $type = "application/octet-stream") { 997 997 if(!@is_file($path)) … … 1052 1052 $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); 1053 1053 1054 $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", 1054 $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", 1055 1055 $disposition, $name, $this->LE.$this->LE); 1056 1056 … … 1064 1064 else 1065 1065 { 1066 $mime[] = $this->EncodeFile($path, $encoding); 1066 $mime[] = $this->EncodeFile($path, $encoding); 1067 1067 if($this->IsError()) { return ""; } 1068 1068 $mime[] = $this->LE.$this->LE; … … 1130 1130 1131 1131 /** 1132 * Encode a header string to best of Q, B, quoted or none. 1132 * Encode a header string to best of Q, B, quoted or none. 1133 1133 * @access private 1134 1134 * @return string … … 1183 1183 1184 1184 /** 1185 * Encode string to quoted-printable. 1185 * Encode string to quoted-printable. 1186 1186 * @access private 1187 1187 * @return string … … 1206 1206 1207 1207 /** 1208 * Encode string to q encoding. 1208 * Encode string to q encoding. 1209 1209 * @access private 1210 1210 * @return string … … 1244 1244 * @return void 1245 1245 */ 1246 function AddStringAttachment($string, $filename, $encoding = "base64", 1246 function AddStringAttachment($string, $filename, $encoding = "base64", 1247 1247 $type = "application/octet-stream") { 1248 1248 // Append to $attachment array … … 1259 1259 1260 1260 /** 1261 * Adds an embedded attachment. This can include images, sounds, and 1262 * just about any other document. Make sure to set the $type to an 1263 * image type. For JPEG images use "image/jpeg" and for GIF images 1261 * Adds an embedded attachment. This can include images, sounds, and 1262 * just about any other document. Make sure to set the $type to an 1263 * image type. For JPEG images use "image/jpeg" and for GIF images 1264 1264 * use "image/gif". 1265 1265 * @param string $path Path to the attachment. 1266 * @param string $cid Content ID of the attachment. Use this to identify 1266 * @param string $cid Content ID of the attachment. Use this to identify 1267 1267 * the Id for accessing the image in an HTML form. 1268 1268 * @param string $name Overrides the attachment name. 1269 1269 * @param string $encoding File encoding (see $Encoding). 1270 * @param string $type File extension (MIME) type. 1270 * @param string $type File extension (MIME) type. 1271 1271 * @return bool 1272 1272 */ 1273 function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64", 1273 function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64", 1274 1274 $type = "application/octet-stream") { 1275 1275 … … 1398 1398 1399 1399 /** 1400 * Returns the proper RFC 822 formatted date. 1400 * Returns the proper RFC 822 formatted date. 1401 1401 * @access private 1402 1402 * @return string … … 1413 1413 1414 1414 /** 1415 * Returns the appropriate server variable. Should work with both 1416 * PHP 4.1.0+ as well as older versions. Returns an empty string 1415 * Returns the appropriate server variable. Should work with both 1416 * PHP 4.1.0+ as well as older versions. Returns an empty string 1417 1417 * if nothing is found. 1418 1418 * @access private … … 1476 1476 1477 1477 /** 1478 * Changes every end of line from CR or LF to CRLF. 1478 * Changes every end of line from CR or LF to CRLF. 1479 1479 * @access private 1480 1480 * @return string … … 1488 1488 1489 1489 /** 1490 * Adds a custom header. 1490 * Adds a custom header. 1491 1491 * @return void 1492 1492 */ -
trunk/wp-includes/class-pop3.php
r4945 r6026 1 <?php 1 <?php 2 2 3 3 /** -
trunk/wp-includes/class-snoopy.php
r5424 r6026 817 817 } 818 818 $headers .= substr($cookie_headers,0,-2) . "\r\n"; 819 } 819 } 820 820 } 821 821 if(!empty($this->rawheaders)) -
trunk/wp-includes/comment-template.php
r5982 r6026 290 290 if ( $user_ID) { 291 291 $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"); 292 } else if ( empty($comment_author) ) { 292 } else if ( empty($comment_author) ) { 293 293 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date"); 294 294 } else { -
trunk/wp-includes/feed-atom-comments.php
r5752 r6026 8 8 <?php do_action('atom_ns'); ?> 9 9 > 10 <title type="text"><?php 10 <title type="text"><?php 11 11 if ( is_singular() ) 12 12 printf(__('Comments on: %s'), get_the_title_rss()); -
trunk/wp-includes/feed-rss2-comments.php
r5911 r6026 2 2 header('Content-Type: text/xml;charset=' . get_option('blog_charset'), true); 3 3 4 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; 4 echo '<?xml version="1.0" encoding="'.get_option('blog_charset').'"?'.'>'; 5 5 ?> 6 6 <!-- generator="wordpress/<?php echo $wp_version ?>" --> 7 <rss version="2.0" 7 <rss version="2.0" 8 8 xmlns:content="http://purl.org/rss/1.0/modules/content/" 9 9 xmlns:dc="http://purl.org/dc/elements/1.1/" -
trunk/wp-includes/feed.php
r6025 r6026 157 157 158 158 if ( !empty($categories) ) foreach ( (array) $categories as $category ) { 159 $cat_names[] = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter); 159 $cat_names[] = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter); 160 160 } 161 161 162 162 if ( !empty($tags) ) foreach ( (array) $tags as $tag ) { 163 $cat_names[] = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter); 163 $cat_names[] = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter); 164 164 } 165 165 -
trunk/wp-includes/formatting.php
r6015 r6026 18 18 } 19 19 20 $static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney); 20 $static_characters = array_merge(array('---', ' -- ', '--', 'xn–', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney); 21 21 $static_replacements = array_merge(array('—', ' — ', '–', 'xn--', '…', '“', '’s', '”', ' ™'), $cockneyreplace); 22 22 … … 132 132 if ( $value < 128 ) { 133 133 if ( $length && ( strlen($unicode) + 1 > $length ) ) 134 break; 134 break; 135 135 $unicode .= chr($value); 136 136 } else { … … 651 651 // HTML loop taken from texturize function, could possible be consolidated 652 652 $textarr = preg_split("/(<.*>)/U", $text, -1, PREG_SPLIT_DELIM_CAPTURE); // capture the tags as well as in between 653 $stop = count($textarr);// loop stuff 654 for ($i = 0; $i < $stop; $i++) { 655 $content = $textarr[$i]; 656 if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag 657 $content = preg_replace($wp_smiliessearch, $wp_smiliesreplace, $content); 658 } 659 $output .= $content; 653 $stop = count($textarr);// loop stuff 654 for ($i = 0; $i < $stop; $i++) { 655 $content = $textarr[$i]; 656 if ((strlen($content) > 0) && ('<' != $content{0})) { // If it's not a tag 657 $content = preg_replace($wp_smiliessearch, $wp_smiliesreplace, $content); 658 } 659 $output .= $content; 660 660 } 661 661 } else { … … 1086 1086 $url = str_replace(';//', '://', $url); 1087 1087 /* If the URL doesn't appear to contain a scheme, we 1088 * presume it needs http:// appended (unless a relative 1088 * presume it needs http:// appended (unless a relative 1089 1089 * link starting with / or a php file). 1090 1090 */ … … 1095 1095 $url = preg_replace('/&([^#])(?![a-z]{2,8};)/', '&$1', $url); 1096 1096 if ( !is_array($protocols) ) 1097 $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'); 1097 $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet'); 1098 1098 if ( wp_kses_bad_protocol( $url, $protocols ) != $url ) 1099 1099 return ''; -
trunk/wp-includes/functions.php
r6025 r6026 9 9 return false; 10 10 } 11 $i = mktime( 12 (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ), 13 (int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 ) 11 $i = mktime( 12 (int) substr( $m, 11, 2 ), (int) substr( $m, 14, 2 ), (int) substr( $m, 17, 2 ), 13 (int) substr( $m, 5, 2 ), (int) substr( $m, 8, 2 ), (int) substr( $m, 0, 4 ) 14 14 ); 15 15 … … 183 183 184 184 // Allow plugins to short-circuit options. 185 $pre = apply_filters( 'pre_option_' . $setting, false ); 186 if ( false !== $pre ) 187 return $pre; 185 $pre = apply_filters( 'pre_option_' . $setting, false ); 186 if ( false !== $pre ) 187 return $pre; 188 188 189 189 // prevent non-existent options from triggering multiple queries … … 1204 1204 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 1205 1205 <link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install.css" type="text/css" /> 1206 <?php 1206 <?php 1207 1207 if ( ( $wp_locale ) && ('rtl' == $wp_locale->text_direction) ) : ?> 1208 1208 <link rel="stylesheet" href="<?php echo $admin_dir; ?>css/install-rtl.css" type="text/css" /> … … 1221 1221 1222 1222 function _config_wp_home($url = '') { 1223 if ( defined( 'WP_HOME' ) ) 1223 if ( defined( 'WP_HOME' ) ) 1224 1224 return WP_HOME; 1225 1225 else return $url; … … 1227 1227 1228 1228 function _config_wp_siteurl($url = '') { 1229 if ( defined( 'WP_SITEURL' ) ) 1229 if ( defined( 'WP_SITEURL' ) ) 1230 1230 return WP_SITEURL; 1231 1231 else return $url; -
trunk/wp-includes/general-template.php
r6025 r6026 65 65 66 66 /** 67 * Note: some of these values are DEPRECATED. Meaning they could be 68 * taken out at any time and shouldn't be relied upon. Options 69 * without "// DEPRECATED" are the preferred and recommended ways 67 * Note: some of these values are DEPRECATED. Meaning they could be 68 * taken out at any time and shouldn't be relied upon. Options 69 * without "// DEPRECATED" are the preferred and recommended ways 70 70 * to get the information. 71 71 */ … … 342 342 343 343 $defaults = array( 344 'type' => 'monthly', 'limit' => '', 345 'format' => 'html', 'before' => '', 344 'type' => 'monthly', 'limit' => '', 345 'format' => 'html', 'before' => '', 346 346 'after' => '', 'show_post_count' => false 347 347 ); … … 391 391 $url = get_month_link($arcresult->year, $arcresult->month); 392 392 $text = sprintf(__('%1$s %2$d'), $wp_locale->get_month($arcresult->month), $arcresult->year); 393 if ( $show_post_count ) 393 if ( $show_post_count ) 394 394 $after = ' ('.$arcresult->posts.')' . $afterafter; 395 395 echo get_archives_link($url, $text, $format, $before, $after); … … 837 837 838 838 if ( !isset( $wp_rich_edit) ) { 839 if ( get_user_option( 'rich_editing' ) == 'true' && 840 ( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) || 839 if ( get_user_option( 'rich_editing' ) == 'true' && 840 ( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) || 841 841 !preg_match( '!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT'] ) ) 842 842 && 'comment.php' != $pagenow ) { … … 902 902 var endPos = myField.selectionEnd; 903 903 myField.value = myField.value.substring(0, startPos) 904 + myValue 904 + myValue 905 905 + myField.value.substring(endPos, myField.value.length); 906 906 myField.focus(); … … 988 988 989 989 function paginate_links( $args = '' ) { 990 $defaults = array( 990 $defaults = array( 991 991 'base' => '%_%', // http://example.com/all_posts.php%_% : %_% is replaced by format (below) 992 992 'format' => '?page=%#%', // ?page=%#% : %#% is replaced by the page number … … 1073 1073 } else { 1074 1074 $_file = add_query_arg( 'version', get_bloginfo( 'version' ), get_option( 'siteurl' ) . "/wp-admin/$file.css" ); 1075 } 1075 } 1076 1076 return apply_filters( 'wp_admin_css_uri', $_file, $file ); 1077 1077 } -
trunk/wp-includes/js/tinymce/wp-mce-help.php
r5965 r6026 91 91 td b { font-family: Tahoma, "Times New Roman", Times, serif } 92 92 </style> 93 <?php endif; ?> 93 <?php endif; ?> 94 94 <script type="text/javascript"> 95 95 window.onkeydown = window.onkeypress = function (e) { -
trunk/wp-includes/kses.php
r5787 r6026 20 20 if (!CUSTOM_TAGS) { 21 21 $allowedposttags = array( 22 'address' => array(), 22 'address' => array(), 23 23 'a' => array( 24 'href' => array(), 'title' => array(), 25 'rel' => array(), 'rev' => array(), 24 'href' => array(), 'title' => array(), 25 'rel' => array(), 'rev' => array(), 26 26 'name' => array() 27 ), 27 ), 28 28 'abbr' => array( 29 29 'title' => array(), 'class' => array() 30 ), 30 ), 31 31 'acronym' => array( 32 32 'title' => array() 33 ), 34 'b' => array(), 35 'big' => array(), 33 ), 34 'b' => array(), 35 'big' => array(), 36 36 'blockquote' => array( 37 'cite' => array(), 'xml:lang' => array(), 37 'cite' => array(), 'xml:lang' => array(), 38 38 'lang' => array() 39 ), 40 'br' => array(), 39 ), 40 'br' => array(), 41 41 'button' => array( 42 'disabled' => array(), 'name' => array(), 42 'disabled' => array(), 'name' => array(), 43 43 'type' => array(), 'value' => array() 44 ), 44 ), 45 45 'caption' => array( 46 46 'align' => array() 47 ), 48 'code' => array(), 47 ), 48 'code' => array(), 49 49 'col' => array( 50 'align' => array(), 'char' => array(), 51 'charoff' => array(), 'span' => array(), 50 'align' => array(), 'char' => array(), 51 'charoff' => array(), 'span' => array(), 52 52 'valign' => array(), 'width' => array() 53 ), 53 ), 54 54 'del' => array( 55 55 'datetime' => array() 56 ), 57 'dd' => array(), 56 ), 57 'dd' => array(), 58 58 'div' => array( 59 'align' => array(), 'xml:lang' => array(), 59 'align' => array(), 'xml:lang' => array(), 60 60 'lang' => array() 61 ), 62 'dl' => array(), 63 'dt' => array(), 64 'em' => array(), 65 'fieldset' => array(), 61 ), 62 'dl' => array(), 63 'dt' => array(), 64 'em' => array(), 65 'fieldset' => array(), 66 66 'font' => array( 67 'color' => array(), 'face' => array(), 67 'color' => array(), 'face' => array(), 68 68 'size' => array() 69 ), 69 ), 70 70 'form' => array( 71 'action' => array(), 'accept' => array(), 72 'accept-charset' => array(), 'enctype' => array(), 73 'method' => array(), 'name' => array(), 71 'action' => array(), 'accept' => array(), 72 'accept-charset' => array(), 'enctype' => array(), 73 'method' => array(), 'name' => array(), 74 74 'target' => array() 75 ), 75 ), 76 76 'h1' => array( 77 77 'align' => array() 78 ), 78 ), 79 79 'h2' => array( 80 80 'align' => array() 81 ), 81 ), 82 82 'h3' => array( 83 83 'align' => array() 84 ), 84 ), 85 85 'h4' => array( 86 86 'align' => array() 87 ), 87 ), 88 88 'h5' => array( 89 89 'align' => array() 90 ), 90 ), 91 91 'h6' => array( 92 92 'align' => array() 93 ), 93 ), 94 94 'hr' => array( 95 'align' => array(), 'noshade' => array(), 95 'align' => array(), 'noshade' => array(), 96 96 'size' => array(), 'width' => array() 97 ), 98 'i' => array(), 97 ), 98 'i' => array(), 99 99 'img' => array( 100 'alt' => array(), 'align' => array(), 101 'border' => array(), 'height' => array(), 102 'hspace' => array(), 'longdesc' => array(), 103 'vspace' => array(), 'src' => array(), 100 'alt' => array(), 'align' => array(), 101 'border' => array(), 'height' => array(), 102 'hspace' => array(), 'longdesc' => array(), 103 'vspace' => array(), 'src' => array(), 104 104 'width' => array() 105 ), 105 ), 106 106 'ins' => array( 107 107 'datetime' => array(), 'cite' => array() 108 ), 109 'kbd' => array(), 108 ), 109 'kbd' => array(), 110 110 'label' => array( 111 111 'for' => array() 112 ), 112 ), 113 113 'legend' => array( 114 114 'align' => array() 115 ), 116 'li' => array(), 115 ), 116 'li' => array(), 117 117 'p' => array( 118 'align' => array(), 'xml:lang' => array(), 118 'align' => array(), 'xml:lang' => array(), 119 119 'lang' => array() 120 ), 120 ), 121 121 'pre' => array( 122 122 'width' => array() 123 ), 123 ), 124 124 'q' => array( 125 125 'cite' => array() 126 ), 127 's' => array(), 128 'strike' => array(), 129 'strong' => array(), 130 'sub' => array(), 131 'sup' => array(), 126 ), 127 's' => array(), 128 'strike' => array(), 129 'strong' => array(), 130 'sub' => array(), 131 'sup' => array(), 132 132 'table' => array( 133 'align' => array(), 'bgcolor' => array(), 134 'border' => array(), 'cellpadding' => array(), 135 'cellspacing' => array(), 'rules' => array(), 133 'align' => array(), 'bgcolor' => array(), 134 'border' => array(), 'cellpadding' => array(), 135 'cellspacing' => array(), 'rules' => array(), 136 136 'summary' => array(), 'width' => array() 137 ), 137 ), 138 138 'tbody' => array( 139 'align' => array(), 'char' => array(), 139 'align' => array(), 'char' => array(), 140 140 'charoff' => array(), 'valign' => array() 141 ), 141 ), 142 142 'td' => array( 143 'abbr' => array(), 'align' => array(), 144 'axis' => array(), 'bgcolor' => array(), 145 'char' => array(), 'charoff' => array(), 146 'colspan' => array(), 'headers' => array(), 147 'height' => array(), 'nowrap' => array(), 148 'rowspan' => array(), 'scope' => array(), 143 'abbr' => array(), 'align' => array(), 144 'axis' => array(), 'bgcolor' => array(), 145 'char' => array(), 'charoff' => array(), 146 'colspan' => array(), 'headers' => array(), 147 'height' => array(), 'nowrap' => array(), 148 'rowspan' => array(), 'scope' => array(), 149 149 'valign' => array(), 'width' => array() 150 ), 150 ), 151 151 'textarea' => array( 152 'cols' => array(), 'rows' => array(), 153 'disabled' => array(), 'name' => array(), 152 'cols' => array(), 'rows' => array(), 153 'disabled' => array(), 'name' => array(), 154 154 'readonly' => array() 155 ), 155 ), 156 156 'tfoot' => array( 157 'align' => array(), 'char' => array(), 157 'align' => array(), 'char' => array(), 158 158 'charoff' => array(), 'valign' => array() 159 ), 159 ), 160 160 'th' => array( 161 'abbr' => array(), 'align' => array(), 162 'axis' => array(), 'bgcolor' => array(), 163 'char' => array(), 'charoff' => array(), 164 'colspan' => array(), 'headers' => array(), 165 'height' => array(), 'nowrap' => array(), 166 'rowspan' => array(), 'scope' => array(), 161 'abbr' => array(), 'align' => array(), 162 'axis' => array(), 'bgcolor' => array(), 163 'char' => array(), 'charoff' => array(), 164 'colspan' => array(), 'headers' => array(), 165 'height' => array(), 'nowrap' => array(), 166 'rowspan' => array(), 'scope' => array(), 167 167 'valign' => array(), 'width' => array() 168 ), 168 ), 169 169 'thead' => array( 170 'align' => array(), 'char' => array(), 170 'align' => array(), 'char' => array(), 171 171 'charoff' => array(), 'valign' => array() 172 ), 173 'title' => array(), 172 ), 173 'title' => array(), 174 174 'tr' => array( 175 'align' => array(), 'bgcolor' => array(), 176 'char' => array(), 'charoff' => array(), 175 'align' => array(), 'bgcolor' => array(), 176 'char' => array(), 'charoff' => array(), 177 177 'valign' => array() 178 ), 179 'tt' => array(), 180 'u' => array(), 181 'ul' => array(), 182 'ol' => array(), 178 ), 179 'tt' => array(), 180 'u' => array(), 181 'ul' => array(), 182 'ol' => array(), 183 183 'var' => array() 184 184 ); … … 187 187 'a' => array( 188 188 'href' => array(), 'title' => array() 189 ), 189 ), 190 190 'abbr' => array( 191 191 'title' => array() 192 ), 192 ), 193 193 'acronym' => array( 194 194 'title' => array() 195 ), 196 'b' => array(), 195 ), 196 'b' => array(), 197 197 'blockquote' => array( 198 198 'cite' => array() … … 204 204 // 'dl' => array(), 205 205 // 'dt' => array(), 206 'em' => array(), 206 'em' => array(), 207 207 'i' => array(), 208 208 // 'ins' => array('datetime' => array(), 'cite' => array()), … … 211 211 // 'p' => array(), 212 212 // 'q' => array(), 213 'strike' => array(), 213 'strike' => array(), 214 214 'strong' => array(), 215 215 // 'sub' => array(), -
trunk/wp-includes/locale.php
r5700 r6026 91 91 // See http://php.net/number_format 92 92 93 $trans = __('number_format_decimals'); 93 $trans = __('number_format_decimals'); 94 94 $this->number_format['decimals'] = ('number_format_decimals' == $trans) ? 0 : $trans; 95 95 … … 97 97 $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans; 98 98 99 $trans = __('number_format_thousands_sep'); 100 $this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans; 99 $trans = __('number_format_thousands_sep'); 100 $this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans; 101 101 102 102 // Import global locale vars set during inclusion of $locale.php. -
trunk/wp-includes/pluggable.php
r5993 r6026 175 175 $headers = array(); 176 176 } elseif ( !is_array( $headers ) ) { 177 // Explode the headers out, so this function can take both 177 // Explode the headers out, so this function can take both 178 178 // string headers and an array of headers. 179 179 $tempheaders = (array) explode( "\n", $headers ); … … 397 397 398 398 if ( !$location ) // allows the wp_redirect filter to cancel a redirect 399 return false; 399 return false; 400 400 401 401 $location = preg_replace('|[^a-z0-9-~+_.?#=&;,/:%]|i', '', $location); … … 559 559 560 560 if( get_option( "moderation_notify" ) == 0 ) 561 return true; 561 return true; 562 562 563 563 $comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1"); -
trunk/wp-includes/plugin.php
r6025 r6026 3 3 /** 4 4 * Hooks a function to a specific filter action. 5 * 5 * 6 6 * Filters are the hooks that WordPress launches to modify text of various types 7 * before adding it to the database or sending it to the browser screen. Plugins 8 * can specify that one or more of its PHP functions is executed to 7 * before adding it to the database or sending it to the browser screen. Plugins 8 * can specify that one or more of its PHP functions is executed to 9 9 * modify specific types of text at these times, using the Filter API. 10 * See the [Plugin API] for a list of filter hooks. 10 * See the [Plugin API] for a list of filter hooks. 11 11 * 12 12 * @param string $tag The name of the filter to hook the <tt>$function_to_add</tt> to. … … 29 29 /** 30 30 * Call the functions added to a filter hook. 31 * 31 * 32 32 * The callback functions attached to filter hook <tt>$tag</tt> are invoked by 33 33 * calling this function. This function can be used to create a new filter hook … … 67 67 /** 68 68 * Merge the filter functions of a specific filter hook with generic filter functions. 69 * 70 * It is possible to defined generic filter functions using the filter hook 71 * <em>all</e>. These functions are called for every filter tag. This function 69 * 70 * It is possible to defined generic filter functions using the filter hook 71 * <em>all</e>. These functions are called for every filter tag. This function 72 72 * merges the functions attached to the <em>all</em> hook with the functions 73 73 * of a specific hoook defined by <tt>$tag</tt>. … … 88 88 89 89 /** 90 * Removes a function from a specified filter hook. 91 * 92 * This function removes a function attached to a specified filter hook. This 93 * method can be used to remove default functions attached to a specific filter 90 * Removes a function from a specified filter hook. 91 * 92 * This function removes a function attached to a specified filter hook. This 93 * method can be used to remove default functions attached to a specific filter 94 94 * hook and possibly replace them with a substitute. 95 95 * @param string $tag The filter hook to which the function to be removed is hooked. … … 112 112 /** 113 113 * Hooks a function on to a specific action. 114 * 115 * Actions are the hooks that the WordPress core launches at specific points 114 * 115 * Actions are the hooks that the WordPress core launches at specific points 116 116 * during execution, or when specific events occur. Plugins can specify that 117 * one or more of its PHP functions are executed at these points, using the 117 * one or more of its PHP functions are executed at these points, using the 118 118 * Action API. 119 * 119 * 120 120 * @param string $tag The name of the action to which the <tt>$function_to-add</tt> is hooked. 121 121 * @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. 122 122 * @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. 123 * @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. 123 * @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. 124 124 * @return boolean Always true. 125 125 */ … … 130 130 /** 131 131 * Execute functions hooked on a specific action hook. 132 * 132 * 133 133 * This function invokes all functions attached to action hook <tt>$tag</tt>. 134 134 * It is possible to create new action hooks by simply calling this function, … … 136 136 * @uses merge_filters 137 137 * @param string $tag The name of the action to be executed. 138 * @param mixed $arg,... Optional additional arguments which are passed on to the functions hooked to the action. 138 * @param mixed $arg,... Optional additional arguments which are passed on to the functions hooked to the action. 139 139 */ 140 140 function do_action($tag, $arg = '') { … … 184 184 /** 185 185 * Execute functions hooked on a specific action hook, specifying arguments in a array. 186 * 187 * This function is identical to {@link do_action}, but the argumetns passe to 186 * 187 * This function is identical to {@link do_action}, but the argumetns passe to 188 188 * the functions hooked to <tt>$tag</tt> are supplied using an array. 189 189 * @param string $tag The name of the action to be executed. … … 213 213 214 214 /** 215 * Removes a function from a specified action hook. 216 * 217 * This function removes a function attached to a specified action hook. This 218 * method can be used to remove default functions attached to a specific filter 215 * Removes a function from a specified action hook. 216 * 217 * This function removes a function attached to a specified action hook. This 218 * method can be used to remove default functions attached to a specific filter 219 219 * hook and possibly replace them with a substitute. 220 220 * @param string $tag The action hook to which the function to be removed is hooked. … … 234 234 /** 235 235 * Gets the basename of a plugin. 236 * 236 * 237 237 * This method extract the name of a plugin from its filename. 238 238 * @param string $file The filename of plugin. … … 248 248 /** 249 249 * Hook a function on a plugin activation action hook. 250 * 250 * 251 251 * When a plugin is activated, the action 'activate_PLUGINNAME' hook is 252 252 * activated. In the name of this hook, PLUGINNAME is replaced with the name of 253 253 * the plugin, including the optional subdirectory. For example, when the plugin 254 * is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the 255 * name of this hook will become 'activate_sampleplugin/sample.php'. 256 * When the plugin consists of only one file and is (as by default) located at 257 * <tt>wp-content/plugin/sample.php</tt> the name of this hook will be 254 * is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the 255 * name of this hook will become 'activate_sampleplugin/sample.php'. 256 * When the plugin consists of only one file and is (as by default) located at 257 * <tt>wp-content/plugin/sample.php</tt> the name of this hook will be 258 258 * 'activate_sample.php'. 259 259 * @param string $file The filename of the plugin including the path. … … 267 267 /** 268 268 * Hook a function on a plugin deactivation action hook. 269 * 269 * 270 270 * When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is 271 271 * deactivated. In the name of this hook, PLUGINNAME is replaced with the name of 272 272 * the plugin, including the optional subdirectory. For example, when the plugin 273 * is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the 274 * name of this hook will become 'activate_sampleplugin/sample.php'. 275 * When the plugin consists of only one file and is (as by default) located at 276 * <tt>wp-content/plugin/sample.php</tt> the name of this hook will be 273 * is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the 274 * name of this hook will become 'activate_sampleplugin/sample.php'. 275 * When the plugin consists of only one file and is (as by default) located at 276 * <tt>wp-content/plugin/sample.php</tt> the name of this hook will be 277 277 * 'activate_sample.php'. 278 278 * @param string $file The filename of the plugin including the path. -
trunk/wp-includes/post-template.php
r5752 r6026 140 140 function wp_link_pages($args = '') { 141 141 $defaults = array( 142 'before' => '<p>' . __('Pages:'), 'after' => '</p>', 143 'next_or_number' => 'number', 'nextpagelink' => __('Next page'), 144 'previouspagelink' => __('Previous page'), 'pagelink' => '%', 142 'before' => '<p>' . __('Pages:'), 'after' => '</p>', 143 'next_or_number' => 'number', 'nextpagelink' => __('Next page'), 144 'previouspagelink' => __('Previous page'), 'pagelink' => '%', 145 145 'more_file' => '', 'echo' => 1 146 146 ); … … 254 254 function wp_dropdown_pages($args = '') { 255 255 $defaults = array( 256 'depth' => 0, 'child_of' => 0, 257 'selected' => 0, 'echo' => 1, 256 'depth' => 0, 'child_of' => 0, 257 'selected' => 0, 'echo' => 1, 258 258 'name' => 'page_id', 'show_option_none' => '' 259 259 ); … … 283 283 function wp_list_pages($args = '') { 284 284 $defaults = array( 285 'depth' => 0, 'show_date' => '', 286 'date_format' => get_option('date_format'), 287 'child_of' => 0, 'exclude' => '', 288 'title_li' => __('Pages'), 'echo' => 1, 285 'depth' => 0, 'show_date' => '', 286 'date_format' => get_option('date_format'), 287 'child_of' => 0, 'exclude' => '', 288 'title_li' => __('Pages'), 'echo' => 1, 289 289 'authors' => '', 'sort_column' => 'menu_order, post_title' 290 290 ); -
trunk/wp-includes/post.php
r5976 r6026 42 42 43 43 $defaults = array( 44 'numberposts' => -1, 'post_type' => '', 44 'numberposts' => -1, 'post_type' => '', 45 45 'post_status' => '', 'post_parent' => 0 46 46 ); … … 195 195 196 196 $defaults = array( 197 'numberposts' => 5, 'offset' => 0, 198 'category' => 0, 'orderby' => 'post_date', 199 'order' => 'DESC', 'include' => '', 200 'exclude' => '', 'meta_key' => '', 201 'meta_value' =>'', 'post_type' => 'post', 197 'numberposts' => 5, 'offset' => 0, 198 'category' => 0, 'orderby' => 'post_date', 199 'order' => 'DESC', 'include' => '', 200 'exclude' => '', 'meta_key' => '', 201 'meta_value' =>'', 'post_type' => 'post', 202 202 'post_status' => 'publish', 'post_parent' => 0 203 203 ); … … 249 249 250 250 $query = "SELECT DISTINCT * FROM $wpdb->posts "; 251 $query .= empty( $category ) ? '' : ", $wpdb->term_relationships, $wpdb->term_taxonomy "; 251 $query .= empty( $category ) ? '' : ", $wpdb->term_relationships, $wpdb->term_taxonomy "; 252 252 $query .= empty( $meta_key ) ? '' : ", $wpdb->postmeta "; 253 253 $query .= " WHERE 1=1 "; … … 440 440 $post->$field = sanitize_post_field($field, $post->$field, $post->ID, $context); 441 441 else 442 $post[$field] = sanitize_post_field($field, $post[$field], $post['ID'], $context); 442 $post[$field] = sanitize_post_field($field, $post[$field], $post['ID'], $context); 443 443 } 444 444 … … 1115 1115 1116 1116 $defaults = array( 1117 'child_of' => 0, 'sort_order' => 'ASC', 1118 'sort_column' => 'post_title', 'hierarchical' => 1, 1119 'exclude' => '', 'include' => '', 1120 'meta_key' => '', 'meta_value' => '', 1117 'child_of' => 0, 'sort_order' => 'ASC', 1118 'sort_column' => 'post_title', 'hierarchical' => 1, 1119 'exclude' => '', 'include' => '', 1120 'meta_key' => '', 'meta_value' => '', 1121 1121 'authors' => '' 1122 1122 ); … … 1132 1132 $inclusions = ''; 1133 1133 if ( !empty($include) ) { 1134 $child_of = 0; //ignore child_of, exclude, meta_key, and meta_value params if using include 1134 $child_of = 0; //ignore child_of, exclude, meta_key, and meta_value params if using include 1135 1135 $exclude = ''; 1136 1136 $meta_key = ''; … … 1161 1161 } 1162 1162 } 1163 if (!empty($exclusions)) 1163 if (!empty($exclusions)) 1164 1164 $exclusions .= ')'; 1165 1165 … … 1191 1191 1192 1192 $query = "SELECT * FROM $wpdb->posts " ; 1193 $query .= ( empty( $meta_key ) ? "" : ", $wpdb->postmeta " ) ; 1193 $query .= ( empty( $meta_key ) ? "" : ", $wpdb->postmeta " ) ; 1194 1194 $query .= " WHERE (post_type = 'page' AND post_status = 'publish') $exclusions $inclusions " ; 1195 1195 $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' )" ) ; … … 1622 1622 * to allow all published posts, and all private posts to which the user 1623 1623 * has access. 1624 * 1624 * 1625 1625 * @param string $post_type currently only supports 'post' or 'page'. 1626 1626 * @return string SQL code that can be added to a where clause. -
trunk/wp-includes/query.php
r6025 r6026 276 276 277 277 /* 278 * Comments loop. 279 */ 280 281 function have_comments() { 282 global $wp_query; 283 return $wp_query->have_comments(); 284 } 285 286 function the_comment() { 287 global $wp_query; 288 return $wp_query->the_comment(); 289 } 278 * Comments loop. 279 */ 280 281 function have_comments() { 282 global $wp_query; 283 return $wp_query->have_comments(); 284 } 285 286 function the_comment() { 287 global $wp_query; 288 return $wp_query->the_comment(); 289 } 290 290 291 291 /* … … 566 566 } else { 567 567 $qv['category__in'] = array_map('intval', $qv['category__in']); 568 $this->is_category = true; 568 $this->is_category = true; 569 569 } 570 570 … … 579 579 } else { 580 580 $qv['category__and'] = array_map('intval', $qv['category__and']); 581 $this->is_category = true; 581 $this->is_category = true; 582 582 } 583 583 … … 593 593 } else { 594 594 $qv['tag__in'] = array_map('intval', $qv['tag__in']); 595 $this->is_tag = true; 595 $this->is_tag = true; 596 596 } 597 597 … … 606 606 } else { 607 607 $qv['tag__and'] = array_map('intval', $qv['tag__and']); 608 $this->is_category = true; 608 $this->is_category = true; 609 609 } 610 610 … … 613 613 } else { 614 614 $qv['tag_slug__in'] = array_map('sanitize_title', $qv['tag_slug__in']); 615 $this->is_tag = true; 615 $this->is_tag = true; 616 616 } 617 617 … … 620 620 } else { 621 621 $qv['tag_slug__and'] = array_map('sanitize_title', $qv['tag_slug__and']); 622 $this->is_tag = true; 622 $this->is_tag = true; 623 623 } 624 624 … … 903 903 $searchand = ' AND '; 904 904 } 905 $term = addslashes_gpc($q['s']); 905 $term = addslashes_gpc($q['s']); 906 906 if (!$q['sentence'] && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] ) 907 907 $search .= " OR (post_title LIKE '{$n}{$term}{$n}') OR (post_content LIKE '{$n}{$term}{$n}')"; … … 1225 1225 1226 1226 // Apply post-paging filters on where and join. Only plugins that 1227 // manipulate paging queries should use these hooks. 1227 // manipulate paging queries should use these hooks. 1228 1228 1229 1229 // Announce current selection parameters. For use by caching plugins. -
trunk/wp-includes/rss.php
r6025 r6026 835 835 foreach ( $rss->items as $item ) { 836 836 printf( 837 '<li><a href="%1$s" title="%2$s">%3$s</a></li>', 838 clean_url( $item['link'] ), 839 attribute_escape( strip_tags( $item['description'] ) ), 837 '<li><a href="%1$s" title="%2$s">%3$s</a></li>', 838 clean_url( $item['link'] ), 839 attribute_escape( strip_tags( $item['description'] ) ), 840 840 htmlentities( $item['title'] ) 841 841 ); -
trunk/wp-includes/streams.php
r5700 r6026 140 140 } 141 141 142 // Preloads entire file in memory first, then creates a StringReader 142 // Preloads entire file in memory first, then creates a StringReader 143 143 // over it (it assumes knowledge of StringReader internals) 144 144 class CachedFileReader extends StringReader { -
trunk/wp-includes/taxonomy.php
r6007 r6026 19 19 * $wp_taxonomies global variable. 20 20 * 21 * @example 21 * @example 22 22 * <?php $taxonomies = get_object_taxonomies('post'); ?> 23 23 * Should result in <pre>Array( … … 86 86 global $wp_taxonomies; 87 87 88 return isset($wp_taxonomies[$taxonomy]); 88 return isset($wp_taxonomies[$taxonomy]); 89 89 } 90 90 … … 116 116 * 117 117 * A simple function for creating or modifying a taxonomy object based on the parameters given. 118 * The function will accept an array (third optional parameter), along with strings for the 118 * The function will accept an array (third optional parameter), along with strings for the 119 119 * taxonomy name and another string for the object type. 120 120 * … … 164 164 * be returned. 165 165 * 166 * It is possible to change the order that object_ids is returned by either using PHP sort family 166 * It is possible to change the order that object_ids is returned by either using PHP sort family 167 167 * functions or using the database by using $args with either ASC or DESC array. The value should 168 168 * be in the key named 'order'. … … 214 214 215 215 /** 216 * get_term() - 217 * 218 * 216 * get_term() - 217 * 218 * 219 219 * 220 220 * @package Taxonomy … … 266 266 267 267 /** 268 * get_term_by() - 269 * 270 * 268 * get_term_by() - 269 * 270 * 271 271 * 272 272 * @package Taxonomy 273 273 * @subpackage Term 274 274 * @global object $wpdb Database Query 275 * @param string $field 276 * @param string $value 277 * @param string $taxonomy 275 * @param string $field 276 * @param string $value 277 * @param string $taxonomy 278 278 * @param string $output Either OBJECT, ARRAY_A, or ARRAY_N 279 279 * @return mixed Term Row from database … … 575 575 $term->$field = sanitize_term_field($field, $term->$field, $term->term_id, $taxonomy, $context); 576 576 else 577 $term[$field] = sanitize_term_field($field, $term[$field], $term['term_id'], $taxonomy, $context); 577 $term[$field] = sanitize_term_field($field, $term[$field], $term['term_id'], $taxonomy, $context); 578 578 } 579 579 … … 701 701 * @param int|array $object_id The id of the object(s)) to retrieve for. 702 702 * @param string|array $taxonomies The taxonomies to retrieve terms from. 703 * @return array The requested term data. 703 * @return array The requested term data. 704 704 */ 705 705 function wp_get_object_terms($object_ids, $taxonomies, $args = array()) { … … 778 778 $slug = sanitize_title($name); 779 779 780 $term_group = 0; 780 $term_group = 0; 781 781 if ( $alias_of ) { 782 782 $alias = $wpdb->fetch_row("SELECT term_id, term_group FROM $wpdb->terms WHERE slug = '$alias_of'"); … … 1004 1004 } 1005 1005 1006 foreach ( $taxonomies as $taxonomy ) { 1006 foreach ( $taxonomies as $taxonomy ) { 1007 1007 wp_cache_delete('all_ids', $taxonomy); 1008 1008 wp_cache_delete('get', $taxonomy); -
trunk/wp-includes/theme.php
r5867 r6026 73 73 74 74 $theme_data = implode( '', file( $theme_file ) ); 75 $theme_data = str_replace ( '\r', '\n', $theme_data ); 75 $theme_data = str_replace ( '\r', '\n', $theme_data ); 76 76 preg_match( '|Theme Name:(.*)$|mi', $theme_data, $theme_name ); 77 77 preg_match( '|Theme URI:(.*)$|mi', $theme_data, $theme_uri ); … … 210 210 $parent_dir = dirname(dirname($theme_file)); 211 211 if ( file_exists("$theme_root/$parent_dir/$template/index.php") ) { 212 $template = "$parent_dir/$template"; 212 $template = "$parent_dir/$template"; 213 213 } else { 214 214 $wp_broken_themes[$name] = array('Name' => $name, 'Title' => $title, 'Description' => __('Template is missing.')); -
trunk/wp-includes/update.php
r6025 r6026 13 13 $locale = get_locale(); 14 14 15 if ( 16 isset( $current->last_checked ) && 17 43200 > ( time() - $current->last_checked ) && 15 if ( 16 isset( $current->last_checked ) && 17 43200 > ( time() - $current->last_checked ) && 18 18 $current->version_checked == $wp_version 19 19 ) -
trunk/wp-includes/widgets.php
r6025 r6026 376 376 ?> 377 377 <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> 378 <p><label for="pages-sortby"><?php _e( 'Sort by:' ); ?> 378 <p><label for="pages-sortby"><?php _e( 'Sort by:' ); ?> 379 379 <select name="pages-sortby" id="pages-sortby"> 380 380 <option value="post_title"<?php selected( $options['sortby'], 'post_title' ); ?>><?php _e('Page title'); ?></option> … … 391 391 extract($args, EXTR_SKIP); 392 392 wp_list_bookmarks(array( 393 'title_before' => $before_title, 'title_after' => $after_title, 394 'category_before' => $before_widget, 'category_after' => $after_widget, 393 'title_before' => $before_title, 'title_after' => $after_title, 394 'category_before' => $before_widget, 'category_after' => $after_widget, 395 395 'show_images' => true, 'class' => 'linkcat widget' 396 396 )); … … 418 418 $title = empty($options['title']) ? __('Archives') : $options['title']; 419 419 420 echo $before_widget; 420 echo $before_widget; 421 421 echo $before_title . $title . $after_title; 422 422 423 if($d) { 423 if($d) { 424 424 ?> 425 425 <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> 426 <?php 427 } else { 426 <?php 427 } else { 428 428 ?> 429 429 <ul> … … 433 433 } 434 434 435 echo $after_widget; 435 echo $after_widget; 436 436 } 437 437 … … 615 615 616 616 echo $before_widget; 617 echo $before_title . $title . $after_title; 617 echo $before_title . $title . $after_title; 618 618 619 619 $cat_args = "orderby=name&show_count={$c}&hierarchical={$h}"; -
trunk/wp-includes/wp-db.php
r5950 r6026 83 83 84 84 function __destruct() { 85 return true; 85 return true; 86 86 } 87 87 -
trunk/wp-login.php
r6009 r6026 215 215 216 216 $user_login = sanitize_user( $_POST['user_login'] ); 217 $user_email = apply_filters( 'user_registration_email', $_POST['user_email'] ); 217 $user_email = apply_filters( 'user_registration_email', $_POST['user_email'] ); 218 218 219 219 // Check the username -
trunk/wp-settings.php
r6025 r6026 12 12 13 13 $input = array_merge($_GET, $_POST, $_COOKIE, $_SERVER, $_ENV, $_FILES, isset($_SESSION) && is_array($_SESSION) ? $_SESSION : array()); 14 foreach ( $input as $k => $v ) 14 foreach ( $input as $k => $v ) 15 15 if ( !in_array($k, $noUnset) && isset($GLOBALS[$k]) ) { 16 16 $GLOBALS[$k] = NULL; … … 19 19 } 20 20 21 wp_unregister_GLOBALS(); 21 wp_unregister_GLOBALS(); 22 22 23 23 unset( $wp_filter, $cache_userdata, $cache_lastcommentmodified, $cache_lastpostdate, $cache_settings, $category_cache, $cache_categories ); … … 159 159 if ( !is_blog_installed() && (strpos($_SERVER['PHP_SELF'], 'install.php') === false && !defined('WP_INSTALLING')) ) { 160 160 if ( defined('WP_SITEURL') ) 161 $link = WP_SITEURL . '/wp-admin/install.php'; 161 $link = WP_SITEURL . '/wp-admin/install.php'; 162 162 elseif (strpos($_SERVER['PHP_SELF'], 'wp-admin') !== false) 163 163 $link = preg_replace('|/wp-admin/?.*?$|', '/', $_SERVER['PHP_SELF']) . 'wp-admin/install.php'; … … 200 200 // Used to guarantee unique hash cookies 201 201 $cookiehash = md5(get_option('siteurl')); 202 define('COOKIEHASH', $cookiehash); 202 define('COOKIEHASH', $cookiehash); 203 203 } 204 204 -
trunk/xmlrpc.php
r5981 r6026 6 6 $_COOKIE = array(); 7 7 8 // A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default, 8 // A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default, 9 9 // but we can do it ourself. 10 10 if ( !isset( $HTTP_RAW_POST_DATA ) ) { … … 18 18 include('./wp-config.php'); 19 19 20 if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd 20 if ( isset( $_GET['rsd'] ) ) { // http://archipelago.phrasewise.com/rsd 21 21 header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); 22 22 … … 724 724 725 725 /* so it is actually editable with a windows/mac client */ 726 // 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); 726 // 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); 727 727 728 728 return $content; … … 1029 1029 case "closed": 1030 1030 $ping_status = "closed"; 1031 break; 1031 break; 1032 1032 case "open": 1033 1033 $ping_status = "open"; … … 1239 1239 case "closed": 1240 1240 $ping_status = "closed"; 1241 break; 1241 break; 1242 1242 case "open": 1243 1243 $ping_status = "open";
Note: See TracChangeset
for help on using the changeset viewer.