Skip to content

Commit

Permalink
Update EnqueuedResourcesStandard.xml
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsdeBlaauw committed Nov 6, 2019
1 parent 72b5448 commit dbfa653
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions WordPress/Docs/WP/EnqueuedResourcesStandard.xml
Expand Up @@ -9,7 +9,7 @@
<![CDATA[
<em>wp_enqueue_script</em>(
'someScript-js',
'http://someurl/somefile.js',
$path_to_file,
array( 'jquery' ),
'1.0.0',
true
Expand All @@ -18,8 +18,10 @@
</code>
<code title="Invalid: Script is directly embedded in HTML.">
<![CDATA[
<script <em>src="http://someurl/somefile.js"</em>>
</script>
printf(
'<em><script src="%s"></script></em>',
esc_attr( $path_to_file )
);
]]>
</code>
</code_comparison>
Expand All @@ -33,16 +35,18 @@
<![CDATA[
<em>wp_enqueue_style</em>(
'style-name',
'https://example.com/somefile.css',
$path_to_file,
array(),
'1.0.0'
);
]]>
</code>
<code title="Invalid: Stylesheet is directly embedded in HTML.">
<![CDATA[
<link rel="stylesheet"
<em>href="http://someurl/somefile.css"</em> />
printf(
'<em><link rel="stylesheet" href="%s" /></em>',
esc_attr( $path_to_file )
);
]]>
</code>
</code_comparison>
Expand Down

0 comments on commit dbfa653

Please sign in to comment.