Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automatic ping to search engines
#13
@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:

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)
Reply


Messages In This Thread
Automatic ping to search engines - by Carlos - 2012-01-18, 06:56:31
RE: Automatic ping to search engines - by Carlos - 2014-02-01, 01:19:44
RE: Automatic ping to search engines - by likoud - 2015-05-20, 20:20:05
Automatic ping to search engines - by ccagle8 - 2012-01-18, 13:20:08
Automatic ping to search engines - by Connie - 2012-01-18, 19:09:07
Automatic ping to search engines - by Carlos - 2012-01-19, 01:53:00
Automatic ping to search engines - by ccagle8 - 2012-01-19, 02:52:51
Automatic ping to search engines - by n00dles101 - 2012-03-30, 01:05:50
Automatic ping to search engines - by Carlos - 2012-03-30, 03:45:35
Automatic ping to search engines - by ccagle8 - 2012-03-30, 23:38:37
Automatic ping to search engines - by Carlos - 2012-04-07, 05:03:05
Automatic ping to search engines - by mvlcek - 2012-04-08, 05:12:49
Automatic ping to search engines - by mvlcek - 2012-04-08, 05:52:10
Automatic ping to search engines - by Carlos - 2012-04-08, 18:06:19
Automatic ping to search engines - by Carlos - 2012-04-12, 17:28:13
Automatic ping to search engines - by Carlos - 2012-04-12, 17:32:30
Automatic ping to search engines - by shawn_a - 2012-04-19, 10:33:55
Automatic ping to search engines - by Carlos - 2012-04-19, 19:56:26



Users browsing this thread: 1 Guest(s)