Editorial Calendar - Version 2.1

Version Description

The calendar now moves posts from the drafts drawer to the main calendar properly on blogs with the alternate functionality of the date function.

The calendar can now display up to eight weeks at a time instead of just five.

Download this release

Release Info

Developer zgrossbart
Plugin Icon wp plugin Editorial Calendar
Version 2.1
Comparing to
See all releases

Code changes from version 2.0 to 2.1

Files changed (3) hide show
  1. edcal.js +4 -7
  2. edcal.php +14 -3
  3. readme.txt +8 -2
edcal.js CHANGED
@@ -84,7 +84,7 @@ var edcal = {
84
  This is a preference value indicating if you see the post author
85
  */
86
  authorPref: false,
87
-
88
  /*
89
  This is a preference value indicating if you see the post time
90
  */
@@ -2390,7 +2390,7 @@ var edcal = {
2390
  '<select id="edcal_weeks_pref" ' + 'class="screen-per-page" title="' + edcal.str_weekstt + '"> ';
2391
 
2392
  var weeks = parseInt(edcal.weeksPref, 10);
2393
- for (i = 1; i < 6; i++) {
2394
  if (i === weeks) {
2395
  optionsHtml += '<option selected="true">' + i + '</option>';
2396
  } else {
@@ -2491,11 +2491,8 @@ var edcal = {
2491
  We start by validating the number of weeks. We only allow
2492
  1, 2, 3, 4, or 5 weeks at a time.
2493
  */
2494
- if (jQuery('#edcal_weeks_pref').val() !== '1' &&
2495
- jQuery('#edcal_weeks_pref').val() !== '2' &&
2496
- jQuery('#edcal_weeks_pref').val() !== '3' &&
2497
- jQuery('#edcal_weeks_pref').val() !== '4' &&
2498
- jQuery('#edcal_weeks_pref').val() !== '5') {
2499
  humanMsg.displayMsg(edcal.str_weekserror);
2500
  return;
2501
  }
84
  This is a preference value indicating if you see the post author
85
  */
86
  authorPref: false,
87
+
88
  /*
89
  This is a preference value indicating if you see the post time
90
  */
2390
  '<select id="edcal_weeks_pref" ' + 'class="screen-per-page" title="' + edcal.str_weekstt + '"> ';
2391
 
2392
  var weeks = parseInt(edcal.weeksPref, 10);
2393
+ for (i = 1; i < 9; i++) {
2394
  if (i === weeks) {
2395
  optionsHtml += '<option selected="true">' + i + '</option>';
2396
  } else {
2491
  We start by validating the number of weeks. We only allow
2492
  1, 2, 3, 4, or 5 weeks at a time.
2493
  */
2494
+ var weeks = parseInt(jQuery('#edcal_weeks_pref').val(), 10);
2495
+ if (weeks < 1 || weeks > 8) {
 
 
 
2496
  humanMsg.displayMsg(edcal.str_weekserror);
2497
  return;
2498
  }
edcal.php CHANGED
@@ -18,7 +18,7 @@
18
  /*
19
  Plugin Name: WordPress Editorial Calendar
20
  Description: The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
21
- Version: 2.0
22
  Author: Colin Vernon, Justin Evans, Joachim Kudish, Mary Vogt, and Zack Grossbart
23
  Author URI: http://www.zackgrossbart.com
24
  Plugin URI: http://stresslimitdesign.com/editorial-calendar-plugin
@@ -317,7 +317,7 @@ class EdCal {
317
  edcal.str_opt_time = <?php echo($this->edcal_json_encode(__('Time of day', 'editorial-calendar'))) ?>;
318
  edcal.str_fatal_error = <?php echo($this->edcal_json_encode(__('An error occurred while loading the calendar: ', 'editorial-calendar'))) ?>;
319
 
320
- edcal.str_weekserror = <?php echo($this->edcal_json_encode(__('The calendar can only show between 1 and 5 weeks at a time.', 'editorial-calendar'))) ?>;
321
  edcal.str_weekstt = <?php echo($this->edcal_json_encode(__('Select the number of weeks for the calendar to show.', 'editorial-calendar'))) ?>;
322
 
323
  edcal.str_showdrafts = <?php echo($this->edcal_json_encode(__('Show Unscheduled Drafts'))) ?>;
@@ -388,7 +388,7 @@ class EdCal {
388
  </div>
389
 
390
  <div id="topright" class="tablenav-pages alignright">
391
- <a class="save button" title="<?php echo(__('Show unscheduled posts', 'editorial-calendar')) ?>" id="showdraftsdrawer"><?php echo(__('Show Drafts', 'editorial-calendar')) ?></a>
392
  </div>
393
  </div>
394
 
@@ -738,6 +738,17 @@ class EdCal {
738
  if ($post_date_gmt == '01011970') {
739
  $post_date_gmt = '00000000';
740
  }
 
 
 
 
 
 
 
 
 
 
 
741
  ?>
742
  {
743
  "date" : "<?php the_time('d') ?><?php the_time('m') ?><?php the_time('Y') ?>",
18
  /*
19
  Plugin Name: WordPress Editorial Calendar
20
  Description: The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
21
+ Version: 2.1
22
  Author: Colin Vernon, Justin Evans, Joachim Kudish, Mary Vogt, and Zack Grossbart
23
  Author URI: http://www.zackgrossbart.com
24
  Plugin URI: http://stresslimitdesign.com/editorial-calendar-plugin
317
  edcal.str_opt_time = <?php echo($this->edcal_json_encode(__('Time of day', 'editorial-calendar'))) ?>;
318
  edcal.str_fatal_error = <?php echo($this->edcal_json_encode(__('An error occurred while loading the calendar: ', 'editorial-calendar'))) ?>;
319
 
320
+ edcal.str_weekserror = <?php echo($this->edcal_json_encode(__('The calendar can only show between 1 and 8 weeks at a time.', 'editorial-calendar'))) ?>;
321
  edcal.str_weekstt = <?php echo($this->edcal_json_encode(__('Select the number of weeks for the calendar to show.', 'editorial-calendar'))) ?>;
322
 
323
  edcal.str_showdrafts = <?php echo($this->edcal_json_encode(__('Show Unscheduled Drafts'))) ?>;
388
  </div>
389
 
390
  <div id="topright" class="tablenav-pages alignright">
391
+ <a class="save button" title="<?php echo(__('Show unscheduled posts', 'editorial-calendar')) ?>" id="showdraftsdrawer"><?php echo(__('Show Unscheduled Drafts', 'editorial-calendar')) ?></a>
392
  </div>
393
  </div>
394
 
738
  if ($post_date_gmt == '01011970') {
739
  $post_date_gmt = '00000000';
740
  }
741
+
742
+ /*
743
+ * The date function in PHP isn't consistent in the way it handles
744
+ * formatting dates that are all zeros. In that case we can manually
745
+ * format the all zeros date so it shows up properly.
746
+ */
747
+ if ($post->post_date_gmt == '0000-00-00 00:00:00') {
748
+ $post_date_gmt = '00000000';
749
+ }
750
+
751
+
752
  ?>
753
  {
754
  "date" : "<?php the_time('d') ?><?php the_time('m') ?><?php the_time('Y') ?>",
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: cvernon, justinstresslimit, jkudish, MaryVogt, zgrossbart
3
  Tags: posts, post, calendar, AJAX, admin, administration
4
  Requires at least: 2.8.5
5
- Tested up to: 3.3.2
6
- Stable tag: 2.0
7
 
8
  The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
9
 
@@ -173,6 +173,12 @@ Moving published posts can cause problems with some RSS feeds and is generally n
173
 
174
  == Changelog ==
175
 
 
 
 
 
 
 
176
  = 2.0 =
177
 
178
  The calendar now has a new major feature, the "drafts drawer," a post staging area where we make all unscheduled posts available to drag onto the calendar. You can also now drag posts from the calendar back into the drafts drawer to "un-schedule" them.
2
  Contributors: cvernon, justinstresslimit, jkudish, MaryVogt, zgrossbart
3
  Tags: posts, post, calendar, AJAX, admin, administration
4
  Requires at least: 2.8.5
5
+ Tested up to: 3.4
6
+ Stable tag: 2.1
7
 
8
  The Editorial Calendar makes it possible to see all your posts and drag and drop them to manage your blog.
9
 
173
 
174
  == Changelog ==
175
 
176
+ = 2.1 =
177
+
178
+ The calendar now moves posts from the drafts drawer to the main calendar properly on blogs with the alternate functionality of the date function.
179
+
180
+ The calendar can now display up to eight weeks at a time instead of just five.
181
+
182
  = 2.0 =
183
 
184
  The calendar now has a new major feature, the "drafts drawer," a post staging area where we make all unscheduled posts available to drag onto the calendar. You can also now drag posts from the calendar back into the drafts drawer to "un-schedule" them.