Skip to content
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

CS: consistency for file includes #147

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Mar 23, 2021

Context

  • Code style consistency

Summary

This PR can be summarized in the following changelog entry:

  • Code style consistency

Relevant technical choices:

  • No functional changes.

The DUPLICATE_POST_PATH constant is declared early in the plugin bootstrap file.
For consistency, it is recommended to use this constant throughout the application for file includes.

Note: the DUPLICATE_POST_PATH constant is based on plugin_dir_path() which returns the path with a trailing slash, so leading slashes in the "file name" part of the paths have been removed.

Test instructions

This PR can be tested by following these steps:

  • Open any admin page on which this plugin is loaded. If there are no fatal errors, we're good ;-)

The `DUPLICATE_POST_PATH` constant is declared early in the plugin bootstrap file.
For consistency, it is recommended to use this constant throughout the application for file includes.

Note: the `DUPLICATE_POST_PATH` constant is based on `plugin_dir_path()` which returns the path with a trailing slash, so leading slashes in the "file name" part of the paths have been removed.
@enricobattocchi
Copy link
Member

Tested OK!

@enricobattocchi enricobattocchi merged commit 2cbf4ee into develop Mar 23, 2021
@enricobattocchi enricobattocchi deleted the JRF/CS/consistent-file-includes branch March 23, 2021 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants