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

Enhancement/bbPress The support for the bbPress plugin! #134

Merged
merged 6 commits into from
Jun 10, 2022

Conversation

faisal-alvi
Copy link
Member

@faisal-alvi faisal-alvi commented Jun 3, 2022

Description of the Change

  • This PR enhances the SLA plugin to support the bbPress plugin.
  • Loads the entire JS at bbPress edit profile page at FE to support 1) the SLA avatar upload 2) Remove the SLA avatar.
  • Also, forces the file input field at FE because we don’t have a media popup at FE.
  • Adds support for the file uploads from FE by loading the required core files for wp_handle_upload and wp_generate_attachment_metadata functions. Thanks to @foliovision to contribute in this point via bbPress - make sure the functions to process image uploads are all there #132.

Enhancement of the #132 and Alternate of #133.

Alternate Designs

  • The file input field to upload SLA are now visible at FE on the edit bbPress profile page.

Possible Drawbacks

Nothing seems to be.

Verification Process

  1. Install the bbPress plugin.
  2. Visit https://site.com/forums/users/{user-name}/edit
  3. See the file input displayed to upload the avatar.
  4. Upload an avatar and confirm it's uploaded successfully.
  5. Click the “Delete local avatar” button and see if the avatar was deleted successfully.
  6. Also check these actions work in the backend as well.

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 - The support for the bbPress plugin by loading the JS at FE on the profile edit page.
Fixed - Uploads and Deletions work at FE on the bbPress edit profile page.

Credits

Props @foliovision @faisal-alvi @iamdharmesh

@faisal-alvi faisal-alvi added this to the 2.5.0 milestone Jun 3, 2022
@faisal-alvi faisal-alvi self-assigned this Jun 3, 2022
@faisal-alvi faisal-alvi requested review from a team and iamdharmesh and removed request for a team June 3, 2022 11:49
@foliovision
Copy link

Hello @faisal-alvi

perfect, it works now. I was able to add and remove the avatar on a bbPress edit profile page without issues.

Thanks,
Martin

Copy link
Member

@iamdharmesh iamdharmesh left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @faisal-alvi. The code looks good to me, just added a few notes on this, can you please help to check on it?

includes/class-simple-local-avatars.php Show resolved Hide resolved
includes/class-simple-local-avatars.php Show resolved Hide resolved
includes/class-simple-local-avatars.php Outdated Show resolved Hide resolved
@faisal-alvi faisal-alvi merged commit a6d3af8 into develop Jun 10, 2022
@faisal-alvi faisal-alvi deleted the fix/bbPress branch June 10, 2022 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants