static function getArchiveLink($filter = '', $taxonomy_term = Null) { $permalink_structure = Get_Option('permalink_structure'); # Get base url if ($taxonomy_term) { $base_url = Get_Term_Link($taxonomy_term); } else { $base_url = Get_Post_Type_Archive_Link(self::$post_type_name); } if (!empty($permalink_structure)) { return User_TrailingSlashIt(SPrintF('%1$s/filter:%2$s', RTrim($base_url, '/'), RawURLEncode($filter))); } else { return Add_Query_Arg(array('filter' => RawURLEncode($filter)), $base_url); } }
function Print_Taxonomy_Archive_Urls($tag, $taxonomy) { $taxonomy = Get_Taxonomy($taxonomy); $archive_url = Get_Term_Link(get_term($tag->term_id, $taxonomy->name)); $archive_feed = Get_Term_Feed_Link($tag->term_id, $taxonomy->name); ?> <tr class="form-field"> <th scope="row" valign="top"><?php echo I18n::t('Archive Url'); ?> </th> <td> <a href="<?php echo $archive_url; ?> " target="_blank"><?php echo $archive_url; ?> </a><br> <span class="description"><?php PrintF(I18n::t('This is the URL to the archive of this %s.'), $taxonomy->labels->singular_name); ?> </span> </td> </tr> <tr class="form-field"> <th scope="row" valign="top"><?php echo I18n::t('Archive Feed'); ?> </th> <td> <a href="<?php echo $archive_feed; ?> " target="_blank"><?php echo $archive_feed; ?> </a><br> <span class="description"><?php PrintF(I18n::t('This is the URL to the feed of the archive of this %s.'), $taxonomy->labels->singular_name); ?> </span> </td> </tr> <?php }