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

Functionality placeholders #1981

Merged
merged 44 commits into from
Aug 8, 2024
Merged

Conversation

zackkatz
Copy link
Member

@zackkatz zackkatz commented Feb 2, 2024

  • Allow installing and activating inline
  • Add check to see if license includes the plugin
  • Make install AJAXified
  • Ensure refresh after ajax install does not throw away any form data that has been changed

Implements #1980

💾 Build file (729b388).

@zackkatz zackkatz linked an issue Feb 2, 2024 that may be closed by this pull request
3 tasks
This needs to be DRY'd and improved, but it's looking pretty good.
@zackkatz
Copy link
Member Author

zackkatz commented Feb 5, 2024

Starting to take shape:


Traits allow us to not add too much into the abstract plugin and theme hooks class.

To make a class function as a placeholder, you add `use GravityView_Functionality_Placeholder;` then implement the abstract methods.
@rafaehlers
Copy link
Contributor

@zackkatz I'm unsure if it's included, but please don't forget to include the PDF for GravityView tab.

@zackkatz zackkatz modified the milestones: 2.21, 2.20 Feb 21, 2024
@zackkatz zackkatz assigned doekenorg and unassigned mrcasual May 8, 2024
@zackkatz
Copy link
Member Author

zackkatz commented May 8, 2024

@doekenorg Since you have recently worked on this for #1996, I think it makes sense if you were to work on the functionality. Let me know if you have questions.

- Extracted a placeholder.php template
- Replaced `add_placeholder_hooks` with a more generic `add_inactive_hooks` when the plugin is inactive.
- Removed the trait and opted for a Placeholder value object
- Added `extra_nav_class` option to a metabox for displaying purposes.
- Added a `gk/navigation/tab` hook to overwrite the navigtaion label HTML.
- Added hooks before and after a metabox for additional rendering purposes.
@zackkatz zackkatz assigned mrcasual and zackkatz and unassigned doekenorg Jul 29, 2024
@zackkatz zackkatz changed the title [WIP] Functionality placeholders Functionality placeholders Aug 5, 2024
@zackkatz zackkatz requested a review from mrcasual August 5, 2024 20:45
@zackkatz zackkatz removed their assignment Aug 5, 2024
@mrcasual mrcasual modified the milestones: 2.21, 2.26 Aug 8, 2024
const ajaxRoute = $( this ).data( 'action' ) + '_product';
const text_domain = $( this ).data( 'text-domain' );

// Todo: refactor after #1996 is merged.
Copy link
Collaborator

Choose a reason for hiding this comment

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

@zackkatz or @doekenorg, what kind of refactoring is expected here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question! That's one for @doekenorg I believe.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this has to do with code duplication when it comes to activating plugins. See if we can reuse the logic from that PR instead having it here again.

@mrcasual mrcasual merged commit 19725d5 into develop Aug 8, 2024
1 check passed
@mrcasual mrcasual deleted the feature/1980-functionality-placeholders branch August 8, 2024 22:04
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.

Add placeholders for Extension/Layout functionality
4 participants