Changeset 41376 for trunk/src/wp-admin/plugin-editor.php
- Timestamp:
- 09/13/2017 06:07:48 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/plugin-editor.php
r38745 r41376 116 116 117 117 // List of allowable extensions 118 $editable_extensions = array('php', 'txt', 'text', 'js', 'css', 'html', 'htm', 'xml', 'inc', 'include'); 118 $editable_extensions = array( 119 'bash', 120 'conf', 121 'css', 122 'diff', 123 'htm', 124 'html', 125 'http', 126 'inc', 127 'include', 128 'js', 129 'json', 130 'jsx', 131 'less', 132 'md', 133 'patch', 134 'php', 135 'php3', 136 'php4', 137 'php5', 138 'php7', 139 'phps', 140 'phtml', 141 'sass', 142 'scss', 143 'sh', 144 'sql', 145 'svg', 146 'text', 147 'txt', 148 'xml', 149 'yaml', 150 'yml', 151 ); 119 152 120 153 /** … … 157 190 '<p>' . __('<a href="https://wordpress.org/support/">Support Forums</a>') . '</p>' 158 191 ); 192 193 $settings = wp_enqueue_code_editor( array( 'file' => $real_file ) ); 194 if ( ! empty( $settings ) ) { 195 wp_enqueue_script( 'wp-theme-plugin-editor' ); 196 wp_add_inline_script( 'wp-theme-plugin-editor', sprintf( 'jQuery( function() { wp.themePluginEditor.init( %s ); } )', wp_json_encode( $settings ) ) ); 197 } 159 198 160 199 require_once(ABSPATH . 'wp-admin/admin-header.php');
Note: See TracChangeset
for help on using the changeset viewer.