• Resolved aprokaev

    (@aprokaev)


    Hello

    I use PCP plugin to validate my own plugin before submiting it to WordPress repository.

    PCP plugin shows error “missing_direct_file_access_protection” with descripton

    PHP file should prevent direct access. Add a check like: if ( ! defined( 'ABSPATH' ) ) exit"

    Could you add this check to generated files?

    thanks, Alex

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Tim W

    (@timwhitlock)

    I don’t see that .l10n.php files should need this line as they won’t produce an error if executed out of context. They simply return an array of string literals. WordPress (GlotPress) don’t add this line. If they start doing so, then I’ll do the same.

    As a side point: Shipping your own translations within your plugin is something that WordPress have discouraged over the years. Contributing your translations to their GlotPress project would mean no need to submit any l10n.php files

    Thread Starter aprokaev

    (@aprokaev)

    Thank you for the detailed reply.

    My bad, I should not report the warnings as these files won’t be part of WordPress repository.
    Only paid version of our plugin will use them.

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.