secret
Created

  • Download Gist
gistfile1.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// NEW CODE:
 
// Update the dynamic data if we're on the continents.php page
if ($_SERVER['SCRIPT_NAME'] == '/continents.php')
{
$catDataObj = get_category_by_slug( @$_GET['continent'] );
if ($catDataObj !== false) // check that we have a valid continent value
{
$cid = $catDataObj->term_id;
$filter = array('filter'=>'cats', 'filterDetail'=>'all:' . $cid);
$contentDiv = preg_replace('|<li class="erwpFeaturedPhotos".*?data-filterDetail="[^"]*"|', '<li class="erwpFeaturedPhotos" data-filter="' . $filter['filter'] . '" data-filterDetail="' . $filter['filterDetail'] . '"', $contentDiv);
}
}
 
// EXISTING CODE:
// Search for dynamic content and replace
$contentDiv = self::replaceDynamicRotatorHTML($contentDiv);

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.