Opened 12 years ago
Last modified 23 months ago
#28855 assigned defect (bug)
Commented add_actions and unused functions in wp-admin/includes/theme-install.php
| Reported by: | michalzuber | Owned by: | chriscct7 |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | 3.9 |
| Severity: | normal | Keywords: | needs-refresh has-patch dev-feedback |
| Cc: | Focuses: | administration |
Description
Only install_themes_upload() is used inwp-admin/theme-install.php:134
mike@mike:~/Sites/wordpress-svn$ grep -r '// add_action' src/
src/wp-admin/includes/theme-install.php:135:// add_action('install_themes_dashboard', 'install_themes_dashboard');
src/wp-admin/includes/theme-install.php:147:// add_action('install_themes_upload', 'install_themes_upload', 10, 0);
src/wp-admin/includes/theme-install.php:179:// add_action('install_themes_search', 'display_themes');
src/wp-admin/includes/theme-install.php:180:// add_action('install_themes_featured', 'display_themes');
src/wp-admin/includes/theme-install.php:181:// add_action('install_themes_new', 'display_themes');
src/wp-admin/includes/theme-install.php:182:// add_action('install_themes_updated', 'display_themes');
mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_dashboard src
src/wp-admin/includes/theme-install.php:96:function install_themes_dashboard() {
src/wp-admin/includes/theme-install.php:135:// add_action('install_themes_dashboard', 'install_themes_dashboard');
mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_upload src
src/wp-admin/includes/theme-install.php:137:function install_themes_upload() {
src/wp-admin/includes/theme-install.php:147:// add_action('install_themes_upload', 'install_themes_upload', 10, 0);
src/wp-admin/theme-install.php:134: <?php install_themes_upload(); ?>
mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_search src
src/wp-admin/includes/theme-install.php:179:// add_action('install_themes_search', 'display_themes');
mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_featured src
src/wp-admin/includes/theme-install.php:180:// add_action('install_themes_featured', 'display_themes');
mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_new src
src/wp-admin/includes/theme-install.php:181:// add_action('install_themes_new', 'display_themes');
mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_updated src
src/wp-admin/includes/theme-install.php:182:// add_action('install_themes_updated', 'display_themes');
display_themes is used only in the same file wp-admin/includes/theme-install.php, but in the commented add_actions. Should that function be deprecated?
mike@mike:~/Sites/wordpress-svn$ grep -r display_themes src
src/wp-admin/includes/theme-install.php:122:function display_themes() {
src/wp-admin/includes/theme-install.php:132:// add_action('install_themes_search', 'display_themes');
src/wp-admin/includes/theme-install.php:133:// add_action('install_themes_featured', 'display_themes');
src/wp-admin/includes/theme-install.php:134:// add_action('install_themes_new', 'display_themes');
src/wp-admin/includes/theme-install.php:135:// add_action('install_themes_updated', 'display_themes');
Attachments (1)
Change History (5)
#4
@
23 months ago
- Keywords dev-feedback added
The commented out //add_action were removed in https://core.trac.wordpress.org/ticket/32529
display_themes does seem to be unused. Do you know anything more about this function @SergeyBiryukov ?
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Removed commented add_action lines