Skip to content

Add an action gp_after_project_form_fields to enable additional fields to be added#1522

Merged
akirk merged 6 commits into
GlotPress:developfrom
2ndkauboy:project-form-fields-action
Dec 14, 2022
Merged

Add an action gp_after_project_form_fields to enable additional fields to be added#1522
akirk merged 6 commits into
GlotPress:developfrom
2ndkauboy:project-form-fields-action

Conversation

@2ndkauboy

Copy link
Copy Markdown
Contributor

What?

This PR introduces a new action gp_after_project_form_fields with developers can use to add additional form fields to GlotPress projects.

Why?

Currently, plugins extending GlotPress need to override the whole template file in order to add additional form fields. This new action would allow them to easily place them after the default fields.

How?

This PR closes #969

When the project form is submitted, the additional form fields can be saved as described in the issue.

@akirk akirk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In our PR review in the glotpress chat we agreed that this can move forward, we'd just like the $project to be added as a parameter. Thank you!

Comment thread gp-templates/project-form.php Outdated
Comment thread gp-templates/project-form.php Outdated
akirk
akirk previously approved these changes Dec 14, 2022

@akirk akirk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok to merge now.

Comment thread gp-templates/project-form.php
akirk
akirk previously approved these changes Dec 14, 2022
Comment thread gp-templates/project-form.php
Comment thread gp-templates/project-form.php
@akirk akirk merged commit 2888a92 into GlotPress:develop Dec 14, 2022
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.

Make it easier to extend templates

3 participants