HEX
Server: Apache
System: Linux nc-ph-4101.simplemoneygoals.com 5.14.0-503.21.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Jan 12 09:45:05 EST 2025 x86_64
User: dailygoldindex (1004)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: /home/dailygoldindex/public_html/wp-content/themes/jnews/class/Module/Post/Post_Share_View.php
<?php
/**
 * @author : Jegtheme
 */
namespace JNews\Module\Post;

Class Post_Share_View extends PostViewAbstract
{
    public function module_filter($attr)
    {
        add_filter('jnews_allow_override_share', '__return_false');

        add_filter('jnews_show_view_tag', function() use ($attr){ return $attr['show_view'] === 'yes'; });
        add_filter('jnews_show_share_tag', function() use ($attr){ return $attr['show_share'] === 'yes'; });
    }

    public function render_module_back($attr, $column_class)
    {
        $this->module_filter($attr);
        ob_start();

        if(defined('JNEWS_SOCIAL_SHARE'))
        {
            if($attr['share_style'] === 'top_share') {
                jnews_share_top_bar(get_the_ID());
            } else if($attr['share_style'] === 'bottom_share') {
                jnews_share_bottom_bar(get_the_ID());
            }
        }

        return "<div class='jeg_custom_share_wrapper {$attr['scheme']}'>" . ob_get_clean() . "</div>";
    }

    public function render_module_front($attr, $column_class)
    {
        return $this->render_module_back($attr, $column_class);
    }
}