Make WordPress Core

Opened 11 years ago

Closed 9 years ago

#25099 closed defect (bug) (worksforme)

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

Reported by: coreygilmore's profile coreygilmore Owned by:
Milestone: 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, preventing the internal link search box from ever being hidden.

Attachments (2)

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

Download all attachments as: .zip

Change History (8)

#1 @mintindeed
11 years ago

  • Cc gabriel.koen@… added

#2 @SergeyBiryukov
11 years ago

  • Description modified (diff)

#3 @SergeyBiryukov
11 years ago

Related: [18498]

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

#4 @SergeyBiryukov
11 years ago

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

#5 @coreygilmore
11 years 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.

#6 @iseulde
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

This changed in [27494] and works for me.

Note: See TracTickets for help on using tickets.