Ticket #17414: PHPDocs-typos-17414.diff
File PHPDocs-typos-17414.diff, 173.1 KB (added by , 14 years ago) |
---|
-
wp-register.php
1 1 <?php 2 2 /** 3 3 * Used to be the page which displayed the registration form. 4 * This file is deprecated and only exists for backwards compatibility 4 5 * 5 * This file is no longer used in WordPress and is6 * deprecated.7 *8 6 * @package WordPress 9 7 * @deprecated Use wp_register() to create a registration link instead 10 8 */ 11 9 12 10 require('./wp-load.php'); 13 11 wp_redirect( site_url('wp-login.php?action=register') ); 14 12 exit; -
wp-trackback.php
33 33 } 34 34 } 35 35 36 // trackback is done by a POST36 // Trackback is done by a POST 37 37 $request_array = 'HTTP_POST_VARS'; 38 38 39 39 if ( !isset($_GET['tb_id']) || !$_GET['tb_id'] ) { -
wp-settings.php
1 1 <?php 2 2 /** 3 * Used to set up and fix common variables and include 3 * Used to set up and fix common variables and includes 4 4 * the WordPress procedural and class library. 5 5 * 6 6 * Allows for some configuration in wp-config.php (see default-constants.php) … … 178 178 require( ABSPATH . WPINC . '/vars.php' ); 179 179 180 180 // Make taxonomies and posts available to plugins and themes. 181 // @plugin authors :warning: these get registered again on the init hook.181 // @plugin authors warning: these get registered again on the init hook. 182 182 create_initial_taxonomies(); 183 183 create_initial_post_types(); 184 184 -
wp-admin/network.php
1 1 <?php 2 2 /** 3 * Network installation administration panel.3 * Network Installation Administration Panel. 4 4 * 5 5 * A multi-step process allowing the user to enable a network of WordPress sites. 6 6 * … … 126 126 /** 127 127 * Prints step 1 for Network installation process. 128 128 * 129 * @todoRealistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network129 * TODO: Realistically, step 1 should be a welcome screen explaining what a Network is and such. Navigating to Tools > Network 130 130 * should not be a sudden "Welcome to a new install process! Fill this out and click here." See also contextual help todo. 131 131 * 132 132 * @since 3.0.0 … … 192 192 193 193 if ( isset( $_POST['subdomain_install'] ) ) { 194 194 $subdomain_install = (bool) $_POST['subdomain_install']; 195 } elseif ( apache_mod_loaded('mod_rewrite') ) { // assume nothing195 } elseif ( apache_mod_loaded('mod_rewrite') ) { // Assume nothing 196 196 $subdomain_install = true; 197 197 } elseif ( !allow_subdirectory_install() ) { 198 198 $subdomain_install = true; 199 199 } else { 200 200 $subdomain_install = false; 201 if ( $got_mod_rewrite = got_mod_rewrite() ) // dangerous assumptions201 if ( $got_mod_rewrite = got_mod_rewrite() ) // Dangerous assumptions 202 202 echo '<div class="updated inline"><p><strong>' . __( 'Note:' ) . '</strong> ' . __( 'Please make sure the Apache <code>mod_rewrite</code> module is installed as it will be used at the end of this installation.' ) . '</p>'; 203 203 elseif ( $is_apache ) 204 204 echo '<div class="error inline"><p><strong>' . __( 'Warning!' ) . '</strong> ' . __( 'It looks like the Apache <code>mod_rewrite</code> module is not installed.' ) . '</p>'; … … 210 210 <h3><?php esc_html_e( 'Addresses of Sites in your Network' ); ?></h3> 211 211 <p><?php _e( 'Please choose whether you would like sites in your WordPress network to use sub-domains or sub-directories. <strong>You cannot change this later.</strong>' ); ?></p> 212 212 <p><?php _e( 'You will need a wildcard DNS record if you are going to use the virtual host (sub-domain) functionality.' ); ?></p> 213 <?php // @todo: Link to an MS readme? ?>213 <?php // TODO: Link to an MS readme? ?> 214 214 <table class="form-table"> 215 215 <tr> 216 216 <th><label><input type='radio' name='subdomain_install' value='1'<?php checked( $subdomain_install ); ?> /> <?php _e( 'Sub-domains' ); ?></label></th> … … 493 493 RewriteCond %{REQUEST_FILENAME} -d 494 494 RewriteRule ^ - [L]'; 495 495 496 // @todocustom content dir.496 // TODO: custom content dir. 497 497 if ( ! $subdomain_install ) 498 498 $htaccess_file .= "\nRewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]\nRewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]"; 499 499 … … 520 520 check_admin_referer( 'install-network-1' ); 521 521 522 522 require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); 523 // create network tables523 // Create network tables 524 524 install_network(); 525 525 $hostname = get_clean_basedomain(); 526 526 $subdomain_install = !allow_subdomain_install() ? false : (bool) $_POST['subdomain_install']; -
wp-admin/users.php
1 1 <?php 2 2 /** 3 * Users administration panel.3 * Users Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 19 19 20 20 add_screen_option( 'per_page', array('label' => _x( 'Users', 'users per page (screen options)' )) ); 21 21 22 // contextual help - choose Help on the top right of admin panel to preview this.22 // Contextual help - choose Help on the top right of admin panel to preview this. 23 23 add_contextual_help($current_screen, 24 24 '<p>' . __('This screen lists all the existing users for your site. Each user has one of five defined roles as set by the site admin: Site Administrator, Editor, Author, Contributor, or Subscriber. Users with roles other than Administrator will see fewer options in the dashboard navigation when they are logged in, based on their role.') . '</p>' . 25 25 '<p>' . __('You can customize the display of information on this screen as you can on other screens, by using the Screen Options tab and the on-screen filters.') . '</p>' . … … 73 73 continue; 74 74 } 75 75 76 // If the user doesn't already belong to the blog, bail.76 // If the user doesn't already belong to the Blog, bail. 77 77 if ( is_multisite() && !is_user_member_of_blog( $id ) ) 78 78 wp_die(__('Cheatin’ uh?')); 79 79 -
wp-admin/admin-ajax.php
584 584 $tags[ $key ]->id = $tag->term_id; 585 585 } 586 586 587 // We need raw tag name shere, so don't filter the output587 // We need raw tag name here, so don't filter the output 588 588 $return = wp_generate_tag_cloud( $tags, array('filter' => 0) ); 589 589 590 590 if ( empty($return) ) -
wp-admin/includes/class-ftp.php
1 1 <?php 2 2 /** 3 * PemFTP - A Ftpimplementation in pure PHP3 * PemFTP - An FTP implementation in pure PHP 4 4 * 5 5 * @package PemFTP 6 6 * @since 2.5 -
wp-admin/includes/class-wp-posts-list-table.php
267 267 268 268 $posts_columns['cb'] = '<input type="checkbox" />'; 269 269 270 /* translators: manage posts column name */270 /* Translators: manage posts column name */ 271 271 $posts_columns['title'] = _x( 'Title', 'column name' ); 272 272 273 273 if ( post_type_supports( $post_type, 'author' ) ) … … 347 347 } 348 348 349 349 /* 350 * arrange pages into two parts: top level pages and children_pages350 * Arrange pages into two parts: top level pages and children_pages. 351 351 * children_pages is two dimensional array, eg. 352 352 * children_pages[10][] contains all sub-pages whose parent is 10. 353 * It only takes O( N ) to arrange this and it takes O( 1 ) for subsequent lookup operations 354 * If searching, ignore hierarchy and treat everything as top level 353 * It only takes O( N ) to arrange this and it takes O( 1 ) for subsequent lookup operations. 354 * If searching, ignore hierarchy and treat everything as top level. 355 355 */ 356 356 if ( empty( $_REQUEST['s'] ) ) { 357 357 … … 360 360 361 361 foreach ( $pages as $page ) { 362 362 363 // catch and repair bad pages363 // Catch and repair bad pages 364 364 if ( $page->post_parent == $page->ID ) { 365 365 $page->post_parent = 0; 366 366 $wpdb->update( $wpdb->posts, array( 'post_parent' => 0 ), array( 'ID' => $page->ID ) ); … … 393 393 $this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page ); 394 394 } 395 395 396 // if it is the last pagenum and there are orphaned pages, display them with paging as well396 // If it is the last pagenum and there are orphaned pages, display them with paging as well 397 397 if ( isset( $children_pages ) && $count < $end ){ 398 398 foreach ( $children_pages as $orphans ){ 399 399 foreach ( $orphans as $op ) { … … 459 459 $this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page ); 460 460 } 461 461 462 unset( $children_pages[$parent] ); // required in order to keep track of orphans462 unset( $children_pages[$parent] ); //Required in order to keep track of orphans 463 463 } 464 464 465 465 function single_row( $a_post, $level = 0 ) { … … 506 506 $attributes = 'class="post-title page-title column-title"' . $style; 507 507 508 508 if ( 0 == $level && (int) $post->post_parent > 0 ) { 509 // sent level 0 by accident, by default, or because we don't know the actual level509 //Sent level 0 by accident, by default, or because we don't know the actual level 510 510 $find_main_page = (int) $post->post_parent; 511 511 while ( $find_main_page > 0 ) { 512 512 $parent = get_page( $find_main_page ); … … 782 782 $authors_dropdown .= $authors; 783 783 $authors_dropdown .= '</label>'; 784 784 endif; 785 endif; // authors785 endif; // Authors 786 786 ?> 787 787 788 788 <?php if ( !$bulk ) echo $authors_dropdown; -
wp-admin/includes/plugin-install.php
97 97 if ( is_wp_error($api_tags) ) { 98 98 echo $api_tags->get_error_message(); 99 99 } else { 100 // Set up the tags in a way which can be interprated by wp_generate_tag_cloud()100 // Set up the tags in a way which can be interpreted by wp_generate_tag_cloud() 101 101 $tags = array(); 102 102 foreach ( (array)$api_tags as $tag ) 103 103 $tags[ $tag['name'] ] = (object) array( … … 175 175 * @since 3.0.0 176 176 */ 177 177 function install_plugin_install_status($api, $loop = false) { 178 // this function is called recursivly, $loop prevents futhur loops.178 // This function is called recursively, $loop prevents futhur loops. 179 179 if ( is_array($api) ) 180 180 $api = (object) $api; 181 181 182 // Default to a "new" plugin182 // Default to a "new" plugin 183 183 $status = 'install'; 184 184 $url = false; 185 185 186 // Check to see if this plugin is known to be installed, and has an update awaiting it.186 // Check to see if this plugin is known to be installed, and has an update awaiting it. 187 187 $update_plugins = get_site_transient('update_plugins'); 188 188 if ( is_object( $update_plugins ) ) { 189 189 foreach ( (array)$update_plugins->response as $file => $plugin ) { … … 205 205 if ( current_user_can('install_plugins') ) 206 206 $url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=' . $api->slug), 'install-plugin_' . $api->slug); 207 207 } else { 208 $key = array_shift( $key = array_keys($installed_plugin) ); // Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers208 $key = array_shift( $key = array_keys($installed_plugin) ); // Use the first plugin regardless of the name, Could have issues for multiple-plugins in one directory if they share different version numbers 209 209 if ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '=') ){ 210 210 $status = 'latest_installed'; 211 211 } elseif ( version_compare($api->version, $installed_plugin[ $key ]['Version'], '<') ) { 212 212 $status = 'newer_installed'; 213 213 $version = $installed_plugin[ $key ]['Version']; 214 214 } else { 215 // If the above update check failed, Then that probably means that the update checker has out-of-date information, force a refresh215 // If the above update check failed, Then that probably means that the update checker has out-of-date information, force a refresh 216 216 if ( ! $loop ) { 217 217 delete_site_transient('update_plugins'); 218 218 wp_update_plugins(); … … 251 251 'div' => array(), 'p' => array(), 'ul' => array(), 'ol' => array(), 'li' => array(), 252 252 'h1' => array(), 'h2' => array(), 'h3' => array(), 'h4' => array(), 'h5' => array(), 'h6' => array(), 253 253 'img' => array('src' => array(), 'class' => array(), 'alt' => array())); 254 // Sanitize HTML254 // Sanitize HTML 255 255 foreach ( (array)$api->sections as $section_name => $content ) 256 256 $api->sections[$section_name] = wp_kses($content, $plugins_allowedtags); 257 257 foreach ( array('version', 'author', 'requires', 'tested', 'homepage', 'downloaded', 'slug') as $key ) … … 302 302 ?> 303 303 </p> 304 304 <?php endif; ?> 305 <h2 class="mainheader"><?php /* translators: For Your Information */ _e('FYI') ?></h2>305 <h2 class="mainheader"><?php /* Translators: For Your Information */ _e('FYI') ?></h2> 306 306 <ul> 307 307 <?php if ( ! empty($api->version) ) : ?> 308 308 <li><strong><?php _e('Version:') ?></strong> <?php echo $api->version ?></li> -
wp-admin/includes/class-pclzip.php
35 35 // (which is not a very smart choice, specifically for windows paths !). 36 36 // A better separator should be a comma (,). This constant gives you the 37 37 // abilty to change that. 38 // However notice that changing this value, may have impact on existing38 // However, notice that changing this value, may have impact on existing 39 39 // scripts, using space separated filenames. 40 // Recomm anded values for compatibility with older versions :40 // Recommended values for compatibility with older versions : 41 41 //define( 'PCLZIP_SEPARATOR', ' ' ); 42 // Recomm anded values for smart separation of filenames.42 // Recommended values for smart separation of filenames. 43 43 if (!defined('PCLZIP_SEPARATOR')) { 44 44 define( 'PCLZIP_SEPARATOR', ',' ); 45 45 } 46 46 47 47 // ----- Error configuration 48 // 0 : PclZip Class integrated error handling48 // 0 : PclZip class integrated error handling 49 49 // 1 : PclError external library error handling. By enabling this 50 50 // you must ensure that you have included PclError library. 51 // [2,...] : reserved for futur use51 // [2,...] : reserved for future use 52 52 if (!defined('PCLZIP_ERROR_EXTERNAL')) { 53 53 define( 'PCLZIP_ERROR_EXTERNAL', 0 ); 54 54 } … … 166 166 define( 'PCLZIP_CB_POST_EXTRACT', 78002 ); 167 167 define( 'PCLZIP_CB_PRE_ADD', 78003 ); 168 168 define( 'PCLZIP_CB_POST_ADD', 78004 ); 169 /* For futur use169 /* For future use 170 170 define( 'PCLZIP_CB_PRE_LIST', 78005 ); 171 171 define( 'PCLZIP_CB_POST_LIST', 78006 ); 172 172 define( 'PCLZIP_CB_PRE_DELETE', 78007 ); … … 176 176 // -------------------------------------------------------------------------------- 177 177 // Class : PclZip 178 178 // Description : 179 // PclZip is the class that represent a Zip archive.179 // PclZip is the class that represents a Zip archive. 180 180 // The public methods allow the manipulation of the archive. 181 181 // Attributes : 182 182 // Attributes must not be accessed directly. … … 200 200 var $error_string = ''; 201 201 202 202 // ----- Current status of the magic_quotes_runtime 203 // This value store the php configuration for magic_quotes203 // This value stores the php configuration for magic_quotes 204 204 // The class can then disable the magic_quotes and reset it after 205 205 var $magic_quotes_status; 206 206 … … 244 244 // When a directory is in the list, the directory and its content is added 245 245 // in the archive. 246 246 // In this synopsis, the function takes an optional variable list of 247 // options. See bel low the supported options.247 // options. See below the supported options. 248 248 // Parameters : 249 249 // $p_filelist : An array containing file or directory names, or 250 250 // a string containing one filename or one directory name, or … … 313 313 } 314 314 } 315 315 316 // ----- Look for 2 arg s316 // ----- Look for 2 arguments 317 317 // Here we need to support the first historic synopsis of the 318 318 // method. 319 319 else { … … 474 474 array_shift($v_arg_list); 475 475 $v_size--; 476 476 477 // ----- Look for first arg 477 // ----- Look for first argument 478 478 if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { 479 479 480 480 // ----- Parse the options … … 498 498 } 499 499 } 500 500 501 // ----- Look for 2 arg s501 // ----- Look for 2 arguments 502 502 // Here we need to support the first historic synopsis of the 503 503 // method. 504 504 else { … … 775 775 } 776 776 } 777 777 778 // ----- Look for 2 arg s778 // ----- Look for 2 arguments 779 779 // Here we need to support the first historic synopsis of the 780 780 // method. 781 781 else { … … 888 888 array_shift($v_arg_list); 889 889 $v_size--; 890 890 891 // ----- Look for first arg 891 // ----- Look for first argument 892 892 if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { 893 893 894 894 // ----- Parse the options … … 1060 1060 // Function : deleteByIndex() 1061 1061 // Description : 1062 1062 // ***** Deprecated ***** 1063 // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefer ed.1063 // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be preferred. 1064 1064 // -------------------------------------------------------------------------------- 1065 1065 function deleteByIndex($p_index) 1066 1066 { … … 1122 1122 return 0; 1123 1123 } 1124 1124 1125 // ----- Read the central directory information s1125 // ----- Read the central directory information 1126 1126 $v_central_dir = array(); 1127 1127 if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) 1128 1128 { … … 1387 1387 return(false); 1388 1388 } 1389 1389 1390 // ----- Check that the file is read eable1390 // ----- Check that the file is readable 1391 1391 if (!is_readable($this->zipname)) { 1392 1392 // ----- Error log 1393 1393 PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'"); … … 1985 1985 // -------------------------------------------------------------------------------- 1986 1986 // Function : privFileDescrExpand() 1987 1987 // Description : 1988 // This method look for each item of the list to see if its a file, a folder1989 // or a string to be added as file. For any other type of files (link, other)1988 // This method looks for each item of the list to see if it's a file, a folder 1989 // or a string to be added as a file. For any other type of files (link, other) 1990 1990 // just ignore the item. 1991 1991 // Then prepare the information that will be stored for that file. 1992 // When it s a folder, expand the folder with all the files that are in that1992 // When it's a folder, expand the folder with all the files that are in that 1993 1993 // folder (recursively). 1994 1994 // Parameters : 1995 1995 // Return Values : … … 2067 2067 // ----- Compose the full filename 2068 2068 $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler; 2069 2069 2070 // ----- Look for different stored filename 2071 // Because the name of the folder was changed, the name of the2070 // ----- Look for different stored filenames 2071 // because the name of the folder was changed, the name of the 2072 2072 // files/sub-folders also change 2073 2073 if (($v_descr['stored_filename'] != $v_descr['filename']) 2074 2074 && (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) { … … 2193 2193 return $v_result; 2194 2194 } 2195 2195 2196 // ----- Go to beginning of File2196 // ----- Go to beginning of file 2197 2197 @rewind($this->zip_fd); 2198 2198 2199 2199 // ----- Creates a temporay file … … 2488 2488 return PclZip::errorCode(); 2489 2489 } 2490 2490 2491 // ----- Look if it is a file or a dir with no all path remove option2492 // or a dir with all its pathremoved2491 // ----- Look if it is a file or a directory with no all path remove option 2492 // or a directory with all its pathes removed 2493 2493 // if ( (is_file($p_filedescr_list[$j]['filename'])) 2494 2494 // || ( is_dir($p_filedescr_list[$j]['filename']) 2495 2495 if ( ($p_filedescr_list[$j]['type'] == 'file') … … 2588 2588 } 2589 2589 2590 2590 2591 // ----- Look for file time2591 // ----- Look for file time 2592 2592 if (isset($p_filedescr['mtime'])) { 2593 2593 $p_header['mtime'] = $p_filedescr['mtime']; 2594 2594 } … … 2612 2612 // ----- Look for pre-add callback 2613 2613 if (isset($p_options[PCLZIP_CB_PRE_ADD])) { 2614 2614 2615 // ----- Generate alocal information2615 // ----- Generate local information 2616 2616 $v_local_header = array(); 2617 2617 $this->privConvertHeader2FileInfo($p_header, $v_local_header); 2618 2618 … … 2626 2626 $v_result = 1; 2627 2627 } 2628 2628 2629 // ----- Update the information s2629 // ----- Update the information 2630 2630 // Only some fields can be modified 2631 2631 if ($p_header['stored_filename'] != $v_local_header['stored_filename']) { 2632 2632 $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']); … … 2901 2901 // Function : privCalculateStoredFilename() 2902 2902 // Description : 2903 2903 // Based on file descriptor properties and global options, this method 2904 // calculate the filename that will be stored in the archive.2904 // calculates the filename that will be stored in the archive. 2905 2905 // Parameters : 2906 2906 // Return Values : 2907 2907 // -------------------------------------------------------------------------------- … … 2941 2941 else { 2942 2942 2943 2943 // ----- Look for short name change 2944 // Its when we c ahnge just the filename but not the path2944 // Its when we change just the filename but not the path 2945 2945 if (isset($p_filedescr['new_short_name'])) { 2946 2946 $v_path_info = pathinfo($p_filename); 2947 2947 $v_dir = ''; … … 3164 3164 return PclZip::errorCode(); 3165 3165 } 3166 3166 3167 // ----- Read the central directory information s3167 // ----- Read the central directory information 3168 3168 $v_central_dir = array(); 3169 3169 if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) 3170 3170 { … … 3215 3215 // -------------------------------------------------------------------------------- 3216 3216 // Function : privConvertHeader2FileInfo() 3217 3217 // Description : 3218 // This function takes the file information sfrom the central directory3219 // entries and extract the interesting parameters that will be given back.3220 // The resulting file info s areset in the array $p_info3218 // This function takes the file information from the central directory 3219 // entries and extracts the interesting parameters that will be given back. 3220 // The resulting file infomation is set in the array $p_info 3221 3221 // $p_info['filename'] : Filename with full path. Given by user (add), 3222 3222 // extracted in the filesystem (extract). 3223 3223 // $p_info['stored_filename'] : Stored filename in the archive. … … 3327 3327 for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) 3328 3328 { 3329 3329 3330 // ----- Read next Central dir entry3330 // ----- Read next Central directory entry 3331 3331 @rewind($this->zip_fd); 3332 3332 if (@fseek($this->zip_fd, $v_pos_entry)) 3333 3333 { … … 3687 3687 // ----- Look for pre-extract callback 3688 3688 if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { 3689 3689 3690 // ----- Generate alocal information3690 // ----- Generate local information 3691 3691 $v_local_header = array(); 3692 3692 $this->privConvertHeader2FileInfo($p_entry, $v_local_header); 3693 3693 … … 3749 3749 $p_entry['status'] = "write_protected"; 3750 3750 3751 3751 // ----- Look for PCLZIP_OPT_STOP_ON_ERROR 3752 // For historical reason first PclZip implementation does not stop3752 // For historical reasons first PclZip implementation does not stop 3753 3753 // when this kind of error occurs. 3754 3754 if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) 3755 3755 && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { … … 3773 3773 $p_entry['status'] = "newer_exist"; 3774 3774 3775 3775 // ----- Look for PCLZIP_OPT_STOP_ON_ERROR 3776 // For historical reason first PclZip implementation does not stop3776 // For historical reasons first PclZip implementation does not stop 3777 3777 // when this kind of error occurs. 3778 3778 if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) 3779 3779 && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { … … 3856 3856 } 3857 3857 else { 3858 3858 // ----- TBC 3859 // Need to be finished3859 // Needs to be finished 3860 3860 if (($p_entry['flag'] & 1) == 1) { 3861 3861 PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.'); 3862 3862 return PclZip::errorCode(); … … 3933 3933 // ----- Look for post-extract callback 3934 3934 elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { 3935 3935 3936 // ----- Generate alocal information3936 // ----- Generate local information 3937 3937 $v_local_header = array(); 3938 3938 $this->privConvertHeader2FileInfo($p_entry, $v_local_header); 3939 3939 … … 4053 4053 // ----- Look for pre-extract callback 4054 4054 if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { 4055 4055 4056 // ----- Generate alocal information4056 // ----- Generate local information 4057 4057 $v_local_header = array(); 4058 4058 $this->privConvertHeader2FileInfo($p_entry, $v_local_header); 4059 4059 … … 4075 4075 $v_result = PCLZIP_ERR_USER_ABORTED; 4076 4076 } 4077 4077 4078 // ----- Update the information s4078 // ----- Update the information 4079 4079 // Only some fields can be modified 4080 4080 $p_entry['filename'] = $v_local_header['filename']; 4081 4081 } … … 4121 4121 // ----- Look for post-extract callback 4122 4122 elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { 4123 4123 4124 // ----- Generate alocal information4124 // ----- Generate local information 4125 4125 $v_local_header = array(); 4126 4126 $this->privConvertHeader2FileInfo($p_entry, $v_local_header); 4127 4127 … … 4167 4167 // ----- Look for pre-extract callback 4168 4168 if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { 4169 4169 4170 // ----- Generate alocal information4170 // ----- Generate local information 4171 4171 $v_local_header = array(); 4172 4172 $this->privConvertHeader2FileInfo($p_entry, $v_local_header); 4173 4173 … … 4188 4188 $v_result = PCLZIP_ERR_USER_ABORTED; 4189 4189 } 4190 4190 4191 // ----- Update the information s4191 // ----- Update the information 4192 4192 // Only some fields can be modified 4193 4193 $p_entry['filename'] = $v_local_header['filename']; 4194 4194 } … … 4233 4233 // ----- Look for post-extract callback 4234 4234 elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { 4235 4235 4236 // ----- Generate alocal information4236 // ----- Generate local information 4237 4237 $v_local_header = array(); 4238 4238 $this->privConvertHeader2FileInfo($p_entry, $v_local_header); 4239 4239 … … 4374 4374 { 4375 4375 $v_result=1; 4376 4376 4377 // ----- Read the 4 byte ssignature4377 // ----- Read the 4 byte signature 4378 4378 $v_binary_data = @fread($this->zip_fd, 4); 4379 4379 $v_data = unpack('Vid', $v_binary_data); 4380 4380 … … 4582 4582 4583 4583 // ----- Add the byte 4584 4584 //$v_bytes = ($v_bytes << 8) | Ord($v_byte); 4585 // N ote we mask the old value down such that once shifted we can never end up with more than a 32bit number4585 // NOTE: We mask the old value down such that once shifted, we never end up with more than a 32bit number. 4586 4586 // Otherwise on systems where we have 64bit integers the check below for the magic number will fail. 4587 4587 $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte); 4588 4588 … … 4684 4684 return $v_result; 4685 4685 } 4686 4686 4687 // ----- Read the central directory information s4687 // ----- Read the central directory information 4688 4688 $v_central_dir = array(); 4689 4689 if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) 4690 4690 { … … 5070 5070 return $v_result; 5071 5071 } 5072 5072 5073 // ----- Read the central directory information s5073 // ----- Read the central directory information 5074 5074 $v_central_dir = array(); 5075 5075 if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) 5076 5076 { … … 5090 5090 return $v_result; 5091 5091 } 5092 5092 5093 // ----- Read the central directory information s5093 // ----- Read the central directory information 5094 5094 $v_central_dir_to_add = array(); 5095 5095 if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1) 5096 5096 { -
wp-admin/includes/class-wp-media-list-table.php
130 130 $posts_columns = array(); 131 131 $posts_columns['cb'] = '<input type="checkbox" />'; 132 132 $posts_columns['icon'] = ''; 133 /* translators: column name */133 /* Translators: column name */ 134 134 $posts_columns['title'] = _x( 'File', 'column name' ); 135 135 $posts_columns['author'] = __( 'Author' ); 136 136 //$posts_columns['tags'] = _x( 'Tags', 'column name' ); … … 139 139 $posts_columns['parent'] = _x( 'Attached to', 'column name' ); 140 140 $posts_columns['comments'] = '<div class="vers"><img alt="Comments" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></div>'; 141 141 } 142 /* translators: column name */142 /* Translators: column name */ 143 143 $posts_columns['date'] = _x( 'Date', 'column name' ); 144 144 $posts_columns = apply_filters( 'manage_media_columns', $posts_columns, $this->detached ); 145 145 -
wp-admin/includes/menu.php
43 43 44 44 $_wp_submenu_nopriv = array(); 45 45 $_wp_menu_nopriv = array(); 46 // Loop over submenus and remove pages for which the user does not have priv s.46 // Loop over submenus and remove pages for which the user does not have privileges. 47 47 foreach ( array( 'submenu' ) as $sub_loop ) { 48 48 foreach ($$sub_loop as $parent => $sub) { 49 49 foreach ($sub as $index => $data) { … … 62 62 unset($sub_loop); 63 63 64 64 // Loop over the top-level menu. 65 // Menus for which the original parent is not accessible due to lack of priv s will have the next65 // Menus for which the original parent is not accessible due to lack of privilegess will have the next 66 66 // submenu in line be assigned as the new menu parent. 67 67 foreach ( $menu as $id => $data ) { 68 68 if ( empty($submenu[$data[2]]) ) … … 96 96 else 97 97 do_action('admin_menu', ''); 98 98 99 // Remove menus that have no accessible submenus and require priv s that the user does not have.99 // Remove menus that have no accessible submenus and require privilegess that the user does not have. 100 100 // Run re-parent loop again. 101 101 foreach ( $menu as $id => $data ) { 102 102 if ( ! current_user_can($data[1]) ) … … 104 104 105 105 // If submenu is empty... 106 106 if ( empty($submenu[$data[2]]) ) { 107 // And user doesn't have priv s, remove menu.107 // And user doesn't have privileges, remove menu. 108 108 if ( isset( $_wp_menu_nopriv[$data[2]] ) ) { 109 109 unset($menu[$id]); 110 110 } … … 141 141 foreach ( $menu as $order => $top ) { 142 142 $i++; 143 143 144 if ( 0 == $order ) { // dashboard is always shown/single144 if ( 0 == $order ) { // Dashboard is always shown/single 145 145 $menu[0][4] = add_cssclass('menu-top-first', $top[4]); 146 146 $lastorder = 0; 147 147 continue; 148 148 } 149 149 150 if ( 0 === strpos($top[2], 'separator') ) { // if separator150 if ( 0 === strpos($top[2], 'separator') ) { // If separator 151 151 $first = true; 152 152 $c = $menu[$lastorder][4]; 153 153 $menu[$lastorder][4] = add_cssclass('menu-top-last', $c); … … 171 171 return apply_filters( 'add_menu_classes', $menu ); 172 172 } 173 173 174 uksort($menu, "strnatcasecmp"); // make it all pretty174 uksort($menu, "strnatcasecmp"); // Make it all pretty 175 175 176 176 if ( apply_filters('custom_menu_order', false) ) { 177 177 $menu_order = array(); -
wp-admin/includes/class-ftp-pure.php
1 1 <?php 2 2 /** 3 * PemFTP - A Ftpimplementation in pure PHP3 * PemFTP - An FTP implementation in pure PHP 4 4 * 5 5 * @package PemFTP 6 6 * @since 2.5 -
wp-admin/includes/class-ftp-sockets.php
1 1 <?php 2 2 /** 3 * PemFTP - A Ftpimplementation in pure PHP3 * PemFTP - An FTP implementation in pure PHP 4 4 * 5 5 * @package PemFTP 6 6 * @since 2.5 -
wp-admin/includes/internal-linking.php
1 1 <?php 2 2 /** 3 * Internal linking functions.3 * Internal Linking Functions. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 64 64 } 65 65 66 66 /** 67 * Dialog for internal linking.67 * Dialog For Internal Linking. 68 68 * 69 69 * @since 3.1.0 70 70 */ -
wp-admin/includes/manifest.php
9 9 $mce_ver = "ver=$tinymce_version"; 10 10 11 11 /** 12 * Retrieve list of all cacheable W Pfiles12 * Retrieve list of all cacheable WordPress files 13 13 * 14 14 * Array format: file, version (optional), bool (whether to use src and set ignoreQuery, defaults to true) 15 15 */ -
wp-admin/includes/file.php
465 465 } 466 466 467 467 /** 468 * Downloads a urlto a local temporary file using the WordPress HTTP Class.469 * Please note, That the calling function must unlink() the 468 * Downloads a URL to a local temporary file using the WordPress HTTP Class. 469 * Please note, That the calling function must unlink() the file. 470 470 * 471 471 * @since 2.5.0 472 472 * 473 473 * @param string $url the URL of the file to download 474 474 * @param int $timeout The timeout for the request to download the file default 300 seconds 475 * @return mixed WP_Error on failure, string Filename on success.475 * @return mixed WP_Error on failure, string filename on success. 476 476 */ 477 477 function download_url( $url, $timeout = 300 ) { 478 478 //WARNING: The file is not automatically deleted, The script must unlink() the file. … … 499 499 } 500 500 501 501 /** 502 * Unzip's a specified ZIP file to a location on the Filesystem via the WordPress Filesystem Abstraction.502 * Unzip's a specified ZIP file to a location on the filesystem via the WordPress Filesystem Abstraction. 503 503 * Assumes that WP_Filesystem() has already been called and set up. Does not extract a root-level __MACOSX directory, if present. 504 504 * 505 505 * Attempts to increase the PHP Memory limit to 256M before uncompressing, … … 509 509 * 510 510 * @param string $file Full path and filename of zip archive 511 511 * @param string $to Full path on the filesystem to extract archive to 512 * @return mixed WP_Error on failure, True on success512 * @return mixed WP_Error on failure, true on success 513 513 */ 514 514 function unzip_file($file, $to) { 515 515 global $wp_filesystem; … … 523 523 $needed_dirs = array(); 524 524 $to = trailingslashit($to); 525 525 526 // Determine any parent dir 's needed (of the upgrade directory)527 if ( ! $wp_filesystem->is_dir($to) ) { // Only do parents if no children exist526 // Determine any parent directories needed (of the upgrade directory) 527 if ( ! $wp_filesystem->is_dir($to) ) { // Only do parents if no children exist 528 528 $path = preg_split('![/\\\]!', untrailingslashit($to)); 529 529 for ( $i = count($path); $i >= 0; $i-- ) { 530 530 if ( empty($path[$i]) ) 531 531 continue; 532 532 533 533 $dir = implode('/', array_slice($path, 0, $i+1) ); 534 if ( preg_match('!^[a-z]:$!i', $dir) ) // Skip it if it looks like a Windows Drive letter.534 if ( preg_match('!^[a-z]:$!i', $dir) ) // Skip it if it looks like a Windows drive letter. 535 535 continue; 536 536 537 537 if ( ! $wp_filesystem->is_dir($dir) ) 538 538 $needed_dirs[] = $dir; 539 539 else 540 break; // A folder exists, therefor , we dont need the check the levels below this540 break; // A folder exists, therefore, we dont need the check the levels below this 541 541 } 542 542 } 543 543 … … 572 572 573 573 $z = new ZipArchive(); 574 574 575 // PHP4-compat - php4 classes can't contain constants575 // PHP4-compat - PHP4 classes can't contain constants 576 576 $zopen = $z->open($file, /* ZIPARCHIVE::CHECKCONS */ 4); 577 577 if ( true !== $zopen ) 578 578 return new WP_Error('incompatible_archive', __('Incompatible Archive.')); … … 584 584 if ( '__MACOSX/' === substr($info['name'], 0, 9) ) // Skip the OS X-created __MACOSX directory 585 585 continue; 586 586 587 if ( '/' == substr($info['name'], -1) ) // directory587 if ( '/' == substr($info['name'], -1) ) // Directory 588 588 $needed_dirs[] = $to . untrailingslashit($info['name']); 589 589 else 590 590 $needed_dirs[] = $to . untrailingslashit(dirname($info['name'])); … … 593 593 $needed_dirs = array_unique($needed_dirs); 594 594 foreach ( $needed_dirs as $dir ) { 595 595 // Check the parent folders of the folders all exist within the creation array. 596 if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist)596 if ( untrailingslashit($to) == $dir ) // Skip over the working directory, we know this exists (or will exist) 597 597 continue; 598 if ( strpos($dir, $to) === false ) // If the directory is not within the working directory, Skip it598 if ( strpos($dir, $to) === false ) // If the directory is not within the working directory, skip it 599 599 continue; 600 600 601 601 $parent_folder = dirname($dir); … … 608 608 609 609 // Create those directories if need be: 610 610 foreach ( $needed_dirs as $_dir ) { 611 if ( ! $wp_filesystem->mkdir($_dir, FS_CHMOD_DIR) && ! $wp_filesystem->is_dir($_dir) ) // Only check to see if the Direxists upon creation failure. Less I/O this way.611 if ( ! $wp_filesystem->mkdir($_dir, FS_CHMOD_DIR) && ! $wp_filesystem->is_dir($_dir) ) // Only check to see if the directory exists upon creation failure. Less I/O this way. 612 612 return new WP_Error('mkdir_failed', __('Could not create directory.'), $_dir); 613 613 } 614 614 unset($needed_dirs); … … 617 617 if ( ! $info = $z->statIndex($i) ) 618 618 return new WP_Error('stat_failed', __('Could not retrieve file from archive.')); 619 619 620 if ( '/' == substr($info['name'], -1) ) // directory620 if ( '/' == substr($info['name'], -1) ) // Directory 621 621 continue; 622 622 623 623 if ( '__MACOSX/' === substr($info['name'], 0, 9) ) // Don't extract the OS X-created __MACOSX directory files … … 685 685 $needed_dirs = array_unique($needed_dirs); 686 686 foreach ( $needed_dirs as $dir ) { 687 687 // Check the parent folders of the folders all exist within the creation array. 688 if ( untrailingslashit($to) == $dir ) // Skip over the working directory, We know this exists (or will exist)688 if ( untrailingslashit($to) == $dir ) // Skip over the working directory, we know this exists (or will exist) 689 689 continue; 690 if ( strpos($dir, $to) === false ) // If the directory is not within the working directory, Skip it690 if ( strpos($dir, $to) === false ) // If the directory is not within the working directory, skip it 691 691 continue; 692 692 693 693 $parent_folder = dirname($dir); … … 700 700 701 701 // Create those directories if need be: 702 702 foreach ( $needed_dirs as $_dir ) { 703 if ( ! $wp_filesystem->mkdir($_dir, FS_CHMOD_DIR) && ! $wp_filesystem->is_dir($_dir) ) // Only check to see if the dir exists upon creation failure. Less I/O this way.703 if ( ! $wp_filesystem->mkdir($_dir, FS_CHMOD_DIR) && ! $wp_filesystem->is_dir($_dir) ) // Only check to see if the directory exists upon creation failure. Less I/O this way. 704 704 return new WP_Error('mkdir_failed', __('Could not create directory.'), $_dir); 705 705 } 706 706 unset($needed_dirs); 707 707 708 // Extract the files from the zip708 // Extract the files from the ZIP 709 709 foreach ( $archive_files as $file ) { 710 710 if ( $file['folder'] ) 711 711 continue; … … 728 728 * @param string $from source directory 729 729 * @param string $to destination directory 730 730 * @param array $skip_list a list of files/folders to skip copying 731 * @return mixed WP_Error on failure, True on success.731 * @return mixed WP_Error on failure, true on success. 732 732 */ 733 733 function copy_dir($from, $to, $skip_list = array() ) { 734 734 global $wp_filesystem; … … 771 771 } 772 772 773 773 /** 774 * Initiali ses and connects the WordPress Filesystem Abstraction classes.774 * Initializes and connects the WordPress Filesystem Abstraction classes. 775 775 * This function will include the chosen transport and attempt connecting. 776 776 * 777 777 * Plugins may add extra transports, And force WordPress to use them by returning the filename via the 'filesystem_method_file' filter. … … 813 813 return false; 814 814 815 815 if ( !$wp_filesystem->connect() ) 816 return false; //There was an er orr connecting to the server.816 return false; //There was an error connecting to the server. 817 817 818 818 // Set the permission constants if not already set. 819 819 if ( ! defined('FS_CHMOD_DIR') ) … … 865 865 866 866 /** 867 867 * Displays a form to the user to request for their FTP/SSH details in order to connect to the filesystem. 868 * All chosen/entered details are saved, Excluding the Password.868 * All chosen/entered details are saved, Excluding the password. 869 869 * 870 870 * Hostnames may be in the form of hostname:portnumber (eg: wordpress.org:2467) to specify an alternate FTP/SSH port. 871 871 * … … 874 874 * @since 2.5.0 875 875 * 876 876 * @param string $form_post the URL to post the form to 877 * @param string $type the chosen Filesystem method in use877 * @param string $type the chosen filesystem method in use 878 878 * @param boolean $error if the current request has failed to connect 879 879 * @param string $context The directory which is needed access to, The write-test will be performed on this directory by get_filesystem_method() 880 880 * @param string $extra_fields Extra POST fields which should be checked for to be included in the post. … … 896 896 897 897 $credentials = get_option('ftp_credentials', array( 'hostname' => '', 'username' => '')); 898 898 899 // If defined, set it to that, Else, If POST'd, set it to that, If not, Set it to whatever it previously was(saved details in option)899 // If defined, set it to that, else, if POST'd, set it to that, if not, set it to whatever it previously was(saved details in option) 900 900 $credentials['hostname'] = defined('FTP_HOST') ? FTP_HOST : (!empty($_POST['hostname']) ? stripslashes($_POST['hostname']) : $credentials['hostname']); 901 901 $credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? stripslashes($_POST['username']) : $credentials['username']); 902 902 $credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? stripslashes($_POST['password']) : ''); … … 905 905 $credentials['public_key'] = defined('FTP_PUBKEY') ? FTP_PUBKEY : (!empty($_POST['public_key']) ? stripslashes($_POST['public_key']) : ''); 906 906 $credentials['private_key'] = defined('FTP_PRIKEY') ? FTP_PRIKEY : (!empty($_POST['private_key']) ? stripslashes($_POST['private_key']) : ''); 907 907 908 //sanitize the hostname, Some people might pass in odd-data:908 //sanitize the hostname, some people might pass in odd-data: 909 909 $credentials['hostname'] = preg_replace('|\w+://|', '', $credentials['hostname']); //Strip any schemes off 910 910 911 911 if ( strpos($credentials['hostname'], ':') ) { … … 922 922 $credentials['connection_type'] = 'ftps'; 923 923 else if ( !empty($_POST['connection_type']) ) 924 924 $credentials['connection_type'] = stripslashes($_POST['connection_type']); 925 else if ( !isset($credentials['connection_type']) ) //All else fails (And its not defaulted to something else saved), Default to FTP925 else if ( !isset($credentials['connection_type']) ) //All else fails (And its not defaulted to something else saved), default to FTP 926 926 $credentials['connection_type'] = 'ftp'; 927 927 928 928 if ( ! $error && … … 931 931 ( 'ssh' == $credentials['connection_type'] && !empty($credentials['public_key']) && !empty($credentials['private_key']) ) 932 932 ) ) { 933 933 $stored_credentials = $credentials; 934 if ( !empty($stored_credentials['port']) ) // save port as part of hostname to simplify above code.934 if ( !empty($stored_credentials['port']) ) //Save port as part of hostname to simplify above code. 935 935 $stored_credentials['hostname'] .= ':' . $stored_credentials['port']; 936 936 937 937 unset($stored_credentials['password'], $stored_credentials['port'], $stored_credentials['private_key'], $stored_credentials['public_key']); -
wp-admin/includes/class-wp-terms-list-table.php
74 74 } 75 75 76 76 function has_items() { 77 // todo: populate $this->items in prepare_items()77 // TODO: populate $this->items in prepare_items() 78 78 return true; 79 79 } 80 80 … … 137 137 138 138 $args['offset'] = $offset = ( $page - 1 ) * $number; 139 139 140 // convert it to table rows140 // Convert it to table rows 141 141 $out = ''; 142 142 $count = 0; 143 143 … … 153 153 else 154 154 $children = _get_term_hierarchy( $taxonomy ); 155 155 156 // Some funky recursion to get the job done( Paging & parents mainly ) is contained within, Skip it for non-hierarchical taxonomies for performance sake156 // Some funky recursion to get the job done( Paging & parents mainly ) is contained within, skip it for non-hierarchical taxonomies for performance sake 157 157 $out .= $this->_rows( $taxonomy, $terms, $children, $offset, $number, $count ); 158 158 } else { 159 159 $terms = get_terms( $taxonomy, $args ); -
wp-admin/includes/class-wp-filesystem-base.php
30 30 var $cache = array(); 31 31 32 32 /** 33 * The Access method of the current connection, Set automatically.33 * The Access method of the current connection, set automatically. 34 34 * 35 35 * @since 2.5 36 36 * @access public … … 47 47 */ 48 48 function abspath() { 49 49 $folder = $this->find_folder(ABSPATH); 50 //Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, Could have some false positives, but rare.50 //Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, could have some false positives, but rare. 51 51 if ( ! $folder && $this->is_dir('/wp-includes') ) 52 52 $folder = '/'; 53 53 return $folder; … … 202 202 continue; //We want this to be caught by the next code block. 203 203 204 204 //Working from /home/ to /user/ to /wordpress/ see if that file exists within the current folder, 205 // If its found, change into it and follow through looking for it.206 // If it can t find WordPress down that route, it'll continue onto the next folder level, and see if that matches, and so on.205 // if it's found, change into it and follow through looking for it. 206 // If it can't find WordPress down that route, it'll continue onto the next folder level, and see if that matches, and so on. 207 207 // If it reaches the end, and still cant find it, it'll return false for the entire function. 208 208 if ( isset($files[ $key ]) ){ 209 209 //Lets try that folder: … … 223 223 } 224 224 if ( $loop ) 225 225 return false; //Prevent this function from looping again. 226 //As an extra last resort, Change back to / if the folder wasnt found. This comes into effect when the CWD is /home/user/ but WPis at /var/www/.... mainly dedicated setups.226 //As an extra last resort, change back to / if the folder wasnt found. This comes into effect when the CWD is /home/user/ but WordPress is at /var/www/.... mainly dedicated setups. 227 227 return $this->search_for_folder($folder, '/', true); 228 228 229 229 } … … 283 283 } 284 284 285 285 /** 286 * Converts *nix style file permissions to a octal number.286 * Converts *nix style file permissions to an octal number. 287 287 * 288 288 * Converts '-rw-r--r--' to 0644 289 289 * From "info at rvgate dot nl"'s comment on the PHP documentation for chmod() -
wp-admin/includes/post.php
787 787 // 788 788 789 789 /** 790 * Replace hrefs of attachment anchors with up-to-date permalinks.790 * Replace HREF's of attachment anchors with up-to-date permalinks. 791 791 * 792 792 * @since 2.3.0 793 793 * @access private … … 947 947 } 948 948 949 949 /** 950 * Get default post mimetypes950 * Get default post MIME types 951 951 * 952 952 * @since 2.9.0 953 953 * … … 1052 1052 * 1053 1053 * @since 2.5.0 1054 1054 * 1055 * @param int|object $id 1055 * @param int|object $id Post ID or post object. 1056 1056 * @param string $title (optional) Title 1057 1057 * @param string $name (optional) Name 1058 1058 * @return array With two entries of type string … … 1110 1110 } 1111 1111 1112 1112 /** 1113 * sample permalink html1113 * Sample Permalink HTML 1114 1114 * 1115 * intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor.1115 * Intended to be used for the inplace editor of the permalink post slug on in the post (and page?) editor. 1116 1116 * 1117 1117 * @since 2.5.0 1118 1118 * … … 1418 1418 /* 1419 1419 The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'. 1420 1420 It adds the plugin's name to TinyMCE's plugins init and the call to PluginManager to load the plugin. 1421 The url should be absolute and should include the jsfile name to be loaded. Example:1421 The url should be absolute and should include the JavaScript file name to be loaded. Example: 1422 1422 array( 'myplugin' => 'http://my-site.com/wp-content/plugins/myfolder/mce_plugin.js' ) 1423 1423 If the plugin uses a button, it should be added with one of the "$mce_buttons" filters. 1424 1424 */ … … 1738 1738 global $content_width, $post; 1739 1739 1740 1740 $width = isset($content_width) && 800 > $content_width ? $content_width : 800; 1741 $width = $width + 10; // compensate for the padding1741 $width = $width + 10; // Compensate for the padding 1742 1742 $dfw_width = get_user_setting( 'dfw_width', $width ); 1743 1743 $save = $post->post_status == 'publish' ? __('Update') : __('Save'); 1744 1744 ?> … … 1757 1757 <?php 1758 1758 1759 1759 $buttons = array( 1760 // format: title, onclick, show in both editors1760 // Format: title, onclick, show in both editors 1761 1761 'bold' => array( 'title' => __('Bold (Ctrl + B)'), 'onclick' => 'fullscreen.b();', 'both' => false ), 1762 1762 'italic' => array( 'title' => __('Italic (Ctrl + I)'), 'onclick' => 'fullscreen.i();', 'both' => false ), 1763 1763 '0' => 'separator', -
wp-admin/includes/class-wp-users-list-table.php
110 110 } 111 111 112 112 $name = translate_user_role( $name ); 113 /* translators: User role name with count */113 /* Translators: User role name with count */ 114 114 $name = sprintf( __('%1$s <span class="count">(%2$s)</span>'), $name, $avail_roles[$this_role] ); 115 115 $role_links[$this_role] = "<a href='" . add_query_arg( 'role', $this_role, $url ) . "'$class>$name</a>"; 116 116 } -
wp-admin/includes/upgrade.php
127 127 128 128 // Default link category 129 129 $cat_name = __('Blogroll'); 130 /* translators: Default link category slug */130 /* Translators: Default link category slug */ 131 131 $cat_slug = sanitize_title(_x('Blogroll', 'Default link category slug')); 132 132 133 133 if ( global_terms_enabled() ) { … … 262 262 'post_content' => $first_page, 263 263 'post_excerpt' => '', 264 264 'post_title' => __( 'Sample Page' ), 265 /* translators: Default page slug */265 /* Translators: Default page slug */ 266 266 'post_name' => __( 'sample-page' ), 267 267 'post_modified' => $now, 268 268 'post_modified_gmt' => $now_gmt, … … 728 728 $wpdb->query("ALTER TABLE $wpdb->users DROP $old"); 729 729 $wpdb->show_errors(); 730 730 731 // populate comment_count field of posts table731 // Populate comment_count field of posts table 732 732 $comments = $wpdb->get_results( "SELECT comment_post_ID, COUNT(*) as c FROM $wpdb->comments WHERE comment_approved = '1' GROUP BY comment_post_ID" ); 733 733 if ( is_array( $comments ) ) 734 734 foreach ($comments as $comment) … … 1268 1268 return true; 1269 1269 } 1270 1270 } 1271 // didn't find it try to create it.1271 // Didn't find it try to create it. 1272 1272 $q = $wpdb->query($create_ddl); 1273 // we cannot directly tell that whether this succeeded!1273 // We cannot directly tell that whether this succeeded! 1274 1274 foreach ($wpdb->get_col("DESC $table_name", 0) as $column ) { 1275 1275 if ($column == $column_name) { 1276 1276 return true; … … 1537 1537 $index_string .= ' ('.$index_columns.')'; 1538 1538 if (!(($aindex = array_search($index_string, $indices)) === false)) { 1539 1539 unset($indices[$aindex]); 1540 // echo "<pre style=\"border:1px solid #ccc;margin-top:5px;\">{$table}:<br />Found index:".$index_string."</pre>\n";1540 // echo "<pre style=\"border:1px solid #ccc;margin-top:5px;\">{$table}:<br />Found index:".$index_string."</pre>\n"; 1541 1541 } 1542 // else echo "<pre style=\"border:1px solid #ccc;margin-top:5px;\">{$table}:<br /><b>Did not find index:</b>".$index_string."<br />".print_r($indices, true)."</pre>\n";1542 // else echo "<pre style=\"border:1px solid #ccc;margin-top:5px;\">{$table}:<br /><b>Did not find index:</b>".$index_string."<br />".print_r($indices, true)."</pre>\n"; 1543 1543 } 1544 1544 } 1545 1545 … … 1619 1619 1620 1620 // Copy files from the old locations to the site theme. 1621 1621 // TODO: This does not copy arbitarary include dependencies. Only the 1622 // standard W Pfiles are copied.1622 // standard WordPress files are copied. 1623 1623 $files = array('index.php' => 'index.php', 'wp-layout.css' => 'style.css', 'wp-comments.php' => 'comments.php', 'wp-comments-popup.php' => 'comments-popup.php'); 1624 1624 1625 1625 foreach ($files as $oldfile => $newfile) { … … 1969 1969 KEY domain (domain) 1970 1970 ) $charset_collate; 1971 1971 "; 1972 // now create tables1972 // Now create tables 1973 1973 dbDelta( $ms_queries ); 1974 1974 } 1975 1975 endif; … … 1994 1994 KEY last_updated (last_updated) 1995 1995 ) $charset_collate; 1996 1996 "; 1997 // now create tables1997 // Now create tables 1998 1998 dbDelta( $ms_queries ); 1999 1999 } 2000 2000 endif; -
wp-admin/includes/class-wp-list-table.php
139 139 if ( !$args['total_pages'] && $args['per_page'] > 0 ) 140 140 $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] ); 141 141 142 // redirect if page number is invalid and headers are not already sent142 // Redirect if page number is invalid and headers are not already sent 143 143 if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) { 144 144 wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) ); 145 145 exit; … … 302 302 * @since 3.1.0 303 303 * @access public 304 304 * 305 * @return string|bool The action name or False if no action was selected305 * @return string|bool the action name or False if no action was selected 306 306 */ 307 307 function current_action() { 308 308 if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) … … 854 854 } 855 855 856 856 /** 857 * Handle an incoming ajaxrequest (called from admin-ajax.php)857 * Handle an incoming AJAX request (called from admin-ajax.php) 858 858 * 859 859 * @since 3.1.0 860 860 * @access public -
wp-admin/includes/class-wp-ms-themes-list-table.php
38 38 } 39 39 40 40 function get_table_classes() { 41 return array( 'widefat', 'plugins' ); // todo: remove and add CSS for .themes41 return array( 'widefat', 'plugins' ); // TODO: remove and add CSS for .themes 42 42 } 43 43 44 44 function ajax_user_can() { … … 269 269 else 270 270 $url = 'themes.php?'; 271 271 272 // preorder272 // Preorder 273 273 $actions = array( 274 274 'enable' => '', 275 275 'disable' => '', -
wp-admin/includes/class-wp-plugin-install-list-table.php
40 40 $tabs = apply_filters( 'install_plugins_tabs', $tabs ); 41 41 $nonmenu_tabs = apply_filters( 'install_plugins_nonmenu_tabs', $nonmenu_tabs ); 42 42 43 // If a non-valid menu tab has been selected, And it s not a non-menu action.43 // If a non-valid menu tab has been selected, And it's not a non-menu action. 44 44 if ( empty( $tab ) || ( !isset( $tabs[ $tab ] ) && !in_array( $tab, (array) $nonmenu_tabs ) ) ) 45 45 $tab = key( $tabs ); 46 46 -
wp-admin/includes/dashboard.php
131 131 } 132 132 133 133 if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget_id']) ) { 134 ob_start(); // hack - but the same hack wp-admin/widgets.php uses134 ob_start(); // Hack - but the same hack wp-admin/widgets.php uses 135 135 wp_dashboard_trigger_widget_control( $_POST['widget_id'] ); 136 136 ob_end_clean(); 137 137 wp_redirect( remove_query_arg( 'edit' ) ); … … 268 268 269 269 echo '</tr><tr>'; 270 270 /* TODO: Show status breakdown on hover 271 if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages isnot exposed in feeds. Don't show if !current_user_can271 if ( $can_edit_pages && !empty($num_pages->publish) ) { // How many pages are not exposed in feeds. Don't show if !current_user_can 272 272 $post_type_texts[] = '<a href="edit-pages.php">'.sprintf( _n( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>'; 273 273 } 274 274 if ( $can_edit_posts && !empty($num_posts->draft) ) { … … 505 505 $last_post_id = (int) get_user_option( 'dashboard_quick_press_last_post_id' ); // Get the last post_ID 506 506 if ( $last_post_id ) { 507 507 $post = get_post( $last_post_id ); 508 if ( empty( $post ) || $post->post_status != 'auto-draft' ) { // auto-draft doesn't existsanymore508 if ( empty( $post ) || $post->post_status != 'auto-draft' ) { // Auto-draft doesn't exist anymore 509 509 $post = get_default_post_to_edit('post', true); 510 510 update_user_option( (int) $GLOBALS['current_user']->ID, 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID 511 511 } else { … … 669 669 670 670 $actions_string = ''; 671 671 if ( current_user_can( 'edit_comment', $comment->comment_ID ) ) { 672 // preorder it: Approve | Reply | Edit | Spam | Trash672 // Preorder it: Approve | Reply | Edit | Spam | Trash 673 673 $actions = array( 674 674 'approve' => '', 'unapprove' => '', 675 675 'reply' => '', … … 691 691 $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>'; 692 692 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . esc_attr__('Edit comment') . "'>". __('Edit') . '</a>'; 693 693 $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>'; 694 $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>';694 $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>'; 695 695 if ( !EMPTY_TRASH_DAYS ) 696 696 $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>'; 697 697 else … … 721 721 722 722 <div class="dashboard-comment-wrap"> 723 723 <h4 class="comment-meta"> 724 <?php printf( /* translators: 1: comment author, 2: post link, 3: notification if the comment is pending */__( 'From %1$s on %2$s%3$s' ),724 <?php printf( /* Translators: 1: comment author, 2: post link, 3: notification if the comment is pending */__( 'From %1$s on %2$s%3$s' ), 725 725 '<cite class="comment-author">' . get_comment_author_link() . '</cite>', $comment_post_link.' '.$comment_link, ' <span class="approve">' . __( '[Pending]' ) . '</span>' ); ?> 726 726 </h4> 727 727 … … 740 740 $type = esc_html( $type ); 741 741 ?> 742 742 <div class="dashboard-comment-wrap"> 743 <?php /* translators: %1$s is type of comment, %2$s is link to the post */ ?>743 <?php /* Translators: %1$s is type of comment, %2$s is link to the post */ ?> 744 744 <h4 class="comment-meta"><?php printf( _x( '%1$s on %2$s', 'dashboard' ), "<strong>$type</strong>", $comment_post_link." ".$comment_link ); ?></h4> 745 745 <p class="comment-author"><?php comment_author_link(); ?></p> 746 746 … … 837 837 $content = wp_html_excerpt($content, 50) . ' ...'; 838 838 839 839 if ( $link ) 840 /* translators: incoming links feed, %1$s is other person, %3$s is content */840 /* Translators: incoming links feed, %1$s is other person, %3$s is content */ 841 841 $text = __( '%1$s linked here <a href="%2$s">saying</a>, "%3$s"' ); 842 842 else 843 /* translators: incoming links feed, %1$s is other person, %3$s is content */843 /* Translators: incoming links feed, %1$s is other person, %3$s is content */ 844 844 $text = __( '%1$s linked here saying, "%3$s"' ); 845 845 846 846 if ( !empty($show_date) ) { 847 847 if ( !empty($show_author) || !empty($show_summary) ) 848 /* translators: incoming links feed, %4$s is the date */848 /* Translators: incoming links feed, %4$s is the date */ 849 849 $text .= ' ' . __( 'on %4$s' ); 850 850 $date = esc_html( strip_tags( $item->get_date() ) ); 851 851 $date = strtotime( $date ); … … 993 993 if ( !isset($items[$item_key]) ) 994 994 continue; 995 995 996 // current bbPress feed item titles are: user on "topic title"996 // Current bbPress feed item titles are: user on "topic title" 997 997 if ( preg_match( '/"(.*)"/s', $item->get_title(), $matches ) ) 998 998 $title = $matches[1]; 999 999 else // but let's make it forward compatible if things change … … 1015 1015 } 1016 1016 1017 1017 /** 1018 * Checks to see if all of the feed urlin $check_urls are cached.1018 * Checks to see if all of the feed URL's in $check_urls are cached. 1019 1019 * 1020 * If $check_urls is empty, look for the rss feed urlfound in the dashboard1020 * If $check_urls is empty, look for the RSS feed URL found in the dashboard 1021 1021 * widget optios of $widget_id. If cached, call $callback, a function that 1022 * echoes out output for this widget. If not cache, echo a "Loading..." stub1022 * echoes output for this widget. If not cache, echo a "Loading..." stub 1023 1023 * which is later replaced by AJAX call (see top of /wp-admin/index.php) 1024 1024 * 1025 1025 * @since 2.5.0 … … 1236 1236 } 1237 1237 1238 1238 /** 1239 * Empty function usable by plugins to output empty dashboard widget (to be populated later by J S).1239 * Empty function usable by plugins to output empty dashboard widget (to be populated later by JavaScript). 1240 1240 */ 1241 1241 function wp_dashboard_empty() {} 1242 1242 -
wp-admin/includes/misc.php
129 129 $htaccess_file = $home_path.'.htaccess'; 130 130 131 131 // If the file doesn't already exist check for write access to the directory and whether we have some rules. 132 // else check for write access to the file.132 // Else check for write access to the file. 133 133 if ((!file_exists($htaccess_file) && is_writable($home_path) && $wp_rewrite->using_mod_rewrite_permalinks()) || is_writable($htaccess_file)) { 134 134 if ( got_mod_rewrite() ) { 135 135 $rules = explode( "\n", $wp_rewrite->mod_rewrite_rules() ); … … 544 544 * @return bool 545 545 */ 546 546 function win_is_writable( $path ) { 547 /* will work in despite of Windows ACLs bug547 /* Will work in despite of Windows ACLs bug 548 548 * NOTE: use a trailing slash for folders!!! 549 549 * see http://bugs.php.net/bug.php?id=27609 550 550 * see http://bugs.php.net/bug.php?id=30931 … … 554 554 return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp'); 555 555 else if ( is_dir( $path ) ) 556 556 return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' ); 557 // check tmp file for read/write capabilities557 // Check tmp file for read/write capabilities 558 558 $should_delete_tmp_file = !file_exists( $path ); 559 559 $f = @fopen( $path, 'a' ); 560 560 if ( $f === false ) -
wp-admin/includes/class-wp-theme-install-list-table.php
31 31 $tabs['search'] = __( 'Search Results' ); 32 32 $tabs['upload'] = __( 'Upload' ); 33 33 $tabs['featured'] = _x( 'Featured','Theme Installer' ); 34 // $tabs['popular'] = _x( 'Popular','Theme Installer' );34 // $tabs['popular'] = _x( 'Popular','Theme Installer' ); 35 35 $tabs['new'] = _x( 'Newest','Theme Installer' ); 36 36 $tabs['updated'] = _x( 'Recently Updated','Theme Installer' ); 37 37 38 $nonmenu_tabs = array( 'theme-information' ); // Valid actions to perform which do not have a Menu item.38 $nonmenu_tabs = array( 'theme-information' ); // Valid actions to perform which do not have a menu item. 39 39 40 40 $tabs = apply_filters( 'install_themes_tabs', $tabs ); 41 41 $nonmenu_tabs = apply_filters( 'install_themes_nonmenu_tabs', $nonmenu_tabs ); -
wp-admin/includes/class-wp-filesystem-ftpsockets.php
23 23 $this->method = 'ftpsockets'; 24 24 $this->errors = new WP_Error(); 25 25 26 //Check if possible to use ftpfunctions.26 //Check if possible to use FTP functions. 27 27 if ( ! @include_once ABSPATH . 'wp-admin/includes/class-ftp.php' ) 28 28 return false; 29 29 $this->ftp = new ftp(); … … 97 97 if ( ! $this->ftp->fget($temphandle, $file) ) { 98 98 fclose($temphandle); 99 99 unlink($temp); 100 return ''; //Blank document, File does exist, It s just blank.100 return ''; //Blank document, File does exist, It's just blank. 101 101 } 102 102 103 103 fseek($temphandle, 0); //Skip back to the start of the file being written to … … 241 241 } 242 242 243 243 function is_readable($file) { 244 //Get dir list, Check if the file is writable by the current user??244 //Get directory list, check if the file is writable by the current user?? 245 245 return true; 246 246 } 247 247 248 248 function is_writable($file) { 249 //Get dir list, Check if the file is writable by the current user??249 //Get directory list, check if the file is writable by the current user?? 250 250 return true; 251 251 } 252 252 -
wp-admin/includes/deprecated.php
37 37 } 38 38 39 39 /** 40 * Calculates the new dimen tions for a downsampled image.40 * Calculates the new dimensions for a downsampled image. 41 41 * 42 42 * @since 2.0.0 43 43 * @deprecated 3.0.0 … … 176 176 } 177 177 178 178 /** 179 * Adds Java script required to make CodePress work on the theme/plugin editors.179 * Adds JavaScript required to make CodePress work on the theme/plugin editors. 180 180 * 181 181 * @since 2.8.0 182 182 * @deprecated 3.0.0 … … 210 210 if ( !is_multisite() ) 211 211 $level_key = $wpdb->get_blog_prefix() . 'user_level'; 212 212 else 213 $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmusite admins don't have user_levels213 $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // Multisite site admins don't have user_levels 214 214 215 215 return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value != '0'", $level_key) ); 216 216 } … … 263 263 if ( !is_multisite() ) 264 264 $level_key = $wpdb->get_blog_prefix() . 'user_level'; 265 265 else 266 $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmusite admins don't have user_levels266 $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // Multisite site admins don't have user_levels 267 267 268 268 $query = $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s", $level_key); 269 269 if ( $exclude_zeros ) … … 283 283 if ( !is_multisite() ) 284 284 $level_key = $wpdb->get_blog_prefix() . 'user_level'; 285 285 else 286 $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // wpmusite admins don't have user_levels286 $level_key = $wpdb->get_blog_prefix() . 'capabilities'; // Multisite site admins don't have user_levels 287 287 288 288 return $wpdb->get_col( $wpdb->prepare("SELECT user_id FROM $wpdb->usermeta WHERE meta_key = %s AND meta_value = '0'", $level_key) ); 289 289 } … … 533 533 * @access public 534 534 */ 535 535 function prepare_vars_for_template_usage() { 536 $this->search_term = stripslashes($this->search_term); // done with DB, from now on we want slashes gone536 $this->search_term = stripslashes($this->search_term); // Done with DB, from now on we want slashes gone 537 537 } 538 538 539 539 /** … … 545 545 * @access public 546 546 */ 547 547 function do_paging() { 548 if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results548 if ( $this->total_users_for_query > $this->users_per_page ) { // Have to page the results 549 549 $args = array(); 550 550 if( ! empty($this->search_term) ) 551 551 $args['usersearch'] = urlencode($this->search_term); -
wp-admin/includes/class-wp-upgrader.php
12 12 */ 13 13 14 14 /** 15 * WordPress Upgrader class for Upgrading/Installing a local set of files via the Filesystem Abstraction classes from a Z ipfile.15 * WordPress Upgrader class for Upgrading/Installing a local set of files via the Filesystem Abstraction classes from a ZIP file. 16 16 * 17 17 * @TODO More Detailed docs, for methods as well. 18 18 * … … 45 45 $this->strings['fs_no_content_dir'] = __('Unable to locate WordPress Content directory (wp-content).'); 46 46 $this->strings['fs_no_plugins_dir'] = __('Unable to locate WordPress Plugin directory.'); 47 47 $this->strings['fs_no_themes_dir'] = __('Unable to locate WordPress Theme directory.'); 48 /* translators: %s: directory name */48 /* Translators: %s: directory name */ 49 49 $this->strings['fs_no_folder'] = __('Unable to locate needed folder (%s).'); 50 50 51 51 $this->strings['download_failed'] = __('Download failed.'); … … 103 103 } 104 104 } 105 105 return true; 106 } // end fs_connect();106 } //End fs_connect(); 107 107 108 108 function download_package($package) { 109 109 110 110 if ( ! preg_match('!^(http|https|ftp)://!i', $package) && file_exists($package) ) //Local file or remote? 111 return $package; // must be a local file..111 return $package; //Must be a local file.. 112 112 113 113 if ( empty($package) ) 114 114 return new WP_Error('no_package', $this->strings['no_package']); … … 145 145 $wp_filesystem->delete($working_dir, true); 146 146 147 147 // Unzip package to working directory 148 $result = unzip_file($package, $working_dir); //TODO optimizations, Copy when Move/Rename would suffice?148 $result = unzip_file($package, $working_dir); //TODO: optimizations, copy when Move/Rename would suffice? 149 149 150 150 // Once extracted, delete the package if required. 151 151 if ( $delete_package ) … … 179 179 if ( is_wp_error($res) ) 180 180 return $res; 181 181 182 //Retain the Original source and destinations182 //Retain the original source and destinations 183 183 $remote_source = $source; 184 184 $local_destination = $destination; 185 185 186 186 $source_files = array_keys( $wp_filesystem->dirlist($remote_source) ); 187 187 $remote_destination = $wp_filesystem->find_folder($local_destination); 188 188 189 //Locate which directory to copy to the new folder, This is based on the actual folder holding the files.189 //Locate which directory to copy to the new folder, this is based on the actual folder holding the files. 190 190 if ( 1 == count($source_files) && $wp_filesystem->is_dir( trailingslashit($source) . $source_files[0] . '/') ) //Only one folder? Then we want its contents. 191 191 $source = trailingslashit($source) . trailingslashit($source_files[0]); 192 192 elseif ( count($source_files) == 0 ) 193 193 return new WP_Error('bad_package', $this->strings['bad_package']); //There are no files? 194 // else //Its only a single file, The upgrader will use the foldername of this file as the destination folder. foldername is based on zip filename.194 // Else // Its only a single file, The upgrader will use the foldername of this file as the destination folder. Foldername is based on zip filename. 195 195 196 196 //Hook ability to change the source file location.. 197 197 $source = apply_filters('upgrader_source_selection', $source, $remote_source, $this); … … 221 221 else if ( ! $removed ) 222 222 return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']); 223 223 } elseif ( $wp_filesystem->exists($remote_destination) ) { 224 //If we're not clearing the destination folder and something exists there allready, Bail.225 // But first check to see if there are actually any files in the folder.224 //If we're not clearing the destination folder and something exists there allready, bail. 225 //First check to see if there are actually any files in the folder. 226 226 $_files = $wp_filesystem->dirlist($remote_destination); 227 227 if ( ! empty($_files) ) { 228 228 $wp_filesystem->delete($remote_source, true); //Clear out the source files. … … 259 259 return $res; 260 260 } 261 261 262 //Bombard the calling function wi llall the info which we've just used.262 //Bombard the calling function with all the info which we've just used. 263 263 return $this->result; 264 264 } 265 265 … … 351 351 } 352 352 353 353 /** 354 * Plugin Upgrader class for WordPress Plugins, It is designed to upgrade/install plugins from a local zip, remote zip URL, or uploaded zipfile.354 * Plugin Upgrader class for WordPress plugins, It is designed to upgrade/install plugins from a local ZIP, remote ZIP URL, or uploaded ZIP file. 355 355 * 356 * @TODO More Detailed docs, for methods as well.356 * TODO: More detailed docs, for methods as well. 357 357 * 358 358 * @package WordPress 359 359 * @subpackage Upgrader … … 418 418 return false; 419 419 } 420 420 421 // Get the URL to the zipfile421 // Get the URL to the ZIP file 422 422 $r = $current->response[ $plugin ]; 423 423 424 424 add_filter('upgrader_pre_install', array(&$this, 'deactivate_plugin_before_upgrade'), 10, 2); 425 425 add_filter('upgrader_clear_destination', array(&$this, 'delete_old_plugin'), 10, 4); 426 //'source_selection' => array(&$this, 'source_selection'), // theres a track ticket to move up the directory for zip's which are made a bit differently, useful for non-.org plugins.426 //'source_selection' => array(&$this, 'source_selection'), // There's a track ticket to move up the directory for ZIP's which are made a bit differently, useful for non-.org plugins. 427 427 428 428 $this->run(array( 429 429 'package' => $r->package, … … 468 468 $this->skin->bulk_header(); 469 469 470 470 // Only start maintenance mode if running in Multisite OR the plugin is in use 471 $maintenance = is_multisite(); // @TODO: This should only kick in for individual sites if at all possible.471 $maintenance = is_multisite(); // TODO: This should only kick in for individual sites if at all possible. 472 472 foreach ( $plugins as $plugin ) 473 473 $maintenance = $maintenance || (is_plugin_active($plugin) && isset($current->response[ $plugin ]) ); // Only activate Maintenance mode if a plugin is active AND has an update available 474 474 if ( $maintenance ) … … 491 491 continue; 492 492 } 493 493 494 // Get the URL to the zipfile494 // Get the URL to the ZIP file 495 495 $r = $current->response[ $plugin ]; 496 496 497 497 $this->skin->plugin_active = is_plugin_active($plugin); … … 529 529 return $results; 530 530 } 531 531 532 // return plugin info.532 // Return plugin info. 533 533 function plugin_info() { 534 534 if ( ! is_array($this->result) ) 535 535 return false; 536 536 if ( empty($this->result['destination_name']) ) 537 537 return false; 538 538 539 $plugin = get_plugins('/' . $this->result['destination_name']); // Ensure to pass with leading slash539 $plugin = get_plugins('/' . $this->result['destination_name']); // Ensure to pass with leading slash 540 540 if ( empty($plugin) ) 541 541 return false; 542 542 543 $pluginfiles = array_keys($plugin); // Assume the requested plugin is the first in the list543 $pluginfiles = array_keys($plugin); // Assume the requested plugin is the first in the list 544 544 545 545 return $this->result['destination_name'] . '/' . $pluginfiles[0]; 546 546 } 547 547 548 // Hooked to pre_install548 // Hooked to pre_install 549 549 function deactivate_plugin_before_upgrade($return, $plugin) { 550 550 551 if ( is_wp_error($return) ) // Bypass.551 if ( is_wp_error($return) ) // Bypass. 552 552 return $return; 553 553 554 554 $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : ''; … … 557 557 558 558 if ( is_plugin_active($plugin) ) { 559 559 $this->skin->feedback('deactivate_plugin'); 560 // Deactivate the plugin silently, Prevent deactivation hooks from running.560 // Deactivate the plugin silently, prevent deactivation hooks from running. 561 561 deactivate_plugins($plugin, true); 562 562 } 563 563 } 564 564 565 // Hooked to upgrade_clear_destination565 // Hooked to upgrade_clear_destination 566 566 function delete_old_plugin($removed, $local_destination, $remote_destination, $plugin) { 567 567 global $wp_filesystem; 568 568 569 569 if ( is_wp_error($removed) ) 570 return $removed; // Pass errors through.570 return $removed; // Pass errors through. 571 571 572 572 $plugin = isset($plugin['plugin']) ? $plugin['plugin'] : ''; 573 573 if ( empty($plugin) ) … … 580 580 return $removed; 581 581 582 582 // If plugin is in its own directory, recursively delete the directory. 583 if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) // base check on if plugin includes directory seperator AND that its not the root plugin folder583 if ( strpos($plugin, '/') && $this_plugin_dir != $plugins_dir ) // Base check on if plugin includes directory seperator AND that its not the root plugin folder 584 584 $deleted = $wp_filesystem->delete($this_plugin_dir, true); 585 585 else 586 586 $deleted = $wp_filesystem->delete($plugins_dir . $plugin); … … 595 595 /** 596 596 * Theme Upgrader class for WordPress Themes, It is designed to upgrade/install themes from a local zip, remote zip URL, or uploaded zip file. 597 597 * 598 * @TODOMore Detailed docs, for methods as well.598 * TODO: More Detailed docs, for methods as well. 599 599 * 600 600 * @package WordPress 601 601 * @subpackage Upgrader … … 717 717 $this->skin->bulk_header(); 718 718 719 719 // Only start maintenance mode if running in Multisite OR the theme is in use 720 $maintenance = is_multisite(); // @TODO: This should only kick in for individual sites if at all possible.720 $maintenance = is_multisite(); // TODO: This should only kick in for individual sites if at all possible. 721 721 foreach ( $themes as $theme ) 722 722 $maintenance = $maintenance || $theme == get_stylesheet() || $theme == get_template(); 723 723 if ( $maintenance ) … … 741 741 742 742 $this->skin->theme_info = $this->theme_info($theme); 743 743 744 // Get the URL to the zipfile744 // Get the URL to the ZIP file 745 745 $r = $current->response[ $theme ]; 746 746 747 747 $options = array( … … 787 787 788 788 $theme = isset($theme['theme']) ? $theme['theme'] : ''; 789 789 790 if ( $theme != get_stylesheet() ) // If not current790 if ( $theme != get_stylesheet() ) // If not current 791 791 return $return; 792 // Change to maintenance mode now.792 // Change to maintenance mode now. 793 793 if ( ! $this->bulk ) 794 794 $this->maintenance_mode(true); 795 795 … … 804 804 if ( $theme != get_stylesheet() ) //If not current 805 805 return $return; 806 806 807 // Ensure stylesheet name hasnt changed after the upgrade:808 // @TODO: Note, This doesnt handle the Template changing, or the Template name changing.807 // Ensure stylesheet name hasnt changed after the upgrade: 808 // TODO: Note, This doesnt handle the Template changing, or the Template name changing. 809 809 if ( $theme == get_stylesheet() && $theme != $this->result['destination_name'] ) { 810 810 $theme_info = $this->theme_info(); 811 811 $stylesheet = $this->result['destination_name']; … … 813 813 switch_theme($template, $stylesheet, true); 814 814 } 815 815 816 // Time to remove maintenance mode816 // Time to remove maintenance mode 817 817 if ( ! $this->bulk ) 818 818 $this->maintenance_mode(false); 819 819 return $return; … … 850 850 /** 851 851 * Core Upgrader class for WordPress. It allows for WordPress to upgrade itself in combiantion with the wp-admin/includes/update-core.php file 852 852 * 853 * @TODOMore Detailed docs, for methods as well.853 * TODO: More Detailed docs, for methods as well. 854 854 * 855 855 * @package WordPress 856 856 * @subpackage Upgrader … … 910 910 /** 911 911 * Generic Skin for the WordPress Upgrader classes. This skin is designed to be extended for specific purposes. 912 912 * 913 * @TODOMore Detailed docs, for methods as well.913 * TODO: More Detailed docs, for methods as well. 914 914 * 915 915 * @package WordPress 916 916 * @subpackage Upgrader … … 997 997 /** 998 998 * Plugin Upgrader Skin for WordPress Plugin Upgrades. 999 999 * 1000 * @TODOMore Detailed docs, for methods as well.1000 * TODO: More Detailed docs, for methods as well. 1001 1001 * 1002 1002 * @package WordPress 1003 1003 * @subpackage Upgrader … … 1229 1229 /** 1230 1230 * Plugin Installer Skin for WordPress Plugin Installer. 1231 1231 * 1232 * @TODOMore Detailed docs, for methods as well.1232 * TODO: More Detailed docs, for methods as well. 1233 1233 * 1234 1234 * @package WordPress 1235 1235 * @subpackage Upgrader … … 1293 1293 /** 1294 1294 * Theme Installer Skin for the WordPress Theme Installer. 1295 1295 * 1296 * @TODOMore Detailed docs, for methods as well.1296 * TODO: More Detailed docs, for methods as well. 1297 1297 * 1298 1298 * @package WordPress 1299 1299 * @subpackage Upgrader … … 1315 1315 1316 1316 function before() { 1317 1317 if ( !empty($this->api) ) { 1318 /* translators: 1: theme name, 2: version */1318 /* Translators: 1: theme name, 2: version */ 1319 1319 $this->upgrader->strings['process_success'] = sprintf( __('Successfully installed the theme <strong>%1$s %2$s</strong>.'), $this->api->name, $this->api->version); 1320 1320 } 1321 1321 } … … 1356 1356 /** 1357 1357 * Theme Upgrader Skin for WordPress Theme Upgrades. 1358 1358 * 1359 * @TODOMore Detailed docs, for methods as well.1359 * TODO: More Detailed docs, for methods as well. 1360 1360 * 1361 1361 * @package WordPress 1362 1362 * @subpackage Upgrader … … 1406 1406 /** 1407 1407 * Upgrade Skin helper for File uploads. This class handles the upload process and passes it as if its a local file to the Upgrade/Installer functions. 1408 1408 * 1409 * @TODOMore Detailed docs, for methods as well.1409 * TODO: More Detailed docs, for methods as well. 1410 1410 * 1411 1411 * @package WordPress 1412 1412 * @subpackage Upgrader … … 1428 1428 else if ( isset($_GET[$urlholder]) ) 1429 1429 $this->filename = $_GET[$urlholder]; 1430 1430 1431 // Handle a newly uploaded file, Else assume its already been uploaded1431 // Handle a newly uploaded file, Else assume its already been uploaded 1432 1432 if ( !empty($_FILES) ) { 1433 1433 $this->filename = wp_unique_filename( $uploads['basedir'], $this->filename ); 1434 1434 $this->package = $uploads['basedir'] . '/' . $this->filename; 1435 1435 1436 // Move the file to the uploads dir 1436 // Move the file to the uploads directory 1437 1437 if ( false === @ move_uploaded_file( $_FILES[$form]['tmp_name'], $this->package) ) 1438 1438 wp_die( sprintf( __('The uploaded file could not be moved to %s.' ), $uploads['path'])); 1439 1439 } else { -
wp-admin/includes/schema.php
198 198 $options = array( 199 199 'siteurl' => $guessurl, 200 200 'blogname' => __('My Site'), 201 /* translators: blog tagline */201 /* Translators: blog tagline */ 202 202 'blogdescription' => __('Just another WordPress site'), 203 203 'users_can_register' => 0, 204 204 'admin_email' => 'you@example.com', … … 219 219 'default_pingback_flag' => 1, 220 220 'default_post_edit_rows' => 20, 221 221 'posts_per_page' => 10, 222 /* translators: default date format, see http://php.net/date */222 /* Translators: default date format, see http://php.net/date */ 223 223 'date_format' => __('F j, Y'), 224 /* translators: default time format, see http://php.net/date */224 /* Translators: default time format, see http://php.net/date */ 225 225 'time_format' => __('g:i a'), 226 /* translators: links last updated date format, see http://php.net/date */226 /* Translators: links last updated date format, see http://php.net/date */ 227 227 'links_updated_date_format' => __('F j, Y g:i a'), 228 228 'links_recently_updated_prepend' => '<em>', 229 229 'links_recently_updated_append' => '</em>', … … 356 356 if ( !empty($insert) ) 357 357 $wpdb->query("INSERT INTO $wpdb->options (option_name, option_value, autoload) VALUES " . $insert); 358 358 359 // in case it is set, but blank, update "home"359 // In case it is set, but blank, update "home" 360 360 if ( !__get_option('home') ) update_option('home', $guessurl); 361 361 362 362 // Delete unused options … … 364 364 foreach ( $unusedoptions as $option ) 365 365 delete_option($option); 366 366 367 // delete obsolete magpie stuff367 // Delete obsolete magpie stuff 368 368 $wpdb->query("DELETE FROM $wpdb->options WHERE option_name REGEXP '^rss_[0-9a-f]{32}(_ts)?$'"); 369 369 } 370 370 … … 393 393 // Add roles 394 394 395 395 // Dummy gettext calls to get strings in the catalog. 396 /* translators: user role */396 /* Translators: user role */ 397 397 _x('Administrator', 'User role'); 398 /* translators: user role */398 /* Translators: user role */ 399 399 _x('Editor', 'User role'); 400 /* translators: user role */400 /* Translators: user role */ 401 401 _x('Author', 'User role'); 402 /* translators: user role */402 /* Translators: user role */ 403 403 _x('Contributor', 'User role'); 404 /* translators: user role */404 /* Translators: user role */ 405 405 _x('Subscriber', 'User role'); 406 406 407 407 add_role('administrator', 'Administrator'); … … 624 624 } 625 625 626 626 /** 627 * populate network settings627 * Populate network settings 628 628 * 629 629 * @since 3.0.0 630 630 * … … 641 641 if ( '' == $site_name ) 642 642 $errors->add( 'empty_sitename', __( 'You must provide a name for your network of sites.' ) ); 643 643 644 // check for network collision644 // Check for network collision 645 645 if ( $network_id == $wpdb->get_var( $wpdb->prepare( "SELECT id FROM $wpdb->site WHERE id = %d", $network_id ) ) ) 646 646 $errors->add( 'siteid_exists', __( 'The network already exists.' ) ); 647 647 … … 652 652 if ( $errors->get_error_code() ) 653 653 return $errors; 654 654 655 // set up site tables655 // Set up site tables 656 656 $template = get_option( 'template' ); 657 657 $stylesheet = get_option( 'stylesheet' ); 658 658 $allowed_themes = array( $stylesheet => true ); … … 710 710 'wpmu_upgrade_site' => $wp_db_version, 711 711 'welcome_email' => $welcome_email, 712 712 'first_post' => __( 'Welcome to <a href="SITE_URL">SITE_NAME</a>. This is your first post. Edit or delete it, then start blogging!' ), 713 // @todo -network admins should have a method of editing the network siteurl (used for cookie hash)713 // TODO: network admins should have a method of editing the network siteurl (used for cookie hash) 714 714 'siteurl' => get_option( 'siteurl' ) . '/', 715 715 'add_new_users' => '0', 716 716 'upload_space_check_disabled' => '0', -
wp-admin/includes/comment.php
99 99 * @since 2.3.0 100 100 * @uses $wpdb 101 101 * 102 * @param int|array $post_id Either a single Post ID or an array of Post IDs103 * @return int|array Either a single Posts pending comments as an int or an array of ints keyed on the Post IDs102 * @param int|array $post_id Either a single post ID or an array of post ID's 103 * @return int|array Either a single posts pending comments as an int or an array of int's keyed on the post IDs 104 104 */ 105 105 function get_pending_comments_num( $post_id ) { 106 106 global $wpdb; -
wp-admin/includes/theme.php
87 87 if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() ) 88 88 return new WP_Error('fs_error', __('Filesystem error.'), $wp_filesystem->errors); 89 89 90 // Get the base plugin folder90 // Get the base plugin folder 91 91 $themes_dir = $wp_filesystem->wp_themes_dir(); 92 92 if ( empty($themes_dir) ) 93 93 return new WP_Error('fs_no_themes_dir', __('Unable to locate WordPress theme directory.')); … … 200 200 } 201 201 202 202 /** 203 * Tidies a filename for urldisplay by the theme editor.203 * Cleans up a filename for URL display by the theme editor. 204 204 * 205 205 * @since 2.9.0 206 206 * @access private … … 258 258 } 259 259 260 260 /** 261 * Retrieve list of WordPress theme features ( akatheme tags)261 * Retrieve list of WordPress theme features (AKA theme tags) 262 262 * 263 263 * @since 3.1.0 264 264 * 265 * @return array 265 * @return array Array of features keyed by category with translations keyed by slug. 266 266 */ 267 267 function get_theme_feature_list() { 268 268 // Hard-coded list is used if api not accessible. … … 401 401 $res = new WP_Error('themes_api_failed', __('An unknown error occurred.'), wp_remote_retrieve_body( $request ) ); 402 402 } 403 403 } 404 // var_dump(array($args, $res));404 // var_dump(array($args, $res)); 405 405 return apply_filters('themes_api_result', $res, $action, $args); 406 406 } 407 407 -
wp-admin/includes/meta-boxes.php
1 1 <?php 2 2 3 // -- Post related Meta Boxes3 // -- Post Related Meta Boxes 4 4 5 5 /** 6 6 * Display post submit form fields. … … 155 155 </div><?php // /misc-pub-section ?> 156 156 157 157 <?php 158 // translators: Publish box date formt, see http://php.net/date158 // Translators: Publish box date formt, see http://php.net/date 159 159 $datef = __( 'M j, Y @ G:i' ); 160 160 if ( 0 != $post->ID ) { 161 if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date161 if ( 'future' == $post->post_status ) { // Scheduled for publishing at a future date 162 162 $stamp = __('Scheduled for: <b>%1$s</b>'); 163 } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published163 } else if ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // Already published 164 164 $stamp = __('Published on: <b>%1$s</b>'); 165 } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified165 } else if ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // Draft, 1 or more saves, no date specified 166 166 $stamp = __('Publish <b>immediately</b>'); 167 } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified167 } else if ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // Draft, 1 or more saves, future date specified 168 168 $stamp = __('Schedule for: <b>%1$s</b>'); 169 169 } else { // draft, 1 or more saves, date specified 170 170 $stamp = __('Publish on: <b>%1$s</b>'); 171 171 } 172 172 $date = date_i18n( $datef, strtotime( $post->post_date ) ); 173 } else { // draft (no saves, and thus no date specified)173 } else { // Draft (no saves, and thus no date specified) 174 174 $stamp = __('Publish <b>immediately</b>'); 175 175 $date = date_i18n( $datef, strtotime( current_time('mysql') ) ); 176 176 } … … 563 563 <label class="screen-reader-text" for="parent_id"><?php _e('Parent') ?></label> 564 564 <?php echo $pages; ?> 565 565 <?php 566 } // end empty pages check567 } // end hierarchical check.566 } // End empty pages check 567 } // End hierarchical check. 568 568 if ( 'page' == $post->post_type && 0 != count( get_page_templates() ) ) { 569 569 $template = !empty($post->page_template) ? $post->page_template : false; 570 570 ?> … … 597 597 598 598 <div id="minor-publishing"> 599 599 600 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>600 <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with return key ?> 601 601 <div style="display:none;"> 602 602 <?php submit_button( __( 'Save' ), 'button', 'save', false ); ?> 603 603 </div> … … 754 754 ?> 755 755 <table class="editform" style="width: 100%;" cellspacing="2" cellpadding="5"> 756 756 <tr> 757 <th style="width: 20%;" scope="row"><label for="link_rel"><?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('rel:') ?></label></th>757 <th style="width: 20%;" scope="row"><label for="link_rel"><?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('rel:') ?></label></th> 758 758 <td style="width: 80%;"><input type="text" name="link_rel" id="link_rel" size="50" value="<?php echo ( isset( $link->link_rel ) ? esc_attr($link->link_rel) : ''); ?>" /></td> 759 759 </tr> 760 760 <tr> 761 761 <td colspan="2"> 762 762 <table cellpadding="3" cellspacing="5" class="form-table"> 763 763 <tr> 764 <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?> </th>764 <th scope="row"> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?> </th> 765 765 <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('identity') ?> </span></legend> 766 766 <label for="me"> 767 767 <input type="checkbox" name="identity" value="me" id="me" <?php xfn_check('identity', 'me'); ?> /> … … 769 769 </fieldset></td> 770 770 </tr> 771 771 <tr> 772 <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?> </th>772 <th scope="row"> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?> </th> 773 773 <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('friendship') ?> </span></legend> 774 774 <label for="contact"> 775 <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>775 <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> 776 776 <label for="acquaintance"> 777 <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>777 <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> 778 778 <label for="friend"> 779 <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>779 <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> 780 780 <label for="friendship"> 781 <input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship'); ?> /> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label>781 <input name="friendship" type="radio" class="valinp" value="" id="friendship" <?php xfn_check('friendship'); ?> /> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label> 782 782 </fieldset></td> 783 783 </tr> 784 784 <tr> 785 <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?> </th>786 <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?> </span></legend>785 <th scope="row"> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?> </th> 786 <td><fieldset><legend class="screen-reader-text"><span> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('physical') ?> </span></legend> 787 787 <label for="met"> 788 788 <input class="valinp" type="checkbox" name="physical" value="met" id="met" <?php xfn_check('physical', 'met'); ?> /> 789 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('met') ?></label>789 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('met') ?></label> 790 790 </fieldset></td> 791 791 </tr> 792 792 <tr> 793 <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?> </th>794 <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?> </span></legend>793 <th scope="row"> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?> </th> 794 <td><fieldset><legend class="screen-reader-text"><span> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('professional') ?> </span></legend> 795 795 <label for="co-worker"> 796 796 <input class="valinp" type="checkbox" name="professional" value="co-worker" id="co-worker" <?php xfn_check('professional', 'co-worker'); ?> /> 797 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-worker') ?></label>797 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('co-worker') ?></label> 798 798 <label for="colleague"> 799 799 <input class="valinp" type="checkbox" name="professional" value="colleague" id="colleague" <?php xfn_check('professional', 'colleague'); ?> /> 800 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('colleague') ?></label>800 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('colleague') ?></label> 801 801 </fieldset></td> 802 802 </tr> 803 803 <tr> 804 <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </th>805 <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </span></legend>804 <th scope="row"> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </th> 805 <td><fieldset><legend class="screen-reader-text"><span> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('geographical') ?> </span></legend> 806 806 <label for="co-resident"> 807 807 <input class="valinp" type="radio" name="geographical" value="co-resident" id="co-resident" <?php xfn_check('geographical', 'co-resident'); ?> /> 808 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('co-resident') ?></label>808 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('co-resident') ?></label> 809 809 <label for="neighbor"> 810 810 <input class="valinp" type="radio" name="geographical" value="neighbor" id="neighbor" <?php xfn_check('geographical', 'neighbor'); ?> /> 811 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('neighbor') ?></label>811 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('neighbor') ?></label> 812 812 <label for="geographical"> 813 813 <input class="valinp" type="radio" name="geographical" value="" id="geographical" <?php xfn_check('geographical'); ?> /> 814 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label>814 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label> 815 815 </fieldset></td> 816 816 </tr> 817 817 <tr> 818 <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </th>819 <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </span></legend>818 <th scope="row"> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </th> 819 <td><fieldset><legend class="screen-reader-text"><span> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('family') ?> </span></legend> 820 820 <label for="child"> 821 821 <input class="valinp" type="radio" name="family" value="child" id="child" <?php xfn_check('family', 'child'); ?> /> 822 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('child') ?></label>822 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('child') ?></label> 823 823 <label for="kin"> 824 824 <input class="valinp" type="radio" name="family" value="kin" id="kin" <?php xfn_check('family', 'kin'); ?> /> 825 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('kin') ?></label>825 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('kin') ?></label> 826 826 <label for="parent"> 827 827 <input class="valinp" type="radio" name="family" value="parent" id="parent" <?php xfn_check('family', 'parent'); ?> /> 828 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('parent') ?></label>828 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('parent') ?></label> 829 829 <label for="sibling"> 830 830 <input class="valinp" type="radio" name="family" value="sibling" id="sibling" <?php xfn_check('family', 'sibling'); ?> /> 831 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sibling') ?></label>831 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('sibling') ?></label> 832 832 <label for="spouse"> 833 833 <input class="valinp" type="radio" name="family" value="spouse" id="spouse" <?php xfn_check('family', 'spouse'); ?> /> 834 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('spouse') ?></label>834 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('spouse') ?></label> 835 835 <label for="family"> 836 836 <input class="valinp" type="radio" name="family" value="" id="family" <?php xfn_check('family'); ?> /> 837 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label>837 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('none') ?></label> 838 838 </fieldset></td> 839 839 </tr> 840 840 <tr> 841 <th scope="row"> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?> </th>842 <td><fieldset><legend class="screen-reader-text"><span> <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?> </span></legend>841 <th scope="row"> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?> </th> 842 <td><fieldset><legend class="screen-reader-text"><span> <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('romantic') ?> </span></legend> 843 843 <label for="muse"> 844 844 <input class="valinp" type="checkbox" name="romantic" value="muse" id="muse" <?php xfn_check('romantic', 'muse'); ?> /> 845 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('muse') ?></label>845 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('muse') ?></label> 846 846 <label for="crush"> 847 847 <input class="valinp" type="checkbox" name="romantic" value="crush" id="crush" <?php xfn_check('romantic', 'crush'); ?> /> 848 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('crush') ?></label>848 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('crush') ?></label> 849 849 <label for="date"> 850 850 <input class="valinp" type="checkbox" name="romantic" value="date" id="date" <?php xfn_check('romantic', 'date'); ?> /> 851 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('date') ?></label>851 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('date') ?></label> 852 852 <label for="romantic"> 853 853 <input class="valinp" type="checkbox" name="romantic" value="sweetheart" id="romantic" <?php xfn_check('romantic', 'sweetheart'); ?> /> 854 <?php /* translators: xfn: http://gmpg.org/xfn/ */ _e('sweetheart') ?></label>854 <?php /* Translators: xfn: http://gmpg.org/xfn/ */ _e('sweetheart') ?></label> 855 855 </fieldset></td> 856 856 </tr> 857 857 </table> -
wp-admin/includes/image-edit.php
323 323 if ( !is_array($changes) ) 324 324 return $img; 325 325 326 // expand change operations326 // Expand change operations 327 327 foreach ( $changes as $key => $obj ) { 328 328 if ( isset($obj->r) ) { 329 329 $obj->type = 'rotate'; … … 341 341 $changes[$key] = $obj; 342 342 } 343 343 344 // combine operations344 // Combine operations 345 345 if ( count($changes) > 1 ) { 346 346 $filtered = array($changes[0]); 347 347 for ( $i = 0, $j = 1; $j < count($changes); $j++ ) { … … 365 365 unset($filtered); 366 366 } 367 367 368 // image resource before applying the changes368 // Image resource before applying the changes 369 369 $img = apply_filters('image_edit_before_change', $img, $changes); 370 370 371 371 foreach ( $changes as $operation ) { … … 401 401 if ( $changes ) 402 402 $img = image_edit_apply_changes($img, $changes); 403 403 404 // scale the image404 // Scale the image 405 405 $w = imagesx($img); 406 406 $h = imagesy($img); 407 407 $ratio = _image_get_preview_ratio($w, $h); … … 438 438 439 439 if ( $parts['basename'] != $data['file'] ) { 440 440 if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) { 441 // delete only if it'sedited image441 // Delete only if it's an edited image 442 442 if ( preg_match('/-e[0-9]{13}\./', $parts['basename']) ) { 443 443 $delpath = apply_filters('wp_delete_file', $file); 444 444 @unlink($delpath); … … 463 463 $data = $backup_sizes["$default_size-orig"]; 464 464 if ( isset($meta['sizes'][$default_size]) && $meta['sizes'][$default_size]['file'] != $data['file'] ) { 465 465 if ( defined('IMAGE_EDIT_OVERWRITE') && IMAGE_EDIT_OVERWRITE ) { 466 // delete only if it'sedited image466 // Delete only if it's an edited image 467 467 if ( preg_match('/-e[0-9]{13}-/', $meta['sizes'][$default_size]['file']) ) { 468 468 $delpath = apply_filters( 'wp_delete_file', path_join($parts['dirname'], $meta['sizes'][$default_size]['file']) ); 469 469 @unlink($delpath); … … 513 513 $sX = imagesx($img); 514 514 $sY = imagesy($img); 515 515 516 // check if it has roughly the same w / hratio516 // Check if it has roughly the same width/height ratio 517 517 $diff = round($sX / $sY, 2) - round($fwidth / $fheight, 2); 518 518 if ( -0.1 < $diff && $diff < 0.1 ) { 519 // scale the full size image519 // Scale the full size image 520 520 $dst = wp_imagecreatetruecolor($fwidth, $fheight); 521 521 if ( imagecopyresampled( $dst, $img, 0, 0, 0, 0, $fwidth, $fheight, $sX, $sY ) ) { 522 522 imagedestroy($img); … … 549 549 if ( !is_array($backup_sizes) ) 550 550 $backup_sizes = array(); 551 551 552 // generate new filename552 // Generate new filename 553 553 $path = get_attached_file($post_id); 554 554 $path_parts = pathinfo( $path ); 555 555 $filename = $path_parts['filename']; … … 575 575 } 576 576 } 577 577 578 // save the full-size file, also needed to create sub-sizes578 // Save the full-size file, also needed to create sub-sizes 579 579 if ( !wp_save_image_file($new_path, $img, $post->post_mime_type, $post_id) ) { 580 580 $return->error = esc_js( __('Unable to save the image.') ); 581 581 return $return; -
wp-admin/includes/class-wp-plugins-list-table.php
119 119 120 120 $this->items = array(); 121 121 foreach ( $plugins[ $status ] as $plugin_file => $plugin_data ) { 122 // Translate, Don't Apply Markup, Sanitize HTML122 // Translate, don't apply markup, sanitize HTML 123 123 $this->items[$plugin_file] = _get_plugin_data_markup_translate( $plugin_file, $plugin_data, false, true ); 124 124 } 125 125 -
wp-admin/includes/theme-install.php
20 20 ); 21 21 22 22 /** 23 * Retrieve list of WordPress theme features ( akatheme tags)23 * Retrieve list of WordPress theme features (AKA theme tags) 24 24 * 25 25 * @since 2.8.0 26 26 * … … 133 133 134 134 $name = wp_kses($theme->name, $themes_allowedtags); 135 135 $desc = wp_kses($theme->description, $themes_allowedtags); 136 // if ( strlen($desc) > 30 )136 // if ( strlen($desc) > 30 ) 137 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'; -
wp-admin/includes/widgets.php
100 100 101 101 $params[0]['before_widget'] = "<div id='widget-{$i}_{$id}' class='widget'$hidden>"; 102 102 $params[0]['after_widget'] = "</div>"; 103 $params[0]['before_title'] = "%BEG_OF_TITLE%"; // deprecated104 $params[0]['after_title'] = "%END_OF_TITLE%"; // deprecated103 $params[0]['before_title'] = "%BEG_OF_TITLE%"; // Deprecated 104 $params[0]['after_title'] = "%END_OF_TITLE%"; // Deprecated 105 105 if ( is_callable( $wp_registered_widgets[$widget_id]['callback'] ) ) { 106 106 $wp_registered_widgets[$widget_id]['_callback'] = $wp_registered_widgets[$widget_id]['callback']; 107 107 $wp_registered_widgets[$widget_id]['callback'] = 'wp_widget_control'; … … 162 162 163 163 // We aren't showing a widget control, we're outputing a template for a mult-widget control 164 164 if ( isset($sidebar_args['_display']) && 'template' == $sidebar_args['_display'] && $widget_number ) { 165 // number == -1 implies a template where id numbers are replaced by a generic '__i__'165 // Number == -1 implies a template where id numbers are replaced by a generic '__i__' 166 166 $control['params'][0]['number'] = -1; 167 // with id_base widget id's are constructed like {$id_base}-{$id_number}167 // With id_base widget ID's are constructed like {$id_base}-{$id_number} 168 168 if ( isset($control['id_base']) ) 169 169 $id_format = $control['id_base'] . '-__i__'; 170 170 } -
wp-admin/includes/update-core.php
1 1 <?php 2 2 /** 3 * WordPress core upgrade functionality.3 * WordPress Core Upgrade Functionality. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 249 249 * 250 250 * The contents of this array indicate any new bundled plugins/themes which 251 251 * should be installed with the WordPress Upgrade. These items will not be 252 * re-installed in future upgrades, this behavio ur is controlled by the252 * re-installed in future upgrades, this behavior is controlled by the 253 253 * introduced version present here being older than the current installed version. 254 254 * 255 255 * The content of this array should follow the following format: … … 362 362 $wp_filesystem->delete($maintenance_file); 363 363 $wp_filesystem->put_contents($maintenance_file, $maintenance_string, FS_CHMOD_FILE); 364 364 365 // Copy new versions of W Pfiles into place.365 // Copy new versions of WordPress files into place. 366 366 $result = _copy_dir($from . $distro, $to, array('wp-content') ); 367 367 368 368 // Custom Content Directory needs updating now. … … 414 414 415 415 $wp_filesystem->mkdir($dest . $filename, FS_CHMOD_DIR); 416 416 $_result = copy_dir( $from . $distro . 'wp-content/' . $file, $dest . $filename); 417 if ( is_wp_error($_result) ) // If aerror occurs partway through this final step, keep the error flowing through, but keep process going.417 if ( is_wp_error($_result) ) // If an error occurs partway through this final step, keep the error flowing through, but keep process going. 418 418 $result = $_result; 419 419 } 420 420 } 421 } // end foreach421 } // end foreach 422 422 } 423 423 424 424 // Handle $result error from the above blocks -
wp-admin/includes/class-wp-themes-list-table.php
76 76 77 77 return; 78 78 } 79 // else, fallthrough. install_themes doesn't help if you can't enable it.79 // Else, fallthrough. install_themes doesn't help if you can't enable it. 80 80 } else { 81 81 if ( current_user_can( 'install_themes' ) ) { 82 82 printf( __( 'You only have one theme installed right now. Live a little! You can choose from over 1,000 free themes in the WordPress.org Theme Directory at any time: just click on the <a href="%s">Install Themes</a> tab above.' ), admin_url( 'theme-install.php' ) ); … … 179 179 <?php endif; ?> 180 180 </a> 181 181 <h3><?php 182 /* translators: 1: theme title, 2: theme version, 3: theme author */182 /* Translators: 1: theme title, 2: theme version, 3: theme author */ 183 183 printf( __( '%1$s %2$s by %3$s' ), $title, $version, $author ) ; ?></h3> 184 184 <p class="description"><?php echo $description; ?></p> 185 185 <span class='action-links'><?php echo $actions ?></span> 186 186 <?php if ( current_user_can( 'edit_themes' ) && $parent_theme ) { 187 /* translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?>187 /* Translators: 1: theme title, 2: template dir, 3: stylesheet_dir, 4: theme title, 5: parent_theme */ ?> 188 188 <p><?php printf( __( 'The template files are located in <code>%2$s</code>. The stylesheet files are located in <code>%3$s</code>. <strong>%4$s</strong> uses templates from <strong>%5$s</strong>. Changes made to the templates will affect both themes.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ), $title, $parent_theme ); ?></p> 189 189 <?php } else { ?> 190 190 <p><?php printf( __( 'All of this theme’s files are located in <code>%2$s</code>.' ), $title, str_replace( WP_CONTENT_DIR, '', $template_dir ), str_replace( WP_CONTENT_DIR, '', $stylesheet_dir ) ); ?></p> … … 193 193 <p><?php _e( 'Tags:' ); ?> <?php echo join( ', ', $tags ); ?></p> 194 194 <?php endif; ?> 195 195 <?php theme_update_available( $themes[$theme_name] ); ?> 196 <?php endif; // end if not empty theme_name ?>196 <?php endif; // End if not empty theme_name ?> 197 197 </td> 198 <?php } // end foreach $cols ?>198 <?php } // End foreach $cols ?> 199 199 </tr> 200 <?php } // end foreach $table200 <?php } // End foreach $table 201 201 } 202 202 203 203 function search_theme( $theme ) { -
wp-admin/includes/class-wp-comments-list-table.php
348 348 } 349 349 350 350 echo '<div class="submitted-on">'; 351 /* translators: 2: comment date, 3: comment time */351 /* Translators: 2: comment date, 3: comment time */ 352 352 printf( __( 'Submitted on <a href="%1$s">%2$s at %3$s</a>' ), $comment_url, 353 /* translators: comment date format. See http://php.net/date */ get_comment_date( __( 'Y/m/d' ) ),354 /* translators: comment time format. See http://php.net/date */ get_comment_date( get_option( 'time_format' ) ) );353 /* Translators: comment date format. See http://php.net/date */ get_comment_date( __( 'Y/m/d' ) ), 354 /* Translators: comment time format. See http://php.net/date */ get_comment_date( get_option( 'time_format' ) ) ); 355 355 356 356 if ( $comment->comment_parent ) { 357 357 $parent = get_comment( $comment->comment_parent ); … … 374 374 } 375 375 376 376 if ( $user_can ) { 377 // preorder it: Approve | Reply | Quick Edit | Edit | Spam | Trash377 // Preorder it: Approve | Reply | Quick Edit | Edit | Spam | Trash 378 378 $actions = array( 379 379 'approve' => '', 'unapprove' => '', 380 380 'reply' => '', … … 395 395 } 396 396 397 397 if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) { 398 $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>';398 $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>'; 399 399 } elseif ( 'spam' == $the_comment_status ) { 400 400 $actions['unspam'] = "<a href='$unspam_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1 vim-z vim-destructive'>" . _x( 'Not Spam', 'comment' ) . '</a>'; 401 401 } elseif ( 'trash' == $the_comment_status ) { … … 423 423 ++$i; 424 424 ( ( ( 'approve' == $action || 'unapprove' == $action ) && 2 === $i ) || 1 === $i ) ? $sep = '' : $sep = ' | '; 425 425 426 // Reply and quickedit need a hide-if-no-js span when not added with ajax426 // Reply and quickedit need a hide-if-no-js span when not added with AJAX 427 427 if ( ( 'reply' == $action || 'quickedit' == $action ) && ! defined('DOING_AJAX') ) 428 428 $action .= ' hide-if-no-js'; 429 429 elseif ( ( $action == 'untrash' && $the_comment_status == 'trash' ) || ( $action == 'unspam' && $the_comment_status == 'spam' ) ) { -
wp-admin/includes/template.php
257 257 return (array) get_user_option( 'manage' . $screen->id . 'columnshidden' ); 258 258 } 259 259 260 // adds hidden fields with the data for use in the inline editor for posts and pages260 // Adds hidden fields with the data for use in the inline editor for posts and pages 261 261 /** 262 262 * {@internal Missing Short Description}} 263 263 * … … 323 323 * @param unknown_type $mode 324 324 */ 325 325 function wp_comment_reply($position = '1', $checkbox = false, $mode = 'single', $table_row = true) { 326 // allow plugin to replace the popup content326 // Allow plugin to replace the popup content 327 327 $content = apply_filters( 'wp_comment_reply', '', array('position' => $position, 'checkbox' => $checkbox, 'mode' => $mode) ); 328 328 329 329 if ( ! empty($content) ) { … … 432 432 <tbody id="the-list" class="list:meta"> 433 433 <tr><td></td></tr> 434 434 </tbody> 435 </table>'; // TBODY needed for list-manipulation JS435 </table>'; // TBODY needed for list-manipulation JavaScript 436 436 return; 437 437 } 438 438 $count = 0; … … 479 479 480 480 if ( is_serialized( $entry['meta_value'] ) ) { 481 481 if ( is_serialized_string( $entry['meta_value'] ) ) { 482 // this is a serialized string, so we should display it482 // This is a serialized string, so we should display it 483 483 $entry['meta_value'] = maybe_unserialize( $entry['meta_value'] ); 484 484 } else { 485 // this is a serialized array/object so we should NOT display it485 // This is a serialized array/object so we should NOT display it 486 486 --$count; 487 487 return; 488 488 } … … 622 622 $minute = '<input type="text" ' . ( $multi ? '' : 'id="mn" ' ) . 'name="mn" value="' . $mn . '" size="2" maxlength="2"' . $tab_index_attribute . ' autocomplete="off" />'; 623 623 624 624 echo '<div class="timestamp-wrap">'; 625 /* translators: 1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input */625 /* Translators: 1: month input, 2: day input, 3: year input, 4: hour input, 5: minute input */ 626 626 printf(__('%1$s%2$s, %3$s @ %4$s : %5$s'), $month, $day, $year, $hour, $minute); 627 627 628 628 echo '</div><input type="hidden" id="ss" name="ss" value="' . $ss . '" />'; … … 1604 1604 * 1605 1605 */ 1606 1606 function iframe_footer() { 1607 // We're going to hide any footer output on iframe pages, but run the hooks anyway since they output Javascript or other needed content. ?>1607 // We're going to hide any footer output on iframe pages, but run the hooks anyway since they output JavaScript or other needed content. ?> 1608 1608 <div class="hidden"> 1609 1609 <?php 1610 1610 do_action('admin_footer', ''); … … 1688 1688 * @since 3.0.0 1689 1689 * 1690 1690 * @param string $screen The name of the screen 1691 * @return object An object containing the safe screen name and id1691 * @return object An object containing the safe screen name and ID 1692 1692 */ 1693 1693 function convert_to_screen( $screen ) { 1694 1694 $screen = str_replace( array('.php', '-new', '-add', '-network', '-user' ), '', $screen); … … 1858 1858 if ( is_string($screen) ) 1859 1859 $screen = convert_to_screen($screen); 1860 1860 1861 // Back compat for plugins using the filter instead of add_screen_option()1861 // Back compatibility for plugins using the filter instead of add_screen_option() 1862 1862 $columns = apply_filters('screen_layout_columns', array(), $screen->id, $screen); 1863 1863 if ( !empty($columns) && isset($columns[$screen->id]) ) 1864 1864 add_screen_option('layout_columns', array('max' => $columns[$screen->id]) ); … … 1938 1938 else 1939 1939 $per_page = apply_filters( $option, $per_page ); 1940 1940 1941 // Back compat 1941 // Back compatibility 1942 1942 if ( isset( $screen->post_type ) ) 1943 1943 $per_page = apply_filters( 'edit_posts_per_page', $per_page, $screen->post_type ); 1944 1944 … … 2195 2195 endswitch; 2196 2196 $text = ( NULL == $text ) ? __( 'Save Changes' ) : $text; 2197 2197 2198 // Default the id attribute to $name unless an idwas specifically provided in $other_attributes2198 // Default the ID attribute to $name unless an ID was specifically provided in $other_attributes 2199 2199 $id = $name; 2200 2200 if ( is_array( $other_attributes ) && isset( $other_attributes['id'] ) ) { 2201 2201 $id = $other_attributes['id']; -
wp-admin/includes/user.php
130 130 131 131 $errors = new WP_Error(); 132 132 133 /* checking that username has been typed */133 /* Checking that username has been typed */ 134 134 if ( $user->user_login == '' ) 135 135 $errors->add( 'user_login', __( '<strong>ERROR</strong>: Please enter a username.' )); 136 136 137 /* checking the password has been typed twice */137 /* Checking the password has been typed twice */ 138 138 do_action_ref_array( 'check_passwords', array ( $user->user_login, & $pass1, & $pass2 )); 139 139 140 140 if ( $update ) { … … 153 153 if ( false !== strpos( stripslashes($pass1), "\\" ) ) 154 154 $errors->add( 'pass', __( '<strong>ERROR</strong>: Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) ); 155 155 156 /* checking the password has been typed twice the same */156 /* Checking the password has been typed twice the same */ 157 157 if ( $pass1 != $pass2 ) 158 158 $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter the same password in the two password fields.' ), array( 'form-field' => 'pass1' ) ); 159 159 … … 166 166 if ( !$update && username_exists( $user->user_login ) ) 167 167 $errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' )); 168 168 169 /* checking e-mail address */169 /* Checking e-mail address */ 170 170 if ( empty( $user->user_email ) ) { 171 171 $errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) ); 172 172 } elseif ( !is_email( $user->user_email ) ) { … … 274 274 275 275 $id = (int) $id; 276 276 277 // allow for transaction statement277 // Allow for transaction statement 278 278 do_action('delete_user', $id); 279 279 280 280 if ( 'novalue' === $reassign || null === $reassign ) { … … 309 309 $wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id = $id AND meta_key = '{$level_key}'"); 310 310 } 311 311 312 // allow for commit transaction312 // Allow for commit transaction 313 313 do_action('deleted_user', $id); 314 314 315 315 return true; … … 335 335 */ 336 336 function default_password_nag_handler($errors = false) { 337 337 global $user_ID; 338 if ( ! get_user_option('default_password_nag') ) // Short circuit it.338 if ( ! get_user_option('default_password_nag') ) // Short circuit it. 339 339 return; 340 340 341 // get_user_setting = JS saved UI setting. else no-js-falback code.341 // get_user_setting = JS saved UI setting. else no-js-falback code. 342 342 if ( 'hide' == get_user_setting('default_password_nag') || isset($_GET['default_password_nag']) && '0' == $_GET['default_password_nag'] ) { 343 343 delete_user_setting('default_password_nag'); 344 344 update_user_option($user_ID, 'default_password_nag', false, true); … … 350 350 * @since 2.8.0 351 351 */ 352 352 function default_password_nag_edit_user($user_ID, $old_data) { 353 if ( ! get_user_option('default_password_nag', $user_ID) ) // Short circuit it.353 if ( ! get_user_option('default_password_nag', $user_ID) ) // Short circuit it. 354 354 return; 355 355 356 356 $new_data = get_userdata($user_ID); 357 357 358 if ( $new_data->user_pass != $old_data->user_pass ) { // Remove the nag if the password has been changed.358 if ( $new_data->user_pass != $old_data->user_pass ) { // Remove the nag if the password has been changed. 359 359 delete_user_setting('default_password_nag', $user_ID); 360 360 update_user_option($user_ID, 'default_password_nag', false, true); 361 361 } … … 367 367 */ 368 368 function default_password_nag() { 369 369 global $pagenow; 370 if ( 'profile.php' == $pagenow || ! get_user_option('default_password_nag') ) // Short circuit it.370 if ( 'profile.php' == $pagenow || ! get_user_option('default_password_nag') ) // Short circuit it. 371 371 return; 372 372 373 373 echo '<div class="error default-password-nag">'; -
wp-admin/includes/media.php
15 15 */ 16 16 function media_upload_tabs() { 17 17 $_default_tabs = array( 18 'type' => __('From Computer'), // handler action suffix => tab text18 'type' => __('From Computer'), // Handler action suffix => tab text 19 19 'type_url' => __('From URL'), 20 20 'gallery' => __('Gallery'), 21 21 'library' => __('Media Library') … … 211 211 $title = $name; 212 212 $content = ''; 213 213 214 // use image exif/iptc data for title and caption defaults if possible214 // Use image exif/iptc data for title and caption defaults if possible 215 215 if ( $image_meta = @wp_read_image_metadata($file) ) { 216 216 if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) 217 217 $title = $image_meta['title']; … … 262 262 $title = preg_replace('/\.[^.]+$/', '', basename($file)); 263 263 $content = ''; 264 264 265 // use image exif/iptc data for title and caption defaults if possible265 // Use image exif/iptc data for title and caption defaults if possible 266 266 if ( $image_meta = @wp_read_image_metadata($file) ) { 267 267 if ( trim( $image_meta['title'] ) && ! is_numeric( sanitize_title( $image_meta['title'] ) ) ) 268 268 $title = $image_meta['title']; … … 292 292 /** 293 293 * {@internal Missing Short Description}} 294 294 * 295 * Wrap iframe content (produced by $content_func) in a doctype, htmlhead/body295 * Wrap iframe content (produced by $content_func) in a doctype, HTML head/body 296 296 * etc any additional function args will be passed to content_func. 297 297 * 298 298 * @since 2.5.0 … … 448 448 $image_alt = get_post_meta($attachment_id, '_wp_attachment_image_alt', true); 449 449 if ( $image_alt != stripslashes($attachment['image_alt']) ) { 450 450 $image_alt = wp_strip_all_tags( stripslashes($attachment['image_alt']), true ); 451 // update_meta expects slashed451 // Update_meta expects slashed 452 452 update_post_meta( $attachment_id, '_wp_attachment_image_alt', addslashes($image_alt) ); 453 453 } 454 454 } … … 572 572 $tmp = download_url( $file ); 573 573 574 574 // Set variables for storage 575 // fix file filename for query strings575 // Fix file filename for query strings 576 576 preg_match('/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $file, $matches); 577 577 $file_array['name'] = basename($matches[0]); 578 578 $file_array['tmp_name'] = $tmp; … … 583 583 $file_array['tmp_name'] = ''; 584 584 } 585 585 586 // do the validation and storage stuff586 // Do the validation and storage stuff 587 587 $id = media_handle_sideload( $file_array, $post_id, $desc ); 588 588 // If error storing permanently, unlink 589 589 if ( is_wp_error($id) ) { … … 1476 1476 1477 1477 if ( $flash ) : 1478 1478 1479 // Set the post param s, which SWFUpload will post back with the file, and pass1479 // Set the post parameters, which SWFUpload will post back with the file, and pass 1480 1480 // them through a filter. 1481 1481 $post_params = array( 1482 1482 "post_id" => $post_id, … … 1536 1536 swfupload_pre_load_handler: swfuploadPreLoad, 1537 1537 swfupload_load_failed_handler: swfuploadLoadFailed, 1538 1538 custom_settings : { 1539 degraded_element_id : "html-upload-ui", // idof the element displayed when swfupload is unavailable1540 swfupload_element_id : "flash-upload-ui" // idof the element displayed when swfupload is available1539 degraded_element_id : "html-upload-ui", // ID of the element displayed when swfupload is unavailable 1540 swfupload_element_id : "flash-upload-ui" // ID of the element displayed when swfupload is available 1541 1541 }, 1542 1542 debug: false 1543 1543 }; … … 2294 2294 echo '<p class="upload-html-bypass hide-if-no-js">'; 2295 2295 _e('You are using the Browser uploader.'); 2296 2296 if ( $flash ) { 2297 // the user manually selected the browser uploader, so let them switch back to Flash2297 // The user manually selected the browser uploader, so let them switch back to Flash 2298 2298 echo ' '; 2299 2299 printf( __('Try the <a href="%s">Flash uploader</a> instead.'), esc_url(add_query_arg('flash', 1)) ); 2300 2300 } -
wp-admin/includes/ms.php
1 1 <?php 2 2 /** 3 * Multisite administration functions.3 * Multisite Administration Functions. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Multisite … … 134 134 restore_current_blog(); 135 135 } 136 136 137 // @todoMerge with wp_delete_user() ?137 // TODO: Merge with wp_delete_user() ? 138 138 function wpmu_delete_user( $id ) { 139 139 global $wpdb; 140 140 … … 171 171 172 172 clean_user_cache( $id ); 173 173 174 // allow for commit transaction174 // Allow for commit transaction 175 175 do_action( 'deleted_user', $id ); 176 176 177 177 return true; … … 409 409 410 410 if ( $space > 1000 ) { 411 411 $space = number_format( $space / 1024 ); 412 /* translators: Gigabytes */412 /* Translators: Gigabytes */ 413 413 $space .= __( 'GB' ); 414 414 } else { 415 /* translators: Megabytes */415 /* Translators: Megabytes */ 416 416 $space .= __( 'MB' ); 417 417 } 418 418 ?> -
wp-admin/includes/export.php
76 76 $where .= $wpdb->prepare( " AND {$wpdb->posts}.post_date < %s", date( 'Y-m-d', strtotime('+1 month', strtotime($args['end_date'])) ) ); 77 77 } 78 78 79 // grab a snapshot of post IDs, just in case it changes during the export79 // Grab a snapshot of post IDs, just in case it changes during the export 80 80 $post_ids = $wpdb->get_col( "SELECT ID FROM {$wpdb->posts} $join WHERE $where" ); 81 81 82 // get the requested terms ready, empty unless posts filtered by category or all content82 // Get the requested terms ready, empty unless posts filtered by category or all content 83 83 $cats = $tags = $terms = array(); 84 84 if ( isset( $term ) && $term ) { 85 85 $cat = get_term( $term['term_id'], 'category' ); … … 92 92 $custom_taxonomies = get_taxonomies( array( '_builtin' => false ) ); 93 93 $custom_terms = (array) get_terms( $custom_taxonomies, array( 'get' => 'all' ) ); 94 94 95 // put categories in order with no child going before its parent95 // Put categories in order with no child going before its parent 96 96 while ( $cat = array_shift( $categories ) ) { 97 97 if ( $cat->parent == 0 || isset( $cats[$cat->parent] ) ) 98 98 $cats[$cat->term_id] = $cat; … … 100 100 $categories[] = $cat; 101 101 } 102 102 103 // put terms in order with no child going before its parent103 // Put terms in order with no child going before its parent 104 104 while ( $t = array_shift( $custom_terms ) ) { 105 105 if ( $t->parent == 0 || isset( $terms[$t->parent] ) ) 106 106 $terms[$t->term_id] = $t; … … 348 348 global $wp_query; 349 349 $wp_query->in_the_loop = true; // Fake being in the loop. 350 350 351 // fetch 20 posts at a time rather than loading the entire table into memory351 // Fetch 20 posts at a time rather than loading the entire table into memory 352 352 while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) { 353 353 $where = "WHERE ID IN (" . join( ',', $next_posts ) . ")"; 354 354 $posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" ); -
wp-admin/includes/image.php
7 7 */ 8 8 9 9 /** 10 * Create a thumbnail from an Image given a maximum side size.10 * Create a thumbnail from an image given a maximum side size. 11 11 * 12 12 * This function can handle most image file formats which PHP supports. If PHP 13 13 * does not have the functionality to save in a file of the same format, the 14 * thumbnail will be created as a jpeg.14 * thumbnail will be created as a JPEG. 15 15 * 16 16 * @since 1.2.0 17 17 * 18 * @param mixed $file Filename of the original image, Or attachment id.18 * @param mixed $file Filename of the original image, or attachment id. 19 19 * @param int $max_side Maximum length of a single side for the thumbnail. 20 20 * @param mixed $deprecated Never used. 21 21 * @return string Thumbnail path on success, Error string on failure. … … 28 28 } 29 29 30 30 /** 31 * Crop an Image to a given size.31 * Crop an image to a given size. 32 32 * 33 33 * @since 2.1.0 34 34 * … … 82 82 * 83 83 * @since 2.1.0 84 84 * 85 * @param int $attachment_id Attachment I dto process.85 * @param int $attachment_id Attachment ID to process. 86 86 * @param string $file Filepath of the Attached image. 87 87 * @return mixed Metadata for attachment. 88 88 */ … … 97 97 list($uwidth, $uheight) = wp_constrain_dimensions($metadata['width'], $metadata['height'], 128, 96); 98 98 $metadata['hwstring_small'] = "height='$uheight' width='$uwidth'"; 99 99 100 // Make the file path relative to the upload dir 100 // Make the file path relative to the upload directory 101 101 $metadata['file'] = _wp_relative_upload_path($file); 102 102 103 103 // make thumbnails and other intermediate sizes … … 138 138 } 139 139 140 140 /** 141 * Calculated the new dimen tions for a downsampled image.141 * Calculated the new dimensions for a down-sampled image. 142 142 * 143 143 * @since 2.0.0 144 144 * @see wp_constrain_dimensions() … … 184 184 /** 185 185 * Get extended image metadata, exif or iptc as available. 186 186 * 187 * Retrieves the EXIF metadata aperture, credit, camera, caption, copyright, iso187 * Retrieves the EXIF metadata aperture, credit, camera, caption, copyright, ISO 188 188 * created_timestamp, focal_length, shutter_speed, and title. 189 189 * 190 190 * The IPTC metadata that is retrieved is APP13, credit, byline, created date … … 203 203 204 204 list( , , $sourceImageType ) = getimagesize( $file ); 205 205 206 // exifcontains a bunch of data we'll probably never need formatted in ways206 // 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 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. … … 220 220 'title' => '', 221 221 ); 222 222 223 // read iptc first, since it might contain data not available in exifsuch223 // Read IPTC first, since it might contain data not available in EXIF such 224 224 // as caption, description etc 225 225 if ( is_callable( 'iptcparse' ) ) { 226 226 getimagesize( $file, $info ); … … 228 228 if ( ! empty( $info['APP13'] ) ) { 229 229 $iptc = iptcparse( $info['APP13'] ); 230 230 231 // headline, "A brief synopsis of the caption."231 // Headline, "A brief synopsis of the caption." 232 232 if ( ! empty( $iptc['2#105'][0] ) ) 233 233 $meta['title'] = utf8_encode( trim( $iptc['2#105'][0] ) ); 234 // title, "Many use the Title field to store the filename of the image, though the field may be used in many ways."234 // Title, "Many use the title field to store the filename of the image, though the field may be used in many ways." 235 235 elseif ( ! empty( $iptc['2#005'][0] ) ) 236 236 $meta['title'] = utf8_encode( trim( $iptc['2#005'][0] ) ); 237 237 238 if ( ! empty( $iptc['2#120'][0] ) ) { // description / legacy caption238 if ( ! empty( $iptc['2#120'][0] ) ) { // Description / legacy caption 239 239 $caption = utf8_encode( trim( $iptc['2#120'][0] ) ); 240 240 if ( empty( $meta['title'] ) ) { 241 241 // Assume the title is stored in 2:120 if it's short. … … 248 248 } 249 249 } 250 250 251 if ( ! empty( $iptc['2#110'][0] ) ) // credit251 if ( ! empty( $iptc['2#110'][0] ) ) // Credit 252 252 $meta['credit'] = utf8_encode(trim($iptc['2#110'][0])); 253 elseif ( ! empty( $iptc['2#080'][0] ) ) // creator / legacy byline253 elseif ( ! empty( $iptc['2#080'][0] ) ) // Creator / legacy byline 254 254 $meta['credit'] = utf8_encode(trim($iptc['2#080'][0])); 255 255 256 256 if ( ! empty( $iptc['2#055'][0] ) and ! empty( $iptc['2#060'][0] ) ) // created date and time 257 257 $meta['created_timestamp'] = strtotime( $iptc['2#055'][0] . ' ' . $iptc['2#060'][0] ); 258 258 259 if ( ! empty( $iptc['2#116'][0] ) ) // copyright259 if ( ! empty( $iptc['2#116'][0] ) ) // Copyright 260 260 $meta['copyright'] = utf8_encode( trim( $iptc['2#116'][0] ) ); 261 261 } 262 262 } 263 263 264 // fetch additional info from exifif available264 // Fetch additional info from EXIF if available 265 265 if ( is_callable( 'exif_read_data' ) && in_array( $sourceImageType, apply_filters( 'wp_read_image_metadata_types', array( IMAGETYPE_JPEG, IMAGETYPE_TIFF_II, IMAGETYPE_TIFF_MM ) ) ) ) { 266 266 $exif = @exif_read_data( $file ); 267 267 … … 332 332 $info = @getimagesize($path); 333 333 if ( empty($info) ) 334 334 $result = false; 335 elseif ( !in_array($info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) ) // only gif, jpeg and pngimages can reliably be displayed335 elseif ( !in_array($info[2], array(IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG)) ) // Only GIF, JPEG and PNG images can reliably be displayed 336 336 $result = false; 337 337 else 338 338 $result = true; -
wp-admin/includes/class-wp-filesystem-direct.php
28 28 /** 29 29 * connect filesystem. 30 30 * 31 * @return bool Returns true on success or false on failure (always true for WP_Filesystem_Direct).31 * @return bool returns true on success or false on failure (always true for WP_Filesystem_Direct). 32 32 */ 33 33 function connect() { 34 34 return true; … … 37 37 * Reads entire file into a string 38 38 * 39 39 * @param string $file Name of the file to read. 40 * @return string|bool The function returns the read data or false on failure.40 * @return string|bool the function returns the read data or false on failure. 41 41 */ 42 42 function get_contents($file) { 43 43 return @file_get_contents($file); … … 89 89 * 90 90 * @param string $file Path to the file. 91 91 * @param mixed $group A group name or number. 92 * @param bool $recursive (optional) If set True changes file group recursiv ly. Defaults to False.93 * @return bool Returns true on success or false on failure.92 * @param bool $recursive (optional) If set True changes file group recursively. Defaults to False. 93 * @return bool returns true on success or false on failure. 94 94 */ 95 95 function chgrp($file, $group, $recursive = false) { 96 96 if ( ! $this->exists($file) ) … … 112 112 * 113 113 * @param string $file Path to the file. 114 114 * @param int $mode (optional) The permissions as octal number, usually 0644 for files, 0755 for dirs. 115 * @param bool $recursive (optional) If set True changes file group recursiv ly. Defaults to False.116 * @return bool Returns true on success or false on failure.115 * @param bool $recursive (optional) If set True changes file group recursively. Defaults to False. 116 * @return bool returns true on success or false on failure. 117 117 */ 118 118 function chmod($file, $mode = false, $recursive = false) { 119 119 if ( ! $mode ) { … … 140 140 * 141 141 * @param string $file Path to the file. 142 142 * @param mixed $owner A user name or number. 143 * @param bool $recursive (optional) If set True changes file owner recursiv ly. Defaults to False.144 * @return bool Returns true on success or false on failure.143 * @param bool $recursive (optional) If set True changes file owner recursively. Defaults to False. 144 * @return bool returns true on success or false on failure. 145 145 */ 146 146 function chown($file, $owner, $recursive = false) { 147 147 if ( ! $this->exists($file) ) … … 160 160 /** 161 161 * Gets file owner 162 162 * 163 * @param string $file Path to the file.163 * @param string $file path to the file. 164 164 * @return string Username of the user. 165 165 */ 166 166 function owner($file) { … … 177 177 * 178 178 * FIXME does not handle errors in fileperms() 179 179 * 180 * @param string $file Path to the file.181 * @return string Mode of the file (last 4 digits).180 * @param string $file path to the file. 181 * @return string mode of the file (last 4 digits). 182 182 */ 183 183 function getchmod($file) { 184 184 return substr(decoct(@fileperms($file)),3); … … 207 207 if ( ! $overwrite && $this->exists($destination) ) 208 208 return false; 209 209 210 // try using rename first . if that fails (for example, source is read only) try copy210 // try using rename first, if that fails(for example, source is read only), try copy. 211 211 if ( @rename($source, $destination) ) 212 212 return true; 213 213 … … 222 222 function delete($file, $recursive = false, $type = false) { 223 223 if ( empty($file) ) //Some filesystems report this as /, which can cause non-expected recursive deletion of all files in the filesystem. 224 224 return false; 225 $file = str_replace('\\', '/', $file); // for win32, occasional problems deleting files otherwise225 $file = str_replace('\\', '/', $file); //For win32, occasional problems deleting files otherwise 226 226 227 227 if ( 'f' == $type || $this->is_file($file) ) 228 228 return @unlink($file); 229 229 if ( ! $recursive && $this->is_dir($file) ) 230 230 return @rmdir($file); 231 231 232 //At this point it s a folder, and we're in recursive mode232 //At this point it's a folder, and we're in recursive mode 233 233 $file = trailingslashit($file); 234 234 $filelist = $this->dirlist($file, true); 235 235 236 236 $retval = true; 237 if ( is_array($filelist) ) // false if no files, So check first.237 if ( is_array($filelist) ) //False if no files, so check first. 238 238 foreach ($filelist as $filename => $fileinfo) 239 239 if ( ! $this->delete($file . $filename, $recursive, $fileinfo['type']) ) 240 240 $retval = false; … … 284 284 } 285 285 286 286 function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { 287 // safe mode fails with a trailing slash under certain PHP versions.287 // Safe mode fails with a trailing slash under certain PHP versions. 288 288 $path = untrailingslashit($path); 289 289 if ( empty($path) ) 290 290 $path = '/'; -
wp-admin/includes/nav-menu.php
69 69 70 70 if ( isset( $item->post_status ) && 'draft' == $item->post_status ) { 71 71 $classes[] = 'pending'; 72 /* translators: %s: title of menu item in draft status */72 /* Translators: %s: title of menu item in draft status */ 73 73 $title = sprintf( __('%s (Pending)'), $item->title ); 74 74 } 75 75 … … 598 598 if ( isset( $post_type['args']->_default_query ) ) 599 599 $args = array_merge($args, (array) $post_type['args']->_default_query ); 600 600 601 // @todotransient caching of these results with proper invalidation on updating of a post of this type601 // TODO: transient caching of these results with proper invalidation on updating of a post of this type 602 602 $get_posts = new WP_Query; 603 603 $posts = $get_posts->query( $args ); 604 604 if ( ! $get_posts->post_count ) { … … 720 720 <?php 721 721 $args['walker'] = $walker; 722 722 723 // if we're dealing with pages, let's put a checkbox for the front page at the top of the list723 // If we're dealing with pages, let's put a checkbox for the front page at the top of the list 724 724 if ( 'page' == $post_type_name ) { 725 725 $front_page = 'page' == get_option('show_on_front') ? (int) get_option( 'page_on_front' ) : 0; 726 726 if ( ! empty( $front_page ) ) { … … 799 799 global $nav_menu_selected_id; 800 800 $taxonomy_name = $taxonomy['args']->name; 801 801 802 // paginate browsing for large numbers of objects802 // Paginate browsing for large numbers of objects 803 803 $per_page = 50; 804 804 $pagenum = isset( $_REQUEST[$taxonomy_name . '-tab'] ) && isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 1; 805 805 $offset = 0 < $pagenum ? $per_page * ( $pagenum - 1 ) : 0; … … 1046 1046 'post_status' => 'publish', 1047 1047 ); 1048 1048 1049 // posts should show only published items1049 // Posts should show only published items 1050 1050 } elseif ( 'post' == $object->name ) { 1051 1051 $object->_default_query = array( 1052 1052 'post_status' => 'publish', 1053 1053 ); 1054 1054 1055 // cats should be in reverse chronological order1055 // Cats should be in reverse chronological order 1056 1056 } elseif ( 'category' == $object->name ) { 1057 1057 $object->_default_query = array( 1058 1058 'orderby' => 'id', 1059 1059 'order' => 'DESC', 1060 1060 ); 1061 1061 1062 // custom post types should show only published items1062 // Custom post types should show only published items 1063 1063 } else { 1064 1064 $object->_default_query = array( 1065 1065 'post_status' => 'publish', … … 1148 1148 global $wpdb; 1149 1149 $delete_timestamp = time() - (60*60*24*EMPTY_TRASH_DAYS); 1150 1150 1151 // delete orphaned draft menu items1151 // Delete orphaned draft menu items 1152 1152 $menu_items_to_delete = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts AS p LEFT JOIN $wpdb->postmeta AS m ON p.ID = m.post_id WHERE post_type = 'nav_menu_item' AND post_status = 'draft' AND meta_key = '_menu_item_orphaned' AND meta_value < '%d'", $delete_timestamp ) ); 1153 1153 1154 1154 foreach( (array) $menu_items_to_delete as $menu_item_id ) -
wp-admin/includes/class-wp-filesystem-ssh2.php
24 24 * 25 25 * Note: Do not leave the directory yet! 26 26 * 27 * Enter: pecl install -f ssh227 * Enter: pecl install -f SSH2 28 28 * 29 29 * Copy the ssh.so file it creates to your PHP Module Directory. 30 30 * Open up your PHP.INI file and look for where extensions are placed. … … 52 52 $this->method = 'ssh2'; 53 53 $this->errors = new WP_Error(); 54 54 55 //Check if possible to use ssh2 functions.55 //Check if possible to use SSH2 functions. 56 56 if ( ! extension_loaded('ssh2') ) { 57 57 $this->errors->add('no_ssh2_ext', __('The ssh2 PHP extension is not available')); 58 58 return false; … … 92 92 $this->options['username'] = $opt['username']; 93 93 94 94 if ( empty ($opt['password']) ) { 95 if ( !$this->keys ) // password can be blank if we are using keys95 if ( !$this->keys ) //Password can be blank if we are using keys 96 96 $this->errors->add('empty_password', __('SSH2 password is required')); 97 97 } else { 98 98 $this->options['password'] = $opt['password']; … … 306 306 } 307 307 308 308 function touch($file, $time = 0, $atime = 0) { 309 //Not impl mented.309 //Not implemented. 310 310 } 311 311 312 312 function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { -
wp-admin/includes/class-wp-importer.php
109 109 } 110 110 } while ( count( $results ) == $limit ); 111 111 112 // unset to save memory112 // Unset to save memory 113 113 unset( $results, $r ); 114 114 115 115 return $hashtable; -
wp-admin/update.php
1 1 <?php 2 2 /** 3 * Update/Install Plugin/Theme administration panel.3 * Update/Install Plugin/Theme Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration -
wp-admin/install-helper.php
6 6 * require_once(). 7 7 * 8 8 * These functions are not optimized for speed, but they should only be used 9 * once in a while, so speed shouldn't be a concern. If it is and you are9 * once in a while, so speed shouldn't be a concern. If it is used, and you are 10 10 * needing to use these functions a lot, you might experience time outs. If you 11 * do , then it is advised to just write the SQL code yourself.11 * do experience time outs, then it is advised to just write the SQL code yourself. 12 12 * 13 13 * You can turn debugging on, by setting $debug to 1 after you include this 14 14 * file. -
wp-admin/theme-editor.php
1 1 <?php 2 2 /** 3 * Theme editor administration panel.3 * Theme Editor Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 195 195 <li><a href="theme-editor.php?file=<?php echo "$template_file"; ?>&theme=<?php echo urlencode($theme) ?>&dir=theme"><?php echo $filedesc ?></a></li> 196 196 <?php endwhile; ?> 197 197 </ul> 198 <h3><?php /* translators: Theme stylesheets in theme editor */ _ex('Styles', 'Theme stylesheets in theme editor'); ?></h3>198 <h3><?php /* Translators: Theme stylesheets in theme editor */ _ex('Styles', 'Theme stylesheets in theme editor'); ?></h3> 199 199 <ul> 200 200 <?php 201 201 $template_mapping = array(); -
wp-admin/admin.php
117 117 $the_parent = $pagenow; 118 118 if ( ! $page_hook = get_plugin_page_hook($plugin_page, $the_parent) ) { 119 119 $page_hook = get_plugin_page_hook($plugin_page, $plugin_page); 120 // backwards compatibility for plugins using add_management_page120 // Backwards compatibility for plugins using add_management_page 121 121 if ( empty( $page_hook ) && 'edit.php' == $pagenow && '' != get_plugin_page_hook($plugin_page, 'tools.php') ) { 122 122 // There could be plugin specific params on the URL, so we need the whole query string 123 123 if ( !empty($_SERVER[ 'QUERY_STRING' ]) ) -
wp-admin/admin-functions.php
1 1 <?php 2 2 /** 3 3 * Administration Functions 4 *5 4 * This file is deprecated, use 'wp-admin/includes/admin.php' instead. 6 5 * 7 6 * @deprecated 2.5 -
wp-admin/revision.php
1 1 <?php 2 2 /** 3 * Revisions administration panel.3 * Revisions Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 61 61 break; 62 62 } 63 63 64 if ( $left_revision->ID == $right_revision->post_parent ) // right is a revision of left64 if ( $left_revision->ID == $right_revision->post_parent ) // Right is a revision of left 65 65 $post =& $left_revision; 66 elseif ( $left_revision->post_parent == $right_revision->ID ) // left is a revision of right66 elseif ( $left_revision->post_parent == $right_revision->ID ) // Left is a revision of right 67 67 $post =& $right_revision; 68 elseif ( $left_revision->post_parent == $right_revision->post_parent ) // both are revisions of common parent68 elseif ( $left_revision->post_parent == $right_revision->post_parent ) // Both are revisions of common parent 69 69 $post = get_post( $left_revision->post_parent ); 70 70 else 71 71 break; // Don't diff two unrelated revisions 72 72 73 73 if ( ! WP_POST_REVISIONS || !post_type_supports($post->post_type, 'revisions') ) { // Revisions disabled 74 74 if ( 75 // we're not looking at an autosave75 // We're not looking at an autosave 76 76 ( !wp_is_post_autosave( $left_revision ) && !wp_is_post_autosave( $right_revision ) ) 77 77 || 78 // we're not comparing an autosave to the current post78 // We're not comparing an autosave to the current post 79 79 ( $post->ID !== $left_revision->ID && $post->ID !== $right_revision->ID ) 80 80 ) { 81 81 $redirect = 'edit.php?post_type=' . $post->post_type; … … 139 139 exit; 140 140 } 141 141 142 // This is so th at the correct "Edit" menu item is selected.142 // This is so the correct "Edit" menu item is selected. 143 143 if ( !empty($post->post_type) && 'post' != $post->post_type ) 144 144 $parent_file = $submenu_file = 'edit.php?post_type=' . $post->post_type; 145 145 else … … 165 165 </tr> 166 166 <?php endif; 167 167 168 // use get_post_to_edit filters?168 // Use get_post_to_edit filters? 169 169 $identical = true; 170 170 foreach ( _wp_post_revision_fields() as $field => $field_title ) : 171 171 if ( 'diff' == $action ) { -
wp-admin/ms-sites.php
1 1 <?php 2 2 /** 3 * Multisite sites administration panel.3 * Multisite Sites Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Multisite -
wp-admin/user-new.php
18 18 19 19 if ( is_multisite() ) { 20 20 function admin_created_user_email( $text ) { 21 /* translators: 1: Site name, 2: site URL, 3: role */21 /* Translators: 1: Site name, 2: site URL, 3: role */ 22 22 return sprintf( __( 'Hi, 23 23 You\'ve been invited to join \'%1$s\' at 24 24 %2$s as a %3$s. -
wp-admin/options-general.php
1 1 <?php 2 2 /** 3 * General settings administration panel.3 * General Settings Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 14 14 15 15 $title = __('General Settings'); 16 16 $parent_file = 'options-general.php'; 17 /* translators: date and time format for exact current time, mainly about timezones, see http://php.net/date */17 /* Translators: date and time format for exact current time, mainly about timezones, see http://php.net/date */ 18 18 $timezone_format = _x('Y-m-d G:i:s', 'timezone date format'); 19 19 20 20 /** -
wp-admin/options-media.php
1 1 <?php 2 2 /** 3 * Media settings administration panel.3 * Media Settings Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration -
wp-admin/my-sites.php
1 1 <?php 2 2 /** 3 * My Sites dashboard.3 * My Sites Dashboard. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Multisite -
wp-admin/upload.php
1 1 <?php 2 2 /** 3 * Media Library administration panel.3 * Media Library Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration -
wp-admin/edit-form-comment.php
54 54 55 55 <div class="misc-pub-section curtime misc-pub-section-last"> 56 56 <?php 57 // translators: Publish box date formt, see http://php.net/date57 // Translators: Publish box date format, see http://php.net/date 58 58 $datef = __( 'M j, Y @ G:i' ); 59 59 $stamp = __('Submitted on: <b>%1$s</b>'); 60 60 $date = date_i18n( $datef, strtotime( $comment->comment_date ) ); -
wp-admin/edit-form-advanced.php
34 34 2 => __('Custom field updated.'), 35 35 3 => __('Custom field deleted.'), 36 36 4 => __('Post updated.'), 37 /* translators: %s: date and time of the revision */37 /* translators: %s: Date and time of the revision */ 38 38 5 => isset($_GET['revision']) ? sprintf( __('Post restored to revision from %s'), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, 39 39 6 => sprintf( __('Post published. <a href="%s">View post</a>'), esc_url( get_permalink($post_ID) ) ), 40 40 7 => __('Post saved.'), … … 84 84 $nonce_action = 'update-' . $post_type . '_' . $post_ID; 85 85 $form_extra .= "<input type='hidden' id='post_ID' name='post_ID' value='" . esc_attr($post_ID) . "' />"; 86 86 87 // Detect if there exists an autosave newer than the postand if that autosave is different than the post87 // Detect if an autosave newer than the post exists and if that autosave is different than the post 88 88 if ( $autosave && mysql2date( 'U', $autosave->post_modified_gmt, false ) > mysql2date( 'U', $post->post_modified_gmt, false ) ) { 89 89 foreach ( _wp_post_revision_fields() as $autosave_field => $_autosave_field ) { 90 90 if ( normalize_whitespace( $autosave->$autosave_field ) != normalize_whitespace( $post->$autosave_field ) ) { -
wp-admin/ms-upgrade-network.php
1 1 <?php 2 2 /** 3 * Multisite upgrade administration panel.3 * Multisite Upgrade Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Multisite -
wp-admin/plugin-install.php
5 5 * @package WordPress 6 6 * @subpackage Administration 7 7 */ 8 // TODO route this page svia a specific iframe handler instead of the do_action below8 // TODO route this page via a specific iframe handler instead of the do_action below 9 9 if ( !defined( 'IFRAME_REQUEST' ) && isset( $_GET['tab'] ) && ( 'plugin-information' == $_GET['tab'] ) ) 10 10 define( 'IFRAME_REQUEST', true ); 11 11 -
wp-admin/freedoms.php
1 1 <?php 2 2 /** 3 * Your Rights administration panel.3 * Your Rights Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration -
wp-admin/nav-menus.php
280 280 if ( isset( $_POST['menu-locations'] ) ) 281 281 set_theme_mod( 'nav_menu_locations', array_map( 'absint', $_POST['menu-locations'] ) ); 282 282 283 // Add Menu283 // Add menu 284 284 if ( 0 == $nav_menu_selected_id ) { 285 285 $new_menu_title = trim( esc_html( $_POST['menu-name'] ) ); 286 286 -
wp-admin/options-discussion.php
1 1 <?php 2 2 /** 3 * Discussion settings administration panel.3 * Discussion Settings Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 161 161 162 162 <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> 163 163 164 <?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? ?>164 <?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? ?> 165 165 166 166 <table class="form-table"> 167 167 <tr valign="top"> … … 182 182 183 183 <?php 184 184 $ratings = array( 185 /* translators: Content suitability rating: http://bit.ly/89QxZA */185 /* Translators: Content suitability rating: http://bit.ly/89QxZA */ 186 186 'G' => __('G — Suitable for all audiences'), 187 /* translators: Content suitability rating: http://bit.ly/89QxZA */187 /* Translators: Content suitability rating: http://bit.ly/89QxZA */ 188 188 'PG' => __('PG — Possibly offensive, usually for audiences 13 and above'), 189 /* translators: Content suitability rating: http://bit.ly/89QxZA */189 /* Translators: Content suitability rating: http://bit.ly/89QxZA */ 190 190 'R' => __('R — Intended for adult audiences above 17'), 191 /* translators: Content suitability rating: http://bit.ly/89QxZA */191 /* Translators: Content suitability rating: http://bit.ly/89QxZA */ 192 192 'X' => __('X — Even more mature than above') 193 193 ); 194 194 foreach ($ratings as $key => $rating) : -
wp-admin/ms-users.php
1 1 <?php 2 2 /** 3 * Multisite users administration panel.3 * Multisite Users Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Multisite -
wp-admin/plugins.php
1 1 <?php 2 2 /** 3 * Plugins administration panel.3 * Plugins Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 198 198 exit; 199 199 } 200 200 201 $plugins = array_filter($plugins, 'is_plugin_inactive'); // Do not allow to delete Activated plugins.201 $plugins = array_filter($plugins, 'is_plugin_inactive'); // Do not allow to delete activated plugins. 202 202 if ( empty( $plugins ) ) { 203 203 wp_redirect( self_admin_url( "plugins.php?error=true&main=true&plugin_status=$status&paged=$page&s=$s" ) ); 204 204 exit; … … 255 255 $data_to_delete = false; 256 256 foreach ( $plugin_info as $plugin ) { 257 257 if ( $plugin['is_uninstallable'] ) { 258 /* translators: 1: plugin name, 2: plugin author */258 /* Translators: 1: plugin name, 2: plugin author */ 259 259 echo '<li>', sprintf( __( '<strong>%1$s</strong> by <em>%2$s</em> (will also <strong>delete its data</strong>)' ), esc_html($plugin['Name']), esc_html($plugin['AuthorName']) ), '</li>'; 260 260 $data_to_delete = true; 261 261 } else { 262 /* translators: 1: plugin name, 2: plugin author */262 /* Translators: 1: plugin name, 2: plugin author */ 263 263 echo '<li>', sprintf( __('<strong>%1$s</strong> by <em>%2$s</em>' ), esc_html($plugin['Name']), esc_html($plugin['AuthorName']) ), '</li>'; 264 264 } 265 265 } -
wp-admin/credits.php
1 1 <?php 2 2 /** 3 * Credits administration panel.3 * Credits Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration -
wp-admin/user-edit.php
1 1 <?php 2 2 /** 3 * Edit user administration panel.3 * Edit User Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 36 36 else 37 37 $parent_file = 'profile.php'; 38 38 39 // contextual help - choose Help on the top right of admin panel to preview this.39 // Contextual help - choose Help on the top right of admin panel to preview this. 40 40 add_contextual_help($current_screen, 41 41 '<p>' . __('Your profile contains information about you (your “account”) as well as some personal options related to using WordPress.') . '</p>' . 42 42 '<p>' . __('You can change your password, turn on keyboard shortcuts, change the color scheme of your WordPress administration screens, and turn off the WYSIWYG (Visual) editor, among other things.') . '</p>' . … … 115 115 if ( $user->user_login && isset( $_POST[ 'email' ] ) && is_email( $_POST[ 'email' ] ) && $wpdb->get_var( $wpdb->prepare( "SELECT user_login FROM {$wpdb->signups} WHERE user_login = %s", $user->user_login ) ) ) 116 116 $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->signups} SET user_email = %s WHERE user_login = %s", $_POST[ 'email' ], $user_login ) ); 117 117 118 // WPMU must delete the user from the current blog if WP added himafter editing.118 // Multisite must delete the user from the current blog if WordPress added user after editing. 119 119 $delete_role = false; 120 120 $blog_prefix = $wpdb->get_blog_prefix(); 121 121 if ( $user_id != $current_user->ID ) { … … 127 127 } 128 128 if ( !isset( $errors ) || ( isset( $errors ) && is_object( $errors ) && false == $errors->get_error_codes() ) ) 129 129 $errors = edit_user($user_id); 130 if ( $delete_role ) // stops usersbeing added to current blog when they are edited130 if ( $delete_role ) // Stops users from being added to current blog when they are edited 131 131 delete_user_meta( $user_id, $blog_prefix . 'capabilities' ); 132 132 133 133 if ( is_multisite() && is_network_admin() && !IS_PROFILE_PAGE && current_user_can( 'manage_network_options' ) && !isset($super_admins) && empty( $_POST['super_admin'] ) == is_super_admin( $user_id ) ) … … 217 217 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Show Admin Bar') ?></span></legend> 218 218 <label for="admin_bar_front"> 219 219 <input name="admin_bar_front" type="checkbox" id="admin_bar_front" value="1" <?php checked( _get_admin_bar_pref( 'front', $profileuser->ID ) ); ?> /> 220 <?php /* translators: Show admin bar when viewing site */ _e( 'when viewing site' ); ?></label><br />220 <?php /* Translators: Show admin bar when viewing site */ _e( 'when viewing site' ); ?></label><br /> 221 221 <label for="admin_bar_admin"> 222 222 <input name="admin_bar_admin" type="checkbox" id="admin_bar_admin" value="1" <?php checked( _get_admin_bar_pref( 'admin', $profileuser->ID ) ); ?> /> 223 <?php /* translators: Show admin bar in dashboard */ _e( 'in dashboard' ); ?></label></fieldset>223 <?php /* Translators: Show admin bar in dashboard */ _e( 'in dashboard' ); ?></label></fieldset> 224 224 </td> 225 225 </tr> 226 226 <?php do_action('personal_options', $profileuser); ?> … … 247 247 $user_roles = $profileuser->roles; 248 248 $user_role = array_shift($user_roles); 249 249 250 // print the full list of roles with the primary one selected.250 // Print the full list of roles with the primary one selected. 251 251 wp_dropdown_roles($user_role); 252 252 253 // print the 'no role' option. Make it selected if the user has no role yet.253 // Print the 'no role' option. Make it selected if the user has no role yet. 254 254 if ( $user_role ) 255 255 echo '<option value="">' . __('— No role for this site —') . '</option>'; 256 256 else -
wp-admin/options-reading.php
1 1 <?php 2 2 /** 3 * Reading settings administration panel.3 * Reading Settings Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration -
wp-admin/ms-themes.php
1 1 <?php 2 2 /** 3 * Multisite themes administration panel.3 * Multisite Themes Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Multisite -
wp-admin/setup-config.php
29 29 error_reporting(0); 30 30 31 31 /**#@+ 32 * These three defin es are required to allow us to use require_wp_db() to load32 * These three definitions are required to allow us to use require_wp_db() to load 33 33 * the database class while being wp-content/db.php aware. 34 34 * @ignore 35 35 */ -
wp-admin/ms-admin.php
1 1 <?php 2 2 /** 3 * Multisite administration panel.3 * Multisite Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Multisite -
wp-admin/install.php
138 138 <?php 139 139 } // end display_setup_form() 140 140 141 // Let's check to make sure W Pisn't already installed.141 // Let's check to make sure WordPress isn't already installed. 142 142 if ( is_blog_installed() ) { 143 143 display_header(); 144 144 die( '<h1>' . __( 'Already Installed' ) . '</h1><p>' . __( 'You appear to have already installed WordPress. To reinstall please clear your old database tables first.' ) . '</p><p class="step"><a href="../wp-login.php" class="button">' . __('Log In') . '</a></p></body></html>' ); -
wp-admin/theme-install.php
1 1 <?php 2 2 /** 3 * Install theme administration panel.3 * Install Theme Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration -
wp-admin/widgets.php
1 1 <?php 2 2 /** 3 * Widgets administration panel.3 * Widgets Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 46 46 $help .= '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'; 47 47 add_contextual_help($current_screen, $help); 48 48 49 // register the inactive_widgets area as sidebar49 // Register the inactive_widgets area as sidebar 50 50 register_sidebar(array( 51 51 'name' => __('Inactive Widgets'), 52 52 'id' => 'wp_inactive_widgets', … … 62 62 if ( empty( $sidebars_widgets ) ) 63 63 $sidebars_widgets = wp_get_widget_defaults(); 64 64 65 // look for "lost" widgets, this has to run at least on each theme change65 // Look for "lost" widgets, this has to run at least on each theme change 66 66 function retrieve_widgets() { 67 67 global $wp_registered_widget_updates, $wp_registered_sidebars, $sidebars_widgets, $wp_registered_widgets; 68 68 … … 86 86 } 87 87 } 88 88 89 // if new theme has less sidebars than the old theme89 // If new theme has less sidebars than the old theme 90 90 if ( !empty($sidebars_widgets) ) { 91 91 foreach ( $sidebars_widgets as $lost => $val ) { 92 92 if ( is_array($val) ) … … 94 94 } 95 95 } 96 96 97 // discard invalid, theme-specific widgets from sidebars97 // Discard invalid, theme-specific widgets from sidebars 98 98 $shown_widgets = array(); 99 99 foreach ( $_sidebars_widgets as $sidebar => $widgets ) { 100 100 if ( !is_array($widgets) ) … … 112 112 $sidebars_widgets = $_sidebars_widgets; 113 113 unset($_sidebars_widgets, $_widgets); 114 114 115 // find hidden/lost multi-widget instances115 // Find hidden/lost multi-widget instances 116 116 $lost_widgets = array(); 117 117 foreach ( $wp_registered_widgets as $key => $val ) { 118 118 if ( in_array($key, $shown_widgets, true) ) … … 171 171 $id_base = $_POST['id_base']; 172 172 $sidebar = isset($sidebars_widgets[$sidebar_id]) ? $sidebars_widgets[$sidebar_id] : array(); 173 173 174 // delete174 // Delete 175 175 if ( isset($_POST['removewidget']) && $_POST['removewidget'] ) { 176 176 177 177 if ( !in_array($widget_id, $sidebar, true) ) { … … 198 198 199 199 $sidebars_widgets[$sidebar_id] = $sidebar; 200 200 201 // remove old position201 // Remove old position 202 202 if ( !isset($_POST['delete_widget']) ) { 203 203 foreach ( $sidebars_widgets as $key => $sb ) { 204 204 if ( is_array($sb) ) … … 253 253 254 254 $id_base = isset($control['id_base']) ? $control['id_base'] : $control['id']; 255 255 256 // show the widget form256 // Show the widget form 257 257 $width = ' style="width:' . max($control['width'], 350) . 'px"'; 258 258 $key = isset($_GET['key']) ? (int) $_GET['key'] : 0; 259 259 -
wp-admin/update-core.php
1 1 <?php 2 2 /** 3 * Update Core administration panel.3 * Update Core Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 134 134 } 135 135 136 136 echo '<p>'; 137 /* translators: %1 date, %2 time. */137 /* Translators: %1 date, %2 time. */ 138 138 printf( __('Last checked on %1$s at %2$s.'), date_i18n( get_option( 'date_format' ) ), date_i18n( get_option( 'time_format' ) ) ); 139 139 echo ' <a class="button" href="' . esc_url( self_admin_url('update-core.php') ) . '">' . __( 'Check Again' ) . '</a>'; 140 140 echo '</p>'; … … 304 304 } 305 305 306 306 /** 307 * Upgrade WordPress core display.307 * Upgrade WordPress Core Display. 308 308 * 309 309 * @since 2.7 310 310 * … … 417 417 } elseif ( 'do-core-upgrade' == $action || 'do-core-reinstall' == $action ) { 418 418 check_admin_referer('upgrade-core'); 419 419 420 // do the (un)dismiss actions before headers,420 // Do the (un)dismiss actions before headers, 421 421 // so that they can redirect 422 422 if ( isset( $_POST['dismiss'] ) ) 423 423 do_dismiss_core_update(); -
wp-admin/options-writing.php
1 1 <?php 2 2 /** 3 * Writing settings administration panel.3 * Writing Settings Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration -
wp-admin/themes.php
1 1 <?php 2 2 /** 3 * Themes administration panel.3 * Themes Administration Panel. 4 4 * 5 5 * @package WordPress 6 6 * @subpackage Administration … … 89 89 <img src="<?php echo $ct->theme_root_uri . '/' . $ct->stylesheet . '/' . $ct->screenshot; ?>" alt="<?php _e('Current theme preview'); ?>" /> 90 90 <?php endif; ?> 91 91 <h4><?php 92 /* translators: 1: theme title, 2: theme version, 3: theme author */92 /* Translators: 1: theme title, 2: theme version, 3: theme author */ 93 93 printf(__('%1$s %2$s by %3$s'), $ct->title, $ct->version, $ct->author) ; ?></h4> 94 94 <p class="theme-description"><?php echo $ct->description; ?></p> 95 95 <div class="theme-options">