@@ -37,6 +37,15 @@ wp_install( user_name: '', deprecated: '', user_email: '', blog_title: '', is_pu
3737// Error: Parameter is passed with incorrect default, unconventional order.
3838wp_install ( is_public: '' , user_name: '' , user_email: '' , deprecated: 'should be empty ' , blog_title: '' );
3939
40+ /*
41+ * Safeguard correct handling of all types of namespaced function calls.
42+ */
43+ \add_option ( '' , '' , [] ); // Bad.
44+ MyNamespace \get_blog_list ( $ foo , $ bar , 'deprecated ' ); // Ok.
45+ \MyNamespace \get_wp_title_rss ( 'deprecated ' ); // Ok.
46+ namespace \the_author ( 'deprecated ' , 'deprecated ' ); // The sniff should start flagging this once it can resolve relative namespaces.
47+ namespace \Sub \wp_title_rss ( 'deprecated ' ); // Ok.
48+
4049// All will give an ERROR. The functions are ordered alphabetically.
4150
4251_future_post_hook ( 10 , $ post );
@@ -100,12 +109,3 @@ inject_ignored_hooked_blocks_metadata_attributes('', 'deprecated');
100109// All will give an WARNING as they have been deprecated after WP 6.6.
101110wp_render_elements_support_styles ('deprecated ' );
102111_wp_can_use_pcre_u ('deprecated ' );
103-
104- /*
105- * Safeguard correct handling of all types of namespaced function calls.
106- */
107- \add_option ( '' , '' , [] ); // Bad.
108- MyNamespace \get_blog_list ( $ foo , $ bar , 'deprecated ' ); // Ok.
109- \MyNamespace \get_wp_title_rss ( 'deprecated ' ); // Ok.
110- namespace \the_author ( 'deprecated ' , 'deprecated ' ); // The sniff should start flagging this once it can resolve relative namespaces.
111- namespace \Sub \wp_title_rss ( 'deprecated ' ); // Ok.
0 commit comments