You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Infinum/Sniffs/Shortcodes/DisallowDoShortcodeSniff.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ public function process( PHP_CodeSniffer_File $phpcsFile, $stackPtr ) {
37
37
$tokens = $phpcsFile->getTokens();
38
38
$token = $tokens[ $stackPtr ];
39
39
40
-
if ( preg_match( '`do_shortcode`im', $token['content'] ) > 0 ) {
40
+
if ( preg_match( '`^do_shortcode`i', $token['content'] ) > 0 ) {
41
41
$phpcsFile->addWarning( 'Do not include do_shortcode() function in theme files. Use shortcode callback function instead.' , $stackPtr, 'do_shortcodeDetected' );
0 commit comments