Skip to content

Commit 60a279e

Browse files
committed
Update Hook_Registry validation to use is_numeric() for consistency
- Change is_int() to is_numeric() for priority and args validation - Matches validation pattern used in add-to-all plugin - Ensures consistent behavior across all WebberZone plugins
1 parent 0dd20e1 commit 60a279e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

includes/util/class-hook-registry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ public static function register( $hook_type, $hook_name, $callback, $priority =
4747
if ( ! is_callable( $callback ) ) {
4848
return false;
4949
}
50-
if ( ! is_int( $priority ) || $priority < 0 ) {
50+
if ( ! is_numeric( $priority ) || $priority < 0 ) {
5151
return false;
5252
}
53-
if ( ! is_int( $args ) || $args < 1 ) {
53+
if ( ! is_numeric( $args ) || $args < 1 ) {
5454
return false;
5555
}
5656

0 commit comments

Comments
 (0)