*/
/** WordPress Administration Bootstrap */
-require_once('./admin.php');
+require_once( dirname( __FILE__ ) . '/admin.php' );
if ( is_multisite() && ! is_network_admin() ) {
wp_redirect( network_admin_url( 'plugin-editor.php' ) );
$plugins = get_plugins();
-if ( empty($plugins) )
- wp_die( __('There are no plugins installed on this site.') );
+if ( empty( $plugins ) ) {
+ include( ABSPATH . 'wp-admin/admin-header.php' );
+ ?>
+ <div class="wrap">
+ <h2><?php echo esc_html( $title ); ?></h2>
+ <div id="message" class="error"><p><?php _e( 'You do not appear to have any plugins available at this time.' ); ?></p></div>
+ </div>
+ <?php
+ include( ABSPATH . 'wp-admin/admin-footer.php' );
+ exit;
+}
if ( $file ) {
$plugin = $file;
}
exit;
-break;
-
default:
if ( isset($_GET['liveupdate']) ) {
// List of allowable extensions
$editable_extensions = array('php', 'txt', 'text', 'js', 'css', 'html', 'htm', 'xml', 'inc', 'include');
- $editable_extensions = (array) apply_filters('editable_extensions', $editable_extensions);
+
+ /**
+ * Filter file type extensions editable in the plugin editor.
+ *
+ * @since 2.8.0
+ *
+ * @param array $editable_extensions An array of editable plugin file extensions.
+ */
+ $editable_extensions = (array) apply_filters( 'editable_extensions', $editable_extensions );
if ( ! is_file($real_file) ) {
wp_die(sprintf('<p>%s</p>', __('No such file exists! Double check the name and try again.')));
'<p><strong>' . __('For more information:') . '</strong></p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Plugins_Editor_Screen" target="_blank">Documentation on Editing Plugins</a>') . '</p>' .
'<p>' . __('<a href="http://codex.wordpress.org/Writing_a_Plugin" target="_blank">Documentation on Writing Plugins</a>') . '</p>' .
- '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
+ '<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
);
require_once(ABSPATH . 'wp-admin/admin-header.php');
</div>
<?php endif; ?>
<div class="wrap">
-<?php screen_icon(); ?>
<h2><?php echo esc_html( $title ); ?></h2>
<div class="fileedit-sub">