Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#18126 closed task (blessed) (fixed)

Expose image options on XML-RPC

Reported by: koke's profile koke Owned by: josephscott's profile josephscott
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.2.1
Component: XML-RPC Keywords: mobile has-patch commit dev-reviewed
Focuses: Cc:

Description

To pick good defaults when inserting images from the mobile apps, it'd be nice to have the following options exposed:

  • image_default_link_type
  • image_default_size
  • image_default_align

Attachments (1)

path-core-18126.diff (899 bytes) - added by daniloercoli 13 years ago.

Download all attachments as: .zip

Change History (11)

#1 @isaackeyet
13 years ago

  • Cc isaackeyet added

#2 @daniloercoli
13 years ago

  • Cc ercoli@… added
  • Keywords has-patch added; needs-patch removed

#3 @josephscott
13 years ago

This looks fine to me, just one question. What are the legitimate values for these options? My copy of WP -trunk has empty values for all three.

#4 @koke
13 years ago

Defaults look like this to me:

mysql> select * from wp_options where option_name LIKE 'image%';
+-----------+---------+-------------------------+--------------+----------+
| option_id | blog_id | option_name             | option_value | autoload |
+-----------+---------+-------------------------+--------------+----------+
|        76 |       0 | image_default_align     |              | yes      | 
|        74 |       0 | image_default_link_type | file         | yes      | 
|        75 |       0 | image_default_size      |              | yes      | 
+-----------+---------+-------------------------+--------------+----------+

For image_default_size, trunk/wp-admin/includes/media.php#L730:

// if $check is not enabled, default to the first available size that's bigger than a thumbnail

For image_default_align, defaults to 'none' in trunk/wp-admin/includes/media.php#L682

#5 @SergeyBiryukov
13 years ago

  • Milestone changed from Awaiting Review to 3.4

#6 @ericmann
13 years ago

Looks fine to me.

#7 @josephscott
13 years ago

  • Type changed from enhancement to task (blessed)

#8 @westi
13 years ago

  • Keywords commit dev-reviewed added
  • Owner set to josephscott
  • Status changed from new to assigned

Patch looks good to me.

#9 @josephscott
13 years ago

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

In [19884]:

Expose image_default_link_type, image_default_size, and image_default_align
options via XML-RPC

Props koke
Fixes #18126

#10 @koke
13 years ago

Related: #20228

Note: See TracTickets for help on using tickets.