diff --git a/src/wp-admin/edit-comments.php b/src/wp-admin/edit-comments.php
index d7f14f2cd09aa..ffc1d58d8c548 100644
--- a/src/wp-admin/edit-comments.php
+++ b/src/wp-admin/edit-comments.php
@@ -84,31 +84,31 @@
switch ( $doaction ) {
case 'approve':
wp_set_comment_status( $comment_id, 'approve' );
- $approved++;
+ ++$approved;
break;
case 'unapprove':
wp_set_comment_status( $comment_id, 'hold' );
- $unapproved++;
+ ++$unapproved;
break;
case 'spam':
wp_spam_comment( $comment_id );
- $spammed++;
+ ++$spammed;
break;
case 'unspam':
wp_unspam_comment( $comment_id );
- $unspammed++;
+ ++$unspammed;
break;
case 'trash':
wp_trash_comment( $comment_id );
- $trashed++;
+ ++$trashed;
break;
case 'untrash':
wp_untrash_comment( $comment_id );
- $untrashed++;
+ ++$untrashed;
break;
case 'delete':
wp_delete_comment( $comment_id );
- $deleted++;
+ ++$deleted;
break;
}
}
diff --git a/src/wp-admin/edit.php b/src/wp-admin/edit.php
index b5ed3322ae401..90b342330eea7 100644
--- a/src/wp-admin/edit.php
+++ b/src/wp-admin/edit.php
@@ -124,7 +124,7 @@
}
if ( wp_check_post_lock( $post_id ) ) {
- $locked++;
+ ++$locked;
continue;
}
@@ -132,7 +132,7 @@
wp_die( __( 'Error in moving the item to Trash.' ) );
}
- $trashed++;
+ ++$trashed;
}
$sendback = add_query_arg(
@@ -160,7 +160,7 @@
wp_die( __( 'Error in restoring the item from Trash.' ) );
}
- $untrashed++;
+ ++$untrashed;
}
$sendback = add_query_arg( 'untrashed', $untrashed, $sendback );
@@ -185,7 +185,7 @@
wp_die( __( 'Error in deleting the item.' ) );
}
}
- $deleted++;
+ ++$deleted;
}
$sendback = add_query_arg( 'deleted', $deleted, $sendback );
break;
diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
index 16b827d7bd5d0..8aada30959372 100644
--- a/src/wp-admin/includes/ajax-actions.php
+++ b/src/wp-admin/includes/ajax-actions.php
@@ -2149,7 +2149,7 @@ function wp_ajax_inline_save() {
while ( $parent > 0 ) {
$parent_post = get_post( $parent );
$parent = $parent_post->post_parent;
- $level++;
+ ++$level;
}
}
@@ -2211,7 +2211,7 @@ function wp_ajax_inline_save_tax() {
while ( $parent > 0 ) {
$parent_tag = get_term( $parent, $taxonomy );
$parent = $parent_tag->parent;
- $level++;
+ ++$level;
}
$wp_list_table->single_row( $tag, $level );
@@ -2821,7 +2821,7 @@ function wp_ajax_set_attachment_thumbnail() {
}
if ( set_post_thumbnail( $post_id, $thumbnail_id ) ) {
- $success++;
+ ++$success;
}
}
diff --git a/src/wp-admin/includes/class-language-pack-upgrader.php b/src/wp-admin/includes/class-language-pack-upgrader.php
index adeac200d4f80..3c3d42a56a9c8 100644
--- a/src/wp-admin/includes/class-language-pack-upgrader.php
+++ b/src/wp-admin/includes/class-language-pack-upgrader.php
@@ -238,7 +238,7 @@ public function bulk_upgrade( $language_updates = array(), $args = array() ) {
$destination .= '/themes';
}
- $this->update_current++;
+ ++$this->update_current;
$options = array(
'package' => $language_update->package,
diff --git a/src/wp-admin/includes/class-plugin-upgrader.php b/src/wp-admin/includes/class-plugin-upgrader.php
index 48eaee639087c..02743f64561e9 100644
--- a/src/wp-admin/includes/class-plugin-upgrader.php
+++ b/src/wp-admin/includes/class-plugin-upgrader.php
@@ -330,7 +330,7 @@ public function bulk_upgrade( $plugins, $args = array() ) {
$this->update_count = count( $plugins );
$this->update_current = 0;
foreach ( $plugins as $plugin ) {
- $this->update_current++;
+ ++$this->update_current;
$this->skin->plugin_info = get_plugin_data( WP_PLUGIN_DIR . '/' . $plugin, false, true );
if ( ! isset( $current->response[ $plugin ] ) ) {
diff --git a/src/wp-admin/includes/class-theme-upgrader.php b/src/wp-admin/includes/class-theme-upgrader.php
index 688f8d612de64..12bd4772919cc 100644
--- a/src/wp-admin/includes/class-theme-upgrader.php
+++ b/src/wp-admin/includes/class-theme-upgrader.php
@@ -426,7 +426,7 @@ public function bulk_upgrade( $themes, $args = array() ) {
$this->update_count = count( $themes );
$this->update_current = 0;
foreach ( $themes as $theme ) {
- $this->update_current++;
+ ++$this->update_current;
$this->skin->theme_info = $this->theme_info( $theme );
diff --git a/src/wp-admin/includes/class-wp-automatic-updater.php b/src/wp-admin/includes/class-wp-automatic-updater.php
index e835f0cd35984..bb8cb402aff54 100644
--- a/src/wp-admin/includes/class-wp-automatic-updater.php
+++ b/src/wp-admin/includes/class-wp-automatic-updater.php
@@ -1390,7 +1390,7 @@ protected function send_debug_email() {
} else {
/* translators: %s: WordPress version. */
$body[] = sprintf( __( 'FAILED: WordPress failed to update to %s' ), $result->name );
- $failures++;
+ ++$failures;
}
$body[] = '';
@@ -1432,7 +1432,7 @@ protected function send_debug_email() {
if ( ! $item->result || is_wp_error( $item->result ) ) {
/* translators: %s: Name of plugin / theme / translation. */
$body[] = ' * ' . sprintf( __( 'FAILED: %s' ), $item->name );
- $failures++;
+ ++$failures;
}
}
}
diff --git a/src/wp-admin/includes/class-wp-list-table.php b/src/wp-admin/includes/class-wp-list-table.php
index 3fa6f54dd4a85..8258ebf2a60b2 100644
--- a/src/wp-admin/includes/class-wp-list-table.php
+++ b/src/wp-admin/includes/class-wp-list-table.php
@@ -1410,7 +1410,7 @@ public function print_column_headers( $with_id = true ) {
'' .
'' .
'';
- $cb_counter++;
+ ++$cb_counter;
}
foreach ( $columns as $column_key => $column_display_name ) {
diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php
index 56e76251dacc3..b633fcd116504 100644
--- a/src/wp-admin/includes/class-wp-plugins-list-table.php
+++ b/src/wp-admin/includes/class-wp-plugins-list-table.php
@@ -728,7 +728,7 @@ public function single_row( $item ) {
$suffix = 2;
while ( in_array( $plugin_id_attr, $plugin_id_attrs, true ) ) {
$plugin_id_attr = "$plugin_slug-$suffix";
- $suffix++;
+ ++$suffix;
}
$plugin_id_attrs[] = $plugin_id_attr;
diff --git a/src/wp-admin/includes/class-wp-posts-list-table.php b/src/wp-admin/includes/class-wp-posts-list-table.php
index 6e9bcdc527add..abb305f8e49b0 100644
--- a/src/wp-admin/includes/class-wp-posts-list-table.php
+++ b/src/wp-admin/includes/class-wp-posts-list-table.php
@@ -898,7 +898,7 @@ private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 2
$to_display[ $page->ID ] = $level;
}
- $count++;
+ ++$count;
if ( isset( $children_pages ) ) {
$this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page, $to_display );
@@ -917,7 +917,7 @@ private function _display_rows_hierarchical( $pages, $pagenum = 1, $per_page = 2
$to_display[ $op->ID ] = 0;
}
- $count++;
+ ++$count;
}
}
}
@@ -992,7 +992,7 @@ private function _page_rows( &$children_pages, &$count, $parent_page, $level, $p
while ( $my_parent = array_pop( $my_parents ) ) {
$to_display[ $my_parent->ID ] = $level - $num_parents;
- $num_parents--;
+ --$num_parents;
}
}
@@ -1000,7 +1000,7 @@ private function _page_rows( &$children_pages, &$count, $parent_page, $level, $p
$to_display[ $page->ID ] = $level;
}
- $count++;
+ ++$count;
$this->_page_rows( $children_pages, $count, $page->ID, $level + 1, $pagenum, $per_page, $to_display );
}
@@ -1097,7 +1097,7 @@ public function column_title( $post ) {
break;
}
- $this->current_level++;
+ ++$this->current_level;
$find_main_page = (int) $parent->post_parent;
if ( ! isset( $parent_name ) ) {
@@ -2085,7 +2085,7 @@ public function inline_edit() {
diff --git a/src/wp-admin/includes/class-wp-privacy-requests-table.php b/src/wp-admin/includes/class-wp-privacy-requests-table.php
index cbc8c01892617..e7ffeebd20e93 100644
--- a/src/wp-admin/includes/class-wp-privacy-requests-table.php
+++ b/src/wp-admin/includes/class-wp-privacy-requests-table.php
@@ -239,9 +239,9 @@ public function process_bulk_action() {
$resend = _wp_privacy_resend_request( $request_id );
if ( $resend && ! is_wp_error( $resend ) ) {
- $count++;
+ ++$count;
} else {
- $failures++;
+ ++$failures;
}
}
@@ -286,7 +286,7 @@ public function process_bulk_action() {
$result = _wp_privacy_completed_request( $request_id );
if ( $result && ! is_wp_error( $result ) ) {
- $count++;
+ ++$count;
}
}
@@ -309,9 +309,9 @@ public function process_bulk_action() {
case 'delete':
foreach ( $request_ids as $request_id ) {
if ( wp_delete_post( $request_id, true ) ) {
- $count++;
+ ++$count;
} else {
- $failures++;
+ ++$failures;
}
}
diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php
index 5ab784af40ed9..6d87edee1b865 100644
--- a/src/wp-admin/includes/class-wp-site-health.php
+++ b/src/wp-admin/includes/class-wp-site-health.php
@@ -381,14 +381,14 @@ public function get_test_plugin_version() {
// Loop over the available plugins and check their versions and active state.
foreach ( $plugins as $plugin_path => $plugin ) {
- $plugins_total++;
+ ++$plugins_total;
if ( is_plugin_active( $plugin_path ) ) {
- $plugins_active++;
+ ++$plugins_active;
}
if ( array_key_exists( $plugin_path, $plugin_updates ) ) {
- $plugins_need_update++;
+ ++$plugins_need_update;
}
}
@@ -543,21 +543,21 @@ public function get_test_theme_version() {
}
foreach ( $all_themes as $theme_slug => $theme ) {
- $themes_total++;
+ ++$themes_total;
if ( array_key_exists( $theme_slug, $theme_updates ) ) {
- $themes_need_updates++;
+ ++$themes_need_updates;
}
}
// If this is a child theme, increase the allowed theme count by one, to account for the parent.
if ( is_child_theme() ) {
- $allowed_theme_count++;
+ ++$allowed_theme_count;
}
// If there's a default theme installed and not in use, we count that as allowed as well.
if ( $has_default_theme && ! $using_default_theme ) {
- $allowed_theme_count++;
+ ++$allowed_theme_count;
}
if ( $themes_total > $allowed_theme_count ) {
@@ -3293,11 +3293,11 @@ public function wp_cron_scheduled_check() {
foreach ( $results as $result ) {
if ( 'critical' === $result['status'] ) {
- $site_status['critical']++;
+ ++$site_status['critical'];
} elseif ( 'recommended' === $result['status'] ) {
- $site_status['recommended']++;
+ ++$site_status['recommended'];
} else {
- $site_status['good']++;
+ ++$site_status['good'];
}
}
diff --git a/src/wp-admin/includes/class-wp-terms-list-table.php b/src/wp-admin/includes/class-wp-terms-list-table.php
index 9f2febedc229f..8778e542009af 100644
--- a/src/wp-admin/includes/class-wp-terms-list-table.php
+++ b/src/wp-admin/includes/class-wp-terms-list-table.php
@@ -310,7 +310,7 @@ private function _rows( $taxonomy, $terms, &$children, $start, $per_page, &$coun
while ( $my_parent = array_pop( $my_parents ) ) {
echo "\t";
$this->single_row( $my_parent, $level - $num_parents );
- $num_parents--;
+ --$num_parents;
}
}
diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php
index 94777598e86db..aa8e25c8ed5fa 100644
--- a/src/wp-admin/includes/file.php
+++ b/src/wp-admin/includes/file.php
@@ -1493,7 +1493,7 @@ function verify_file_signature( $filename, $signatures, $filename_for_errors = f
// Ensure only valid-length signatures are considered.
if ( SODIUM_CRYPTO_SIGN_BYTES !== strlen( $signature_raw ) ) {
- $skipped_signature++;
+ ++$skipped_signature;
continue;
}
@@ -1502,7 +1502,7 @@ function verify_file_signature( $filename, $signatures, $filename_for_errors = f
// Only pass valid public keys through.
if ( SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES !== strlen( $key_raw ) ) {
- $skipped_key++;
+ ++$skipped_key;
continue;
}
diff --git a/src/wp-admin/includes/image-edit.php b/src/wp-admin/includes/image-edit.php
index 58861b1a6f66b..4e97e90acaa53 100644
--- a/src/wp-admin/includes/image-edit.php
+++ b/src/wp-admin/includes/image-edit.php
@@ -979,7 +979,7 @@ function wp_save_image( $post_id ) {
$new_path = "{$dirname}/$new_filename";
if ( file_exists( $new_path ) ) {
- $suffix++;
+ ++$suffix;
} else {
break;
}
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index cee19890a762b..e7b4c10369387 100644
--- a/src/wp-admin/includes/media.php
+++ b/src/wp-admin/includes/media.php
@@ -638,7 +638,7 @@ function wp_iframe( $content_func, ...$args ) {
*/
function media_buttons( $editor_id = 'content' ) {
static $instance = 0;
- $instance++;
+ ++$instance;
$post = get_post();
diff --git a/src/wp-admin/includes/menu.php b/src/wp-admin/includes/menu.php
index ae8e06be6e747..da1b2ebf5349f 100644
--- a/src/wp-admin/includes/menu.php
+++ b/src/wp-admin/includes/menu.php
@@ -228,7 +228,7 @@ function add_menu_classes( $menu ) {
$i = 0;
foreach ( $menu as $order => $top ) {
- $i++;
+ ++$i;
if ( 0 === $order ) { // Dashboard is always shown/single.
$menu[0][4] = add_cssclass( 'menu-top-first', $top[4] );
diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php
index 24cd26d661842..3c55f3f59af32 100644
--- a/src/wp-admin/includes/misc.php
+++ b/src/wp-admin/includes/misc.php
@@ -403,7 +403,7 @@ function wp_print_theme_file_tree( $tree, $level = 2, $size = 1, $index = 1 ) {
$size = count( $tree );
foreach ( $tree as $label => $theme_file ) :
- $index++;
+ ++$index;
if ( ! is_array( $theme_file ) ) {
wp_print_theme_file_tree( $theme_file, $level, $index, $size );
@@ -505,7 +505,7 @@ function wp_print_plugin_file_tree( $tree, $label = '', $level = 2, $size = 1, $
$size = count( $tree );
foreach ( $tree as $label => $plugin_file ) :
- $index++;
+ ++$index;
if ( ! is_array( $plugin_file ) ) {
wp_print_plugin_file_tree( $plugin_file, $label, $level, $index, $size );
diff --git a/src/wp-admin/includes/ms.php b/src/wp-admin/includes/ms.php
index 1e38133a3f3d8..b52a50a2f9fe7 100644
--- a/src/wp-admin/includes/ms.php
+++ b/src/wp-admin/includes/ms.php
@@ -734,7 +734,7 @@ function avoid_blog_page_permalink_collision( $data, $postarr ) {
while ( $c < 10 && get_id_from_blogname( $post_name ) ) {
$post_name .= mt_rand( 1, 10 );
- $c++;
+ ++$c;
}
if ( $post_name !== $data['post_name'] ) {
diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php
index 6feac91493002..0a3699672d9ba 100644
--- a/src/wp-admin/includes/template.php
+++ b/src/wp-admin/includes/template.php
@@ -1355,7 +1355,7 @@ function do_meta_boxes( $screen, $context, $data_object ) {
}
}
- $i++;
+ ++$i;
// get_hidden_meta_boxes() doesn't apply in the block editor.
$hidden_class = ( ! $screen->is_block_editor() && in_array( $box['id'], $hidden, true ) ) ? ' hide-if-js' : '';
echo '
' . "\n";
@@ -1550,7 +1550,7 @@ function do_accordion_sections( $screen, $context, $data_object ) {
continue;
}
- $i++;
+ ++$i;
$hidden_class = in_array( $box['id'], $hidden, true ) ? 'hide-if-js' : '';
$open_class = '';
diff --git a/src/wp-admin/includes/upgrade.php b/src/wp-admin/includes/upgrade.php
index 0f081222393e6..bf0b12405da5c 100644
--- a/src/wp-admin/includes/upgrade.php
+++ b/src/wp-admin/includes/upgrade.php
@@ -1292,7 +1292,7 @@ function upgrade_230() {
$num = 2;
do {
$alt_slug = $slug . "-$num";
- $num++;
+ ++$num;
$slug_check = $wpdb->get_var( $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s", $alt_slug ) );
} while ( $slug_check );
diff --git a/src/wp-admin/includes/widgets.php b/src/wp-admin/includes/widgets.php
index 93979b6a25de5..682f596d941f7 100644
--- a/src/wp-admin/includes/widgets.php
+++ b/src/wp-admin/includes/widgets.php
@@ -134,7 +134,7 @@ function wp_list_widget_controls( $sidebar, $sidebar_name = '' ) {
function wp_list_widget_controls_dynamic_sidebar( $params ) {
global $wp_registered_widgets;
static $i = 0;
- $i++;
+ ++$i;
$widget_id = $params[0]['widget_id'];
$id = isset( $params[0]['_temp_id'] ) ? $params[0]['_temp_id'] : $widget_id;
@@ -168,7 +168,7 @@ function next_widget_id_number( $id_base ) {
$number = max( $number, $matches[1] );
}
}
- $number++;
+ ++$number;
return $number;
}
diff --git a/src/wp-admin/link.php b/src/wp-admin/link.php
index 084b1d7566ec1..f07cc5897d3a3 100644
--- a/src/wp-admin/link.php
+++ b/src/wp-admin/link.php
@@ -45,7 +45,7 @@
$link_id = (int) $link_id;
if ( wp_delete_link( $link_id ) ) {
- $deleted++;
+ ++$deleted;
}
}
diff --git a/src/wp-admin/menu.php b/src/wp-admin/menu.php
index aa89f6c571328..6a90772155a54 100644
--- a/src/wp-admin/menu.php
+++ b/src/wp-admin/menu.php
@@ -161,7 +161,7 @@
*/
$core_menu_positions = array( 59, 60, 65, 70, 75, 80, 85, 99 );
while ( isset( $menu[ $ptype_menu_position ] ) || in_array( $ptype_menu_position, $core_menu_positions, true ) ) {
- $ptype_menu_position++;
+ ++$ptype_menu_position;
}
$menu[ $ptype_menu_position ] = array( esc_attr( $ptype_obj->labels->menu_name ), $ptype_obj->cap->edit_posts, $ptype_file, '', $menu_class, $ptype_menu_id, $menu_icon );
diff --git a/src/wp-admin/network/users.php b/src/wp-admin/network/users.php
index 60ab967b94b27..d0b40e710d286 100644
--- a/src/wp-admin/network/users.php
+++ b/src/wp-admin/network/users.php
@@ -184,7 +184,7 @@
continue;
}
wpmu_delete_user( $id );
- $i++;
+ ++$i;
}
}
diff --git a/src/wp-admin/users.php b/src/wp-admin/users.php
index ec8886b61b1b4..97b96a7b1a0b7 100644
--- a/src/wp-admin/users.php
+++ b/src/wp-admin/users.php
@@ -381,7 +381,7 @@
);
echo "\n";
- $go_delete++;
+ ++$go_delete;
}
}
?>
diff --git a/src/wp-admin/widgets-form.php b/src/wp-admin/widgets-form.php
index b77f23dbc3aea..aa01798856506 100644
--- a/src/wp-admin/widgets-form.php
+++ b/src/wp-admin/widgets-form.php
@@ -310,7 +310,7 @@
} else {
$j = count( $sidebars_widgets[ $sbname ] );
if ( isset( $_GET['addnew'] ) || ! in_array( $widget_id, $sidebars_widgets[ $sbname ], true ) ) {
- $j++;
+ ++$j;
}
}
$selected = '';
@@ -540,7 +540,7 @@
diff --git a/src/wp-content/themes/twentyeleven/functions.php b/src/wp-content/themes/twentyeleven/functions.php
index f17bf729f38e1..4c478fd8e318f 100644
--- a/src/wp-content/themes/twentyeleven/functions.php
+++ b/src/wp-content/themes/twentyeleven/functions.php
@@ -667,15 +667,15 @@ function twentyeleven_footer_sidebar_class() {
$count = 0;
if ( is_active_sidebar( 'sidebar-3' ) ) {
- $count++;
+ ++$count;
}
if ( is_active_sidebar( 'sidebar-4' ) ) {
- $count++;
+ ++$count;
}
if ( is_active_sidebar( 'sidebar-5' ) ) {
- $count++;
+ ++$count;
}
$class = '';
diff --git a/src/wp-content/themes/twentyeleven/image.php b/src/wp-content/themes/twentyeleven/image.php
index a727ea147acfc..973a249b5b077 100644
--- a/src/wp-content/themes/twentyeleven/image.php
+++ b/src/wp-content/themes/twentyeleven/image.php
@@ -77,7 +77,7 @@
// If there is more than 1 attachment in a gallery...
if ( count( $attachments ) > 1 ) {
- $k++;
+ ++$k;
if ( isset( $attachments[ $k ] ) ) {
// ...get the URL of the next image attachment.
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
diff --git a/src/wp-content/themes/twentyeleven/showcase.php b/src/wp-content/themes/twentyeleven/showcase.php
index c867b830d9571..0821040f76d99 100644
--- a/src/wp-content/themes/twentyeleven/showcase.php
+++ b/src/wp-content/themes/twentyeleven/showcase.php
@@ -88,7 +88,7 @@
$featured->the_post();
// Increase the counter.
- $counter_slider++;
+ ++$counter_slider;
/*
* We're going to add a class to our featured post for featured images.
@@ -153,7 +153,7 @@
// Let's roll again.
while ( $featured->have_posts() ) :
$featured->the_post();
- $counter_slider++;
+ ++$counter_slider;
if ( 1 === $counter_slider ) {
$class = ' class="active"';
} else {
diff --git a/src/wp-content/themes/twentyseventeen/inc/template-functions.php b/src/wp-content/themes/twentyseventeen/inc/template-functions.php
index 2c2e9504cced5..6b61eae85b239 100644
--- a/src/wp-content/themes/twentyseventeen/inc/template-functions.php
+++ b/src/wp-content/themes/twentyseventeen/inc/template-functions.php
@@ -89,7 +89,7 @@ function twentyseventeen_panel_count() {
// Create a setting and control for each of the sections available in the theme.
for ( $i = 1; $i < ( 1 + $num_sections ); $i++ ) {
if ( get_theme_mod( 'panel_' . $i ) ) {
- $panel_count++;
+ ++$panel_count;
}
}
diff --git a/src/wp-content/themes/twentyten/loop-attachment.php b/src/wp-content/themes/twentyten/loop-attachment.php
index 007b5aa036f9d..5c348d6cc78f3 100644
--- a/src/wp-content/themes/twentyten/loop-attachment.php
+++ b/src/wp-content/themes/twentyten/loop-attachment.php
@@ -107,7 +107,7 @@
// If there is more than 1 image attachment in a gallery...
if ( count( $attachments ) > 1 ) {
- $k++;
+ ++$k;
if ( isset( $attachments[ $k ] ) ) {
// ...get the URL of the next image attachment.
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
diff --git a/src/wp-content/themes/twentytwelve/image.php b/src/wp-content/themes/twentytwelve/image.php
index ffdde2c00d23a..c17067cb23de3 100644
--- a/src/wp-content/themes/twentytwelve/image.php
+++ b/src/wp-content/themes/twentytwelve/image.php
@@ -77,7 +77,7 @@
// If there is more than 1 attachment in a gallery...
if ( count( $attachments ) > 1 ) :
- $k++;
+ ++$k;
if ( isset( $attachments[ $k ] ) ) :
// ...get the URL of the next image attachment.
$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
diff --git a/src/wp-content/themes/twentytwenty/index.php b/src/wp-content/themes/twentytwenty/index.php
index 0c73e812e3adf..9c7442c6e9fd9 100644
--- a/src/wp-content/themes/twentytwenty/index.php
+++ b/src/wp-content/themes/twentytwenty/index.php
@@ -84,7 +84,7 @@
$i = 0;
while ( have_posts() ) {
- $i++;
+ ++$i;
if ( $i > 1 ) {
echo '
';
}
diff --git a/src/wp-content/themes/twentytwentyone/inc/template-functions.php b/src/wp-content/themes/twentytwentyone/inc/template-functions.php
index a862dfac14a38..5c1ca0f1e116d 100644
--- a/src/wp-content/themes/twentytwentyone/inc/template-functions.php
+++ b/src/wp-content/themes/twentytwentyone/inc/template-functions.php
@@ -384,7 +384,7 @@ function twenty_twenty_one_print_first_instance_of_block( $block_name, $content
if ( $is_matching_block ) {
// Increment count.
- $instances_count++;
+ ++$instances_count;
// Add the block HTML.
$blocks_content .= render_block( $block );
diff --git a/src/wp-includes/class-walker-comment.php b/src/wp-includes/class-walker-comment.php
index 2aabcbd1583a0..825a28334b14f 100644
--- a/src/wp-includes/class-walker-comment.php
+++ b/src/wp-includes/class-walker-comment.php
@@ -174,7 +174,7 @@ public function start_el( &$output, $data_object, $depth = 0, $args = array(), $
// Restores the more descriptive, specific name for use within this method.
$comment = $data_object;
- $depth++;
+ ++$depth;
$GLOBALS['comment_depth'] = $depth;
$GLOBALS['comment'] = $comment;
diff --git a/src/wp-includes/class-wp-block.php b/src/wp-includes/class-wp-block.php
index cdbc678f13d56..65d3af6a12f1a 100644
--- a/src/wp-includes/class-wp-block.php
+++ b/src/wp-includes/class-wp-block.php
@@ -244,7 +244,7 @@ public function render( $options = array() ) {
$block_content .= $inner_block->render();
}
- $index++;
+ ++$index;
}
}
}
diff --git a/src/wp-includes/class-wp-comment-query.php b/src/wp-includes/class-wp-comment-query.php
index 40f283896653e..9ebddd1c74e15 100644
--- a/src/wp-includes/class-wp-comment-query.php
+++ b/src/wp-includes/class-wp-comment-query.php
@@ -1079,7 +1079,7 @@ protected function fill_descendants( $comments ) {
wp_cache_set_multiple( $data, 'comment-queries' );
}
- $level++;
+ ++$level;
$levels[ $level ] = $child_ids;
} while ( $child_ids );
diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php
index 77176609bc04f..0bceee3454224 100644
--- a/src/wp-includes/class-wp-customize-manager.php
+++ b/src/wp-includes/class-wp-customize-manager.php
@@ -1077,7 +1077,7 @@ protected function dismiss_user_auto_draft_changesets() {
continue;
}
if ( update_post_meta( $autosave_autodraft_post->ID, '_customize_restore_dismissed', true ) ) {
- $dismissed++;
+ ++$dismissed;
}
}
return $dismissed;
@@ -1479,7 +1479,7 @@ public function import_theme_starter_content( $starter_content = array() ) {
if ( ! $nav_menu_term_id ) {
while ( isset( $changeset_data[ sprintf( 'nav_menu[%d]', $placeholder_id ) ] ) ) {
- $placeholder_id--;
+ --$placeholder_id;
}
$nav_menu_term_id = $placeholder_id;
$nav_menu_setting_id = sprintf( 'nav_menu[%d]', $placeholder_id );
diff --git a/src/wp-includes/class-wp-hook.php b/src/wp-includes/class-wp-hook.php
index 8a6cdfd09f758..9c1cac6d1c917 100644
--- a/src/wp-includes/class-wp-hook.php
+++ b/src/wp-includes/class-wp-hook.php
@@ -317,7 +317,7 @@ public function apply_filters( $value, $args ) {
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
- $this->nesting_level--;
+ --$this->nesting_level;
return $value;
}
@@ -359,7 +359,7 @@ public function do_all_hook( &$args ) {
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
- $this->nesting_level--;
+ --$this->nesting_level;
}
/**
diff --git a/src/wp-includes/class-wp-list-util.php b/src/wp-includes/class-wp-list-util.php
index c394f2c613b0c..656035529186e 100644
--- a/src/wp-includes/class-wp-list-util.php
+++ b/src/wp-includes/class-wp-list-util.php
@@ -117,12 +117,12 @@ public function filter( $args = array(), $operator = 'AND' ) {
if ( is_array( $obj ) ) {
// Treat object as an array.
if ( array_key_exists( $m_key, $obj ) && ( $m_value == $obj[ $m_key ] ) ) {
- $matched++;
+ ++$matched;
}
} elseif ( is_object( $obj ) ) {
// Treat object as an object.
if ( isset( $obj->{$m_key} ) && ( $m_value == $obj->{$m_key} ) ) {
- $matched++;
+ ++$matched;
}
}
}
diff --git a/src/wp-includes/class-wp-meta-query.php b/src/wp-includes/class-wp-meta-query.php
index 0c6867d84ee2a..69dde01ff077e 100644
--- a/src/wp-includes/class-wp-meta-query.php
+++ b/src/wp-includes/class-wp-meta-query.php
@@ -633,7 +633,7 @@ public function get_sql_for_clause( &$clause, $parent_query, $clause_key = '' )
$clause_key_base = $clause_key;
while ( isset( $this->clauses[ $clause_key ] ) ) {
$clause_key = $clause_key_base . '-' . $iterator;
- $iterator++;
+ ++$iterator;
}
// Store the clause in our flat array.
diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php
index 16e1cfc248975..458b7898c2e8b 100644
--- a/src/wp-includes/class-wp-query.php
+++ b/src/wp-includes/class-wp-query.php
@@ -3470,7 +3470,7 @@ public function get_posts() {
// Move to front, after other stickies.
array_splice( $this->posts, $sticky_offset, 0, array( $sticky_post ) );
// Increment the sticky offset. The next sticky will be placed at this offset.
- $sticky_offset++;
+ ++$sticky_offset;
// Remove post from sticky posts array.
$offset = array_search( $sticky_post->ID, $sticky_posts, true );
unset( $sticky_posts[ $offset ] );
@@ -3500,7 +3500,7 @@ public function get_posts() {
foreach ( $stickies as $sticky_post ) {
array_splice( $this->posts, $sticky_offset, 0, array( $sticky_post ) );
- $sticky_offset++;
+ ++$sticky_offset;
}
}
}
@@ -3620,7 +3620,7 @@ private function set_found_posts( $q, $limits ) {
*/
public function next_post() {
- $this->current_post++;
+ ++$this->current_post;
/** @var WP_Post */
$this->post = $this->posts[ $this->current_post ];
@@ -3730,7 +3730,7 @@ public function rewind_posts() {
* @return WP_Comment Comment object.
*/
public function next_comment() {
- $this->current_comment++;
+ ++$this->current_comment;
/** @var WP_Comment */
$this->comment = $this->comments[ $this->current_comment ];
diff --git a/src/wp-includes/class-wp-rewrite.php b/src/wp-includes/class-wp-rewrite.php
index 150eabcbd8de1..8bcf8fc962246 100644
--- a/src/wp-includes/class-wp-rewrite.php
+++ b/src/wp-includes/class-wp-rewrite.php
@@ -531,7 +531,7 @@ public function get_date_permastruct() {
$front = $front . 'date/';
break;
}
- $tok_index++;
+ ++$tok_index;
}
$this->date_structure = $front . $date_endian;
diff --git a/src/wp-includes/class-wp-theme-json.php b/src/wp-includes/class-wp-theme-json.php
index b929c956086f8..227398facd2c5 100644
--- a/src/wp-includes/class-wp-theme-json.php
+++ b/src/wp-includes/class-wp-theme-json.php
@@ -3399,7 +3399,7 @@ public function set_spacing_sizes() {
}
if ( $below_midpoint_count < $steps_mid_point - 2 ) {
- $x_small_count++;
+ ++$x_small_count;
}
$slug -= 10;
@@ -3436,7 +3436,7 @@ public function set_spacing_sizes() {
}
if ( $above_midpoint_count > 1 ) {
- $x_large_count++;
+ ++$x_large_count;
}
$slug += 10;
diff --git a/src/wp-includes/class-wp-walker.php b/src/wp-includes/class-wp-walker.php
index 28cecfe79ec46..d8c00a372322a 100644
--- a/src/wp-includes/class-wp-walker.php
+++ b/src/wp-includes/class-wp-walker.php
@@ -325,7 +325,7 @@ public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$arg
$empty_array = array();
foreach ( $elements as $e ) {
- $count++;
+ ++$count;
if ( $count < $start ) {
continue;
}
@@ -372,7 +372,7 @@ public function paged_walk( $elements, $max_depth, $page_num, $per_page, ...$arg
}
foreach ( $top_level_elements as $e ) {
- $count++;
+ ++$count;
// For the last page, need to unset earlier children in order to keep track of orphans.
if ( $end >= $total_top && $count < $start ) {
@@ -416,7 +416,7 @@ public function get_number_of_root_elements( $elements ) {
foreach ( $elements as $e ) {
if ( empty( $e->$parent_field ) ) {
- $num++;
+ ++$num;
}
}
return $num;
diff --git a/src/wp-includes/class-wpdb.php b/src/wp-includes/class-wpdb.php
index 1510d82a9f190..39c467f03182d 100644
--- a/src/wp-includes/class-wpdb.php
+++ b/src/wp-includes/class-wpdb.php
@@ -1539,7 +1539,7 @@ public function prepare( $query, ...$args ) {
$k = 1;
$l = strlen( $s );
while ( $k <= $l && '%' === $s[ $l - $k ] ) {
- $k++;
+ ++$k;
}
$placeholder = '%' . ( $k % 2 ? '%' : '' ) . $format . $type;
@@ -1600,7 +1600,7 @@ public function prepare( $query, ...$args ) {
$new_query .= $split_query[ $key - 2 ] . $split_query[ $key - 1 ] . $placeholder;
$key += 3;
- $arg_id++;
+ ++$arg_id;
}
// Replace $query; and add remaining $query characters, or index 0 if there were no placeholders.
@@ -1632,7 +1632,7 @@ public function prepare( $query, ...$args ) {
$used_placeholders[ $arg_pos ][] = $placeholder;
$key += 3;
- $arg_id++;
+ ++$arg_id;
}
$conflicts = array();
@@ -2304,7 +2304,7 @@ public function query( $query ) {
if ( $this->result instanceof mysqli_result ) {
while ( $row = mysqli_fetch_object( $this->result ) ) {
$this->last_result[ $num_rows ] = $row;
- $num_rows++;
+ ++$num_rows;
}
}
@@ -2334,7 +2334,7 @@ private function _do_query( $query ) {
$this->result = mysqli_query( $this->dbh, $query );
}
- $this->num_queries++;
+ ++$this->num_queries;
if ( defined( 'SAVEQUERIES' ) && SAVEQUERIES ) {
$this->log_query(
@@ -3878,7 +3878,7 @@ public function get_col_info( $info_type = 'name', $col_offset = -1 ) {
$new_array = array();
foreach ( (array) $this->col_info as $col ) {
$new_array[ $i ] = $col->{$info_type};
- $i++;
+ ++$i;
}
return $new_array;
} else {
diff --git a/src/wp-includes/comment-template.php b/src/wp-includes/comment-template.php
index 59b2361d846d8..03f450dc9bef7 100644
--- a/src/wp-includes/comment-template.php
+++ b/src/wp-includes/comment-template.php
@@ -549,7 +549,7 @@ function get_comment_class( $css_class = '', $comment_id = null, $post = null )
$classes[] = 'even';
}
- $comment_alt++;
+ ++$comment_alt;
// Alt for top-level comments.
if ( 1 == $comment_depth ) {
@@ -559,7 +559,7 @@ function get_comment_class( $css_class = '', $comment_id = null, $post = null )
} else {
$classes[] = 'thread-even';
}
- $comment_thread_alt++;
+ ++$comment_thread_alt;
}
$classes[] = "depth-$comment_depth";
diff --git a/src/wp-includes/compat.php b/src/wp-includes/compat.php
index 2b8de57bd7b9b..5bfdbc23d6d60 100644
--- a/src/wp-includes/compat.php
+++ b/src/wp-includes/compat.php
@@ -203,7 +203,7 @@ function _mb_strlen( $str, $encoding = null ) {
do {
// We had some string left over from the last round, but we counted it in that last round.
- $count--;
+ --$count;
/*
* Split by UTF-8 character, limit to 1000 characters (last array element will contain
diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index be37097220129..fddd2b1aa1db4 100644
--- a/src/wp-includes/formatting.php
+++ b/src/wp-includes/formatting.php
@@ -476,7 +476,7 @@ function wpautop( $text, $br = true ) {
$pre_tags[ $name ] = substr( $text_part, $start ) . '';
$text .= substr( $text_part, 0, $start ) . $name;
- $i++;
+ ++$i;
}
$text .= $last_part;
@@ -2657,14 +2657,14 @@ function force_balance_tags( $text ) {
} elseif ( $tagstack[ $stacksize - 1 ] === $tag ) { // Found closing tag.
$tag = '' . $tag . '>'; // Close tag.
array_pop( $tagstack );
- $stacksize--;
+ --$stacksize;
} else { // Closing tag not at top, search for it.
for ( $j = $stacksize - 1; $j >= 0; $j-- ) {
if ( $tagstack[ $j ] === $tag ) {
// Add tag to tagqueue.
for ( $k = $stacksize - 1; $k >= $j; $k-- ) {
$tagqueue .= '' . array_pop( $tagstack ) . '>';
- $stacksize--;
+ --$stacksize;
}
break;
}
@@ -2692,7 +2692,7 @@ function force_balance_tags( $text ) {
*/
if ( $stacksize > 0 && ! in_array( $tag, $nestable_tags, true ) && $tagstack[ $stacksize - 1 ] === $tag ) {
$tagqueue = '' . array_pop( $tagstack ) . '>';
- $stacksize--;
+ --$stacksize;
}
$stacksize = array_push( $tagstack, $tag );
}
@@ -3083,7 +3083,7 @@ function make_clickable( $text ) {
|| preg_match( '|^