Skip to content

Commit

Permalink
Merge pull request #3319 from 10up/feature/status-report-download
Browse files Browse the repository at this point in the history
Add a download report button
  • Loading branch information
felipeelia authored Feb 22, 2023
2 parents ce6b431 + c5b5826 commit 304f26b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions assets/css/status-report.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
}

.ep-copy-button-wrapper {
align-items: center;
display: inline-flex;
margin: 0.5rem 0 1rem;
}

Expand Down
3 changes: 3 additions & 0 deletions includes/classes/Screen/StatusReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ public function render_reports() {
?>
<p><?php esc_html_e( 'This screen provides a list of information related to ElasticPress and synced content that can be helpful during troubleshooting. This list can also be copy/pasted and shared as needed.', 'elasticpress' ); ?></p>
<p class="ep-copy-button-wrapper">
<a download="elasticpress-report.txt" href="data:text/plain;charset=utf-8,<?php echo rawurlencode( implode( "\n\n", $copy_paste_output ) ); ?>" class="button button-primary" id="ep-download-report">
<?php esc_html_e( 'Download report', 'elasticpress' ); ?>
</a>
<button class="button" data-clipboard-text="<?php echo esc_attr( implode( "\n\n", $copy_paste_output ) ); ?>" id="ep-copy-report" type="button">
<?php esc_html_e( 'Copy status report to clipboard', 'elasticpress' ); ?>
</button>
Expand Down

0 comments on commit 304f26b

Please sign in to comment.