Opened 16 years ago
Closed 16 years ago
#13911 closed defect (bug) (invalid)
update_option bug
| Reported by: | jowo | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.0 |
| Severity: | normal | Keywords: | reporter-feedback close |
| Cc: | Focuses: |
Description
update_option('show_on_front', 'page');
update_option('page_on_front', 1);
Does not work.
show_on_front is not updated in database
page_on_front does not even exist
Change History (6)
#2
@
16 years ago
- Keywords reporter-feedback close added
- Milestone 3.0 → Unassigned
- Priority high → normal
#5
@
16 years ago
Ok I finally tracked down the bug I was having. It was an error on my part.
In my plugin I did update_option() and below it I was running wp_delete_post(1, TRUE); which in turn reset those two options and actually deleted the "page_on_front" in database.
I guess because they are related and wp_delete_post() takes care of that. I thought it only worked with the wp_term* tables not options.
So works as intended.
Btw seems redundant to have two functions doing the exact same thing? update_option() seems to work as should.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Works for me.