Make WordPress Core

Opened 8 months ago

Last modified 8 months ago

#25099 new defect (bug)

Allow internal link search in wp_link_dialog to actually be hidden using wplink user setting

Reported by: coreygilmore Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 3.3
Component: Editor Keywords: has-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

$show_internal is set in class-wp-editor.php using:

$show_internal = '1' == get_user_setting( 'wplink', '0' );

And this is later checked using if( ! $show_internal ), which is never true because $show_internal will either be 1 or empty.

Defaulting to 1 and typecasting as an integer fixes it.

The same basic logic issues exist in wplink.dev.js, preventing the internal link search box from ever being hidden.

Attachments (2)

25099-wplink.js.patch (2.5 KB) - added by coreygilmore 8 months ago.
25099-class-wp-editor.php.patch (766 bytes) - added by coreygilmore 8 months ago.

Download all attachments as: .zip

Change History (7)

comment:1 mintindeed8 months ago

  • Cc gabriel.koen@… added

comment:2 SergeyBiryukov8 months ago

  • Description modified (diff)

comment:3 SergeyBiryukov8 months ago

Related: [18498]

The patches don't look like correct SVN patches due to ANSI escape codes, could you please fix them?

comment:4 SergeyBiryukov8 months ago

FWIW, hiding the internal link search appears to work for me, $show_internal has a proper boolean value.

comment:5 coreygilmore8 months ago

Patches resubmitted, I unfortunately I was working off r25000, and r25031 changed (and fixed some of the problems) with wplink.js. I'll rework my patches as necessary to fix the remaining issues in the latest rev.

Note: See TracTickets for help on using tickets.