开发者

Wordpress Automatic Backup Modification

I'm currently trying to change the Automatic WordPress Backup scr开发者_开发技巧ipt so that it can save files on a more regular basis (about once every 6 hours).

At the moment I can't get it to work so any help would be much appreciated. In automatic-wordpress-backup I've added 'often' => 600 in the init function (line 51) as well as adding 'Often' in the following code (line 369-373) :

<select name="s3b-schedule">
<?php foreach ( array('Disabled','Often','Hourly','Daily','Weekly','Monthly') as $s ) : ?>
    <option value="<?php echo strtolower($s) ?>" <?php if ( strtolower($s) == get_option('s3b-schedule') || ((get_option('s3b-schedule') === false || get_option('s3b-schedule') == '') && $s == 'Daily') ) echo 'selected="selected"' ?>><?php echo $s ?></option>
<?php endforeach; ?>
</select>

With the entire code being quite long I'm not sure if I need to upload everything to here or if you'll check the original package in the link provided above but if you need more information please let me know.

Thanks


I took a quick look.

To start, try pastie.org and paste source of plugin. I think you are going to get far fewer answers if people have to go download the plugin to view the source. I took a quick look and the changes you made seem reasonable.

See line 59 where the backup is scheduled using wp_schedule_event. This basically says, take the value passed in from the admin form and backup on this schedule. If this isn't working then install Fiddler and check the post data getting sent from the plugin when you save your changes. You should see your new 'often' option going in. If it is being passed in, but still not running then look at the hook s3-backup (third param). Something must be going wrong in there.

Good luck.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜