TGM plugin activation text domain (Theme Review question)

wordpress

#1

Hey fellow authors and reviewers,

How do you deal with text domain in TGM plugin activation library. Do you leave it as ‘tgmpa’ or change to your theme name?
If you do not change it, you end up with multiple text domains in your theme files, what reviewers say about this? Did you have any issues with that?

Cheers!


#2

Well, one of my theme got soft-rejected mentioning this reason they also said to fix following error:

INFO: admin/plugins/class-tgm-plugin-activation.php The theme appears to use include or require. If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead.


#3

Are you sure it wasn’t one of the many other files with the includes? It’s more likely that it was just one of the several files that raised this message. A single file and that too from a drop-in library wouldn’t be much of a concern.

If not, you should mention StephenCronin in this topic. It would be simply irresponsible of a reviewer to reject solely on an INFO message of this type- which is a suggestion, and even then it’s only for certain cases when it’s really used for a template partial. Again, seems very unlikely and there must be more to the story.


#4

That’s what I wonder, because it is the only file using php require or include function.

However, this was not the only reason of soft-reject. I’ve changed the text domain but I’m not sure how to proceed with this one.


#5

@StephenCronin Please check this with the reviewers.


#6

The PHP require function is even being used by TwentyFifteen theme for including backend functionality. I don’t see how it should be an issue?


#7

There is also “load_template” that is basically the same as require, except you get access to wordpress variables inside the template.
load_template( $_template_file, $require_once );

https://codex.wordpress.org/Function_Reference/load_template


#8

Hi guys,

  1. text domain should be only one in theme;
  2. INFO from theme-check plugin is only… well… info :slight_smile: to check by reviewer that require is not used instead of get_tempalte_part(), but in your example require (for tgmpa file) is used properly, so I think it’s only reviewer’s mistake :smile: