forked from codehooligans/media-tags
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmediatags_thirdparty.php
More file actions
36 lines (35 loc) · 881 Bytes
/
mediatags_thirdparty.php
File metadata and controls
36 lines (35 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
function mediatag_thirdparty_support()
{
if (function_exists('is_plugin_active'))
{
if (is_plugin_active('google-sitemap-generator/sitemap.php')) {
$mediatags->thirdparty->google_sitemap = true;
mediatags_google_sitemap_pages();
}
}
}
function mediatags_google_sitemap_pages()
{
$mediatag_google_plugin = get_option('mediatag_google_plugin', 'no');
if ($mediatag_google_plugin == "yes")
{
$generatorObject = &GoogleSitemapGenerator::GetInstance(); //Please note the "&" sign!
if($generatorObject!=null)
{
$mediatag_items = get_mediatags();
if ($mediatag_items)
{
foreach($mediatag_items as $mediatag_item)
{
$mediatag_permalink = get_mediatag_link($mediatag_item->term_id);
if (strlen($mediatag_permalink))
{
$generatorObject->AddUrl($mediatag_permalink, time(), "daily", 0.5);
}
}
}
}
}
}
?>