WordPress.org

Make WordPress Core

Opened 13 months ago

Last modified 3 months ago

#20816 new enhancement

custom-background $args enhancement

Reported by: frumph Owned by:
Priority: normal Milestone: Awaiting Review
Component: Themes Version: 3.4
Severity: normal Keywords: 3.7-early has-patch
Cc: ian@…, erick@…, lancewillett, takashi@…, bradthomas127@…

Description (last modified by SergeyBiryukov)

Looking to have added the rest of the arguments to pass through the $args to include the rest of the appearance -> background parameters including but not limited to position(x/y), repeat and attachment.

add_theme_support('custom-background', $args);

Example:

array(
	'default-color' => '000000', 
	'default-image' => get_stylesheet_directory_uri() . '/images/background-wolfbw.jpg',
	'repeat' => 'no-repeat',
	'position-x' => 'center',
	'attachment' => 'fixed'
);

ie. the repeat position(x/y) and attachment parameters

Main themes even child themes have looks which sometimes need to incorporate fixed or positioning that cannot be set with the current $arguments and it would benefit theme designers to allow those arguments to be passed

Attachments (1)

20816.diff (7.0 KB) - added by obenland 8 months ago.

Download all attachments as: .zip

Change History (9)

comment:1 SergeyBiryukov13 months ago

  • Description modified (diff)

comment:2 iandstewart9 months ago

  • Cc ian@… added

comment:3 ethitter9 months ago

  • Cc erick@… added

comment:4 lancewillett9 months ago

  • Cc lancewillett added

comment:5 iamtakashi9 months ago

  • Cc takashi@… added

comment:6 follow-up: bradthomas1278 months ago

  • Cc bradthomas127@… added

obenland8 months ago

comment:7 in reply to: ↑ 6 obenland8 months ago

  • Keywords has-patch added

20816.diff​ lets themes define background position, repeat, and attachment for their default image in add_theme_support()

comment:8 obenland3 months ago

  • Keywords 3.7-early added
Note: See TracTickets for help on using tickets.