Skip to content

Duplicate ID defined in some instances #67

Description

@trepmal

This ID:

echo apply_filters( 'ngx_http_concat_style_loader_tag', "<link rel='stylesheet' id='$media-css-$idx' href='$href' type='text/css' media='$media' />\n", $handles, $href, $media );

the do_items() function is called twice, once for the head, once for the footer. This means the loop that sets the number in the ID is run twice, resetting on the second instance, resulting in the doubled ID.

Simplest fix might be to increment the number sufficiently on one of the loops. e.g. adding between these lines

foreach( $stylesheets as $idx => $stylesheets_group ) {
foreach( $stylesheets_group as $media => $css ) {

 if ( $group ) { $idx += 1000; }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions