wp-includes/class-wp-styles.php:137Processes a style dependency.
$handlestring$groupint|falseoptionalfalsebool2 hooks fire while WP_Styles::do_item() runs, in this order:
Filters the HTML link tag of an enqueued style.
Filters the HTML link tag of an enqueued style.
public function do_item( $handle, $group = false ) { if ( ! parent::do_item( $handle ) ) { return false; } $obj = $this->registered[ $handle ]; if ( $obj->extra['conditional'] ?? false ) { return false; } if ( null === $obj->ver ) { $ver = ''; } else { $ver = $obj->ver ? $obj->ver : $this->default_version; } if ( isset( $this->args[ $handle ] ) ) { $ver = $ver ? $ver . '&' . $this->args[ $handle ] : $this->args[ $handle ]; } $src = $obj->src; $inline_style = $this->print_inline_style( $handle, false ); if ( $inline_style ) { $processor = new WP_HTML_Tag_Processor( '<style></style>' ); $processor->next_tag(); $processor->set_attribute( 'id', "{$handle}-inline-css" ); $processor->set_modifiable_text( "\n{$inline_style}\n" ); $inline_style_tag = "{$processor->get_updated_html()}\n"; } else { $inline_style_tag = ''; } if ( $this->do_concat ) { if ( is_string( $src ) && $this->in_default_dir( $src ) && ! isset( $obj->extra['alt'] ) ) { $this->concat .= "$handle,"; $this->concat_version .= "$handle$ver"; $this->print_code .= $inline_style; return true; } } $media = $obj->args ?? 'all'; // A single item may alias a set of items, by having dependencies, but no source. if ( ! $src ) { if ( $inline_style_tag ) { if ( $this->do_concat ) { $this->print_html .= $inline_style_tag; } else { echo $inline_style_tag; } } return true; } $href = $this->_css_href( $src, $obj->ver, $handle ); if ( ! $href ) { return true; } $rel = isset( $obj->extra['alt'] ) && $obj->extra['alt'] ? 'alternate stylesheet' : 'stylesheet'; $title = $obj->extra['title'] ?? ''; $tag = sprintf( "<link rel='%s' id='%s-css'%s href='%s' media='%s' />\n", $rel, esc_attr( $handle ), $title ? sprintf( " title='%s'", esc_attr( $title ) ) : '', $href, esc_attr( $media ) ); /** * Filters the HTML link tag of an enqueued style. * * @since 2.6.0Introduced in 2.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/class-wp-styles.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.