Opened 15 years ago
Closed 15 years ago
#13911 closed defect (bug) (invalid)
update_option bug
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | General | Keywords: | reporter-feedback close |
Focuses: | Cc: |
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
@
15 years ago
- Keywords reporter-feedback close added
- Milestone changed from 3.0 to Unassigned
- Priority changed from high to normal
#5
@
15 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.
Note: See
TracTickets for help on using
tickets.
Works for me.