[wp-trac] [WordPress Trac] #25099: Allow internal link search in wp_link_dialog to actually be hidden using wplink user setting
WordPress Trac
noreply at wordpress.org
Tue Aug 20 21:02:33 UTC 2013
#25099: Allow internal link search in wp_link_dialog to actually be hidden using
wplink user setting
--------------------------+-----------------------------
Reporter: coreygilmore | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 3.3
Severity: minor | Keywords: has-patch
--------------------------+-----------------------------
$show_internal is set in [source:/trunk/wp-includes/class-wp-
editor.php?rev=18498#L776 class-wp-editor.php] using:
{{{#!php
$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 [source:/trunk/wp-
includes/js/wplink.dev.js?rev=18498#L383 wplink.dev.js], preventing the
internal link search box from ever being hidden.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25099>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list