예제 #1
0
         }
         $variations = array_merge($variations, $utils->postTermFeedLinkVariations($post, true));
         break;
         // Break switch handler.
     // Break switch handler.
     case 'custom-post-type':
         // Feeds related to a custom post type archive view.
         if (!$post_id) {
             break;
             // Break switch handler.
         }
         if (!($post = get_post($post_id))) {
             break;
             // Break switch handler.
         }
         $variations = array_merge($variations, $utils->postTypeArchiveFeedLinkVariations($post));
         break;
         // Break switch handler.
         // @TODO Possibly consider search-related feeds in the future.
         //    See: <http://codex.wordpress.org/WordPress_Feeds#Categories_and_Tags>
 }
 if (!($variation_regex_frags = $utils->convertVariationsToHostCachePathRegexFrags($variations))) {
     return $counter;
     // Nothing to do here.
 }
 $in_sets_of = $self->applyWpFilters(GLOBAL_NS . '_autoClearXmlFeedsCache_in_sets_of', 10, get_defined_vars());
 for ($_i = 0; $_i < count($variation_regex_frags); $_i = $_i + $in_sets_of) {
     $_variation_regex_frags = array_slice($variation_regex_frags, $_i, $in_sets_of);
     $_regex = '/^\\/(?:' . implode('|', $_variation_regex_frags) . ')\\./i';
     $counter += $self->clearFilesFromHostCacheDir($_regex);
 }