Ticket #19433: extra_space_3.patch
File extra_space_3.patch, 73.3 KB (added by , 13 years ago) |
---|
-
wp-admin/admin-ajax.php
970 970 // Drafts and auto-drafts are just overwritten by autosave 971 971 if ( 'auto-draft' == $post->post_status || 'draft' == $post->post_status ) { 972 972 $id = edit_post(); 973 } else { // Non drafts are not overwritten. 973 } else { // Non drafts are not overwritten. The autosave is stored in a special post revision. 974 974 $revision_id = wp_create_post_autosave( $post->ID ); 975 975 if ( is_wp_error($revision_id) ) 976 976 $id = $revision_id; -
wp-admin/custom-header.php
676 676 $oitar = $width / HEADER_IMAGE_WIDTH; 677 677 $image = wp_crop_image($file, 0, 0, $width, $height, HEADER_IMAGE_WIDTH, $height / $oitar, false, str_replace(basename($file), 'midsize-'.basename($file), $file)); 678 678 if ( is_wp_error( $image ) ) 679 wp_die( __( 'Image could not be processed. 679 wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) ); 680 680 681 681 $image = apply_filters('wp_create_file_in_uploads', $image, $id); // For replication 682 682 … … 737 737 738 738 $cropped = wp_crop_image( $attachment_id, (int) $_POST['x1'], (int) $_POST['y1'], (int) $_POST['width'], (int) $_POST['height'], HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT ); 739 739 if ( is_wp_error( $cropped ) ) 740 wp_die( __( 'Image could not be processed. 740 wp_die( __( 'Image could not be processed. Please go back and try again.' ), __( 'Image Processing Error' ) ); 741 741 742 742 $cropped = apply_filters('wp_create_file_in_uploads', $cropped, $attachment_id); // For replication 743 743 -
wp-admin/edit-form-advanced.php
87 87 if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) { 88 88 foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { 89 89 if ( normalize_whitespace( $autosave->$autosave_field ) != normalize_whitespace( $post->$autosave_field ) ) { 90 $notice = sprintf( __( 'There is an autosave of this post that is more recent than the version below. 90 $notice = sprintf( __( 'There is an autosave of this post that is more recent than the version below. <a href="%s">View the autosave</a>' ), get_edit_post_link( $autosave->ID ) ); 91 91 break; 92 92 } 93 93 } -
wp-admin/edit-tag-form.php
24 24 else 25 25 do_action('edit_tag_form_pre', $tag); 26 26 27 do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); 27 do_action($taxonomy . '_pre_edit_form', $tag, $taxonomy); ?> 28 28 29 29 <div class="wrap"> 30 30 <?php screen_icon(); ?> -
wp-admin/edit.php
133 133 break; 134 134 } 135 135 136 $sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 136 $sendback = remove_query_arg( array('action', 'action2', 'tags_input', 'post_author', 'comment_status', 'ping_status', '_status', 'post', 'bulk_edit', 'post_view'), $sendback ); 137 137 138 138 wp_redirect($sendback); 139 139 exit(); -
wp-admin/export.php
41 41 get_current_screen()->add_help_tab( array( 42 42 'id' => 'overview', 43 43 'title' => __('Overview'), 44 'content' => '<p>' . __('You can export a file of your site’s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to 44 'content' => '<p>' . __('You can export a file of your site’s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can choose for the WXR file to include only certain posts or pages by setting the dropdown filters to limit the export by category, author, date range by month, or publishing status.') . '</p>' . 45 45 '<p>' . __('Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.') . '</p>', 46 46 ) ); 47 47 -
wp-admin/import.php
20 20 'id' => 'overview', 21 21 'title' => __('Overview'), 22 22 'content' => '<p>' . __('This screen lists links to plugins to import data from blogging/content management platforms. Choose the platform you want to import from, and click Install Now when you are prompted in the popup window. If your platform is not listed, click the link to search the plugin directory for other importer plugins to see if there is one for your platform.') . '</p>' . 23 '<p>' . __('In previous versions of WordPress, all importers were built-in. 23 '<p>' . __('In previous versions of WordPress, all importers were built-in. They have been turned into plugins since most people only use them once or infrequently.') . '</p>', 24 24 ) ); 25 25 26 26 -
wp-admin/includes/dashboard.php
86 86 if ( !isset( $widget_options['dashboard_primary'] ) ) { 87 87 $update = true; 88 88 $widget_options['dashboard_primary'] = array( 89 'link' => apply_filters( 'dashboard_primary_link', 90 'url' => apply_filters( 'dashboard_primary_feed', 89 'link' => apply_filters( 'dashboard_primary_link', __( 'http://wordpress.org/news/' ) ), 90 'url' => apply_filters( 'dashboard_primary_feed', __( 'http://wordpress.org/news/feed/' ) ), 91 91 'title' => apply_filters( 'dashboard_primary_title', __( 'WordPress Blog' ) ), 92 92 'items' => 2, 93 93 'show_summary' => 1, … … 101 101 if ( !isset( $widget_options['dashboard_secondary'] ) ) { 102 102 $update = true; 103 103 $widget_options['dashboard_secondary'] = array( 104 'link' => apply_filters( 'dashboard_secondary_link', 105 'url' => apply_filters( 'dashboard_secondary_feed', 104 'link' => apply_filters( 'dashboard_secondary_link', __( 'http://planet.wordpress.org/' ) ), 105 'url' => apply_filters( 'dashboard_secondary_feed', __( 'http://planet.wordpress.org/feed/' ) ), 106 106 'title' => apply_filters( 'dashboard_secondary_title', __( 'Other WordPress News' ) ), 107 107 'items' => 5, 108 108 'show_summary' => 0, … … 273 273 274 274 echo '</tr><tr>'; 275 275 /* TODO: Show status breakdown on hover 276 if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. 276 if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can 277 277 $post_type_texts[] = '<a href="edit-pages.php">'.sprintf( _n( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>'; 278 278 } 279 279 if ( $can_edit_posts && !empty($num_posts->draft) ) { … … 700 700 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; 701 701 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . esc_attr__('Edit comment') . "'>". __('Edit') . '</a>'; 702 702 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.esc_attr__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 703 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ 703 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>'; 704 704 if ( !EMPTY_TRASH_DAYS ) 705 705 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>'; 706 706 else … … 1115 1115 if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget-rss'][$number]) ) { 1116 1116 $_POST['widget-rss'][$number] = stripslashes_deep( $_POST['widget-rss'][$number] ); 1117 1117 $widget_options[$widget_id] = wp_widget_rss_process( $_POST['widget-rss'][$number] ); 1118 // title is optional. 1118 // title is optional. If black, fill it if possible 1119 1119 if ( !$widget_options[$widget_id]['title'] && isset($_POST['widget-rss'][$number]['title']) ) { 1120 1120 $rss = fetch_feed($widget_options[$widget_id]['url']); 1121 1121 if ( is_wp_error($rss) ) { … … 1290 1290 <div class="wp-badge"><?php printf( __( 'Version %s' ), $display_version ); ?></div> 1291 1291 1292 1292 <div class="welcome-panel-content"> 1293 <h3><?php _e( 'Welcome to your new WordPress site! 1293 <h3><?php _e( 'Welcome to your new WordPress site!' ); ?></h3> 1294 1294 <p class="about-description"><?php _e( 'If you need help getting started, check out our documentation on <a href="http://codex.wordpress.org/First_Steps_With_WordPress">First Steps with WordPress</a>. If you’d rather dive right in, here are a few things most people do first when they set up a new WordPress site. If you need help, use the Help tabs in the upper right corner to get information on how to use your current screen and where to go for more assistance.' ); ?></p> 1295 1295 <div class="welcome-panel-column-container"> 1296 1296 <div class="welcome-panel-column"> -
wp-admin/includes/deprecated.php
133 133 * @deprecated Use register_setting() 134 134 * @see register_setting() 135 135 * 136 * @param string $option_group A settings group name. 136 * @param string $option_group A settings group name. Should correspond to a whitelisted option key name. 137 137 * Default whitelisted option key names include "general," "discussion," and "reading," among others. 138 138 * @param string $option_name The name of an option to sanitize and save. 139 139 * @param unknown_type $sanitize_callback A callback function that sanitizes the option's value. … … 870 870 * @deprecated Use get_current_screen()->add_help_tab() 871 871 * @see WP_Screen 872 872 * 873 * @param string $screen The handle for the screen to add help to. 873 * @param string $screen The handle for the screen to add help to. This is usually the hook name returned by the add_*_page() functions. 874 874 * @param string $help The content of an 'Overview' help tab. 875 875 */ 876 876 function add_contextual_help( $screen, $help ) { -
wp-admin/includes/file.php
157 157 * Please note that the calling function must unlink() this itself. 158 158 * 159 159 * The filename is based off the passed parameter or defaults to the current unix timestamp, 160 * while the directory can either be passed as well, or by leaving 160 * while the directory can either be passed as well, or by leaving it blank, default to a writable temporary directory. 161 161 * 162 162 * @since 2.6.0 163 163 * … … 240 240 // You may define your own function and pass the name in $overrides['upload_error_handler'] 241 241 $upload_error_handler = 'wp_handle_upload_error'; 242 242 243 // You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. 243 // You may have had one or more 'wp_handle_upload_prefilter' functions error out the file. Handle that gracefully. 244 244 if ( isset( $file['error'] ) && !is_numeric( $file['error'] ) && $file['error'] ) 245 245 return $upload_error_handler( $file, $file['error'] ); 246 246 … … 364 364 365 365 /** 366 366 * Handle sideloads, which is the process of retrieving a media item from another server instead of 367 * a traditional media upload. 367 * a traditional media upload. This process involves sanitizing the filename, checking extensions 368 368 * for mime type, and moving the file to the appropriate directory within the uploads directory. 369 369 * 370 370 * @since 2.6.0 … … 486 486 487 487 /** 488 488 * Downloads a url to a local temporary file using the WordPress HTTP Class. 489 * Please note, That the calling function must unlink() the 489 * Please note, That the calling function must unlink() the file. 490 490 * 491 491 * @since 2.5.0 492 492 * … … 884 884 } 885 885 886 886 /** 887 * Displays a form to the user to request for their FTP/SSH details in order to 887 * Displays a form to the user to request for their FTP/SSH details in order to connect to the filesystem. 888 888 * All chosen/entered details are saved, Excluding the Password. 889 889 * 890 890 * Hostnames may be in the form of hostname:portnumber (eg: wordpress.org:2467) to specify an alternate FTP/SSH port. … … 896 896 * @param string $form_post the URL to post the form to 897 897 * @param string $type the chosen Filesystem method in use 898 898 * @param boolean $error if the current request has failed to connect 899 * @param string $context The directory which is needed access to, The write-test will be performed on 899 * @param string $context The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method() 900 900 * @param string $extra_fields Extra POST fields which should be checked for to be included in the post. 901 901 * @return boolean False on failure. True on success. 902 902 */ -
wp-admin/includes/image-edit.php
192 192 </tbody></table> 193 193 <div class="imgedit-wait" id="imgedit-wait-<?php echo $post_id; ?>"></div> 194 194 <script type="text/javascript">imageEdit.init(<?php echo $post_id; ?>);</script> 195 <div class="hidden" id="imgedit-leaving-<?php echo $post_id; ?>"><?php _e("There are unsaved changes that will be lost. 195 <div class="hidden" id="imgedit-leaving-<?php echo $post_id; ?>"><?php _e("There are unsaved changes that will be lost. 'OK' to continue, 'Cancel' to return to the Image Editor."); ?></div> 196 196 </div> 197 197 <?php 198 198 } -
wp-admin/includes/image.php
205 205 206 206 // exif contains a bunch of data we'll probably never need formatted in ways 207 207 // that are difficult to use. We'll normalize it and just extract the fields 208 // that are likely to be useful. 208 // that are likely to be useful. Fractions and numbers are converted to 209 209 // floats, dates to unix timestamps, and everything else to strings. 210 210 $meta = array( 211 211 'aperture' => 0, -
wp-admin/includes/meta-boxes.php
27 27 28 28 <div id="minor-publishing-actions"> 29 29 <div id="save-action"> 30 <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) 30 <?php if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) { ?> 31 31 <input <?php if ( 'private' == $post->post_status ) { ?>style="display:none"<?php } ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save Draft'); ?>" tabindex="4" class="button button-highlighted" /> 32 32 <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?> 33 33 <input type="submit" name="save" id="save-post" value="<?php esc_attr_e('Save as Pending'); ?>" tabindex="4" class="button button-highlighted" /> … … 639 639 <div id="delete-action"> 640 640 <?php 641 641 if ( !empty($_GET['action']) && 'edit' == $_GET['action'] && current_user_can('manage_links') ) { ?> 642 <a class="submitdelete deletion" href="<?php echo wp_nonce_url("link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id); ?>" onclick="if ( confirm('<?php echo esc_js(sprintf(__("You are about to delete this link '%s'\n 642 <a class="submitdelete deletion" href="<?php echo wp_nonce_url("link.php?action=delete&link_id=$link->link_id", 'delete-bookmark_' . $link->link_id); ?>" onclick="if ( confirm('<?php echo esc_js(sprintf(__("You are about to delete this link '%s'\n 'Cancel' to stop, 'OK' to delete."), $link->link_name )); ?>') ) {return true;}return false;"><?php _e('Delete'); ?></a> 643 643 <?php } ?> 644 644 </div> 645 645 … … 789 789 <label for="contact"> 790 790 <input class="valinp" type="radio" name="friendship" value="contact" id="contact" <?php xfn_check('friendship', 'contact'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('contact') ?></label> 791 791 <label for="acquaintance"> 792 <input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance'); ?> /> 792 <input class="valinp" type="radio" name="friendship" value="acquaintance" id="acquaintance" <?php xfn_check('friendship', 'acquaintance'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('acquaintance') ?></label> 793 793 <label for="friend"> 794 794 <input class="valinp" type="radio" name="friendship" value="friend" id="friend" <?php xfn_check('friendship', 'friend'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friend') ?></label> 795 795 <label for="friendship"> … … 833 833 <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </th> 834 834 <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </span></legend> 835 835 <label for="child"> 836 <input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child'); ?> 836 <input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child'); ?> /> 837 837 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('child') ?></label> 838 838 <label for="kin"> 839 <input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin'); ?> 839 <input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin'); ?> /> 840 840 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('kin') ?></label> 841 841 <label for="parent"> 842 842 <input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent'); ?> /> … … 894 894 </tr> 895 895 <tr class="form-field"> 896 896 <th valign="top" scope="row"><label for="rss_uri"><?php _e('RSS Address') ?></label></th> 897 <td><input name="link_rss" class="code" type="text" id="rss_uri" value="<?php echo 897 <td><input name="link_rss" class="code" type="text" id="rss_uri" value="<?php echo ( isset( $link->link_rss ) ? esc_attr($link->link_rss) : ''); ?>" size="50" style="width: 95%" /></td> 898 898 </tr> 899 899 <tr class="form-field"> 900 900 <th valign="top" scope="row"><label for="link_notes"><?php _e('Notes') ?></label></th> -
wp-admin/includes/ms.php
49 49 * @since 3.0.0 50 50 * 51 51 * @param int $blog_id Blog ID 52 * @param bool $drop True if blog's table should be dropped. 52 * @param bool $drop True if blog's table should be dropped. Default is false. 53 53 * @return void 54 54 */ 55 55 function wpmu_delete_blog( $blog_id, $drop = false ) { … … 115 115 $index++; 116 116 } 117 117 118 $stack = array_reverse( $stack ); 118 $stack = array_reverse( $stack ); // Last added dirs are deepest 119 119 foreach( (array) $stack as $dir ) { 120 120 if ( $dir != $top_dir) 121 121 @rmdir( $dir ); … … 430 430 function update_user_status( $id, $pref, $value, $deprecated = null ) { 431 431 global $wpdb; 432 432 433 if ( null !== $deprecated 433 if ( null !== $deprecated ) 434 434 _deprecated_argument( __FUNCTION__, '3.1' ); 435 435 436 436 $wpdb->update( $wpdb->users, array( $pref => $value ), array( 'ID' => $id ) ); … … 549 549 $output[$be] = '<option value="' . esc_attr( $code_lang ) . '"' . selected( $current, $code_lang, false ) . '> ' . $be . '</option>'; 550 550 } else { 551 551 $translated = format_code_lang( $code_lang ); 552 $output[$translated] = 552 $output[$translated] = '<option value="' . esc_attr( $code_lang ) . '"' . selected( $current, $code_lang, false ) . '> ' . esc_html ( $translated ) . '</option>'; 553 553 } 554 554 555 555 } … … 634 634 <?php foreach( (array) $all_blogs as $blog ) { 635 635 if ( $primary_blog == $blog->userblog_id ) 636 636 $found = true; 637 ?><option value="<?php echo $blog->userblog_id ?>"<?php selected( $primary_blog, 637 ?><option value="<?php echo $blog->userblog_id ?>"<?php selected( $primary_blog, $blog->userblog_id ); ?>><?php echo esc_url( get_home_url( $blog->userblog_id ) ) ?></option><?php 638 638 } ?> 639 639 </select> 640 640 <?php … … 771 771 * Whether or not we have a large network. 772 772 * 773 773 * The default criteria for a large network is either more than 10,000 users or more than 10,000 sites. 774 * Plugins can alter this criteria 774 * Plugins can alter this criteria using the 'wp_is_large_network' filter. 775 775 * 776 776 * @since 3.3.0 777 * @param string $using 'sites or 'users'. 777 * @param string $using 'sites or 'users'. Default is 'sites'. 778 778 * @return bool True if the network meets the criteria for large. False otherwise. 779 779 */ 780 780 function wp_is_large_network( $using = 'sites' ) { -
wp-admin/includes/nav-menu.php
7 7 * @since 3.0.0 8 8 * @uses Walker_Nav_Menu 9 9 */ 10 class Walker_Nav_Menu_Edit extends Walker_Nav_Menu 10 class Walker_Nav_Menu_Edit extends Walker_Nav_Menu { 11 11 /** 12 12 * @see Walker_Nav_Menu::start_lvl() 13 13 * @since 3.0.0 … … 209 209 * @since 3.0.0 210 210 * @uses Walker_Nav_Menu 211 211 */ 212 class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu 212 class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu { 213 213 function __construct( $fields = false ) { 214 214 if ( $fields ) { 215 215 $this->db_fields = $fields; … … 990 990 ( 991 991 ! isset( $_item_object_data['menu-item-type'] ) || // and item type either isn't set 992 992 in_array( $_item_object_data['menu-item-url'], array( 'http://', '' ) ) || // or URL is the default 993 ! ( 'custom' == $_item_object_data['menu-item-type'] && ! isset( $_item_object_data['menu-item-db-id'] ) ) || 993 ! ( 'custom' == $_item_object_data['menu-item-type'] && ! isset( $_item_object_data['menu-item-db-id'] ) ) || // or it's not a custom menu item (but not the custom home page) 994 994 ! empty( $_item_object_data['menu-item-db-id'] ) // or it *is* a custom menu item that already exists 995 995 ) 996 996 ) { -
wp-admin/includes/plugin-install.php
199 199 } 200 200 201 201 if ( 'install' == $status ) { 202 if ( is_dir( WP_PLUGIN_DIR 202 if ( is_dir( WP_PLUGIN_DIR . '/' . $api->slug ) ) { 203 203 $installed_plugin = get_plugins('/' . $api->slug); 204 204 if ( empty($installed_plugin) ) { 205 205 if ( current_user_can('install_plugins') ) … … 322 322 <?php endif; if ( ! empty($api->slug) && empty($api->external) ) : ?> 323 323 <li><a target="_blank" href="http://wordpress.org/extend/plugins/<?php echo $api->slug ?>/"><?php _e('WordPress.org Plugin Page »') ?></a></li> 324 324 <?php endif; if ( ! empty($api->homepage) ) : ?> 325 <li><a target="_blank" href="<?php echo $api->homepage ?>"><?php _e('Plugin Homepage 325 <li><a target="_blank" href="<?php echo $api->homepage ?>"><?php _e('Plugin Homepage »') ?></a></li> 326 326 <?php endif; ?> 327 327 </ul> 328 328 <?php if ( ! empty($api->rating) ) : ?> -
wp-admin/includes/plugin.php
882 882 883 883 $new_menu = array( $menu_title, $capability, $menu_slug, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); 884 884 885 if ( null === $position 885 if ( null === $position ) 886 886 $menu[] = $new_menu; 887 887 else 888 888 $menu[$position] = $new_menu; … … 985 985 } 986 986 987 987 // If the parent doesn't already have a submenu, add a link to the parent 988 // as the first item in the submenu. 989 // parent file someone is trying to link back to the parent manually. 988 // as the first item in the submenu. If the submenu file is the same as the 989 // parent file someone is trying to link back to the parent manually. In 990 990 // this case, don't automatically add a link back to avoid duplication. 991 if (!isset( $submenu[$parent_slug] ) && $menu_slug != $parent_slug 991 if (!isset( $submenu[$parent_slug] ) && $menu_slug != $parent_slug ) { 992 992 foreach ( (array)$menu as $parent_menu ) { 993 993 if ( $parent_menu[2] == $parent_slug && current_user_can( $parent_menu[1] ) ) 994 994 $submenu[$parent_slug][] = $parent_menu; … … 1002 1002 add_action( $hookname, $function ); 1003 1003 1004 1004 $_registered_pages[$hookname] = true; 1005 // backwards-compatibility for plugins using add_management page. 1005 // backwards-compatibility for plugins using add_management page. See wp-admin/admin.php for redirect from edit.php to tools.php 1006 1006 if ( 'tools.php' == $parent_slug ) 1007 1007 $_registered_pages[get_plugin_page_hookname( $menu_slug, 'edit.php')] = true; 1008 1008 … … 1589 1589 * 1590 1590 * @since 2.7.0 1591 1591 * 1592 * @param string $option_group A settings group name. 1592 * @param string $option_group A settings group name. Should correspond to a whitelisted option key name. 1593 1593 * Default whitelisted option key names include "general," "discussion," and "reading," among others. 1594 1594 * @param string $option_name The name of an option to sanitize and save. 1595 1595 * @param unknown_type $sanitize_callback A callback function that sanitizes the option's value. … … 1715 1715 * 1716 1716 * @since 2.7.0 1717 1717 * 1718 * @param string $option_group A settings group name. 1718 * @param string $option_group A settings group name. This should match the group name used in register_setting(). 1719 1719 */ 1720 1720 function settings_fields($option_group) { 1721 1721 echo "<input type='hidden' name='option_page' value='" . esc_attr($option_group) . "' />"; -
wp-admin/includes/post.php
171 171 $post_data = _wp_translate_postdata( true, $post_data ); 172 172 if ( is_wp_error($post_data) ) 173 173 wp_die( $post_data->get_error_message() ); 174 if ( 'autosave' != $post_data['action'] 174 if ( 'autosave' != $post_data['action'] && 'auto-draft' == $post_data['post_status'] ) 175 175 $post_data['post_status'] = 'draft'; 176 176 177 177 if ( isset($post_data['visibility']) ) { … … 352 352 $tax_names = get_object_taxonomies( $post ); 353 353 foreach ( $tax_names as $tax_name ) { 354 354 $taxonomy_obj = get_taxonomy($tax_name); 355 if ( 355 if ( isset( $tax_input[$tax_name]) && current_user_can( $taxonomy_obj->cap->assign_terms ) ) 356 356 $new_terms = $tax_input[$tax_name]; 357 357 else 358 358 $new_terms = array(); … … 1259 1259 if ( is_wp_error( $translated ) ) 1260 1260 return $translated; 1261 1261 1262 // Only store one autosave. 1262 // Only store one autosave. If there is already an autosave, overwrite it. 1263 1263 if ( $old_autosave = wp_get_post_autosave( $post_id ) ) { 1264 1264 $new_autosave = _wp_post_revision_fields( $_POST, true ); 1265 1265 $new_autosave['ID'] = $old_autosave->ID; … … 1320 1320 1321 1321 if ( 'draft' == $post->post_status ) { 1322 1322 $id = edit_post(); 1323 } else { // Non drafts are not overwritten. 1323 } else { // Non drafts are not overwritten. The autosave is stored in a special post revision. 1324 1324 $id = wp_create_post_autosave( $post->ID ); 1325 1325 if ( ! is_wp_error($id) ) 1326 1326 $id = $post->ID; -
wp-admin/includes/schema.php
30 30 * @since 3.3.0 31 31 * 32 32 * @param string $scope Optional. The tables for which to retrieve SQL. Can be all, global, ms_global, or blog tables. Defaults to all. 33 * @param int $blog_id Optional. The blog ID for which to retrieve SQL. 33 * @param int $blog_id Optional. The blog ID for which to retrieve SQL. Default is the current blog ID. 34 34 * @return string The SQL needed to create the requested tables. 35 35 */ 36 36 function wp_get_db_schema( $scope = 'all', $blog_id = null ) { -
wp-admin/includes/screen.php
196 196 * @param mixed $hook_name Optional. The hook name (also known as the hook suffix) used to determine the screen, 197 197 * or an existing screen object. 198 198 */ 199 function set_current_screen( $hook_name = 199 function set_current_screen( $hook_name = '' ) { 200 200 WP_Screen::get( $hook_name )->set_current_screen(); 201 201 } 202 202 … … 208 208 */ 209 209 final class WP_Screen { 210 210 /** 211 * Any action associated with the screen. 'add' for *-add.php and *-new.php screens. 211 * Any action associated with the screen. 'add' for *-add.php and *-new.php screens. Empty otherwise. 212 212 * 213 213 * @since 3.3.0 214 214 * @var string … … 217 217 public $action; 218 218 219 219 /** 220 * The base type of the screen. 220 * The base type of the screen. This is typically the same as $id but with any post types and taxonomies stripped. 221 221 * For example, for an $id of 'edit-post' the base is 'edit'. 222 222 * 223 223 * @since 3.3.0 … … 539 539 * 540 540 * @since 3.3.0 541 541 * 542 * @param string $parent_file The parent file of the screen. 542 * @param string $parent_file The parent file of the screen. Typically the $parent_file global. 543 543 */ 544 544 function set_parentage( $parent_file ) { 545 545 $this->parent_file = $parent_file; … … 809 809 $welcome_checked = false; 810 810 } 811 811 echo '<label for="wp_welcome_panel-hide">'; 812 echo '<input type="checkbox" id="wp_welcome_panel-hide"' . checked( (bool) $welcome_checked, true, false ) 812 echo '<input type="checkbox" id="wp_welcome_panel-hide"' . checked( (bool) $welcome_checked, true, false ) . ' />'; 813 813 echo __( 'Welcome' ) . "</label>\n"; 814 814 } 815 815 ?> … … 817 817 </div> 818 818 <?php endif; 819 819 if ( ! empty( $columns ) ) : ?> 820 <h5><?php echo ( isset( $columns['_title'] ) ? $columns['_title'] :_x('Show on screen', 'Columns') ) ?></h5>820 <h5><?php echo ( isset( $columns['_title'] ) ? $columns['_title'] : _x('Show on screen', 'Columns') ) ?></h5> 821 821 <div class="metabox-prefs"> 822 822 <?php 823 823 $special = array('_title', 'cb', 'comment', 'media', 'name', 'title', 'username', 'blogname'); -
wp-admin/includes/taxonomy.php
86 86 * 87 87 * @param mixed $catarr See defaults below. Set 'cat_ID' to a non-zero value to update an existing category. The 'taxonomy' key was added in 3.0.0. 88 88 * @param bool $wp_error Optional, since 2.5.0. Set this to true if the caller handles WP_Error return values. 89 * @return int|object The ID number of the new or updated Category on success. 89 * @return int|object The ID number of the new or updated Category on success. Zero or a WP_Error on failure, depending on param $wp_error. 90 90 */ 91 91 function wp_insert_category($catarr, $wp_error = false) { 92 92 $cat_defaults = array('cat_ID' => 0, 'taxonomy' => 'category', 'cat_name' => '', 'category_description' => '', 'category_nicename' => '', 'category_parent' => ''); … … 145 145 * 146 146 * @since 2.0.0 147 147 * 148 * @param array $catarr The 'cat_ID' value is required. 148 * @param array $catarr The 'cat_ID' value is required. All other keys are optional. 149 149 * @return int|bool The ID number of the new or updated Category on success. Zero or FALSE on failure. 150 150 */ 151 151 function wp_update_category($catarr) { -
wp-admin/includes/template.php
1300 1300 if ( 'attachment' == $post->name ) 1301 1301 continue; 1302 1302 ?> 1303 <input type="radio" name="find-posts-what" id="find-posts-<?php echo esc_attr($post->name); ?>" value="<?php echo esc_attr($post->name); ?>" <?php checked($post->name, 1303 <input type="radio" name="find-posts-what" id="find-posts-<?php echo esc_attr($post->name); ?>" value="<?php echo esc_attr($post->name); ?>" <?php checked($post->name, 'post'); ?> /> 1304 1304 <label for="find-posts-<?php echo esc_attr($post->name); ?>"><?php echo $post->label; ?></label> 1305 1305 <?php 1306 1306 } ?> … … 1409 1409 do_action('admin_head'); 1410 1410 ?> 1411 1411 </head> 1412 <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> 1412 <body<?php if ( isset($GLOBALS['body_id']) ) echo ' id="' . $GLOBALS['body_id'] . '"'; ?> class="wp-admin no-js iframe <?php echo apply_filters( 'admin_body_class', '' ) . ' ' . $admin_body_class; ?>"> 1413 1413 <script type="text/javascript"> 1414 1414 //<![CDATA[ 1415 1415 (function(){ -
wp-admin/includes/theme-install.php
24 24 * 25 25 * @since 2.8.0 26 26 * 27 * @deprecated since 3.1.0 27 * @deprecated since 3.1.0 Use get_theme_feature_list() instead. 28 28 * 29 29 * @return array 30 30 */ 31 31 function install_themes_feature_list( ) { 32 32 if ( !$cache = get_transient( 'wporg_theme_feature_list' ) ) 33 set_transient( 'wporg_theme_feature_list', array( ), 33 set_transient( 'wporg_theme_feature_list', array( ), 10800); 34 34 35 if ( $cache 35 if ( $cache ) 36 36 return $cache; 37 37 38 38 $feature_list = themes_api( 'feature_list', array( ) ); … … 134 134 $name = wp_kses($theme->name, $themes_allowedtags); 135 135 $desc = wp_kses($theme->description, $themes_allowedtags); 136 136 //if ( strlen($desc) > 30 ) 137 // $desc = 137 // $desc = substr($desc, 0, 15) . '<span class="dots">...</span><span>' . substr($desc, -15) . '</span>'; 138 138 139 139 $preview_link = $theme->preview_url . '?TB_iframe=true&width=600&height=400'; 140 140 if ( !is_array($actions) ) { -
wp-admin/includes/theme.php
253 253 $theme_name = is_object($theme) ? $theme->name : (is_array($theme) ? $theme['Name'] : ''); 254 254 $details_url = add_query_arg(array('TB_iframe' => 'true', 'width' => 1024, 'height' => 800), $update['url']); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list. 255 255 $update_url = wp_nonce_url('update.php?action=upgrade-theme&theme=' . urlencode($stylesheet), 'upgrade-theme_' . $stylesheet); 256 $update_onclick = 'onclick="if ( confirm(\'' . esc_js( __("Updating this theme will lose any customizations you have made. 256 $update_onclick = 'onclick="if ( confirm(\'' . esc_js( __("Updating this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to update.") ) . '\') ) {return true;}return false;"'; 257 257 258 258 if ( !is_multisite() ) { 259 259 if ( ! current_user_can('update_themes') ) … … 271 271 * 272 272 * @since 3.1.0 273 273 * 274 * @return array 274 * @return array Array of features keyed by category with translations keyed by slug. 275 275 */ 276 276 function get_theme_feature_list() { 277 277 // Hard-coded list is used if api not accessible. … … 340 340 return $features; 341 341 342 342 if ( !$feature_list = get_site_transient( 'wporg_theme_feature_list' ) ) 343 set_site_transient( 'wporg_theme_feature_list', array( ), 343 set_site_transient( 'wporg_theme_feature_list', array( ), 10800); 344 344 345 345 if ( !$feature_list ) { 346 346 $feature_list = themes_api( 'feature_list', array( ) ); -
wp-admin/includes/update-core.php
264 264 * introduced version present here being older than the current installed version. 265 265 * 266 266 * The content of this array should follow the following format: 267 * 267 * Filename (relative to wp-content) => Introduced version 268 268 * Directories should be noted by suffixing it with a trailing slash (/) 269 269 * 270 270 * @since 3.2.0 -
wp-admin/includes/update.php
142 142 if ( current_user_can('update_core') ) { 143 143 $cur = get_preferred_from_update_core(); 144 144 145 if ( isset( $cur->response ) && $cur->response == 'upgrade' 145 if ( isset( $cur->response ) && $cur->response == 'upgrade' ) 146 146 $msg .= " <a href='" . network_admin_url( 'update-core.php' ) . "' class='button'>" . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . '</a>'; 147 147 } 148 148 -
wp-admin/includes/upgrade.php
58 58 if ( ! $public ) 59 59 update_option('default_pingback_flag', 0); 60 60 61 // Create default user. 62 // being shared among blogs. 61 // Create default user. If the user already exists, the user tables are 62 // being shared among blogs. Just set the role in that case. 63 63 $user_id = username_exists($user_name); 64 64 $user_password = trim($user_password); 65 65 $email_password = false; … … 74 74 $message = '<em>'.__('Your chosen password.').'</em>'; 75 75 $user_id = wp_create_user($user_name, $user_password, $user_email); 76 76 } else { 77 $message = 77 $message = __('User already exists. Password inherited.'); 78 78 } 79 79 80 80 $user = new WP_User($user_id); … … 358 358 359 359 $wp_current_db_version = __get_option('db_version'); 360 360 361 // We are up-to-date. 361 // We are up-to-date. Nothing to do. 362 362 if ( $wp_db_version == $wp_current_db_version ) 363 363 return; 364 364 … … 394 394 global $wp_current_db_version, $wp_db_version, $wp_rewrite; 395 395 $wp_current_db_version = __get_option('db_version'); 396 396 397 // We are up-to-date. 397 // We are up-to-date. Nothing to do. 398 398 if ( $wp_db_version == $wp_current_db_version ) 399 399 return; 400 400 … … 646 646 $active_plugins = __get_option('active_plugins'); 647 647 648 648 // If plugins are not stored in an array, they're stored in the old 649 // newline separated format. 649 // newline separated format. Convert to new format. 650 650 if ( !is_array( $active_plugins ) ) { 651 651 $active_plugins = explode("\n", trim($active_plugins)); 652 652 update_option('active_plugins', $active_plugins); … … 898 898 $wpdb->insert( $wpdb->term_relationships, array('object_id' => $post_id, 'term_taxonomy_id' => $tt_id) ); 899 899 } 900 900 901 // < 3570 we used linkcategories. 901 // < 3570 we used linkcategories. >= 3570 we used categories and link2cat. 902 902 if ( $wp_current_db_version < 3570 ) { 903 // Create link_category terms for link categories. 903 // Create link_category terms for link categories. Create a map of link cat IDs 904 904 // to link_category terms. 905 905 $link_cat_id_map = array(); 906 906 $default_link_cat = 0; … … 1667 1667 * 1668 1668 * @since 1.5.0 1669 1669 */ 1670 function make_db_current_silent( 1670 function make_db_current_silent( $tables = 'all' ) { 1671 1671 $alterations = dbDelta( $tables ); 1672 1672 } 1673 1673 … … 1690 1690 return false; 1691 1691 1692 1692 // Copy files from the old locations to the site theme. 1693 // TODO: This does not copy arbitrary include dependencies. 1693 // TODO: This does not copy arbitrary include dependencies. Only the 1694 1694 // standard WP files are copied. 1695 1695 $files = array('index.php' => 'index.php', 'wp-layout.css' => 'style.css', 'wp-comments.php' => 'comments.php', 'wp-comments-popup.php' => 'comments-popup.php'); 1696 1696 … … 1848 1848 1849 1849 if (file_exists(ABSPATH . 'wp-layout.css')) { 1850 1850 if (! make_site_theme_from_oldschool($theme_name, $template)) { 1851 // TODO: 1851 // TODO: rm -rf the site theme directory. 1852 1852 return false; 1853 1853 } 1854 1854 } else { 1855 1855 if (! make_site_theme_from_default($theme_name, $template)) 1856 // TODO: 1856 // TODO: rm -rf the site theme directory. 1857 1857 return false; 1858 1858 } 1859 1859 … … 1938 1938 1939 1939 // Upgrade versions prior to 2.9 1940 1940 if ( $wp_current_db_version < 11557 ) { 1941 // Delete duplicate options. 1941 // Delete duplicate options. Keep the option with the highest option_id. 1942 1942 $wpdb->query("DELETE o1 FROM $wpdb->options AS o1 JOIN $wpdb->options AS o2 USING (`option_name`) WHERE o2.option_id > o1.option_id"); 1943 1943 1944 1944 // Drop the old primary key and add the new. -
wp-admin/install.php
207 207 $error = true; 208 208 } elseif ( ! is_email( $admin_email ) ) { 209 209 // TODO: poka-yoke 210 display_setup_form( __( 'that isn’t a valid e-mail address. 210 display_setup_form( __( 'that isn’t a valid e-mail address. E-mail addresses look like: <code>username@example.com</code>' ) ); 211 211 $error = true; 212 212 } 213 213 -
wp-admin/link-parse-opml.php
11 11 12 12 global $opml, $map; 13 13 14 // columns we wish to find are: 14 // columns we wish to find are: link_url, link_name, link_target, link_description 15 15 // we need to map XML attribute names to our columns 16 16 $opml_map = array('URL' => 'link_url', 17 17 'HTMLURL' => 'link_url', -
wp-admin/maint/repair.php
19 19 <?php 20 20 21 21 if ( !defined('WP_ALLOW_REPAIR') ) { 22 echo '<p>'.__('To allow use of this page to automatically repair database problems, please add the following line to your wp-config.php file. 22 echo '<p>'.__('To allow use of this page to automatically repair database problems, please add the following line to your wp-config.php file. Once this line is added to your config, reload this page.')."</p><code>define('WP_ALLOW_REPAIR', true);</code>"; 23 23 } elseif ( isset($_GET['repair']) ) { 24 24 check_admin_referer('repair_db'); 25 25 … … 49 49 printf( __( 'The %s table is okay.' ), $table ); 50 50 } else { 51 51 /* translators: 1: table name, 2: error message, */ 52 printf( __( 'The %1$s table is not okay. It is reporting the following error: %2$s. 52 printf( __( 'The %1$s table is not okay. It is reporting the following error: %2$s. WordPress will attempt to repair this table…' ) , $table, "<code>$check->Msg_text</code>" ); 53 53 54 54 $repair = $wpdb->get_row("REPAIR TABLE $table"); 55 55 … … 59 59 printf( __( 'Successfully repaired the %s table.' ), $table ); 60 60 } else { 61 61 /* translators: 1: table name, 2: error message, */ 62 echo sprintf( __( 'Failed to repair the 62 echo sprintf( __( 'Failed to repair the %1$s table. Error: %2$s' ), $table, "<code>$check->Msg_text</code>" ) . '<br />'; 63 63 $problems[$table] = $check->Msg_text; 64 64 $okay = false; 65 65 } … … 95 95 $problem_output[] = "$table: $problem"; 96 96 echo '<textarea name="errors" id="errors" rows="20" cols="60">' . esc_textarea( implode("\n", $problem_output) ) . '</textarea>'; 97 97 } else { 98 echo '<p>'.__('Repairs complete. 98 echo '<p>'.__('Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.')."</p><code>define('WP_ALLOW_REPAIR', true);</code>"; 99 99 } 100 100 } else { 101 101 if ( isset($_GET['referrer']) && 'is_blog_installed' == $_GET['referrer'] ) 102 102 _e('One or more database tables are unavailable. To allow WordPress to attempt to repair these tables, press the “Repair Database” button. Repairing can take a while, so please be patient.'); 103 103 else 104 _e('WordPress can automatically look for some common database problems and repair them. 104 _e('WordPress can automatically look for some common database problems and repair them. Repairing can take a while, so please be patient.') 105 105 ?> 106 106 <p class="step"><a class="button" href="<?php echo wp_nonce_url('repair.php?repair=1', 'repair_db') ?>"><?php _e( 'Repair Database' ); ?></a></p> 107 <?php _e('WordPress can also attempt to optimize the database. This improves performance in some situations.Repairing and optimizing the database can take a long time and the database will be locked while optimizing.'); ?>107 <?php _e('WordPress can also attempt to optimize the database. This improves performance in some situations. Repairing and optimizing the database can take a long time and the database will be locked while optimizing.'); ?> 108 108 <p class="step"><a class="button" href="<?php echo wp_nonce_url('repair.php?repair=2', 'repair_db') ?>"><?php _e( 'Repair and Optimize Database' ); ?></a></p> 109 109 <?php 110 110 } -
wp-admin/nav-menus.php
430 430 431 431 // Calling wp_get_nav_menu_to_edit generates $_wp_nav_menu_max_depth 432 432 if ( is_nav_menu( $nav_menu_selected_id ) ) 433 $edit_markup = wp_get_nav_menu_to_edit( $nav_menu_selected_id 433 $edit_markup = wp_get_nav_menu_to_edit( $nav_menu_selected_id ); 434 434 435 435 function wp_nav_menu_max_depth($classes) { 436 436 global $_wp_nav_menu_max_depth; … … 545 545 <div class="major-publishing-actions"> 546 546 <label class="menu-name-label howto open-label" for="menu-name"> 547 547 <span><?php _e('Menu Name'); ?></span> 548 <input name="menu-name" id="menu-name" type="text" class="menu-name regular-text menu-item-textbox input-with-default-title" title="<?php esc_attr_e('Enter menu name here'); ?>" value="<?php echo esc_attr( $nav_menu_selected_title 548 <input name="menu-name" id="menu-name" type="text" class="menu-name regular-text menu-item-textbox input-with-default-title" title="<?php esc_attr_e('Enter menu name here'); ?>" value="<?php echo esc_attr( $nav_menu_selected_title ); ?>" /> 549 549 </label> 550 550 <?php if ( !empty( $nav_menu_selected_id ) ) : 551 551 if ( ! isset( $auto_add ) ) { -
wp-admin/network/menu.php
56 56 57 57 unset($update_data); 58 58 59 $submenu[ 'upgrade.php' ][10] = array( __( 'Available Updates' ), 'update_core', 59 $submenu[ 'upgrade.php' ][10] = array( __( 'Available Updates' ), 'update_core', 'update-core.php' ); 60 60 $submenu[ 'upgrade.php' ][15] = array( __( 'Update Network' ), 'manage_network', 'upgrade.php' ); 61 61 62 62 $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' ); -
wp-admin/network/settings.php
322 322 $menu_perms = get_site_option( 'menu_items' ); 323 323 $menu_items = apply_filters( 'mu_menu_items', array( 'plugins' => __( 'Plugins' ) ) ); 324 324 foreach ( (array) $menu_items as $key => $val ) { 325 echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . 325 echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[$key] ) ? checked( $menu_perms[$key], '1', false ) : '' ) . " /> " . esc_html( $val ) . "</label><br/>"; 326 326 } 327 327 ?> 328 328 </td> -
wp-admin/network/site-info.php
108 108 ); 109 109 foreach ( $tabs as $tab_id => $tab ) { 110 110 $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : ''; 111 echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . 111 echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>'; 112 112 } 113 113 ?> 114 114 </h3> -
wp-admin/network/site-settings.php
98 98 ); 99 99 foreach ( $tabs as $tab_id => $tab ) { 100 100 $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : ''; 101 echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . 101 echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>'; 102 102 } 103 103 ?> 104 104 </h3> -
wp-admin/network/site-themes.php
152 152 ); 153 153 foreach ( $tabs as $tab_id => $tab ) { 154 154 $class = ( $tab['url'] == $pagenow ) ? ' nav-tab-active' : ''; 155 echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . 155 echo '<a href="' . $tab['url'] . '?id=' . $id .'" class="nav-tab' . $class . '">' . esc_html( $tab['label'] ) . '</a>'; 156 156 } 157 157 ?> 158 158 </h3><?php -
wp-admin/options-discussion.php
164 164 165 165 <h3><?php _e('Avatars'); ?></h3> 166 166 167 <p><?php _e('An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites. 167 <p><?php _e('An avatar is an image that follows you from weblog to weblog appearing beside your name when you comment on avatar enabled sites. Here you can enable the display of avatars for people who comment on your site.'); ?></p> 168 168 169 169 <?php // the above would be a good place to link to codex documentation on the gravatar functions, for putting it in themes. anything like that? ?> 170 170 -
wp-admin/options-general.php
98 98 </tr> 99 99 <tr valign="top"> 100 100 <th scope="row"><label for="blogdescription"><?php _e('Tagline') ?></label></th> 101 <td><input name="blogdescription" type="text" id="blogdescription" 101 <td><input name="blogdescription" type="text" id="blogdescription" value="<?php form_option('blogdescription'); ?>" class="regular-text" /> 102 102 <span class="description"><?php _e('In a few words, explain what this site is about.') ?></span></td> 103 103 </tr> 104 104 <?php if ( !is_multisite() ) { ?> … … 151 151 152 152 $check_zone_info = true; 153 153 154 // Remove old Etc mappings. 154 // Remove old Etc mappings. Fallback to gmt_offset. 155 155 if ( false !== strpos($tzstring,'Etc/GMT') ) 156 156 $tzstring = ''; 157 157 … … 211 211 echo ' '; 212 212 $message = $tr['isdst'] ? 213 213 __('Daylight saving time begins on: <code>%s</code>.') : 214 __('Standard time begins 214 __('Standard time begins on: <code>%s</code>.'); 215 215 // Add the difference between the current offset and the new offset to ts to get the correct transition time from date_i18n(). 216 216 printf( $message, date_i18n(get_option('date_format') . ' ' . get_option('time_format'), $tr['ts'] + ($tz_offset - $tr['offset']) ) ); 217 217 } else { -
wp-admin/options-permalink.php
257 257 <?php wp_nonce_field('update-permalink') ?> 258 258 <p><textarea rows="9" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules() ); ?></textarea></p> 259 259 </form> 260 <p><?php _e('If you temporarily make your <code>web.config</code> file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.') 260 <p><?php _e('If you temporarily make your <code>web.config</code> file writable for us to generate rewrite rules automatically, do not forget to revert the permissions after rule has been saved.') ?></p> 261 261 <?php else : ?> 262 262 <p><?php _e('If the root directory of your site were <a href="http://codex.wordpress.org/Changing_File_Permissions">writable</a>, we could do this automatically, but it isn’t so this is the url rewrite rule you should have in your <code>web.config</code> file. Create a new file, called <code>web.config</code> in the root directory of your site. Click in the field and press <kbd>CTRL + a</kbd> to select all. Then insert this code into the <code>web.config</code> file.') ?></p> 263 263 <form action="options-permalink.php" method="post"> 264 264 <?php wp_nonce_field('update-permalink') ?> 265 265 <p><textarea rows="18" class="large-text readonly" name="rules" id="rules" readonly="readonly"><?php echo esc_textarea( $wp_rewrite->iis7_url_rewrite_rules(true) ); ?></textarea></p> 266 266 </form> 267 <p><?php _e('If you temporarily make your site’s root directory writable for us to generate the <code>web.config</code> file automatically, do not forget to revert the permissions after the file has been created.') 267 <p><?php _e('If you temporarily make your site’s root directory writable for us to generate the <code>web.config</code> file automatically, do not forget to revert the permissions after the file has been created.') ?></p> 268 268 <?php endif; ?> 269 269 <?php endif; ?> 270 270 <?php else : -
wp-admin/options-reading.php
115 115 <tr valign="top"> 116 116 <th scope="row"><?php _e( 'For each article in a feed, show' ); ?> </th> 117 117 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'For each article in a feed, show' ); ?> </span></legend> 118 <p><label><input name="rss_use_excerpt" 118 <p><label><input name="rss_use_excerpt" type="radio" value="0" <?php checked( 0, get_option( 'rss_use_excerpt' ) ); ?> /> <?php _e( 'Full text' ); ?></label><br /> 119 119 <label><input name="rss_use_excerpt" type="radio" value="1" <?php checked( 1, get_option( 'rss_use_excerpt' ) ); ?> /> <?php _e( 'Summary' ); ?></label></p> 120 120 </fieldset></td> 121 121 </tr> -
wp-admin/options-writing.php
32 32 if ( is_multisite() ) { 33 33 $post_email_help = '<p>' . __('Due to security issues, you cannot use Post By Email on Multisite Installs.') . '</p>'; 34 34 } else { 35 $post_email_help = '<p>' . __('Post via email settings allow you to send your WordPress install an email with the content of your post. 35 $post_email_help = '<p>' . __('Post via email settings allow you to send your WordPress install an email with the content of your post. You must set up a secret e-mail account with POP3 access to use this, and any mail received at this address will be posted, so it’s a good idea to keep this address very secret.') . '</p>'; 36 36 } 37 37 38 38 get_current_screen()->add_help_tab( array( -
wp-admin/options.php
151 151 } 152 152 153 153 /** 154 * 154 * Handle settings errors and return to options page 155 155 */ 156 156 // If no settings errors were registered add a general 'updated' message. 157 157 if ( !count( get_settings_errors() ) ) -
wp-admin/plugin-editor.php
236 236 <?php endif; ?> 237 237 <?php if ( is_writeable($real_file) ) : ?> 238 238 <?php if ( in_array( $file, (array) get_option( 'active_plugins', array() ) ) ) { ?> 239 <p><?php _e('<strong>Warning:</strong> Making changes to active plugins is not recommended. 239 <p><?php _e('<strong>Warning:</strong> Making changes to active plugins is not recommended. If your changes cause a fatal error, the plugin will be automatically deactivated.'); ?></p> 240 240 <?php } ?> 241 241 <p class="submit"> 242 242 <?php -
wp-admin/plugins.php
355 355 if ( isset( $_GET['main'] ) ) 356 356 $errmsg = __( 'You cannot delete a plugin while it is active on the main site.' ); 357 357 elseif ( isset($_GET['charsout']) ) 358 $errmsg = sprintf(__('The plugin generated %d characters of <strong>unexpected output</strong> during activation. 358 $errmsg = sprintf(__('The plugin generated %d characters of <strong>unexpected output</strong> during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.'), $_GET['charsout']); 359 359 else 360 360 $errmsg = __('Plugin could not be activated because it triggered a <strong>fatal error</strong>.'); 361 361 ?> -
wp-admin/press-this.php
432 432 show('video'); 433 433 <?php } elseif ( preg_match("/vimeo\.com\/[0-9]+/i", $url) ) { ?> 434 434 show('video'); 435 <?php 435 <?php } elseif ( preg_match("/flickr\.com/i", $url) ) { ?> 436 436 show('photo'); 437 437 <?php } ?> 438 438 jQuery('#title').unbind(); … … 605 605 606 606 $content = ''; 607 607 if ( $selection ) 608 $content .= 608 $content .= $selection; 609 609 610 610 if ( $url ) { 611 611 $content .= '<p>'; -
wp-admin/themes.php
76 76 ?> 77 77 78 78 <?php if ( ! validate_current_theme() ) : ?> 79 <div id="message1" class="updated"><p><?php _e('The active theme is broken. 79 <div id="message1" class="updated"><p><?php _e('The active theme is broken. Reverting to the default theme.'); ?></p></div> 80 80 <?php elseif ( isset($_GET['activated']) ) : 81 81 if ( isset($wp_registered_sidebars) && count( (array) $wp_registered_sidebars ) && current_user_can('edit_theme_options') ) { ?> 82 82 <div id="message2" class="updated"><p><?php printf( __('New theme activated. This theme supports widgets, please visit the <a href="%s">widgets settings</a> screen to configure them.'), admin_url( 'widgets.php' ) ); ?></p></div><?php … … 120 120 if ( ( strcmp($self, $item[2]) == 0 && empty($parent_file)) || ($parent_file && ($item[2] == $parent_file)) ) $class = ' class="current"'; 121 121 122 122 if ( !empty($submenu[$item[2]]) ) { 123 $submenu[$item[2]] = array_values($submenu[$item[2]]); 123 $submenu[$item[2]] = array_values($submenu[$item[2]]); // Re-index. 124 124 $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]); 125 125 if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook)) 126 126 $options[] = "<a href='admin.php?page={$submenu[$item[2]][0][2]}'$class>{$item[0]}</a>"; -
wp-admin/tools.php
20 20 'id' => 'converter', 21 21 'title' => __('Categories and Tags Converter'), 22 22 'content' => '<p>' . __('Categories have hierarchy, meaning that you can nest sub-categories. Tags do not have hierachy and cannot be nested. Sometimes people start out using one on their posts, then later realize that the other would work better for their content.' ) . '</p>' . 23 '<p>' . __( 'The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, return to this screen 23 '<p>' . __( 'The Categories and Tags Converter link on this screen will take you to the Import screen, where that Converter is one of the plugins you can install. Once that plugin is installed, return to this screen and the link will take you to a screen where you can choose to convert tags into categories or vice versa.' ) . '</p>', 24 24 ) ); 25 25 26 26 get_current_screen()->set_help_sidebar( -
wp-admin/update-core.php
36 36 $mysql_version = $wpdb->db_version(); 37 37 $show_buttons = true; 38 38 if ( 'development' == $update->response ) { 39 $message = __('You are using a development version of WordPress. 39 $message = __('You are using a development version of WordPress. You can update to the latest nightly build automatically or download the nightly build and install it manually:'); 40 40 $download = __('Download nightly build'); 41 41 } else { 42 42 if ( $current ) { … … 317 317 echo " 318 318 <tr class='active'> 319 319 <th scope='row' class='check-column'><input type='checkbox' name='checked[]' value='" . esc_attr($stylesheet) . "' /></th> 320 <td class='plugin-title'><img src='$screenshot' width='64' height='64' style='float:left; padding: 0 5px 5px' /><strong>{$theme_data->Name}</strong>" . 320 <td class='plugin-title'><img src='$screenshot' width='64' height='64' style='float:left; padding: 0 5px 5px' /><strong>{$theme_data->Name}</strong>" . sprintf(__('You have version %1$s installed. Update to %2$s.'), $theme_data->Version, $theme_data->update['new_version']) . "</td> 321 321 </tr>"; 322 322 } 323 323 ?> -
wp-admin/upgrade.php
27 27 else 28 28 $step = 0; 29 29 30 // Do it. 30 // Do it. No output. 31 31 if ( 'upgrade_db' === $step ) { 32 32 wp_upgrade(); 33 33 die( '0' ); … … 88 88 case 1: 89 89 wp_upgrade(); 90 90 91 $backto = !empty($_GET['backto']) ? stripslashes( urldecode( $_GET['backto'] ) ) : 91 $backto = !empty($_GET['backto']) ? stripslashes( urldecode( $_GET['backto'] ) ) : __get_option( 'home' ) . '/'; 92 92 $backto = esc_url( $backto ); 93 93 $backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/'); 94 94 ?> -
wp-admin/user-new.php
80 80 81 81 Please click the following link to confirm the invite: 82 82 %4$s' ); 83 wp_mail( $new_user_email, sprintf( __( '[%s] Joining confirmation' ), get_option( 'blogname' ) ), 83 wp_mail( $new_user_email, sprintf( __( '[%s] Joining confirmation' ), get_option( 'blogname' ) ), sprintf($message, get_option('blogname'), site_url(), $_REQUEST[ 'role' ], site_url("/newbloguser/$newuser_key/"))); 84 84 $redirect = add_query_arg( array('update' => 'add'), 'user-new.php' ); 85 85 } 86 86 } … … 163 163 'content' => '<p>' . __('Here is a basic overview of the different user roles and the permissions associated with each one:') . '</p>' . 164 164 '<ul>' . 165 165 '<li>' . __('Administrators have access to all the administration features.') . '</li>' . 166 '<li>' . __('Editors can publish posts, manage posts as well as manage other people’s posts, etc.') 166 '<li>' . __('Editors can publish posts, manage posts as well as manage other people’s posts, etc.') . '</li>' . 167 167 '<li>' . __('Authors can publish and manage their own posts, and are able to upload files.') . '</li>' . 168 168 '<li>' . __('Contributors can write and manage their posts but not publish posts or upload media files.') . '</li>' . 169 169 '<li>' . __('Subscribers can read comments/comment/receive newsletters, etc. but cannot create regular site content.') . '</li>' . … … 251 251 if ( $do_both ) 252 252 echo '<h3 id="add-existing-user">' . __('Add Existing User') . '</h3>'; 253 253 if ( !is_super_admin() ) { 254 _e( 'Enter the email address of an existing user on this network to invite them to this site. 254 _e( 'Enter the email address of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ); 255 255 $label = __('E-mail'); 256 256 } else { 257 _e( 'Enter the email address or username of an existing user on this network to invite them to this site. 257 _e( 'Enter the email address or username of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ); 258 258 $label = __('E-mail or Username'); 259 259 } 260 260 ?> … … 361 361 <?php if ( is_multisite() && is_super_admin() ) { ?> 362 362 <tr> 363 363 <th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th> 364 <td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" 364 <td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" <?php checked( $new_user_ignore_pass ); ?> /> <?php _e( 'Add the user without sending them a confirmation email.' ); ?></label></td> 365 365 </tr> 366 366 <?php } ?> 367 367 </table> -
wp-admin/users.php
33 33 'content' => '<p>' . __('You can customize the display of this screen in a number of ways:') . '</p>' . 34 34 '<ul>' . 35 35 '<li>' . __('You can hide/display columns based on your needs and decide how many users to list per screen using the Screen Options tab.') . '</li>' . 36 '<li>' . __('You can filter the list of users by User Role using the text links in the upper left to show All, Administrator, Editor, Author, Contributor, or Subscriber. The default view is to show all users. 36 '<li>' . __('You can filter the list of users by User Role using the text links in the upper left to show All, Administrator, Editor, Author, Contributor, or Subscriber. The default view is to show all users. Unused User Roles are not listed.') . '</li>' . 37 37 '<li>' . __('You can view all posts made by a user by clicking on the number under the Posts column.') . '</li>' . 38 38 '</ul>' 39 39 ) );