Make WordPress Core

Opened 5 years ago

Closed 5 years 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
Priority: normal Milestone: 5.8
Component: Widgets Version: 5.7
Severity: normal Keywords: has-patch
Cc: Focuses: docs

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 5 years ago.
53394.2.patch (552 bytes ) - added by jontyravi 5 years ago.
53394.3.patch (545 bytes ) - added by jontyravi 5 years ago.
53394.4.patch (545 bytes ) - added by jontyravi 5 years ago.
53394.5.patch (540 bytes ) - added by jontyravi 5 years ago.
53394.6.patch (584 bytes ) - added by jontyravi 5 years ago.
53394.7.patch (530 bytes ) - added by jontyravi 5 years ago.
53394.8.patch (531 bytes ) - added by jontyravi 5 years ago.
53394.9.patch (532 bytes ) - added by jontyravi 5 years ago.
53394.10.patch (549 bytes ) - added by jontyravi 5 years ago.
53394.11.patch (567 bytes ) - added by jontyravi 5 years ago.
53394.12.patch (565 bytes ) - added by jontyravi 5 years ago.

Download all attachments as: .zip

Change History (19)

@jontyravi
5 years ago

@jontyravi
5 years ago

@jontyravi
5 years ago

@jontyravi
5 years ago

@jontyravi
5 years ago

#1 follow-up: @audrasjb
5 years ago

  • Component MediaWidgets
  • 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
5 years ago

@jontyravi
5 years ago

@jontyravi
5 years ago

@jontyravi
5 years ago

#2 in reply to: ↑ 1 @jontyravi
5 years 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
5 years 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
5 years ago

@jontyravi
5 years ago

@jontyravi
5 years ago

#4 in reply to: ↑ 3 @jontyravi
5 years ago

  • Resolutioninvalid
  • Status newclosed

Hi @audrasjb,

I have applied the thing that you have mentioned.

#5 @jontyravi
5 years ago

  • Resolution invalid
  • Status closedreopened

#6 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review5.8

#7 @SergeyBiryukov
5 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status reopenedclosed

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.