Code Modernization: Rename parameters that use reserved keywords in `wp-admin/includes/class-wp-terms-list-table.php`.
While using reserved PHP keywords as parameter name labels is allowed, in the context of function calls using named parameters in PHP 8.0+, this will easily lead to confusion. To avoid that, it is recommended not to use reserved keywords as function parameter names. This commit renames the `$parent` parameter to `$parent_term` in `WP_Terms_List_Table::_rows()`. Follow-up to [52946], [52996], [52997], [52998], [53003], [53014], [53029], [53039], [53116], [53117], [53137]. Props jrf, aristath, poena, justinahinon, SergeyBiryukov. See #55327. Built from https://develop.svn.wordpress.org/trunk@53174 git-svn-id: http://core.svn.wordpress.org/trunk@52763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f448f54be5
commit
c6a5a33e54
|
@ -262,10 +262,10 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||
* @param int $start
|
||||
* @param int $per_page
|
||||
* @param int $count
|
||||
* @param int $parent
|
||||
* @param int $parent_term
|
||||
* @param int $level
|
||||
*/
|
||||
private function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$count, $parent = 0, $level = 0 ) {
|
||||
private function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$count, $parent_term = 0, $level = 0 ) {
|
||||
|
||||
$end = $start + $per_page;
|
||||
|
||||
|
@ -275,7 +275,7 @@ class WP_Terms_List_Table extends WP_List_Table {
|
|||
break;
|
||||
}
|
||||
|
||||
if ( $term->parent !== $parent && empty( $_REQUEST['s'] ) ) {
|
||||
if ( $term->parent !== $parent_term && empty( $_REQUEST['s'] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.0-beta1-53173';
|
||||
$wp_version = '6.0-beta1-53174';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue