@@ -33,7 +33,7 @@ public static function format_hierarhical_name( WP_Term|int|string|null|array|\W
33
33
}
34
34
35
35
$ formatter = self ::get_name_formatter ( $ args );
36
- $ formatted = \array_map ( \ get_term( ... ) , \get_ancestors ( $ term ->term_id , $ term ->taxonomy ) );
36
+ $ formatted = \array_map ( ' get_term ' , \get_ancestors ( $ term ->term_id , $ term ->taxonomy ) );
37
37
$ formatted = \array_map ( $ formatter , \array_reverse ( $ formatted ) );
38
38
$ formatted [] = $ args ['link_final ' ] ? $ formatter ( $ term ) : $ term ->name ;
39
39
@@ -75,7 +75,7 @@ private static function parse_format_args( array $args ): array {
75
75
*/
76
76
private static function get_name_formatter ( array $ args ): Closure {
77
77
if ( \is_callable ( $ args ['formatter ' ] ?? null ) ) {
78
- return $ args ['formatter ' ]( ... ) ;
78
+ return $ args ['formatter ' ];
79
79
}
80
80
81
81
$ formatter ??= $ args ['link_items ' ] && $ args ['link_format ' ]
@@ -101,8 +101,8 @@ private static function get_name_formatter( array $args ): Closure {
101
101
*/
102
102
private static function get_link_formatter ( string |callable |array |bool $ fmt ): ?Closure {
103
103
return match ( true ) {
104
- \is_bool ( $ fmt ) && $ fmt => \ get_term_link( ... ) ,
105
- \is_callable ( $ fmt ) => $ fmt( ... ) ,
104
+ \is_bool ( $ fmt ) && $ fmt => ' get_term_link ' ,
105
+ \is_callable ( $ fmt ) => $ fmt ,
106
106
\is_array ( $ fmt ) => static fn ( $ t ) => \call_user_func ( $ fmt , $ t ),
107
107
\is_string ( $ fmt ) => static fn ( $ t ) => \add_query_arg ( $ t ->taxonomy , $ t ->slug , $ fmt ),
108
108
default => null ,
0 commit comments