OwlCyberSecurity - MANAGER
Edit File: index.php
<?php if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly. } if( !class_exists( 'NeytriProPostModern' ) ) { class NeytriProPostModern { private static $_instance = null; public static function instance() { if ( is_null( self::$_instance ) ) { self::$_instance = new self(); } return self::$_instance; } function __construct() { add_filter( 'neytri_post_styles', array( $this, 'add_post_styles_option' ) ); add_action( 'neytri_hook_container_before', array( $this, 'add_post_hook_container_before' ) ); } function add_post_styles_option( $options ) { $options['modern'] = esc_html__('Modern', 'neytri-pro'); return $options; } function add_post_hook_container_before() { if(is_singular('post')) { $post_id = get_the_ID(); $post_meta = get_post_meta( $post_id, '_neytri_post_settings', TRUE ); $post_meta = is_array( $post_meta ) ? $post_meta : array(); $post_style = !empty( $post_meta['single_post_style'] ) ? $post_meta['single_post_style'] : ''; if($post_style != 'modern') { return; } $template_args['post_ID'] = $post_id; $template_args['post_Style'] = $post_style; $template_args = array_merge( $template_args, neytri_single_post_params() ); ob_start(); echo '<div class="post-modern">'; echo '<div class="post-single-image">'; neytri_template_part( 'post', 'templates/'.$post_style.'/parts/image', '', $template_args ); echo '</div>'; ?> <div class="entry-post-navigation"><?php if( ! is_attachment() ) : $prev_post = get_previous_post(); if( !empty( $prev_post ) ): ?> <div class="post-prev-link"><?php if( has_post_thumbnail( $prev_post->ID ) ): $entry_bg = ''; $url = get_the_post_thumbnail_url( $prev_post->ID, 'full' ); $entry_bg = "style=background-image:url(".$url.")"; ?> <a href="<?php echo get_permalink( $prev_post->ID ); ?>" <?php echo esc_attr($entry_bg);?> class="prev-post-bgimg"></a><?php endif; ?> <div class="nav-title-wrap"> <span class="zmdi zmdi-long-arrow-left zmdi-hc-fw"></span> <span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve"><path d="M3.5,53.8L3.5,53.8c-0.2-0.5-0.3-0.9-0.4-1.4c0,0,0,0,0-0.1c-0.2-0.9-0.2-1.8,0-2.7c0,0,0,0,0-0.1 c0.1-0.4,0.2-0.9,0.4-1.3v-0.1c0.2-0.4,0.4-0.8,0.6-1.2v-0.1c0.3-0.4,0.6-0.8,0.9-1.1l29.7-29.6c2.9-2.9,7.6-2.9,10.5,0 c2.9,2.9,2.9,7.6,0,10.5l0,0l-16.9,17h62.3c4.1,0,7.4,3.3,7.4,7.4s-3.3,7.4-7.4,7.4H28.3l16.9,17c2.9,2.8,3,7.5,0.2,10.5 c-2.8,2.9-7.5,3-10.5,0.2c-0.1-0.1-0.1-0.1-0.2-0.2L5.1,56.2c-0.3-0.4-0.6-0.7-0.9-1.1V55C4,54.6,3.8,54.2,3.5,53.8"/></svg></span> <p><a href="<?php echo get_permalink( $prev_post->ID ); ?>" title="<?php echo esc_attr($prev_post->post_title); ?>"><?php esc_html_e('Prev','neytri-pro'); ?></a></p> <h3><a href="<?php echo get_permalink( $prev_post->ID ); ?>" title="<?php echo esc_attr($prev_post->post_title); ?>"><?php if( get_the_title( $prev_post->ID ) == '') { echo esc_html__('Previous Post', 'neytri-pro'); } else { echo "$prev_post->post_title"; } ?></a> </h3> </div> </div> <?php else: ?> <div class="post-prev-link no-post"> <a href="#" style="background-image:url(<?php echo esc_url(NEYTRI_ROOT_URI.'/assets/images/no-post.jpg') ?>);" class="prev-post-bgimg"></a> <div class="nav-title-wrap"> <span class="zmdi zmdi-long-arrow-left zmdi-hc-fw"></span> <h3><?php echo esc_html__('No previous story to show!', 'neytri-pro'); ?></h3> </div> </div> <?php endif; $next_post = get_next_post(); if( !empty( $next_post ) ): ?> <div class="post-next-link"><?php if( has_post_thumbnail( $next_post->ID ) ): $entry_bg = ''; $url = get_the_post_thumbnail_url( $next_post->ID, 'full' ); $entry_bg = "style=background-image:url(".$url.")"; ?> <a href="<?php echo get_permalink( $next_post->ID ); ?>" <?php echo esc_attr($entry_bg);?> class="next-post-bgimg"></a><?php endif; ?> <div class="nav-title-wrap"> <span class="zmdi zmdi-long-arrow-right zmdi-hc-fw"></span> <span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve"><path d="M97.5,53.8L97.5,53.8c0.2-0.5,0.3-0.9,0.4-1.4c0,0,0,0,0-0.1c0.2-0.9,0.2-1.8,0-2.7c0,0,0,0,0-0.1 c-0.1-0.4-0.2-0.9-0.4-1.3v-0.1c-0.2-0.4-0.4-0.8-0.6-1.2v-0.1c-0.3-0.4-0.6-0.8-0.9-1.1L66.3,16.2c-2.9-2.9-7.6-2.9-10.5,0 s-2.9,7.6,0,10.5l0,0l16.9,17H10.4C6.3,43.6,3,46.9,3,51s3.3,7.4,7.4,7.4h62.3l-16.9,17c-2.9,2.8-3,7.5-0.2,10.5 c2.8,2.9,7.5,3,10.5,0.2c0.1-0.1,0.1-0.1,0.2-0.2l29.6-29.6c0.3-0.4,0.6-0.7,0.9-1.1V55C97,54.6,97.2,54.2,97.5,53.8"/></svg></span> <p><a href="<?php echo get_permalink( $next_post->ID ); ?>" title="<?php echo esc_attr($next_post->post_title); ?>"><?php esc_html_e('Next','neytri-pro'); ?></a></p> <h3><a href="<?php echo get_permalink( $next_post->ID ); ?>" title="<?php echo esc_attr($next_post->post_title); ?>"><?php if(get_the_title( $next_post->ID ) == '') { echo esc_html__('Next Post', 'neytri-pro'); } else { echo "$next_post->post_title"; } ?></a> </h3> </div> </div> <?php else: ?> <div class="post-next-link no-post"> <a href="#" style="background-image:url(<?php echo esc_url(NEYTRI_ROOT_URI.'/assets/images/no-post.jpg') ?>);" class="next-post-bgimg"></a> <div class="nav-title-wrap"> <span class="zmdi zmdi-long-arrow-right zmdi-hc-fw"></span> <h3><?php echo esc_html__('No next story to show!', 'neytri-pro'); ?></h3> </div> </div> <?php endif; endif; ?> </div> <?php echo '</div>'; echo ob_get_clean(); } } } } NeytriProPostModern::instance();