Skip to content

Commit ab80001

Browse files
committed
WP/DeprecatedParameters: update the functions list based on WP 6.8.1
Based on a scan of WP Core at commit WordPress/wordpress-develop@c5d3e24 using a preliminary sniff created for issue 1803. Includes tests.
1 parent f866cf4 commit ab80001

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

WordPress/Sniffs/WP/DeprecatedParametersSniff.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ final class DeprecatedParametersSniff extends AbstractFunctionParameterSniff {
4949
* Array of function, argument, and default value for deprecated argument.
5050
*
5151
* The functions are ordered alphabetically.
52-
* Last updated for WordPress 6.3.
52+
*
53+
* {@internal To be updated after every major release. Last updated for WordPress 6.8.1.}
5354
*
5455
* @since 0.12.0
5556
*
@@ -209,6 +210,13 @@ final class DeprecatedParametersSniff extends AbstractFunctionParameterSniff {
209210
'version' => '4.2.0',
210211
),
211212
),
213+
'inject_ignored_hooked_blocks_metadata_attributes' => array(
214+
2 => array(
215+
'name' => 'deprecated',
216+
'value' => null,
217+
'version' => '6.5.3',
218+
),
219+
),
212220
'install_search_form' => array(
213221
1 => array(
214222
'name' => 'deprecated',
@@ -410,6 +418,13 @@ final class DeprecatedParametersSniff extends AbstractFunctionParameterSniff {
410418
'version' => '3.8.0',
411419
),
412420
),
421+
'wp_render_elements_support_styles' => array(
422+
1 => array(
423+
'name' => 'parsed_block',
424+
'value' => null,
425+
'version' => '6.6.0',
426+
),
427+
),
413428
'wp_title_rss' => array(
414429
1 => array(
415430
'name' => 'deprecated',

WordPress/Tests/WP/DeprecatedParametersUnitTest.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,6 @@ wp_upload_bits( '', 'deprecated' );
9696
xfn_check( '', '', 'deprecated' );
9797
global_terms( $foo, 'deprecated' );
9898

99-
// All will give an WARNING as they have been deprecated after WP 5.8.
99+
// All will give an WARNING as they have been deprecated after WP 6.2.
100+
inject_ignored_hooked_blocks_metadata_attributes('', 'deprecated');
101+
wp_render_elements_support_styles('deprecated');

WordPress/Tests/WP/DeprecatedParametersUnitTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public function getErrorList() {
5151
* @return array<int, int> Key is the line number, value is the number of expected warnings.
5252
*/
5353
public function getWarningList() {
54-
return array();
54+
return array(
55+
100 => 1,
56+
101 => 1,
57+
);
5558
}
5659
}

0 commit comments

Comments
 (0)