Make WordPress Core

Opened 18 years ago

Closed 17 years ago

#7367 closed defect (bug) (fixed)

Redundant logic in script and style queuing classes

Reported by: sambauers Owned by:
Priority: low Milestone:
Component: Optimization Version: 2.6
Severity: minor Keywords: dev-feedback
Cc: Focuses:

Description

I am pretty sure that the changes here:

http://trac.wordpress.org/changeset/8301/trunk/wp-includes/class.wp-scripts.php

And here:

http://trac.wordpress.org/changeset/8301/trunk/wp-includes/class.wp-styles.php

Introduce redundant code.

WP_CONTENT_URL should always be a fully qualified URL so it will match the first condition and never reach the second.

I think these should be reverted, but maybe I'm just not reading it right.

Change History (8)

#1 @anonymized_218323
18 years ago

It appears that if the $src is relative, it will try to add on the WP_CONTENT_URL to the $src to ensure that the relative link is pointing to the right location.

I don't believe it is about WP_CONTENT_URL and about the location of the CSS or Script file.

#2 @anonymized_218323
18 years ago

  • Milestone 2.6.12.7

Moving to 2.7, since it will have to be added to trunk first.

#3 @sambauers
18 years ago

  • Milestone 2.72.8

This is not critical for 2.7

#4 @jacobsantos
18 years ago

  • Component GeneralOptimization

#5 @jacobsantos
18 years ago

  • Milestone 2.8
  • Resolutioninvalid
  • Status newclosed

The change is intentional.

#6 @sambauers
18 years ago

  • Keywords BackPress added
  • Milestone2.8
  • Resolution invalid
  • Status closedreopened
  • Summary Maybe redundant logic in script and style queuing classesRedundant logic in script and style queuing classes

If the logic is followed in all cases except misconfiguration this additional part of the condition is definately redundant. It also diverges from the original abstract BackPress class by imtroducing a WordPress specific constant.

#7 @Denis-de-Bernardy
17 years ago

  • Keywords dev-feedback added; BackPress removed

#8 @Denis-de-Bernardy
17 years ago

  • Milestone 2.8
  • Resolutionfixed
  • Status reopenedclosed

ticket is no longer valid in trunk.

Note: See TracTickets for help on using tickets.