I am trying to add http:// in the post link dialog box if there is not already added. I tried with filter
add_filter('pre_link_url', 'add_http_link_url');
It didn’t work. Does anybody know how to do that ?
I am trying to add http:// in the post link dialog box if there is not already added. I tried with filter
add_filter('pre_link_url', 'add_http_link_url');
It didn’t work. Does anybody know how to do that ?
You must be logged in to post a comment.
Doesn’t WordPress automatically add the “http://” there by default?
Maybe this plugin would help?
wordpress.org/extend/plugins/auto-hyperlink-urls/
EDIT
found this on http://betterwp.net/wordpress-tips/make-links-clickable/
a function named make_clickable() that can be found in wp-includes/formatting.php.
make_clickable() filters the comment_text hook with this:
Since it is that simple, letâs try adding the same filter to our post contents and see if it works
The priority of 12 as used above simply tells WordPress to make links clickable for post contents after shortcodes are parsed (which is at priority 11). If you donât like such behaviour, just change 12 to any number you want. You should take a look at wp-includes/default-filters.php to choose an appropriate priority for make_clickable().
Being that awesome, however, make_clickable() has a limitation, which you can clearly see in this clickable link: http://codex.wordpress.org/Function_Reference/make_clic … _clickable.
See the full stop punctuation mark also included in the link, thus making it broken? To avoid such behaviour you must always have one space plus another character after a plain link, or in other words, never put a plain link like that at the end of a paragraph. In case you must, just make the link clickable the normal way .
Of course if you donât like your visitors to be able to post links that way you can easily remove the filter using:
hope this helps, sorry i had to remove the first link as i can only post 2 links till i get my rep up 🙂