示例#1
0
<?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>
示例#2
0
<?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