[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
Wed Aug 21 01:35:52 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 | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Description changed by SergeyBiryukov:
Old description:
> $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.
New description:
$show_internal is set in [source:tags/3.6/wp-includes/class-wp-
editor.php#L850 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:tags/3.6/wp-
includes/js/wplink.js#L384 wplink.dev.js], preventing the internal link
search box from ever being hidden.
--
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25099#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list