File "ValidHookNameStandard.xml"

Full Path: /home/warrior1/public_html/wp-content/themes/storefront/vendor/wp-coding-standards/wpcs/WordPress/Docs/NamingConventions/ValidHookNameStandard.xml
File size: 944 bytes
MIME-type: text/xml
Charset: utf-8

<?xml version="1.0"?>
<documentation title="Valid Hook Name">
    <standard>
    <![CDATA[
    Use lowercase letters in action and filter names. Separate words using underscores.
    ]]>
    </standard>
    <code_comparison>
        <code title="Valid: lowercase hook name.">
        <![CDATA[
do_action( <em>'prefix_hook_name'</em>, $var );
        ]]>
        </code>
        <code title="Invalid: mixed case hook name.">
        <![CDATA[
do_action( <em>'Prefix_Hook_NAME'</em>, $var );
        ]]>
        </code>
    </code_comparison>
    <code_comparison>
        <code title="Valid: words separated by underscores.">
        <![CDATA[
apply_filters( <em>'prefix_hook_name'</em>, $var );
        ]]>
        </code>
        <code title="Invalid: using non-underscore characters to separate words.">
        <![CDATA[
apply_filters( <em>'prefix\hook-name'</em>, $var );
        ]]>
        </code>
    </code_comparison>
</documentation>