コード例 #1
0
    /**
     * Render the replace file section.
     *
     * Only visible on draft views.
     *
     * @since 1.0
     */
    protected function render_replace_file_section()
    {
        ?>

		<div class="spacing-wrapper bottom-border replace-file-block">

			<span class="replace-file-container">
				<label>
					<?php 
        echo basename(get_attached_file($this->release->get_download()->ID));
        ?>
				</label>
				<a href="javascript:" class="button" id="replace-file"><?php 
        _e("Replace", Plugin::SLUG);
        ?>
</a>
			</span>
		</div>        <?php 
    }
コード例 #2
0
 /**
  * Get data to display for a single key.
  *
  * @param \ITELIC\Activation|\ITELIC\Release $release
  * @param bool                               $raw
  *
  * @return array
  */
 protected function get_fields_for_object(\ITELIC\Release $release, $raw = false)
 {
     if ($release->get_start_date()) {
         $started = $release->get_start_date()->format(DateTime::ISO8601);
     } else {
         $started = '-';
     }
     return array('ID' => $release->get_ID(), 'product' => $raw ? $release->get_product()->ID : $release->get_product()->post_title, 'version' => $release->get_version(), 'type' => $release->get_type(!$raw), 'status' => $release->get_status(!$raw), 'download' => $raw ? $release->get_download()->ID : $release->get_download()->post_title, 'started' => $started, 'changelog' => $release->get_changelog());
 }