Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
GheorgheP committed Jun 3, 2015
1 parent f94424d commit ddafb9b
Show file tree
Hide file tree
Showing 10 changed files with 663 additions and 698 deletions.
711 changes: 471 additions & 240 deletions extensions/seo-sitemap/class-fw-extension-seo-sitemap.php

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions extensions/seo-sitemap/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@
*/
$cfg['search_engines'] = array( 'google', 'bing' );

/**
* The frequency of the sitemap refresh (measured in days).
*/
$cfg['sitemap_refresh_rate'] = 2;

/**
* Exclude post types from sitemap indexing.
*/
Expand Down
27 changes: 26 additions & 1 deletion extensions/seo-sitemap/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ function fw_ext_seo_sitemap_get_search_engines_names( $array = true, $divider =

/**
* Return the home path
*
* @deprecated since version 1.2.0
*
* @return string
*/
function fw_ext_seo_sitemap_get_home_path() {
Expand Down Expand Up @@ -83,9 +86,11 @@ function fw_ext_seo_sitemap_get_stiemap_link() {

/**
* Updates sitemap
*
* @deprecated since version 1.2.0
*/
function fw_ext_seo_sitemap_update() {
fw()->extensions->get( 'seo-sitemap' )->update_sitemap();
return true;
}

/**
Expand All @@ -108,4 +113,24 @@ function fw_ext_seo_sitemap_try_make_file_writable( $filename ) {
}

return true;
}

function fw_ext_seo_sitemaps_array_merge_recursive(array & $array1, array & $array2)
{
$merged = $array1;

foreach ($array2 as $key => & $value)
{
if (is_array($value) && isset($merged[$key]) && is_array($merged[$key]))
{
$merged[$key] = fw_ext_seo_sitemaps_array_merge_recursive($merged[$key], $value);
} else if (is_numeric($key))
{
if (!in_array($value, $merged))
$merged[] = $value;
} else
$merged[$key] = $value;
}

return $merged;
}
Loading

0 comments on commit ddafb9b

Please sign in to comment.