Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor Theme_Readme (readme.txt) PHP class #626

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

Merged
matiasbenedetto merged 11 commits into trunk from improve/readme-class
May 13, 2024

Conversation

@matiasbenedetto
Copy link
Contributor

@matiasbenedetto matiasbenedetto commented May 10, 2024
edited
Loading

What?

  • Refactor ThemeReadme (readme.txt) class to make it more modular, re-usable, and testable.
  • Add tests for their public methods in WordPress core codebase fashion.

Why?

@matiasbenedetto matiasbenedetto added the enhancement New feature or request label May 10, 2024
Comment on lines 28 to 29
* Build a readme.txt file for CHILD/GRANDCHILD themes.
*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also builds one for BLANK themes, so probably drop the "for CHILD/GRANDCHILD themes" part

Copy link
Contributor Author

@matiasbenedetto matiasbenedetto May 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed here: 3e1bd60

@matiasbenedetto matiasbenedetto changed the title (削除) Refactor ThemeReadme (readme.txt) PHP class (削除ここまで) (追記) Refactor Theme_Readme (readme.txt) PHP class (追記ここまで) May 10, 2024
Copy link
Contributor

pbking commented May 13, 2024

I found that the "Recommend Plugins" wasn't being sent back to the client (though it was being persisted if edited from the client).

I did a lil' refactoring, pulling the logic to get that and send it to the client from the "utils" class to the "readme" class and had it pull all the sections, not just look exclusively for the "recommended plugins" section.

Copy link
Contributor

@pbking pbking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is working great! Code looks great, huge improvement.

If you're OK with my additions then I think this is ready to come in!

Copy link
Contributor Author

I found that the "Recommend Plugins" wasn't being sent back to the client (though it was being persisted if edited from the client).

Haha yep, I created an issue about the same #631

I did a lil' refactoring, pulling the logic to get that and send it to the client from the "utils" class to the "readme" class and had it pull all the sections, not just look exclusively for the "recommended plugins" section.

Cool, good addition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pbking pbking pbking approved these changes

Assignees

No one assigned

Labels

enhancement New feature or request

Projects

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Load data from readme.txt in the 'Edit metadata' modal Child and cloned themes doesn't include a reference to the original theme in the readme.txt

AltStyle によって変換されたページ (->オリジナル) /