Make WordPress Core

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#20228 closed defect (bug) (invalid)

Image options can't be changed

Reported by: koke's profile 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)

#1 @ocean90
12 years ago

Sure that it's the right ticket you linked above?

#2 @koke
12 years ago

It wasn't :)
#18126

#3 @azaozz
12 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: @koke
12 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 @azaozz
12 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.

#6 @nacin
12 years ago

  • Keywords reporter-feedback close added
  • Version 3.4 deleted

#7 @iseulde
11 years ago

  • Keywords mobile close removed
  • Resolution set to invalid
  • Status changed from new to closed

#8 @ocean90
11 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.