WordPress.org

Make WordPress Core

Opened 3 months ago

Closed 3 months ago

Last modified 6 weeks ago

#40308 closed defect (bug) (fixed)

Customize: Video header control fails to use is_header_video_active() for active_callback

Reported by: pratikshrestha Owned by: westonruter
Milestone: 4.7.4 Priority: normal
Severity: normal Version: 4.7
Component: Customize Keywords: has-patch commit fixed-major
Focuses: Cc:

Description

Video Header control external_header_video, should have active_callback is_header_video_active, instead of is_front_page.

If a dev tries to filter the front page restriction for Video Headers, then the Video Media control is hidden but external_header_video is still shown.

Attachments (1)

patch.diff (533 bytes) - added by pratikshrestha 3 months ago.
Attaching the patch

Download all attachments as: .zip

Change History (14)

@pratikshrestha
3 months ago

Attaching the patch

#1 @pratikshrestha
3 months ago

I tried attaching a patch. Let me know if this is the correct way to do things or not.

#2 follow-up: @SergeyBiryukov
3 months ago

  • Keywords has-patch added
  • Milestone changed from Awaiting Review to 4.7.4

Hi @pratikshrestha, welcome to WordPress Trac! Thanks for the report.

'active_callback' => 'is_front_page' was added in [39237] and replaced with is_header_video_active in [39240], but it looks like the second instance was missed, so the patch looks good to me.

#3 in reply to: ↑ 2 @pratikshrestha
3 months ago

Replying to SergeyBiryukov:

Hi @pratikshrestha, welcome to WordPress Trac! Thanks for the report.

'active_callback' => 'is_front_page' was added in [39237] and replaced with is_header_video_active in [39240], but it looks like the second instance was missed, so the patch looks good to me.

Great. Glad I could contribute something. :)

This ticket was mentioned in Slack in #core by swissspidy. View the logs.


3 months ago

#5 @westonruter
3 months ago

  • Keywords needs-testing added

#6 @bradyvercher
3 months ago

I confirmed that the external video header control now appears as expected when using a custom active callback, so this looks good to me as well. Good catch, @pratikshrestha.

#7 @westonruter
3 months ago

  • Keywords commit added; needs-testing removed

#8 @westonruter
3 months ago

  • Summary changed from WordPress Video Headers to Customize: Video header control fails to use is_header_video_active() for active_callback

#9 @westonruter
3 months ago

  • Version changed from trunk to 4.7

#10 @westonruter
3 months ago

  • Owner set to westonruter
  • Resolution set to fixed
  • Status changed from new to closed

In 40379:

Customize: Use is_header_video_active() as active_callback for external_header_video control instead of is_front_page().

Use the same active_callback as was supplied previously for the header_video control in [39240] where this instance was missed.

Amends [39240].
Props pratikshrestha.
See #38738.
Fixes #40308.

#11 @westonruter
3 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for consideration in 4.7.4

#12 @swissspidy
3 months ago

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

In 40384:

Customize: Use is_header_video_active() as active_callback for external_header_video control instead of is_front_page().

Use the same active_callback as was supplied previously for the header_video control in [39240] where this instance was missed.

Amends [39240].
Props pratikshrestha.
See #38738.
Fixes #40308.

Merges [40379] to the 4.7 branch.

This ticket was mentioned in Slack in #core by pratikshrestha. View the logs.


6 weeks ago

Note: See TracTickets for help on using tickets.