WordPress bible example
-
I have picked up a copy of WordPress Bible and started to go through it. However, at the example where we create our first plugin I hit a brickwall. Basically, here’s the file I have created called copyright-notices.php
I repeated the code identically to how it’s listed on the book, and it opens in the Admin section, but doesn’t let me save the footer info in the database. Here’s the link to the full code of the plugin:
One weird thing I noticed is that in the form we use copyright_notices_text whereas when I update an option, it says copyright_notices_test. I think it’s a typo, but when I tried to syng them nothing happened. Also, what exactly does the last line mean:
add_action(‘load-copyright-notices.php’,’save_copyright_notices’);
in the code example online it looks different, like so:
add_action( ‘load-plugins_page_copyright-notices’, ‘save_copyright_notices’ );I tried all combinations, but neither one worked. The only thing between changes I made was refresh the page. Maybe there should be a different way to reload the plugin info in order for it to get notices?
Any thoughts are very welcome.
Thanks!
Luka
The topic ‘WordPress bible example’ is closed to new replies.