Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show submitted date in Plugin Controls #369

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

ernilambar
Copy link
Member

@ernilambar ernilambar marked this pull request as ready for review September 15, 2024 04:15
@@ -192,6 +192,11 @@ protected static function display_meta() {
<td><strong><?php printf( '<span title="%s">%s ago</span>', esc_attr( $post->last_updated ), human_time_diff( strtotime( $post->last_updated ) ) ); ?></strong></td>
</tr>

<tr>
<td><?php _e( 'Submitted:', 'wporg-plugins' ); ?></td>
<td><strong><?php printf( '<span title="%s">%s ago</span> (%s)', esc_attr( $post->_submitted_date ), human_time_diff( strtotime( $post->_submitted_date ) ), esc_html( gmdate( 'Y/m/d g:i a', $post->_submitted_date ?? 0 ) ) ); ?></strong></td>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the strtotime() is incorrect here; _submitted_date seems to be stored as a unix timestamp rather than a string like last_updated.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not able to setup proper WP local dev setup for "wordpress.org". So I prepared PR just by guessing variables.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate if you could edit the PR and update as required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants