[wp-trac] [WordPress Trac] #57379: Node Modules in sub-directories not getting ignored while exporting the theme, and a way to disable the theme export (was: A Way to Disable Export Theme)
WordPress Trac
noreply at wordpress.org
Thu Jul 4 01:14:56 UTC 2024
#57379: Node Modules in sub-directories not getting ignored while exporting the
theme, and a way to disable the theme export
----------------------------+---------------------
Reporter: unsalkorkmaz | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7
Component: Administration | Version: 6.1.1
Severity: major | Resolution:
Keywords: has-patch | Focuses:
----------------------------+---------------------
Changes (by rajinsharwar):
* milestone: Awaiting Review => 6.7
Comment:
I have fixed the issue where node_modules were not ignored in the
subdirectories.
Also now, anyone can create a new user capability, and using the new
filter "**allowed_user_role_to_export_theme**", use that to add
restrictions over that Export Functionality. Something like this:
{{{#!php
add_filter( 'allowed_user_role_to_export_theme', function( $role ){
$role = 'my_custom_user_capability';
return $role;
} );
}}}
In this way, instead of the default capability "**edit_theme_options**",
the "**my_custom_user_capability**" will be used while checking for
permissions.
Also, updated the title of the ticket to mention the change about
node_modules. Slating for 6.7 release.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57379#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list