WordPress.org

Make WordPress Core

Opened 15 months ago

Closed 3 months ago

Last modified 2 months ago

#37855 closed defect (bug) (invalid)

Clean WordPress Head - Group together related tags

Reported by: ramiy Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: Bootstrap/Load Keywords: has-patch
Focuses: Cc:

Description

This is a request from the Israeli WordPress Community. I'm trying to make some of them get involved in WordPress core development.

Two WordPress users from the SEO industry, asked me to make the WordPress <head> cleaner. To update the site's source and group together the <meta> and <link rel="..."> tags.

Not the scripts and stylesheets! Other tags like: RSD, WLW, noindex, canonical, shortlink, icon and few others. All those functions echo some kind of <link rel="..."> tag. Changing those tags position in the head has no effect on the site itself.

Attachments (3)

37855.patch (3.9 KB) - added by ramiy 15 months ago.
Add $priority parameter to wp_head actions
37855.2.patch (4.2 KB) - added by ramiy 15 months ago.
re-order the wp_head actions to match the $priority parameter
37855-result.png (460.1 KB) - added by ramiy 15 months ago.

Download all attachments as: .zip

Change History (10)

#1 @ramiy
15 months ago

  • Severity changed from normal to minor

@ramiy
15 months ago

Add $priority parameter to wp_head actions

@ramiy
15 months ago

re-order the wp_head actions to match the $priority parameter

#2 @ramiy
15 months ago

  • Keywords has-patch added

Easy fix, playing with the default-filters.php.

@ramiy
15 months ago

#3 @GaryJ
15 months ago

@ramiy Your patch is going to break multiple plugins and themes that already unhook various items from wp_head, because the priority has changed.

#4 @jorbin
15 months ago

1) @GaryJ is correct.
2) Even if core changes the order, this will always be thrown off by plugins.
3) What is the actual benefit to this? Is it perceived readability?

This ticket was mentioned in Slack in #core by jorbin. View the logs.


14 months ago

#6 @ramiy
3 months ago

  • Resolution set to invalid
  • Status changed from new to closed

#7 @netweb
2 months ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.