<?xml version="1.0"?>
<ruleset name="WebSamurai WordPress Coding Standards">
	<description>WordPress Coding Standards for WebSamurai plugin</description>

	<!-- Check all PHP files in the plugin -->
	<file>.</file>

	<!-- Exclude common directories -->
	<exclude-pattern>*/node_modules/*</exclude-pattern>
	<exclude-pattern>*/vendor/*</exclude-pattern>
	<exclude-pattern>*/build/*</exclude-pattern>
	<exclude-pattern>*/dist/*</exclude-pattern>
	<exclude-pattern>*/src/*</exclude-pattern>
	<exclude-pattern>*.js</exclude-pattern>

	<!-- Use WordPress Coding Standards -->
	<rule ref="WordPress"/>
	<rule ref="WordPress-Extra"/>
	<rule ref="WordPress-Docs"/>

	<!-- Check for PHP cross-version compatibility -->
	<config name="testVersion" value="7.4-"/>

	<!-- Allow for plugin-specific text domain -->
	<rule ref="WordPress.WP.I18n">
		<properties>
			<property name="text_domain" type="array">
				<element value="websamurai"/>
			</property>
		</properties>
	</rule>

	<!-- Verify that everything in the global namespace is prefixed -->
	<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
		<properties>
			<property name="prefixes" type="array">
				<element value="websamurai"/>
				<element value="WEBSAMURAI"/>
			</property>
		</properties>
	</rule>
</ruleset>
