Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/* Show the modified date even though it's never been modified */ function jeg_get_post_date( $format = '', $post = null ) { $publish_date = isset( $post->publish_date ) ? date( $format ?: 'Y-m-d', $post->publish_date ) : get_the_date( $format, $post ); $modified_date = isset( $post->update_date ) ? date( $format ?: 'Y-m-d', $post->update_date ) : get_the_modified_date( $format, $post ); $publish_date_number_format = isset( $post->publish_date ) ? date( 'Y-m-d', $post->publish_date ) : get_the_date( 'Y-m-d', $post ); $modified_date_number_format = isset( $post->update_date ) ? date( 'Y-m-d', $post->update_date ) : get_the_modified_date( 'Y-m-d', $post ); if ( get_theme_mod( 'jnews_global_post_date', 'modified' ) === 'publish' ) { return $publish_date; } elseif ( get_theme_mod( 'jnews_global_post_date', 'modified' ) === 'both' ) { return $publish_date . ' - ' . jnews_return_translation( 'Updated on', 'jnews', 'updated_on' ) . ' ' . $modified_date; } elseif ( get_theme_mod( 'jnews_global_post_date', 'modified' ) === 'modified' ) { if ( strtotime( $publish_date_number_format ) >= strtotime( $modified_date_number_format ) ) { return $publish_date; } else { return $modified_date; } } return $publish_date; }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)