PluginProbe ʕ •ᴥ•ʔ
پارسی دیت – Parsi Date / 2.1.6
پارسی دیت – Parsi Date v2.1.6
6.1 5.1.6 5.1.7 5.1.8 5.1.8.2 6.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.0.0-alpha 2.1 2.1.1 2.1.2 2.1.3 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0.1 2.3.0.2 2.3.1 2.3.2 2.3.3 2.3.4 3.0.1 3.0.2 3.0.3 4.0.0 4.0.1 4.0.2 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5
wp-parsidate / includes / widget / widget_calendar.php
wp-parsidate / includes / widget Last commit date
widget_archive.php 11 years ago widget_calendar.php 10 years ago
widget_calendar.php
40 lines
1 <?php
2 /**
3 * @author lord_viper
4 * @copyright 2013
5 */
6
7 class parsidate_calendar extends WP_Widget
8 {
9 public function __construct()
10 {
11 parent::WP_Widget(false,__('Jalali Date Calender','wp-parsidate'),'description='.__('Jalali Date Calender','wp-parsidate'));
12 }
13
14 public function form($instance)
15 {
16 ?>
17 <p style="text-align:right; direction:rtl">
18 <label><?php _e('Title:','wp-parsidate') ?></label>
19 <input style="width: 200px;" id="<?php echo $this->get_field_id('parsidate_calendar_title'); ?>" name="<?php echo $this->get_field_name('parsidate_calendar_title'); ?>" type="text" value="<?php echo (empty($instance['parsidate_calendar_title'])? __('Jalali Date Calender','wp-parsidate') :$instance['parsidate_calendar_title']) ?>" />
20 </p>
21 <?php
22 }
23
24 public function update($new_instance, $old_instance )
25 {
26 $instance = $old_instance;
27 $instance['parsidate_calendar_title'] = strip_tags($new_instance['parsidate_calendar_title']);
28 return $instance;
29 }
30
31 public function widget($args ,$instance)
32 {
33 extract($args);
34 $title = (empty($instance['parsidate_calendar_title']))?'':$instance['parsidate_calendar_title'];
35 echo "$before_widget\n$before_title $title $after_title";
36 wpp_get_calendar();
37 echo $after_widget;
38 }
39 }
40 ?>