Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#15153 closed enhancement (fixed)

Add Media Settings calls to XML-RPC

Reported by: frsh's profile frsh Owned by: westi's profile westi
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: XML-RPC Keywords: media settings, xml-rpc
Focuses: Cc:

Description

Proposal: Add functionality to allow a caller to read and update a user's preferences in Media Settings.

wp.getMediaSettings
This call would return settings available in the Media Settings area of wp-admin. For example: If a user has specified properties for Image Sizes such as Thumbnail Size, Medium Size, and Large Size, this call would return those properties.

wp.setMediaSettings
This call would allow a caller to save settings available in the Media Settings area of wp-admin. For example: A user changes their preference for Image resizing inside of a mobile app, and the setting is updated in their Media Settings area as well.

Attachments (2)

patch-15153-1.diff (2.8 KB) - added by koke 14 years ago.
First patch proposal
patch-15153-2.diff (1.4 KB) - added by koke 14 years ago.
Patch using getOption/setOption instead of custom methods

Download all attachments as: .zip

Change History (13)

#1 @westi
14 years ago

  • Owner set to westi
  • Status changed from new to accepted

#2 @mtdewvirus
14 years ago

  • Cc mtdewvirus@… added

#3 @koke
14 years ago

  • Cc koke added

#4 @westi
14 years ago

I think it might be better to extend the list of options that can be set/read using wp.getOptions / wp.setOptions

#5 @josephscott
14 years ago

  • Cc josephscott added

I second westi's suggestion, this should make use of the existing options methods instead of adding new methods.

@koke
14 years ago

First patch proposal

#6 @koke
14 years ago

Right now the proposed patch returns the settings as a list of related options:

  <member><name>thumbnail_size_w</name><value><int>96</int></value></member>
  <member><name>thumbnail_size_h</name><value><int>96</int></value></member>
  <member><name>thumbnail_crop</name><value><string>1</string></value></member>
  <member><name>medium_size_w</name><value><string>360</string></value></member>
  <member><name>medium_size_h</name><value><string>360</string></value></member>
  <member><name>large_size_w</name><value><string>900</string></value></member>
  <member><name>large_size_h</name><value><string>900</string></value></member>

Is that OK, or should options be grouped?

  • thumbnail
    • width
    • height
    • crop
  • medium
    • width
    • height
  • large
    • width
    • height

@koke
14 years ago

Patch using getOption/setOption instead of custom methods

#7 @westi
14 years ago

patch-15153-2.doff looks great.

Thank You!

#8 @frsh
14 years ago

These are looking good on my 3.0.1 install.

#9 @frsh
14 years ago

  • Cc frsh added

#10 @westi
14 years ago

  • Milestone changed from Awaiting Review to 3.1

#11 @westi
14 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in [15980] props koke :-)

Note: See TracTickets for help on using tickets.