2023-11-08 20:03:19 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Partial: Chapter Changelog
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Fictioneer
|
|
|
|
* @since 5.7.5
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
// No direct access!
|
|
|
|
defined( 'ABSPATH' ) OR exit;
|
|
|
|
|
|
|
|
// Setup
|
2023-12-02 01:39:14 +01:00
|
|
|
$changelog = array_reverse( fictioneer_get_story_changelog( $post->ID ) );
|
2023-11-08 20:03:19 +01:00
|
|
|
$output = '';
|
|
|
|
|
|
|
|
// Prepare changelog
|
|
|
|
foreach ( $changelog as $entry ) {
|
|
|
|
$output .= '[' . date_i18n( 'Y/m/d H:i:s', $entry[0] ) . '] ' . $entry[1] . "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
2024-12-06 17:38:32 +01:00
|
|
|
<div id="chapter-changelog-modal" class="chapter-changelog modal" data-fictioneer-target="modal" data-action="click->fictioneer#backgroundCloseModals keydown.esc@document->fictioneer#closeModals" data-nosnippet hidden>
|
2023-11-08 20:03:19 +01:00
|
|
|
<div class="modal__wrapper">
|
2024-12-06 17:38:32 +01:00
|
|
|
|
|
|
|
<button class="close" aria-label="<?php esc_attr_e( 'Close modal', 'fictioneer' ); ?>" data-action="click->fictioneer#closeModals"><?php fictioneer_icon( 'fa-xmark' ); ?></button>
|
|
|
|
|
2024-03-14 00:33:00 +01:00
|
|
|
<div class="modal__header drag-anchor"><?php _e( 'Changelog', 'fictioneer' ); ?></div>
|
2023-11-08 20:03:19 +01:00
|
|
|
|
2024-10-01 21:47:11 +02:00
|
|
|
<div class="modal__row _textarea _small-top">
|
2023-11-08 20:03:19 +01:00
|
|
|
<textarea class="modal__textarea _changelog" readonly><?php echo $output; ?></textarea>
|
|
|
|
</div>
|
2024-12-06 17:38:32 +01:00
|
|
|
|
2023-11-08 20:03:19 +01:00
|
|
|
</div>
|
|
|
|
</div>
|