WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Link Chooser

Use the core Add/edit Link dialog anywhere within the admin via JavaScript or simple field attributes.

How do I call the Link Chooser dialog manually via JavaScript?

Here is a very basic example that logs the resulting link parameters to your console:

wpLinkPopup.open( function( link ) {
                console.log( 'Link URL: ', link.href );
                console.log( 'Link Target: ', link.target );
                console.log( 'Link Title: ', link.title );
            });

How do I attach the Link Chooser to a standard input via data attribute?

<input type="text" class="wpLinkPopup" data-linkvalue="href">

Requires: 3.7.1 or higher
Compatible up to: 3.9.0
Last Updated: 2014-4-30
Downloads: 154

Ratings

0 stars
0 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1
100,1,1