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

Refactor plugin dirname and basename #796

Merged
merged 3 commits into from
Mar 8, 2020
Merged

Conversation

herrvigg
Copy link
Collaborator

@herrvigg herrvigg commented Mar 8, 2020

These two utility functions are unnecessary, they are bloating the code and lead to confusions:

  • qtranxf_plugin_dirname() -> qtranslate
  • qtranxf_plugin_basename() -> qtranslate/qtranslate.php

Using directly the basic functions make the code more readable. The legacy functions become deprecated.

  • qtranxf_plugin_dirname() -> dirname( QTRANSLATE_DIR )
  • qtranxf_plugin_basename() -> plugin_basename( QTRANSLATE_FILE )

Code cleanup follows.

@herrvigg herrvigg added the core Core functionalities, including the admin section label Mar 8, 2020
@herrvigg herrvigg merged commit 58fe716 into master Mar 8, 2020
@herrvigg herrvigg deleted the refactor-plugin-dir branch March 10, 2020 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core functionalities, including the admin section
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant