wpexplorer

Untitled

May 18th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. $months = array (
  2. 1 => 'Jan',
  3. 2 => 'Feb',
  4. 3 => 'Mar',
  5. 4 => 'Apr',
  6. 5 => 'May',
  7. 6 => 'Jun',
  8. 7 => 'July',
  9. 8 => 'Aug',
  10. 9 => 'Sep',
  11. 10 => 'Oct',
  12. 11 => 'Nov',
  13. 12 => 'Dec',
  14. );
  15.  
  16. $time = current_time('timestamp');
  17. $today_day = date('j', $time);
  18. $today_month = date('M', $time);
  19. $today_year = date('Y', $time);
  20.  
  21. // meta box ===> Events
  22. $earth_meta_boxes[] = array(
  23. 'id' => 'event_options',
  24. 'title' => __('Event Options','earth'),
  25. 'pages' => array('events'),
  26. 'fields' => array(
  27. array(
  28. 'name' => __('Start Date','earth'),
  29. 'desc' => __('Enter the start date for the event.','earth'),
  30. 'id' => $prefix . 'event_start_date',
  31. 'type' => 'date',
  32. 'std' => array(
  33. 'month' => $today_month,
  34. 'day' => $today_day,
  35. 'year' => $today_year,
  36. ),
  37. 'options' => array (
  38. 'month' => $months
  39. ),
  40. ),
  41. array(
  42. 'name' => __('End Date','earth'),
  43. 'desc' => __('Enter the end date for the event.','earth'),
  44. 'id' => $prefix . 'event_end_date',
  45. 'type' => 'date',
  46. 'std' => array(
  47. 'month' => 'Select Month',
  48. 'day' => '',
  49. 'year' => '',
  50. ),
  51. 'options' => array (
  52. 'month' => $months
  53. ),
  54. ),
Advertisement
Add Comment
Please, Sign In to add comment