@@ -31,7 +31,7 @@ $incorrect_but_ok = get_metadata( 'post' );
3131 * These should all be flagged with a warning.
3232 */
3333$ warning = \get_post_meta ( $ post_id , $ meta_key );
34- implode (', ' , get_post_meta ( $ post_id , $ meta_key ));
34+ implode (', ' , \ GET_POST_META ( $ post_id , $ meta_key ));
3535if (get_post_meta ( $ post_id , key: $ meta_key )) {}
3636$ warning = get_post_meta ( $ post_id , key: $ meta_key , sinngle: true ); // Typo in parameter name.
3737echo get_comment_meta ( $ comment_id , $ meta_key );
@@ -46,3 +46,11 @@ $warning = get_metadata(
4646);
4747$ warning = get_metadata_raw ( 'post ' , $ post_id , $ meta_key );
4848$ warning = get_metadata_default ( 'post ' , $ post_id , $ meta_key );
49+
50+ /*
51+ * Safeguard correct handling of fully qualified and relative namespaced function calls (fully qualified global function
52+ * call and partially qualified namespaced function call are already handled above).
53+ */
54+ \MyNamespace \get_user_meta ( $ user_id , $ meta_key );
55+ namespace \get_metadata ( 'post ' , $ post_id , $ meta_key ); // The sniff should start flagging this once it can resolve relative namespaces.
56+ namespace \Sub \get_comment_meta ( $ comment_id , $ meta_key );
0 commit comments