Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ruud Laan

    (@ruudjoyo)

    Hi Viktor,

    Thanks for this tip. I looked into this option. Do you mean something like leveraging wp_link_dialog() and a usage like: https://stackoverflow.com/questions/11812929/use-wordpress-link-insert-dialog-in-metabox ?

    If so: that will insert a complete url, where as we are storing a post ID.
    Via this ID we later retrieve the permalink. This will ensure no internal links will become dead links even if a post slug changes.

    The dialog does add a search function, which would be useful. The upcoming ‘Pro’ version of the plugin does have a settings field for selecting which posttypes to show in the dropdown, to be able to exclude certain types you don’t need.

    Thanks!

    Thread Starter Viktor Szépe

    (@szepeviktor)

    You can clone wp-includes/js/wplink.js and around line 506 use the ID from the AJAX request.
    And at additional 2 or 3 places to put the ID in your – optionally hidden – input.

    Plugin Author Ruud Laan

    (@ruudjoyo)

    Interesting; not sure how this plays well with the option to enter a external URL.
    Look into it though, maybe we can incorporate this into a new version.
    Thanks Viktor!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘UI to choose link’ is closed to new replies.