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); } }
<?php if (!$this->Get('deactivate_archive')) { ?> <p> <?php PrintF($this->t('The Archive link for your Galleries is: <div><a href="%1$s" target="_blank">%1$s</a></div>'), Get_Post_Type_Archive_Link($this->core->gallery_post_type->name)); ?> </p> <p> <?php PrintF($this->t('The Archive Feed for your Galleries is: <div><a href="%1$s" target="_blank">%1$s</a></div>'), Get_Post_Type_Archive_Feed_Link($this->core->gallery_post_type->name)); ?> </p> <?php } ?> <h4><?php echo $this->t('Deactivate Archive'); ?> </h4> <p> <input type="checkbox" name="deactivate_archive" id="deactivate_archive" value="yes" <?php Checked($this->Get('deactivate_archive'), 'yes'); ?> > <label for="deactivate_archive"><?php echo $this->t('Deactivate the archive feature.'); ?> </label><br>
<?php namespace WordPress\Plugin\Glossary; ?> <p> <?php PrintF(I18n::t('The Archive link for your Glossary is: <a href="%1$s" target="_blank">%1$s</a>'), Get_Post_Type_Archive_Link(Post_Type::$post_type_name)); ?> </p> <p> <?php PrintF(I18n::t('The Archive Feed for your Glossary is: <a href="%1$s" target="_blank">%1$s</a>'), Get_Post_Type_Archive_Feed_Link(Post_Type::$post_type_name)); ?> </p><?php