#20228 closed defect (bug) (invalid)
Image options can't be changed
Reported by: | koke | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Media | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
While testing #19126 I noticed the following options can never change:
- image_default_link_type
- image_default_size
- image_default_align
The "Add media" dialog remembers the last setting for size/align by using cookies. Link type always defaults to file.
Change History (8)
#3
@
13 years ago
As far as I remember there was a UX discussion whether these options should be in Settings -> Media or the last used one should be "remembered". At the end the second one was added but the options were left so plugins can use/change them.
Not sure what would be best for XML-RPC. Maybe the "screen states" can be loaded and used there? Have a look in set_user_setting(), get_user_setting() and wp_user_settings(). Thinking that get_user_option( 'user-settings', $user->ID );
can be parsed and sent to the client app.
#4
follow-up:
↓ 5
@
13 years ago
I guess it'd be better to have that settings per user, but anything works for me as long as it behaves the same way as the web UI.
#5
in reply to:
↑ 4
@
13 years ago
Replying to koke:
It is per user. The way that API works is by setting a cookie from JS when the user changes something. On the next page load that cookie is stored in the DB as "user option". Then the same data is accessible both from PHP and JS even if the user switches to another browser. In that case the cookie is also synced from the DB to the new browser.
That makes it possible to always use the right "UI states" when generating the page from PHP regardless of whether the user is in the same browser, has disabled JS, etc.
Sure that it's the right ticket you linked above?