@ccagle & all
I'd like to add another possibility to those two I suggested in post 8 (this thread):
- Add a hook or filter at the beginning of function generate_sitemap(), that returns without generating the sitemap if some condition is met.
For example:
(Possibly there's a better way to do this...)
(Edit: typo fix)
I'd like to add another possibility to those two I suggested in post 8 (this thread):
- Add a hook or filter at the beginning of function generate_sitemap(), that returns without generating the sitemap if some condition is met.
For example:
Code:
function generate_sitemap() {
global $nositemap;
$nositemap = FALSE;
exec_action('before-sitemap'); // a plugin could set $nositemap to TRUE here
if ($nositemap) return TRUE;
// ... GS code for generating the sitemap
(Possibly there's a better way to do this...)
(Edit: typo fix)