Skip to content

Commit 981b7d4

Browse files
authored
PrefixAllGlobals: minor efficiency tweak (#1822)
PrefixAllGlobals: minor efficiency tweak
2 parents b922e44 + ef7f86e commit 981b7d4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,12 @@ public function register() {
241241
* @return array
242242
*/
243243
public function getGroups() {
244-
$this->target_functions = $this->hookInvokeFunctions;
244+
$this->target_functions = $this->hookInvokeFunctions;
245+
unset(
246+
$this->target_functions['do_action_deprecated'],
247+
$this->target_functions['apply_filters_deprecated']
248+
);
249+
245250
$this->target_functions['define'] = true;
246251

247252
return parent::getGroups();
@@ -793,11 +798,6 @@ protected function process_list_assignment( $stackPtr ) {
793798
*/
794799
public function process_parameters( $stackPtr, $group_name, $matched_content, $parameters ) {
795800

796-
// Ignore deprecated hook names.
797-
if ( strpos( $matched_content, '_deprecated' ) > 0 ) {
798-
return;
799-
}
800-
801801
// No matter whether it is a constant definition or a hook call, both use the first parameter.
802802
if ( ! isset( $parameters[1] ) ) {
803803
return;

0 commit comments

Comments
 (0)