PHP Classes

File: vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourcesStandard.xml

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Download Installed Plugin   vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourcesStandard.xml   Download  
File: vendor/wp-coding-standards/wpcs/WordPress/Docs/WP/EnqueuedResourcesStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Download Installed Plugin
Download a WordPress plugin as a ZIP archive
Author: By
Last change:
Date: Yesterday
Size: 1,437 bytes
 

Contents

Class file image Download
<?xml version="1.0"?> <documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd" title="Enqueued Resources" > <standard> <![CDATA[ Scripts must be registered/enqueued via wp_enqueue_script(). ]]> </standard> <code_comparison> <code title="Valid: Script registered and enqueued correctly."> <![CDATA[ <em>wp_enqueue_script</em>( 'someScript-js', $path_to_file, array( 'jquery' ), '1.0.0', true ); ]]> </code> <code title="Invalid: Script is directly embedded in HTML."> <![CDATA[ printf( '<em><script src="%s"></script></em>', esc_url( $path_to_file ) ); ]]> </code> </code_comparison> <standard> <![CDATA[ Stylesheets must be registered/enqueued via wp_enqueue_style(). ]]> </standard> <code_comparison> <code title="Valid: Stylesheet registered and enqueued correctly."> <![CDATA[ <em>wp_enqueue_style</em>( 'style-name', $path_to_file, array(), '1.0.0' ); ]]> </code> <code title="Invalid: Stylesheet is directly embedded in HTML."> <![CDATA[ printf( '<em><link rel="stylesheet" href="%s" /></em>', esc_url( $path_to_file ) ); ]]> </code> </code_comparison> </documentation>