D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
cwd
/
wp-content
/
themes
/
newsplus1
/
inc
/
widgets
/
Filename :
widget-widgets-list.php
back
Copy
<?php /* Copyrights (C) Arb4Host Network */ ?> <?php function a4h_widget_widgets_list() { register_widget('a4h_widget_widgets_list'); } add_action('widgets_init', 'a4h_widget_widgets_list'); class a4h_widget_widgets_list 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 ?> <?php //sidebar fetch $sidebar_id = 'widgets_list_'.$instance['sidebar']; ?> <?php do_action('a4h_hook_widget_widgets_list_sidebar_before', $this, $instance); ?> <?php if ( is_active_sidebar($sidebar_id) ) { ?> <?php a4h_sidebar($sidebar_id) ;?> <?php } ?> <?php //end output echo $after_widget; } function update($new_instance, $old_instance) { $instance = $old_instance; //start instances $instance['title'] = strip_tags($new_instance['title']); $instance['sidebar'] = $new_instance['sidebar']; //end instances return $instance; } function form($instance) { $defaults = array(); $instance = wp_parse_args((array) $instance, $defaults); //start form ?> <?php a4h_widgets_input_fields($this, $instance, 'text', 'title', 'العنوان'); ?> <?php a4h_widgets_input_fields($this, $instance, 'select', 'sidebar', 'قائمة الودجات', array('options' => array('1' => '#1', '2' => '#2', '3' => '#3', '4' => '#4', '5' => '#5', '6' => '#6', '7' => '#7', '8' => '#8'))); ?> <?php //end form } }