uawdijnntqw1x1x1
IP : 216.73.216.109
Hostname : premium160.web-hosting.com
Kernel : Linux premium160.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
batcwwjx
/
.
/
old
/
.
/
.trash
/
wp-content
/
plugins
/
charitious-assistance
/
xs-assistance.php
/
/
<?php /** Plugin Name: Charitious Assistance Plugin URI:http://xpeedstudio.com Description: Charitious Features is a plugin for our Charitious Theme. Author: xpeedstudio Author URI: http://xpeedstudio.com Version:1.0.0 */ if ( ! defined( 'ABSPATH' ) ) exit; define("XS_PLUGIN_DIR", plugin_dir_path(__FILE__ )); class Xs_Main{ /** * Holds the class object. * * @since 1.0.0 * */ public static $_instance; /** * Plugin Name * * @since 1.0.0 * */ public $plugin_name = 'Charitious Assistance'; /** * Plugin Version * * @since 1.0.0 * */ public $plugin_version = '1.0.0'; /** * Plugin File * * @since 1.0.0 * */ public $file = __FILE__; /** * Load Construct * * @since 1.0.0 */ public function __construct(){ $this->xs_plugin_init(); } /** * Plugin Initialization * * @since 1.0.0 * */ public function xs_plugin_init(){ require_once (plugin_dir_path($this->file). 'post-type/xs-post-class.php'); } public static function xs_get_instance() { if (!isset(self::$_instance)) { self::$_instance = new Xs_Main(); } return self::$_instance; } public function get_social_share(){ ?> <div class="share-items"> <h5 class="xs-post-sub-heading"><?php echo esc_html__('Social Share','charitious'); ?></h5> <ul class="xs-social-list square"> <li><a class="color-facebook" href="http://www.facebook.com/share.php?u=<?php esc_url(the_permalink());?>title=<?php esc_url(the_title());?>"><i class="fa fa-facebook"></i></a></li> <li><a class="color-twitter" href="http://twitter.com/intent/tweet?status=<?php esc_url(the_title());?>+<?php esc_url(the_permalink());?>"><i class="fa fa-twitter"></i></a></li> <li><a class="color-facebook" href="http://www.linkedin.com/shareArticle?mini=true&url=<?php esc_url(the_permalink());?>&title=<?php esc_url(the_title());?>&source=<?php echo esc_url(home_url('/'));?>"><i class="fa fa-linkedin"></i></a></li> <li><a class="color-pinterest" href="http://pinterest.com/pin/create/bookmarklet/?url=<?php esc_url(the_permalink());?>&is_video=false&description=<?php esc_url(the_title());?>"><i class="fa fa-pinterest-p"></i></a></li> <li><a class="color-pinterest" href="https://plus.google.com/share?url=<?php esc_url(the_permalink());?>"><i class="fa fa-google-plus"></i></a></li> </ul> </div> <?php } // function to display number of posts. public function getPostViews($postID){ $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); return esc_html__("0 View","charitious"); } if( $count <= 1 ){ return $count.esc_html__(" View","charitious"); }else{ return $count.esc_html__(" Views","charitious"); } } // function to count views. public function setPostViews($postID) { $count_key = 'post_views_count'; $count = get_post_meta($postID, $count_key, true); if($count==''){ $count = 0; delete_post_meta($postID, $count_key); add_post_meta($postID, $count_key, '0'); }else{ $count++; update_post_meta($postID, $count_key, $count); } } public function get_related_post($xs_post_cat, $post_count,$count_col){ $query = array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $post_count, 'cat' => $xs_post_cat, ); $wp_query = new \WP_Query( $query ); if($wp_query->have_posts()): ?> <div class="row xs-blog-grid"> <?php while ($wp_query->have_posts()) : $wp_query->the_post(); $terms = get_the_terms( get_the_ID(), 'category' ); if ( $terms && ! is_wp_error( $terms ) ) : $cat_temp = ''; foreach ( $terms as $term ) { $cat_temp .= '<a href="'.get_category_link($term->term_id).'" class="xs-blog-meta-tag green-bg bold color-white xs-border-radius" rel="category tag">'.$term->name.'</a>'; } endif; $num_comments = get_comments_number(); // get_comments_number returns only a numeric value if ( $num_comments == 0 ) { $comments = esc_html__('No Comments','charitious'); } elseif ( $num_comments > 1 ) { $comments = $num_comments . esc_html__(' Comments','charitious'); } else { $comments = esc_html__('1 Comment'); } ?> <div class="col-md-6 col-lg-<?php echo esc_attr($count_col);?>"> <div class="xs-box-shadow xs-single-journal"> <?php if(has_post_thumbnail()): ?> <div class="entry-thumbnail "> <?php $img = wp_get_attachment_image_src(get_post_thumbnail_id( $wp_query->ID ),'full'); $img = $img[0]; ?> <img src="<?php echo esc_url($img); ?>" alt="<?php echo get_the_title($wp_query->ID); ?>"> <div class="post-author"> <span class="xs-round-avatar"> <?php echo get_avatar( get_the_author_meta( 'ID' ), 55 );?> </span> <span class="author-name"> <a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) );?>"><?php esc_html_e('By ','charitious');?><?php echo get_the_author(); ?></a> </span> </div> </div> <?php endif; ?> <div class="entry-header"> <div class="entry-meta"> <span class="date"> <a href="" rel="bookmark" class="entry-date"> <?php echo get_the_date('d F Y');?> </a> </span> </div> <h4 class="entry-title"> <a href="<?php echo get_the_permalink(); ?>"><?php the_title(); ?></a> </h4> </div> <span class="xs-separetor"></span> <div class="post-meta"> <?php if ( comments_open() ) { ?> <span class="comments-link"> <i class="fa fa-comments-o"></i> <a href="<?php echo get_comments_link();?>"><?php echo esc_html($comments);?></a> </span> <?php } ?> <span class="view-link"> <i class="fa fa-eye"></i> <a href=""><?php echo $this->getPostViews(get_the_ID());?></a> </span> </div> </div> </div> <?php endwhile; ?> </div> <?php endif; wp_reset_postdata(); } } $Xs_Main = Xs_Main::xs_get_instance();
/home/batcwwjx/./old/./.trash/wp-content/plugins/charitious-assistance/xs-assistance.php