Changes between Initial Version and Version 23 of Ticket #18042
- Timestamp:
- 05/05/2013 04:16:49 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #18042
- Property Cc bainternet pavelevap@… xoodrew@… pippin@… coenjacobs@… goldenapplesdesign@… brady@… piemanek@… added
-
Property
Component
changed from
PluginstoEditor -
Property
Milestone
changed from
Awaiting Reviewto3.6 - Property Keywords has-patch added
-
Property
Type
changed from
defect (bug)toenhancement
-
Ticket #18042 – Description
initial v23 1 In previous versions of WordPress, we were able to write a plugin which called add_filter on "tiny_mce_before_init" and then we were able to specify "external_link_list_url"which we gave it a list of all of the URLs on our site (we primarily linked to non-WordPress URLs on our site from this tool). Then when an author created a Link in the post tool the little popup would include a dropdown of all of the URLs/page titles that we specified.1 In previous versions of !WordPress, we were able to write a plugin which called add_filter on `tiny_mce_before_init` and then we were able to specify `external_link_list_url` which we gave it a list of all of the URLs on our site (we primarily linked to non-WordPress URLs on our site from this tool). Then when an author created a Link in the post tool the little popup would include a dropdown of all of the URLs/page titles that we specified. 2 2 3 In WordPress 3.2 you have the new fancy "link to existing content" feature in the popup.3 In !WordPress 3.2 you have the new fancy "link to existing content" feature in the popup. 4 4 5 5 The problem is that there is NO hook, filter, or pluggable function whatsoever to allow you to override the functionality of this. 6 6 7 I needed to make the search results box return a list of pages (urls and titles) that I specified from a different database. In order order to do that I had to re-create the entire wp_link_query() function from wp-admin/includes/internal-linking.php to make it return search results from my own database. I put that function into a Plugin (to keep it out of Core) but then I had to hack core to rename wp_link_query() to wp_link_query_ORIGINAL()to get it to use my function and not the existing one.7 I needed to make the search results box return a list of pages (urls and titles) that I specified from a different database. In order order to do that I had to re-create the entire `wp_link_query()` function from wp-admin/includes/internal-linking.php to make it return search results from my own database. I put that function into a Plugin (to keep it out of Core) but then I had to hack core to rename `wp_link_query()` to `wp_link_query_ORIGINAL()` to get it to use my function and not the existing one. 8 8 9 Either wp_link_query()needs to be a pluggable function or there need to be hooks that let you completely replace how it works.9 Either `wp_link_query()` needs to be a pluggable function or there need to be hooks that let you completely replace how it works.