Sindbad~EG File Manager
<?php
/*
* Security : blocking direct access
* Source : http://codex.wordpress.org/Theme_Development#Template_Files
*/
defined('ABSPATH') or die("Access Restricted");
$show_desc = mwp_option('mobile-posts-desc');
$show_cat = mwp_option('mobile-posts-cat');
$show_date = mwp_option('mobile-posts-date');
$no_lazyload = mwp_option('mobile-atf-nolazyload');
$get_cats_vid = mwp_option('category-videos');
$get_cats_gal = mwp_option('category-gallery');
$get_cats_eb = mwp_option('category-ebookmagazine');
$get_posts_style = mwp_option('mobile-posts-style');
$get_ppp = mwp_option('mobile-ppp');
$exclude_cats = mwp_option('mobile-posts-ec');
$encode_exclude_categories = base64_encode(serialize($exclude_cats));
$get_exclude_posts = mwp_option('mobile-posts-ep');
$exclude_posts = explode(',', $get_exclude_posts);
$encode_exclude_posts = base64_encode(serialize($exclude_posts));
$get_categories_vid_base = base64_encode(serialize(mwp_option('category-videos')));
$get_categories_gal_base = base64_encode(serialize(mwp_option('category-gallery')));
$page_per_page = (get_query_var('paged')) ? get_query_var('paged') : 1;
$param_query_blog = array(
'post__not_in' => $exclude_posts,
'category__not_in' => $exclude_cats,
'posts_per_page' => $get_ppp,
'paged' => $page_per_page
);
query_posts($param_query_blog);
/*
* hAtom Settings
*
*/
$hentry = mwp_option('seo-hatom');
if ($hentry == 1) {
$hentry_class = '';
$title_entry = '';
$summary_entry = '';
} else {
$hentry_class = ' hentry';
$title_entry = ' entry-title';
$summary_entry = ' entry-summary';
}
if ( have_posts() ) : ?>
<ul class="list-posts">
<?php
$c = 0;
while ( have_posts() ) : the_post();
$c++;
if (in_category($get_cats_eb, $post->ID)) {
$class_book = ' book';
} else {
$class_book = '';
}
?>
<li class="s2 post<?php echo $hentry_class; ?>">
<div class="thumbnail<?php echo $class_book; ?>">
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php
if(!empty($no_lazyload) && $c <= $no_lazyload || mwp_option('lazyload-mobile') == 0) {
if (in_category($get_cats_eb, $post->ID)) {
mwp_thumb_size('mwp-book', 350, 410, 'img-responsive no-lazy' );
} else {
mwp_smart_thumb_nolazy('mwp-small', $post->ID, 370, 210);
}
} else {
if (in_category($get_cats_eb, $post->ID)) {
mwp_thumb_size('mwp-book', 350, 410, 'img-responsive' );
} else {
mwp_smart_thumb('mwp-small', $post->ID, 370, 210);
}
}
if (in_category($get_cats_vid, $post->ID)) {
$duration = mwp_video_duration($post->ID);
if (!empty($duration)) {
?><div class="mduration bg-trans"><?php echo $duration; ?></div><?php
}
?><div class="mplay bg-trans"><i class="fa fa-play"></i></div><?php
}
if (in_category($get_cats_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 class="category">
<?php
if ($show_cat == 1) {
echo '<span class="'.mwp_csa_color().'">';
echo mwp_display_category_name($post->ID);
echo '</span>';
}
if ($show_date == 1 && $show_cat == 1) {
echo '<span class="separator">|</span>';
}
if ($show_date == 1) {
echo '<span class="time">';
if (is_rtl()) {
the_time('j F Y');
} else {
the_time('F jS, Y');
}
echo '</span>';
} ?>
</div>
<h2 class="<?php echo $title_entry; ?>">
<a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>">
<?php the_title(); ?>
</a>
</h2>
<?php if ($hentry == 0) { mwp_meta_hidden(); } ?>
</li>
<?php mwp_home_infeed_ad($c, 's2'); ?>
<?php endwhile; ?>
</ul>
<?php
if (mwp_option('mobile-load-posts') == 1) {
if (get_next_posts_link()) {
?>
<div class="wrap-load">
<div class="post-load">
<a class="pagination__next load-next-button" href="<?php echo next_posts($wp_query->max_num_pages, false) ?>"><?php esc_html_e( 'load more posts', MWP_TEXT_DOMAIN ); ?></a>
</div>
</div>
<?php
}
?>
<script src="<?php echo MWP_PATH_URL; ?>/js/infinite-scroll.min.js" defer="defer"></script>
<script>
jQuery(document).ready(function() {
var infScroll = new InfiniteScroll( '.list-posts', {
path: '.pagination__next',
append: '.s2',
checkLastPage: true,
prefill: false,
responseType: 'document',
outlayer: false,
scrollThreshold: 10,
elementScroll: false,
loadOnScroll: true,
history: 'replace',
historyTitle: true,
hideNav: '.wrap-load',
button: '.load-next-button',
<?php if (mwp_option('lazyload-mobile') == 1) { ?>
onInit: function() {
this.on('append',function() {
jQuery(window).lazyLoadXT();
})
},
<?php } ?>
debug: false,
})
});
</script>
<?php
} else {
if(function_exists('mwp_pagenavi')) {
mwp_pagenavi();
}
}
endif; // have_posts()
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists