Changeset 178396
- Timestamp:
- 12/01/2009 12:41:53 PM (16 years ago)
- Location:
- auto-schedule-posts
- Files:
-
- 5 added
- 2 edited
-
tags/1.0 (added)
-
tags/1.0/auto-schedule-posts.php (added)
-
tags/1.0/auto-schedule-posts.pot (added)
-
tags/1.0/readme.txt (added)
-
tags/1.0/screenshot-1.png (added)
-
trunk/auto-schedule-posts.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
auto-schedule-posts/trunk/auto-schedule-posts.php
r152119 r178396 4 4 Plugin URI: http://www.davidjmiller.org/auto-schedule-posts/ 5 5 Description: Controls the flow of posts preventing posts from publishing too close together and managing the posts between multiple authors for maximum variety 6 Version: 0.96 Version: 1.0 7 7 Author: David Miller 8 8 Author URI: http://www.davidjmiller.org/ … … 117 117 if ($lp == '0' || $lp == '' || $options['method'] == 'min') { 118 118 $published = $wpdb->get_results("SELECT MAX(post_date_gmt) as pt from $wpdb->posts where $wpdb->posts.post_status = 'publish'"); 119 foreach ($published as $last) $lp = $last->pt;119 foreach ($published as $last) $lp = strtotime($last->pt); 120 120 } 121 121 if (time() < ($lp + $interval + $gmtoffset)) $attempt = 'false'; // not time yet … … 190 190 if (isset($_POST['update_options'])) { 191 191 // Fill up the options array as necessary 192 $options['lpa'] = $_POST['lpa']; // maintain record of last post attempt when changing options. 192 193 $options['method'] = $_POST['method']; // 'set' times or 'min' gap 193 194 $options['interval'] = $_POST['interval']; … … 234 235 <h3><a href="http://www.davidjmiller.org/auto-schedule-posts/"><?php _e('Help and Instructions', 'auto_schedule_posts') ?></a></h3> 235 236 <h5><?php echo 'next ' . date('Y-m-d H:i',wp_next_scheduled('asp_pulse')) . ' ' . date('l') ?> </h5> 237 <h5><?php echo 'option_lpa ' . strtotime($options['lpa']) . '<br/>'; 238 echo 'db_lp:'; 239 $published = $wpdb->get_results("SELECT MAX(post_date_gmt) as pt from $wpdb->posts where $wpdb->posts.post_status = 'publish'"); 240 foreach ($published as $last) echo '<br/>' . $last->pt; ?> 241 </h5> 236 242 <form method="post" action=""> 237 243 <fieldset class="options"> … … 249 255 <th scope="row" align="right"><?php _e('Interval', 'auto_schedule_posts') ?>:</th> 250 256 <td><input name="interval" type="text" id="interval" value="<?php echo $options['interval']; ?>" size="10" /> <?php _e('Enter a value in minutes', 'auto_schedule_posts') ?> 257 <input type="hidden" name="lpa" id="lpa" value="<?php echo $options['lpa']; ?>" /> 251 258 </td> 252 259 </tr> -
auto-schedule-posts/trunk/readme.txt
r152119 r178396 37 37 == Changelog == 38 38 39 = 1.0 = 40 * After using this for quite some time I discovered one wrinkle to iron out - in version 0.9 the last published post time was not handled correctly so when updating options new posts could be published before the scheduled time. Now updating options will not open the gate for an extra post to be published. 39 41 = 0.9 = 40 * A virtually beta release - the posts are caught and scheduled, but I would like to add a feature such as onl ly scheduling on the hour (as opposed to at least an hour apart).42 * A virtually beta release - the posts are caught and scheduled, but I would like to add a feature such as only scheduling on the hour (as opposed to at least an hour apart).
Note: See TracChangeset
for help on using the changeset viewer.