|
Server IP : 10.106.20.8 / Your IP : 216.73.216.148 Web Server : Apache System : Linux webm008.cluster106.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : sixiemesrc ( 611999) PHP Version : 8.0.30 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/sixiemesrc/new/wp-content/plugins/gaaga-pro/../gaaga-pro/modules/blog/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
if( !class_exists( 'GaaGaProSiteBlog' ) ) {
class GaaGaProSiteBlog extends GaaGaPlusSiteBlog {
private static $_instance = null;
public $element_position = array();
public static function instance() {
if ( is_null( self::$_instance ) ) {
self::$_instance = new self();
}
return self::$_instance;
}
function __construct() {
$this->load_widgets();
add_action( 'gaaga_after_main_css', array( $this, 'enqueue_css_assets' ), 20 );
add_filter('blog_post_grid_list_style_update', array( $this, 'blog_post_grid_list_style_update' ));
add_filter('blog_post_cover_style_update', array( $this, 'blog_post_cover_style_update' ));
}
function enqueue_css_assets() {
wp_enqueue_style( 'gaaga-pro-blog', GAAGA_PRO_DIR_URL . 'modules/blog/assets/css/blog.css', false, GAAGA_PRO_VERSION, 'all');
$post_style = gaaga_get_archive_post_style();
$file_path = GAAGA_PRO_DIR_PATH . 'modules/blog/templates/'.esc_attr($post_style).'/assets/css/blog-archive-'.esc_attr($post_style).'.css';
if ( file_exists( $file_path ) ) {
wp_enqueue_style( 'wdt-blog-archive-'.esc_attr($post_style), GAAGA_PRO_DIR_URL . 'modules/blog/templates/'.esc_attr($post_style).'/assets/css/blog-archive-'.esc_attr($post_style).'.css', false, GAAGA_PRO_VERSION, 'all');
}
}
function load_widgets() {
add_action( 'widgets_init', array( $this, 'register_widgets_init' ) );
}
function register_widgets_init() {
include_once GAAGA_PRO_DIR_PATH.'modules/blog/widget/widget-recent-posts.php';
register_widget('GaaGa_Widget_Recent_Posts');
}
function blog_post_grid_list_style_update($list) {
$pro_list = array (
'wdt-simple' => esc_html__('Simple', 'gaaga-pro'),
'wdt-overlap' => esc_html__('Overlap', 'gaaga-pro'),
'wdt-thumb-overlap' => esc_html__('Thumb Overlap', 'gaaga-pro'),
'wdt-minimal' => esc_html__('Minimal', 'gaaga-pro'),
'wdt-fancy-box' => esc_html__('Fancy Box', 'gaaga-pro'),
'wdt-bordered' => esc_html__('Bordered', 'gaaga-pro'),
'wdt-magnificent' => esc_html__('Magnificent', 'gaaga-pro')
);
return array_merge( $list, $pro_list );
}
function blog_post_cover_style_update($list) {
$pro_list = array ();
return array_merge( $list, $pro_list );
}
}
}
GaaGaProSiteBlog::instance();
if( !class_exists( 'GaaGaProSiteRelatedBlog' ) ) {
class GaaGaProSiteRelatedBlog extends GaaGaProSiteBlog {
function __construct() {}
}
}