Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#40308 closed defect (bug) (fixed)

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

Reported by: pratikshrestha's profile pratikshrestha Owned by: westonruter's profile 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 8 years ago.
Attaching the patch

Download all attachments as: .zip

Change History (14)

@pratikshrestha
8 years ago

Attaching the patch

#1 @pratikshrestha
8 years ago

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

#2 follow-up: @SergeyBiryukov
8 years 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
8 years 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.


8 years ago

#5 @westonruter
8 years ago

  • Keywords needs-testing added

#6 @bradyvercher
8 years 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
8 years ago

  • Keywords commit added; needs-testing removed

#8 @westonruter
8 years ago

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

#9 @westonruter
8 years ago

  • Version changed from trunk to 4.7

#10 @westonruter
8 years 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
8 years ago

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

Re-opening for consideration in 4.7.4

#12 @swissspidy
8 years 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.


8 years ago

Note: See TracTickets for help on using tickets.