Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#23500 closed defect (bug) (duplicate)

Add action hook to Theme Editor

Reported by: biznis86 Owned by:
Priority: normal Milestone:
Component: Themes Version:
Severity: normal Keywords:
Cc:

Description

Just before line 75 of file wp-admin/theme-editor.php, add action hook for developers to plug in. Perhaps sth like:
do_action('theme_editor_files');

This way, developers can hook into file editor and add their own files like stylesheets in subfolders and php files in level 2 subfolders.

Change History (3)

Or just allow editing CSS files in subfolders by editing line 63 to
$style_files = $theme->get_files( 'css', 1 );

This way, level of security will stay the same and developers will gain more space to define theme file structure.

What's the point of having stylesheets in root theme folder anyway?

comment:2 follow-up: ↓ 3   SergeyBiryukov3 months ago

  • Component changed from General to Themes
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

An action wouldn't be helpful there, a filter on $allowed_files would be.

Duplicate of #6531, #14175, and #17333.

comment:3 in reply to: ↑ 2   SergeyBiryukov3 months ago

Replying to SergeyBiryukov:

An action wouldn't be helpful there, a filter on $allowed_files would be.

Related: #22924

Note: See TracTickets for help on using tickets.