-
Notifications
You must be signed in to change notification settings - Fork 22
Update "local" slug determination mechanism #335
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
Conversation
…and vipgoci_wpcore_misc_get_addon_data_and_slugs_for_directory(), fix bug with dirname count
…addons_data_and_slugs()
No issues were found to report when scanning latest commit (commit-ID: 4979b47) This bot provides automated PHP linting and PHPCS scanning. For more information about the bot and available customizations, see our documentation. Scan run detail
|
This pull request updates the "local" slug determination mechanism to better determine slugs for add-ons placed in subdirectories. This should improve WordPress.org add-on detection.
This is accomplished by a change in logic:
vipgoci_wpcore_misc_determine_local_slug()
function is updated to ensure directory name is included in "local" slug only when there are more than two directories in the relative path. This ensures that the "local" slug only contains directory name when there is an add-on directory present and not just the base directory.vipgoci_wpcore_misc_determine_local_slug()
includes a relative file path.Some changes are to make the above possible but also to make the code easier to maintain and understand:
vipgoci_wpcore_misc_scan_directory_for_addons()
to require two parameters instead of one: Parameter for full path to file and a relative git repository path.These changes should lead to better detection of add-ons and cleaner code.
TODO:
Scan run detail
report as applicablePHPDoc
comments are up to date for functions added or altered