Support » Plugins » Hacks » Re-use Core's "Link to Existing Content" in plugin?

  • I’m working on a Related Posts plugin, and would like to utilize the “Link to Existing Content” feature that is available when adding a link via TinyMCE. However, I’m stumped.

    I took a look at the code, and didn’t really get anywhere. I’m guessing it’s all a bunch of javascript tucked away somewhere, but didn’t have any luck locating it. Any suggestions on how I can take advantage of this without coding it from scratch?

Viewing 1 replies (of 1 total)
  • The link dialog that uses this functionality is generated by wp_link_dialog() in wp-includes/class-wp-editor.php.

    You’ll also want to look at wp-includes/js/wplink.js as it appears to be responsible for the behind-the-scenes whizbang you’re looking for here. 🙂

    You’ll probably want to grab a copy that’s not minified. 😉

Viewing 1 replies (of 1 total)
  • The topic ‘Re-use Core's "Link to Existing Content" in plugin?’ is closed to new replies.