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

Warn if requires headers are not same in readme and plugin header #866

Open
ernilambar opened this issue Jan 30, 2025 · 3 comments · May be fixed by #868
Open

Warn if requires headers are not same in readme and plugin header #866

ernilambar opened this issue Jan 30, 2025 · 3 comments · May be fixed by #868
Labels
[Team] Plugin Review Issues owned by Plugin Review Team [Type] Enhancement A suggestion for improvement of an existing feature
Milestone

Comments

@ernilambar
Copy link
Member

Readme:

  • Check if “Requires at least” and “Requires PHP” are the same when they exists in both readme and plugin headers.

Even though core does not use above headers present in readme file, directory still parses headers from readme. So those cannot be removed from readme file at least for now.

@ernilambar ernilambar added [Team] Plugin Review Issues owned by Plugin Review Team [Type] Enhancement A suggestion for improvement of an existing feature labels Jan 30, 2025
@swissspidy
Copy link
Member

Even though core does not use above headers present in readme file, directory still parses headers from readme.

But only as a fallback, right?
I‘d love to move people away from this eventually.

@ernilambar
Copy link
Member Author

Even though core does not use above headers present in readme file, directory still parses headers from readme.

But only as a fallback, right? I‘d love to move people away from this eventually.

Does not seem so. Values from readme is fetched and attached to the plugin. And same value is used everywhere. I don't find such fallback like you mentioned. https://github.com/WordPress/wordpress.org/blob/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload-handler.php#L445

@ernilambar ernilambar linked a pull request Jan 31, 2025 that will close this issue
@ernilambar ernilambar added this to the 1.5.0 milestone Feb 3, 2025
@swissspidy
Copy link
Member

Hmm that's only in the uploader then, but in the importer the plugin file takes precedence. See https://meta.trac.wordpress.org/ticket/4514 / WordPress/wordpress.org@0ae655c

I think that uploader file should be adjusted accordingly.

Ideally we ask developers to only put it in one place. No reason to have that in two places...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Team] Plugin Review Issues owned by Plugin Review Team [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants