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

Add generate_mapping to Post and Comment Indexable #2637

Merged
merged 4 commits into from
Mar 25, 2022
Merged

Add generate_mapping to Post and Comment Indexable #2637

merged 4 commits into from
Mar 25, 2022

Conversation

rebeccahum
Copy link
Contributor

@rebeccahum rebeccahum commented Mar 7, 2022

Description of the Change

The User and Term Indexable classes have the generate_mapping() function:

public function generate_mapping() {

public function generate_mapping() {

It would be nice if the Post and Comment Indexable could have that same function, so we can piggyback onto it with some code via $indexable->generate_mapping().

Alternate Designs

N/A.

Possible Drawbacks

N/A.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Added - generate_mapping() to post and comment indexable

Credits

Props @rebasaurus

@rebeccahum rebeccahum changed the title Add generate_mapping to Post Indexable Add generate_mapping to Post and Comment Indexable Mar 7, 2022
@felipeelia
Copy link
Member

@rebeccahum I guess if we are aiming to make that a pattern across all Indexables, we should change the parent Indexable class, perhaps with a check to keep backward compatibility. What do you think?

@rebeccahum
Copy link
Contributor Author

@felipeelia Let me know if this is what you had in mind.

@felipeelia felipeelia added this to the 4.1.0 milestone Mar 14, 2022
@felipeelia felipeelia self-assigned this Mar 15, 2022
@felipeelia felipeelia merged commit 533f01c into 10up:develop Mar 25, 2022
@rebeccahum rebeccahum deleted the add/generate_mapping_for_post branch March 25, 2022 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants