-
-
Save anonymous/8371ce267d480d2b6859 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment