An update: doing it the way I described above using the code below, means that the titles get changed in the site's menu when you're on one of the plugin pages, too. The menu is printed using wp_list_pages(). Here's the code I'm trying to use:
PHP Code:
add_filter("the_title", "title_filter");
function title_filter($title) {
global $post;
if(strpos($post->post_content, "[XYZ]")===false) return $title;
return "Whee!";
}
The shortcode [XYZ] is replaced with a few shortcodes and, eventually, I think I'll switch it from calls to strpos() to a regular expression so that it's not too repetative, but I'm trying to keep the PHP simple for the moment.
The altered title wouldn't be "Whee!" either, that's just for the purposes of this example.