| Server IP : 104.26.3.156 / Your IP : 216.73.216.185 Web Server : nginx/1.27.1 System : Linux us-1 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64 User : vinodai ( 3134) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /storage/v1396/vinoddoshi2/public_html/wp-content/themes/oceanwp/partials/single/metas/ |
Upload File : |
<?php
/**
* Post single header meta style
*
* @package OceanWP WordPress theme
*/
// Exit if accessed directly.
defined( 'ABSPATH' ) or exit;
// Get meta sections.
$sections = ocean_blog_single_header_meta();
// Return if sections are empty, not post type or quote post format.
if ( empty( $sections ) || 'post' !== get_post_type() || 'quote' === get_post_format() ) {
return;
}
// Don't display modified date if the same as the published date.
$ocean_date_onoff = false;
$ocean_date_onoff = apply_filters( 'ocean_single_header_modified_date_state', $ocean_date_onoff );
$display_mod_date = ( false === $ocean_date_onoff || ( true === $ocean_date_onoff && ( get_the_date() != get_the_modified_date() ) ) ) ? true : false;
do_action( 'ocean_before_single_post_header_meta' );
?>
<ul class="meta-item meta-style-2 <?php echo ocean_blog_single_header_meta_separator_class(); ?>">
<?php
// Loop through meta sections.
foreach ( $sections as $section ) {
?>
<?php if ( 'author' === $section ) { ?>
<li class="meta-author"><?php ocean_get_post_author(); ?></li>
<?php } ?>
<?php if ( 'date' === $section ) { ?>
<li class="meta-date"><?php ocean_get_post_date(); ?></li>
<?php } ?>
<?php if ( 'mod-date' === $section && true === $display_mod_date ) { ?>
<li class="meta-mod-date"><?php ocean_get_post_modified_date(); ?></li>
<?php } ?>
<?php if ( 'categories' === $section && has_category() ) { ?>
<li class="meta-cat"><?php ocean_get_post_categories(); ?></li>
<?php } ?>
<?php if ( 'tags' === $section && ! empty( ocean_get_post_tags( '', false ) ) ) { ?>
<li class="meta-tag"><?php ocean_get_post_tags(); ?></li>
<?php } ?>
<?php if ( 'reading-time' === $section ) { ?>
<li class="meta-rt"><?php ocean_get_post_reading_time(); ?></li>
<?php } ?>
<?php if ( 'comments' === $section && comments_open() && ! post_password_required() ) { ?>
<li class="meta-comments"><?php comments_popup_link( esc_html__( '0 Comments', 'oceanwp' ), esc_html__( '1 Comment', 'oceanwp' ), esc_html__( '% Comments', 'oceanwp' ), 'comments-link' ); ?></li>
<?php } ?>
<?php } ?>
</ul>
<?php do_action( 'ocean_after_single_post_header_meta' ); ?>