WordPress.org

Make WordPress Core

Opened 7 weeks ago

Closed 7 weeks ago

#53394 closed defect (bug) (fixed)

@global $wp_widget_factory is used but not define in documentation of this function sanitize_widget_instance( $value, $id_base = null )

Reported by: jontyravi Owned by: SergeyBiryukov
Milestone: 5.8 Priority: normal
Severity: normal Version: 5.7
Component: Widgets Keywords: has-patch
Focuses: docs Cc:

Description

@global $wp_widget_factory is used but not define in documentation of this function sanitize_widget_instance( $value, $id_base = null )

Attachments (12)

53394.patch (660 bytes) - added by jontyravi 7 weeks ago.
53394.2.patch (552 bytes) - added by jontyravi 7 weeks ago.
53394.3.patch (545 bytes) - added by jontyravi 7 weeks ago.
53394.4.patch (545 bytes) - added by jontyravi 7 weeks ago.
53394.5.patch (540 bytes) - added by jontyravi 7 weeks ago.
53394.6.patch (584 bytes) - added by jontyravi 7 weeks ago.
53394.7.patch (530 bytes) - added by jontyravi 7 weeks ago.
53394.8.patch (531 bytes) - added by jontyravi 7 weeks ago.
53394.9.patch (532 bytes) - added by jontyravi 7 weeks ago.
53394.10.patch (549 bytes) - added by jontyravi 7 weeks ago.
53394.11.patch (567 bytes) - added by jontyravi 7 weeks ago.
53394.12.patch (565 bytes) - added by jontyravi 7 weeks ago.

Download all attachments as: .zip

Change History (19)

@jontyravi
7 weeks ago

@jontyravi
7 weeks ago

@jontyravi
7 weeks ago

@jontyravi
7 weeks ago

@jontyravi
7 weeks ago

#1 follow-up: @audrasjb
7 weeks ago

  • Component changed from Media to Widgets
  • Keywords needs-refresh added

Hello @jontyravi, thank you for the patch(s),

It looks like there is a small indentation issue on the line you added. Also, there should be a new empty line between @since and @global declarations.

@jontyravi
7 weeks ago

@jontyravi
7 weeks ago

@jontyravi
7 weeks ago

@jontyravi
7 weeks ago

#2 in reply to: ↑ 1 @jontyravi
7 weeks ago

  • Keywords needs-refresh removed

Hi @audrasjb,

Thanks for sharing this thing and I have uploaded a new patch with the all the above changes

#3 follow-up: @audrasjb
7 weeks ago

Thank you. However, for WP coding standards compliance, we need a newline before and after the @global declaration. To clarify, here is what we need:

         * @since 3.9.0
         *
         * @global WP_Widget_Factory $wp_widget_factory         
         *
         * @param array $value Widget instance to sanitize.

(feel free to delete the previous diff files when your patch is somehow uploaded multiple times ;)

@jontyravi
7 weeks ago

@jontyravi
7 weeks ago

@jontyravi
7 weeks ago

#4 in reply to: ↑ 3 @jontyravi
7 weeks ago

  • Resolution set to invalid
  • Status changed from new to closed

Hi @audrasjb,

I have applied the thing that you have mentioned.

#5 @jontyravi
7 weeks ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

#6 @SergeyBiryukov
7 weeks ago

  • Milestone changed from Awaiting Review to 5.8

#7 @SergeyBiryukov
7 weeks ago

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

In 51141:

Docs: Document the usage of $wp_widget_factory global in WP_Customize_Widgets::sanitize_widget_instance().

Follow-up to [50996].

Props jontyravi, audrasjb.
Fixes #53394.

Note: See TracTickets for help on using tickets.