Skip to:
Content

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#7030 closed enhancement (fixed)

Widgets: add support for customizer selective refresh

Reported by: lakrisgubben Owned by: r-a-y
Milestone: 2.6 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch
Cc: alexander.berthelsen@…

Description

See https://make.wordpress.org/core/2016/03/22/implementing-selective-refresh-support-for-widgets/

I'm open to discussion about the changes made to the .js files. I went with encapsulating the on.click functionality into their own functions to make it a bit more readable and more obvious how they work with widgets that have been ajax'ed in via selective refresh in the customizer. :)

Attachments (1)

7030.diff (10.6 KB) - added by lakrisgubben 2 years ago.

Download all attachments as: .zip

Change History (8)

@lakrisgubben
2 years ago

#1 @netweb
2 years ago

  • Component changed from Not sure to Component - Any/All

#2 @DJPaul
2 years ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 2.6

@lakrisgubben Will these changes break anything if it's run on an older version of WordPress?

#3 @lakrisgubben
2 years ago

@DJPaul according to the spec (https://make.wordpress.org/core/2016/03/22/implementing-selective-refresh-support-for-widgets/) there shouldn't be a problem. Have tested it on wp4.1 and works fine there. :)

#4 @r-a-y
2 years ago

  • Keywords needs-testing removed

Patch looks good. I think this can go in. Only minor thing is the whitespace in the patch (needs to be switched to spaces instead of tabs), but that can easily be fixed by the person committing.

Side note: wp_customize_preview() is a WP 4.0 function, which is okay since BP 2.6 supports WP 4.1+.

This ticket was mentioned in Slack in #buddypress by r-a-y. View the logs.


2 years ago

#6 @r-a-y
2 years ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 10793:

Widgets: Add support for WP Customizer's selective refresh.

This functionality is available as of WordPress 4.5.0.

For more details, view the WP development post:
https://make.wordpress.org/core/2016/03/22/implementing-selective-refresh-support-for-widgets/

Props lakrisgubben.
Fixes #7030.

#7 @DJPaul
2 years ago

  • Component changed from Component - Any/All to Core
Note: See TracTickets for help on using tickets.