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

Do not translate plugin data when creating instance #37

Open
wants to merge 1 commit into
base: 0.3.x
Choose a base branch
from

Commits on Oct 13, 2023

  1. Do not translate plugin data

    When retrieving plugin data, translation is no longer used. This used to cause the plugin's text domain to be loaded. It caused weird situations when working with and overriding WP i18n. Example:
    
    You need to override the translation file using `override_load_textdomain`. For this, you need the name of the text domain to override translations for, so as not to affect other plugins/themes. You decide to retrieve the plugin's text domain by using the plugin created by this plugin factory. This loaded the text domain, which caused your override to be bypassed: you are still in the process of registering it.
    
    Now, the factory no longer causes the plugin text domain to load, and you can safely load it later at a time convenient for you.
    XedinUnknown committed Oct 13, 2023
    Configuration menu
    Copy the full SHA
    21bc00e View commit details
    Browse the repository at this point in the history