$28 GRAYBYTE WORDPRESS FILE MANAGER $95

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/home/bravrvjk/cepurhuye.rw/wp-content/plugins/bopea-function/widget/

HOME
Current File : /home/bravrvjk/cepurhuye.rw/wp-content/plugins/bopea-function/widget//recent-large.php
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
add_action('widgets_init', 'bopea_recent_large__widgets');

function bopea_recent_large__widgets() {
    register_widget('bopea_recent_large_widgets');
}

class bopea_recent_large_widgets extends WP_Widget {

/*-----------------------------------------------------------------------------------*/
/*  Widget Setup
/*-----------------------------------------------------------------------------------*/

    public function __construct() {
        $widget_ops = array(
            'classname' => 'main_post_style',
            'description' => esc_html__('Display post on menu or widget.', 'bopea-function')
        );
        parent::__construct('bopea_recent_large_widgets', esc_html__('&nbsp;Recent post large', 'bopea-function'), $widget_ops);
    }

/*-----------------------------------------------------------------------------------*/
/*  Display Widget
/*-----------------------------------------------------------------------------------*/
    function widget($args, $instance) {

        extract($args);

        $cats = isset($instance["cats"]) ? $instance["cats"] : "";
        $title = isset($instance['title']) ? esc_attr($instance['title']) : 'Recent Posts';
        $number = isset($instance['number']) ? absint($instance['number']) : 4;
        $number_offset = isset($instance['number_offset']) ? absint($instance['number_offset']) : 0;

        print $before_widget;

        // Widget title

        if ( $title ){ 
        print $before_title;
        print esc_attr($title);
        print $after_title;
        }
       ?>
        <div class="jl_wgli_w">
            <?php $jellywp_args = array(
                        'showposts' => $number,
                        'ignore_sticky_posts' => 1,
                        'post__not_in'   => array( get_the_ID() ),
                        'category__in' => $cats,
                        'offset' => $number_offset
            );
            $jellywp_widget = null;
            $jellywp_widget = new WP_Query($jellywp_args);
            ?>
            <?php while ($jellywp_widget->have_posts()) {
                $jellywp_widget->the_post();?>                         
                <div class="jl_cgrid_layout">
                    <?php if ( has_post_thumbnail()) {?>
                        <div class="jl_img_holder">
                        <div class="jl_imgw jl_radus_e">
                            <div class="jl_imgin">
                                <?php the_post_thumbnail('bopea_layouts');?>
                            </div>
                            <?php bopea_video_media(get_the_ID());?>
                            <?php bopea_review_bar(get_the_ID(), get_post_meta( get_the_ID(), true ));?>
                            <a class="jl_imgl" href="<?php the_permalink();?>"></a>
                        </div>
                        </div>
                    <?php }?>
                    <div class="jl_fe_text">
                        <?php bopea_post_cat(get_the_ID());?>
                        <h3 class="jl_fe_title"><a href="<?php the_permalink(); ?>"><?php the_title()?></a></h3>
                        <?php bopea_post_meta(get_the_ID());?>
                    </div>
                </div>              
            <?php }?>
        </div>
<?php
wp_reset_postdata();
print $after_widget;
}

/*-----------------------------------------------------------------------------------*/
/*  Update Widget
/*-----------------------------------------------------------------------------------*/

function update( $new_instance, $old_instance ) {
    $instance = $old_instance;
    $instance['title'] = strip_tags($new_instance['title']);
    $instance['cats'] = isset($new_instance['cats']) ? $new_instance['cats'] : "";
    $instance['number'] = absint($new_instance['number']);
    $instance['number_offset'] = absint($new_instance['number_offset']);
     
    return $instance;
}


function form( $instance ) {
    $title = isset($instance['title']) ? esc_attr($instance['title']) : 'Recent Posts';
    $number = isset($instance['number']) ? absint($instance['number']) : 4;
    $number_offset = isset($instance['number_offset']) ? absint($instance['number_offset']) : 0;
?>
<p><span class="widefat">
        <?php esc_html_e('Title:', 'bopea-function'); ?></span>
    <input class="widefat" name="<?php echo esc_attr($this->get_field_name('title')); ?>" type="text" value="<?php echo esc_attr($title); ?>" /></p>

<p><span class="widefat">
        <?php esc_html_e('Number of posts to show:', 'bopea-function'); ?></span>
    <input name="<?php echo esc_attr($this->get_field_name('number')); ?>" type="text" value="<?php echo esc_attr($number); ?>" style="width: 100%;"  /></p>

<p><span class="widefat">
        <?php esc_html_e('Offset posts:', 'bopea-function'); ?></span>
    <input name="<?php echo esc_attr($this->get_field_name('number_offset')); ?>" type="text" value="<?php echo esc_attr($number_offset); ?>" style="width: 100%;" /></p>
<p>
<span class="widefat">
        <?php esc_html_e('Choose your category:', 'bopea-function');?>
        <?php
                   $categories=  get_categories();
                     print "<br/>";
                     foreach ($categories as $cat) {
                    $option = '<input type="checkbox" name="' . $this->get_field_name('cats') . '[]"';
              
                    if (!empty($instance['cats'])) {
                        foreach ($instance['cats'] as $cats) {
                            if ($cats == $cat->term_id) {
                                $option = $option . ' checked="checked"';
                            }
                        }
                    }              
                    $option .= ' value="' . $cat->term_id . '" />';
                    $option .= '&nbsp;';
                    $option .= $cat->cat_name.' ('.esc_html( $cat->category_count ).')';
                    $option .= '<br />';
                    print $option;
                }
                    
                    ?>
    </span>
</p>
<?php }}?>


Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0755
about-us.php
38.562 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
author.php
4.242 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
contact-form-7.php
3.638 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
layout.php
3.193 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
recent-large.php
6.06 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644
recent-small.php
6.77 KB
25 Nov 2025 10.53 AM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF