Sindbad~EG File Manager
<?php
/*
* Security : blocking direct access
* Source : http://codex.wordpress.org/Theme_Development#Template_Files
*/
defined('ABSPATH') or die("Access Restricted");
/*
* Function Description : Load More Posts with AJAX
* Author : Mouad Achemli
* Function Source : http://www.mwordpress.net
* Note : this function is important do not remove from here
* Ajax call in : /includes/blog/blog-1.php
*/
function load_more_custom_home1(){
global $post;
$paged = intval($_GET['paged'] + 1);
$post_per_page = intval($_GET['post_per_page']);
$list_exclude_post = esc_attr($_GET['list_exclude_post']);
$list_exclude_cat = esc_attr($_GET['list_exclude_cat']);
$exclude_post = unserialize(base64_decode($list_exclude_post));
$exclude_cat = unserialize(base64_decode($list_exclude_cat));
$show_desc = esc_attr($_GET['show_desc']);
$show_cat = esc_attr($_GET['show_cat']);
$show_date = esc_attr($_GET['show_date']);
$post_shdow = esc_attr($_GET['post_shdow']);
$get_categories_vid = unserialize(base64_decode($_GET['get_categories_vid']));
$get_categories_gal = unserialize(base64_decode($_GET['get_categories_gal']));
$text_color = esc_attr($_GET['text_color']);
$thumbnail_vyd = esc_attr($_GET['thumbnail_vyd']);
$date_format = esc_attr($_GET['date_format']);
$param = array(
'post_status' => 'publish',
'post__not_in' => $exclude_post,
'category__not_in' => $exclude_cat,
'posts_per_page' => $post_per_page,
'paged' => $paged
);
$home_page_query = new WP_Query( $param );
$output = '';
?>
<div>
<section class="ajax-output">
<?php while ($home_page_query->have_posts()) : $home_page_query->the_post(); ?>
<li class="ps1 hentry<?php echo $post_shdow; ?>">
<div class="block-a">
<div class="thumbnail">
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php
mwp_smart_thumb('mwp-medium', $post->ID, 520, 290);
if (in_category($get_categories_vid, $post->ID)) {
if ($thumbnail_vyd == 1) {
?><div class="mduration bg-trans"><?php echo mwp_video_duration($post->ID); ?></div><?php
}
?><div class="mplay bg-trans"><i class="fa fa-play"></i></div><?php
}
if (in_category($get_categories_gal, $post->ID)) {
?><div class="mduration bg-trans"><?php echo number_photo_gallery($post->ID); ?></div><?php
?><div class="mgallery bg-trans"><i class="fa fa-camera" aria-hidden="true"></i></div><?php
}
?>
</a>
</div>
</div>
<div class="block-b">
<h2 class="entry-title">
<a class="<?php echo $text_color; ?>" href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php the_title(); ?>
</a>
</h2>
<div class="category">
<?php if ($show_cat == 1) { ?>
<?php the_category( '<span class="separator">|</span> ' ); ?>
<?php } ?>
<?php if ($show_date == 1 && $show_cat == 1 || $show_date == 0 && $show_cat == 1 ) { ?>
<span class="separator">|</span>
<?php } ?>
<?php if ($show_date == 1) { ?>
<span class="time"><?php the_time($date_format); ?></span>
<?php } ?>
</div>
<?php if ($show_desc == 1) { ?>
<p class="entry-summary"><?php echo content(20, $post->ID); ?></p>
<?php } ?>
</div>
<?php mwp_meta_hidden(); ?>
</li>
<?php endwhile; ?>
</section>
</div>
<?php
wp_reset_postdata();
die($output);
}
add_action( MWP_AJAX_PREFIX . '_load_more_custom_home1', 'load_more_custom_home1');
add_action( MWP_AJAX_PREFIX . '_nopriv_load_more_custom_home1', 'load_more_custom_home1');
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists