D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
sadaunjx
/
aldolynews.com
/
wp-content
/
themes
/
newsplus
/
inc
/
widgets
/
Filename :
widget-latest-posts-home.php
back
Copy
<?php /* Copyrights (C) Arb4Host Network */ ?> <?php function a4h_widget_latest_posts_home() { register_widget('a4h_widget_latest_posts_home'); } add_action('widgets_init', 'a4h_widget_latest_posts_home'); class a4h_widget_latest_posts_home extends WP_Widget { function __construct() { parent::__construct(false, THEME_PREFIX.' | '.'أحدث المقالات للصفحة الرئيسية'); } function widget($args, $instance) { extract($args); $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'] , $instance, $this->id_base); echo $before_widget; if ( $title ) { echo $before_title.$title.$after_title; } //start output ?> <div class="archive-inner"> <div class="posts-outer"> <div class="posts <?php echo a4h_options('archive_style'); ?>"> <div class="posts-inner"> <?php while ( have_posts() ) : the_post(); do_action('a4h_hook_archive_loop_start'); get_template_part('archive-loop'); do_action('a4h_hook_archive_loop_end'); endwhile; ?> </div> </div> </div> <?php a4h_posts_pagination(); ?> </div> <?php //end output echo $after_widget; } function update($new_instance, $old_instance) { $instance = $old_instance; //start instances $instance['title'] = strip_tags($new_instance['title']); //end instances return $instance; } function form($instance) { $defaults = array(); $instance = wp_parse_args((array) $instance, $defaults); //start form $posts_list_styles = array('style1' => '(#1) صورة بجانبها عنوان', 'style2' => '(#2) صورة أسفلها عنوان', 'style3' => '(#3) صورة أسفلها عنوان بخلفية سوداء', 'style11' => '(#4) شكل مخصص', 'style12' => '(#5) شكل مخصص', 'style13' => '(#6) شكل مخصص', 'style14' => '(#6) شكل مخصص', 'style15' => '(#7) شكل مخصص', 'style31' => '(#8) شكل مخصص', 'style32' => '(#9) شكل مخصص', 'style33' => '(#10) شكل مخصص'); $posts_list_styles = apply_filters('a4h_filter_posts_list_styles', $posts_list_styles); ?> <?php a4h_widgets_input_fields($this, $instance, 'text', 'title', 'العنوان'); ?> <?php //end form } }