Open bobbingwide opened 8 years ago
For WP-a2z, which is WordPress MultiSite, we can use pragmatic links when creating the parsed source. When the link is not found we'll use logic in the 404 page to display the content from the base site, assuming that exists.
We need to be able to store a noderef field as a string rather than a post ID and cater for this when handling the mapping to an actual post.
When processing the [file]
shortcode for an oik_file
post, if the function is not yet mapped to a permalink then create one anyway.
Re: or if it's enabled we can attempt to use AJAX when the user shows some intent to click on the link.
When the user is hovering over a link use the REST API to query further information about the target.
Note: hookr.io does this for actions and filter hooks. We could attempt to do it for just about anything.
For the dynamic links in the syntax highlighted source
Field hovered | Information to display |
---|---|
api | Syntax and long description and various external links |
class | Short description and parent class and various external links |
constant | tbc |
file | link to file |
hook | Syntax and description and various external links |
PHP function | Syntax and description |
string | version in user's selected language link to translation page |
Similarly for shortcodes
Field hovered | Information to display |
---|---|
shortcode link | Syntax |
shortcode parameter | any further information about the parameter |
Note: I'm not sure how to know when to actually initiate the calls.
Note: See #38 where external links to GitHub and/or Trac has already been added for APIs and files.
Some shortcodes, such as [hook], [file] and [api] can take time to find the permalink. There can be many links on a page. But the user's only going to click on one of them. So, unless there is some useful information in the link ( such as the API title) there's little point attempting to resolve the link immediately. 404 handling can be used to pragmatically deal with links that weren't found, or, if it's enabled, we can attempt to use AJAX when the user shows some intent to click on the link.