Support » Plugins » Hacks » Edit Subdirectory stylesheets

  • Resolved Shaped Pixels

    (@shaped-pixels)


    I noticed that the WordPress Codex http://codex.wordpress.org/Editing_Files states you can use the built-in editor to edit HTML, PHP, CSS, and TXT files. However, only PHP and the primary style.css shows up in the list.

    But the main thing here is that I was planning to place a couple CSS files in a subdirectory of the theme /css/ but it’s not finding them.

    Is there something that can be done to have the editor show these extra CSS files, but also the HTML and TXT files (as it appears it’s not).

    Thanks in advance.

    Note: Yes, all files are writable as this is local on my XAMPP

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    Sorry, no. The editor does what it does, there’s no way to alter this outside of directly hacking core files, a very bad idea.

    The plugin editor is more liberal in what files you can edit, so in a sense the Codex is correct, although incomplete and misleading.

    Why are you using the theme editor on a local installation? Why not open the files directly into a nice programmer’s editor? Even for remote servers, I’m not sure why anyone would seriously use these editors.

    IMO, the online editors, while being convenient, also leave much to be desired. They do not create backup files, so unless one had the foresight to download some backups, there is no way to revert from some stupid error on my part. If I’m going through the trouble of using FTP for backups, it’s not any more trouble to edit a local copy and upload the new version. Then I can use my favorite syntax highlighting programmer’s editor.

    The other problem is if I inadvertently introduce a fatal PHP error, it could make the online editor inaccessible. Then it’s back to FTP to revert to a backed up version. I may as well just use FTP to start with.

    Because of these issues, in addition to the limitations you’ve mentioned, I think you should adjust your workflow to not involve the online editors at all. You can then disable them, making your site a little bit more secure. (define ‘DISALLOW_FILE_EDIT’ as true)

    Actually… not long after I posted my question, I realized that editing theme files is not a good idea anyway unless it’s a child theme. So it’s best to not pursue this one.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Edit Subdirectory stylesheets’ is closed to new replies.