Ticket #7367 (reopened defect (bug))

Opened 6 months ago

Last modified 2 weeks ago

Redundant logic in script and style queuing classes

Reported by: sambauers Assigned to: anonymous
Priority: low Milestone: 2.8
Component: Optimization Version: 2.6
Severity: minor Keywords: BackPress
Cc:

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

07/21/08 17:52:40 changed by santosj

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.

08/13/08 20:51:32 changed by santosj

  • milestone changed from 2.6.1 to 2.7.

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

10/14/08 17:59:26 changed by sambauers

  • milestone changed from 2.7 to 2.8.

This is not critical for 2.7

10/23/08 01:17:58 changed by jacobsantos

  • component changed from General to Optimization.

12/27/08 23:54:54 changed by jacobsantos

  • status changed from new to closed.
  • resolution set to invalid.
  • milestone deleted.

The change is intentional.

12/29/08 08:00:26 changed by sambauers

  • keywords set to BackPress.
  • status changed from closed to reopened.
  • summary changed from Maybe redundant logic in script and style queuing classes to Redundant logic in script and style queuing classes.
  • resolution deleted.
  • milestone set to 2.8.

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.