Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:33:45 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve comments in some wp-admin files per the documentation standards.

Follow-up to [47084].

Props passoniate, apedog.
Fixes #49223, #49227.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r47088 r47119  
    179179        }
    180180
    181         // Split out the existing file into the preceding lines, and those that appear after the marker
     181        // Split out the existing file into the preceding lines, and those that appear after the marker.
    182182        $pre_lines        = array();
    183183        $post_lines       = array();
    … …  
    202202        }
    203203
    204         // Check to see if there was a change
     204        // Check to see if there was a change.
    205205        if ( $existing_lines === $insertion ) {
    206206                flock( $fp, LOCK_UN );
    … …  
    210210        }
    211211
    212         // Generate the new file data
     212        // Generate the new file data.
    213213        $new_file_data = implode(
    214214                "\n",
    … …  
    222222        );
    223223
    224         // Write to the start of the file, and truncate it to that length
     224        // Write to the start of the file, and truncate it to that length.
    225225        fseek( $fp, 0 );
    226226        $bytes = fwrite( $fp, $new_file_data );
    … …  
    297297        $web_config_file = $home_path . 'web.config';
    298298
    299         // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP
     299        // Using win_is_writable() instead of is_writable() because of a bug in Windows PHP.
    300300        if ( iis7_supports_permalinks() && ( ( ! file_exists( $web_config_file ) && win_is_writable( $home_path ) && $wp_rewrite->using_mod_rewrite_permalinks() ) || win_is_writable( $web_config_file ) ) ) {
    301301                $rule = $wp_rewrite->iis7_url_rewrite_rules( false );
    … …  
    599599
    600600                if ( T_STRING == $tokens[ $t ][0] && ( '(' == $tokens[ $t + 1 ] || '(' == $tokens[ $t + 2 ] ) ) {
    601                         // If it's a function or class defined locally, there's not going to be any docs available
     601                        // If it's a function or class defined locally, there's not going to be any docs available.
    602602                        if ( ( isset( $tokens[ $t - 2 ][1] ) && in_array( $tokens[ $t - 2 ][1], array( 'function', 'class' ) ) ) || ( isset( $tokens[ $t - 2 ][0] ) && T_OBJECT_OPERATOR == $tokens[ $t - 1 ][0] ) ) {
    603603                                $ignore_functions[] = $tokens[ $t ][1];
    604604                        }
    605                         // Add this to our stack of unique references
     605                        // Add this to our stack of unique references.
    606606                        $functions[] = $tokens[ $t ][1];
    607607                }
    … …  
    674674                        case 'export_personal_data_requests_per_page':
    675675                        case 'remove_personal_data_requests_per_page':
    676                                 // Network admin
     676                                // Network admin.
    677677                        case 'sites_network_per_page':
    678678                        case 'users_network_per_page':
    … …  
    703703                                 * @param int      $value  The number of rows to use.
    704704                                 */
    705                                 $value = apply_filters( 'set-screen-option', false, $option, $value );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
     705                                $value = apply_filters( 'set-screen-option', false, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    706706
    707707                                if ( false === $value ) {
    … …  
    761761 */
    762762function iis7_delete_rewrite_rule( $filename ) {
    763         // If configuration file does not exist then rules also do not exist so there is nothing to delete
     763        // If configuration file does not exist then rules also do not exist, so there is nothing to delete.
    764764        if ( ! file_exists( $filename ) ) {
    765765                return true;
    … …  
    818818        $xpath = new DOMXPath( $doc );
    819819
    820         // First check if the rule already exists as in that case there is no need to re-add it
     820        // First check if the rule already exists as in that case there is no need to re-add it.
    821821        $wordpress_rules = $xpath->query( '/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]' );
    822822        if ( $wordpress_rules->length > 0 ) {
    … …  
    824824        }
    825825
    826         // Check the XPath to the rewrite rule and create XML nodes if they do not exist
     826        // Check the XPath to the rewrite rule and create XML nodes if they do not exist.
    827827        $xmlnodes = $xpath->query( '/configuration/system.webServer/rewrite/rules' );
    828828        if ( $xmlnodes->length > 0 ) {
Note: See TracChangeset for help on using the changeset viewer.