/** * Render the what's changed section. * * @since 1.0 */ protected function render_whats_changed() { ?> <div class="spacing-wrapper bottom-border changelog-block"> <h4><?php _e("What's Changed", Plugin::SLUG); ?> <span class="tip" title="<?php _e("Don't include the version number or date, they'll be added automatically.", Plugin::SLUG); ?> ">i</span> </h4> <div class="whats-changed" title="<?php _e("Click to Edit", Plugin::SLUG); ?> "> <?php echo $this->release->get_changelog(); ?> </div> <div class="whats-changed-editor"> <?php wp_editor($this->release->get_changelog(), 'whats-changed-input', array('teeny' => true, 'editor_height' => '150px', 'media_buttons' => false)); ?> <p> <a href="javascript:" class="button" id="cancel-changelog-editor"> <?php _e("Cancel", Plugin::SLUG); ?> </a> <a href="javascript:" class="button button-primary" id="save-changelog-editor"> <?php _e("Save", Plugin::SLUG); ?> </a> </p> </div> </div> <?php }
/** * 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()); }