Internet php Wordpress

php : Automatically updating Year in Copyright information for a website

Another year gone and it is time to change the copyright information. Here is a quick tip on updating the year automatically. Edit the footer.php or similar file which prints that Copyright information and add to it following php code. Here 2009 is the start year. See the bottom of this page for how this looks like.

2009 - <?php echo date('Y'); ?>
php Wordpress

WordPress : Restrict Comment changes to Admin and creator for 24 hours

Wordpress allows the “creator” of the post to edit anyone’s comment on that post (citation needed). And if the user has admin rights he can edit anyone’s comments. A requirement came across where I needed to limit the users to only edit their comments. I did not want them to play around with words of others on their posts. Also I did not want them to go back and edit their old comments (so they do not create unnecessary confusions for everyone). Here is a quick and dirty change that can limit the user’s capability on what they can do to comments. This shall be put in a plugin which will be the next thing I will take on.