-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Used by and Uses information should be parsed #79
Comments
All docblock information is already parsed and imported. The docblock tags for a post can be retrieved like this: $doc_tags = get_post_meta( get_the_ID(), '_wpapi_tags', true );
$uses = wp_list_filter( $doc_tags, array( 'name' => 'uses' ) );
$used_by = wp_list_filter( $doc_tags, array( 'name' => 'used-by' ) ); Or, were you thinking that we would supplement this with data extracted from the source code, not just what is noted in the docblocks? |
Yes, the previous talk was about making this more (much more) thorough with information from source. Not much on technical side had been suggested/decided so far though. For example this seems suited to be post relationships, but we hadn't had them before and not decided on maybe using plugin as dependency yet. |
Parsing and exporting this data is relatively trivial, it sounds like the main issue is how it should be imported.
That would limit it to only other structures defined by the parsed source, correct? That is probably not a problem for the devhub project (which is the main concern here at present), but there is also the possibility that we want to show "uses" links to functions outside the main source (PHP core functions, or WP core functions from plugin docs). I suppose they could be stored separately if needed though. If we decide against post relationships, I guess the alternative would be post meta? We could save each of the functions used as separate entries, but with the same key. That would make it possible to query for both the used and used-by functions easily (though likely not as efficiently as with post relationships). |
@atimmer can you please confirm that your pull covers and resolves the scope of this issue? |
All usage is captured in post relations right now, there are still some improvements possible with method calling but these are edge cases. |
Thank you closing this big item, refining via new issues as necessary. :) |
On the code reference we want to displayed used by and uses information. Example here: http://developer.rarst.net/reference/functions/
This information will need to be parsed so that we can display it in the theme.
The text was updated successfully, but these errors were encountered: