PluginProbe
WebberZone Top 10 — Popular Posts / 4.5.1
WebberZone Top 10 — Popular Posts v4.5.1
4.5.1 4.5.0 4.4.3 4.4.2 4.4.1 4.4.0 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 trunk 1.0 1.0.1 1.1 1.2 1.3 1.4 1.4.1 1.5 1.5.1 1.5.2 1.5.3 1.6 1.6.1 All 117 releases
← All changes | includes/util/class-hook-registry.php +2 -2 4.3.1 → 4.5.1 View file →
@@ -39,9 +39,9 @@
39 39 public static function register( string $hook_type, string $hook_name, callable $callback, int $priority = 10, int $args = 1 ): bool {
40 40 if ( ! in_array( $hook_type, array( 'action', 'filter' ), true ) ) {
41 41 return false;
42 42 }
43 - if ( empty( trim( $hook_name ) ) ) {
43 + if ( empty( trim( $hook_name, " \t\n\r\0\x0B" ) ) ) {
44 44 return false;
45 45 }
46 46 if ( $priority < 0 ) {
47 47 return false;
@@ -162,9 +162,9 @@
162 162 * @param string $hook_name The hook name.
163 163 * @param callable $callback The callback function.
164 164 * @param int $priority Priority of the hook.
165 165 *
166 - * @return bool True if removed, false if not found or invalid hook.
166 + * @return bool True if removed, false if not found or removal failed.
167 167 */
168 168 public static function remove_action( $hook_name, $callback, $priority = 10 ) {
169 169 return self::remove( 'action', $hook_name, $callback, $priority );
170 170 }