Changeset 47119 for trunk/src/wp-admin/includes/misc.php
- Timestamp:
- 01/29/2020 12:33:45 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/misc.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/misc.php
r47088 r47119 179 179 } 180 180 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. 182 182 $pre_lines = array(); 183 183 $post_lines = array(); … … 202 202 } 203 203 204 // Check to see if there was a change 204 // Check to see if there was a change. 205 205 if ( $existing_lines === $insertion ) { 206 206 flock( $fp, LOCK_UN ); … … 210 210 } 211 211 212 // Generate the new file data 212 // Generate the new file data. 213 213 $new_file_data = implode( 214 214 "\n", … … 222 222 ); 223 223 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. 225 225 fseek( $fp, 0 ); 226 226 $bytes = fwrite( $fp, $new_file_data ); … … 297 297 $web_config_file = $home_path . 'web.config'; 298 298 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. 300 300 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 ) ) ) { 301 301 $rule = $wp_rewrite->iis7_url_rewrite_rules( false ); … … 599 599 600 600 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. 602 602 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] ) ) { 603 603 $ignore_functions[] = $tokens[ $t ][1]; 604 604 } 605 // Add this to our stack of unique references 605 // Add this to our stack of unique references. 606 606 $functions[] = $tokens[ $t ][1]; 607 607 } … … 674 674 case 'export_personal_data_requests_per_page': 675 675 case 'remove_personal_data_requests_per_page': 676 // Network admin 676 // Network admin. 677 677 case 'sites_network_per_page': 678 678 case 'users_network_per_page': … … 703 703 * @param int $value The number of rows to use. 704 704 */ 705 $value = apply_filters( 'set-screen-option', false, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores705 $value = apply_filters( 'set-screen-option', false, $option, $value ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores 706 706 707 707 if ( false === $value ) { … … 761 761 */ 762 762 function iis7_delete_rewrite_rule( $filename ) { 763 // If configuration file does not exist then rules also do not exist so there is nothing to delete763 // If configuration file does not exist then rules also do not exist, so there is nothing to delete. 764 764 if ( ! file_exists( $filename ) ) { 765 765 return true; … … 818 818 $xpath = new DOMXPath( $doc ); 819 819 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. 821 821 $wordpress_rules = $xpath->query( '/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]' ); 822 822 if ( $wordpress_rules->length > 0 ) { … … 824 824 } 825 825 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. 827 827 $xmlnodes = $xpath->query( '/configuration/system.webServer/rewrite/rules' ); 828 828 if ( $xmlnodes->length > 0 ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)