WordPress 6.1.1 shows deprecated errors with PHP 8.1 & 8.2

This is not actually an error, rather a deprecation notice. Which means, future versions of PHP will remove some old language features, so the developers should be aware of it. Info. for WordPress: WordPress developers are well aware of it and future versions of WordPress will be changed and this deprecation notice will no longer … Read more

Undefined index: debuging error for theme option template snippet

Looking at your actual source, the relevant portion (with line numbers) is this: 745 if ( $_GET[‘page’] == basename(__FILE__) ) { 746 747 if ( ‘save’ == $_REQUEST[‘action’] ) { 748 749 foreach ($options as $value) { 750 update_option( $value[‘id’], $_REQUEST[ $value[‘id’] ] ); } 751 752 foreach ($options as $value) { 753 if( isset( … Read more

Where to find new class reference or function of deprecated one?

The deprecated functions are listed in the following files. /wp-includes/deprecated.php /wp-admin/includes/deprecated.php /wp-includes/pluggable-deprecated.php /wp-includes/ms-deprecated.php /wp-admin/includes/ms-deprecated.php As to whether the Codex is updated with the above I have no idea, but like always.. when in doubt look into the actual core code. Use an IDE or text editor that has a good find in files search, so … Read more

Replace deprecated get_category_children code with get_terms

Yes, get_category_children() is indeed deprecated and you should use get_term_children() instead. So with your original code: // You can simply replace this: if (get_category_children($this_category->cat_ID) != “”) // with this: $ids = get_term_children( $this_category->cat_ID, ‘category’ ); if ( ! empty( $ids ) ) And with your second code which uses get_terms(), you can check if the … Read more