Ticket #12670: 12670.001.diff
| File 12670.001.diff, 2.2 KB (added by aaroncampbell, 3 years ago) |
|---|
-
wp-admin/includes/file.php
34 34 'audio.php' => __('Audio Attachment Template'), 35 35 'application.php' => __('Application Attachment Template'), 36 36 'my-hacks.php' => __( 'my-hacks.php (legacy hacks support)' ), 37 '.htaccess'=> __( '.htaccess (for rewrite rules )' ),37 apply_filters( 'access_file_name', '.htaccess' ) => __( '.htaccess (for rewrite rules )' ), 38 38 // Deprecated files 39 39 'wp-layout.css' => __( 'Stylesheet' ), 'wp-comments.php' => __( 'Comments Template' ), 'wp-comments-popup.php' => __( 'Popup Comments Template' )); 40 40 … … 92 92 * @return unknown 93 93 */ 94 94 function get_real_file_to_edit( $file ) { 95 if ('index.php' == $file || '.htaccess'== $file ) {95 if ('index.php' == $file || apply_filters( 'access_file_name', '.htaccess' ) == $file ) { 96 96 $real_file = get_home_path() . $file; 97 97 } else { 98 98 $real_file = WP_CONTENT_DIR . $file; -
wp-admin/includes/misc.php
126 126 global $wp_rewrite; 127 127 128 128 $home_path = get_home_path(); 129 $htaccess_file = $home_path .'.htaccess';129 $htaccess_file = $home_path . apply_filters( 'access_file_name', '.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 132 // else check for write access to the file. -
wp-admin/options-permalink.php
116 116 else 117 117 $writable = false; 118 118 } else { 119 if ( ( ! file_exists($home_path . '.htaccess') && is_writable($home_path) ) || is_writable($home_path . '.htaccess') ) 119 $htaccess_file = $home_path . apply_filters( 'access_file_name', '.htaccess' ); 120 if ( ( ! file_exists($htaccess_file) && is_writable($home_path) ) || is_writable($htaccess_file) ) 120 121 $writable = true; 121 122 else 122 123 $writable = false;