This WordPress snippet modifies the default output of wp_dropdown_pages() to display page options in the format:
{Page Title} - {slug} ({ID})
Instead of the default page title, each option in the dropdown will now include the page’s slug and ID for better clarity. This is useful for administrators working with multiple pages that might have similar titles.
Simply add this snippet to your theme’s functions.php or a custom plugin, and it will automatically apply to all wp_dropdown_pages() calls on your site.