• Is there a way to change which filetypes can be edited for appearance>editor? I can see in the sources theres an $allowed_files variable but.. wondering if anyones every done it?

    Specifically: I am using *.tpl and *.scss for a theme I don’t want users to be able to edit the complied css/html just the pre-processed files. I’m using a bootstrapper to parse SASS/SCSS and templates then minifying etc.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Sure you can:

    a) you can include a Child Theme and if you’re using basic setup, users won’t see anything else other than what’s in the Child Theme.

    b) roll management and/or user privileges if they’re not admin/moderator .etc they will not be able to edit/see what you don’t want them to see 🙂

    Thanks,
    Emil

    Thread Starter alex-m

    (@alex-m)

    Thanks Emil, I’m more interested in specifying the file types rather than changing directory structures or messing with the user permissions.

    For instance; there has to be a file somewhere in wordpress which says that the theme>editor can edit “.php” and “.css” as there are a load of other files in a theme which don’t show up. What I’m interested in is:
    can these be changed to other file extensions and if so what would be the hooks/actions etc to use?

    Thanks very much indeed 🙂

    You’re not changing the permission and/or directories, simply don’t give them permission to editor and problem solved. This can be done from your (admin) end.

    No need to overcomplicate simple things, WordPress is well-capable of handling this 🙂

    Emil

    Thread Starter alex-m

    (@alex-m)

    Ah yes but can WordPress be configured to edit files with .scss and .tpl extensions and definitely not edit .css and .php files?

    Thanks very much Emil.

    Via http://sass-lang.com ? yes it can 🙂

    Thread Starter alex-m

    (@alex-m)

    Hey Emil,
    Yeah, I’ve been using SASS for a while, but the editor in WordPress Admin>Appearance>Editor can NOT edit SASS files.
    That’s the problem.
    Thanks
    A

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can I specify which files the appearance>editor can edit’ is closed to new replies.