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

Added media support for Product Short description and description. #2317

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

YeasinArafat1998
Copy link
Contributor

@YeasinArafat1998 YeasinArafat1998 commented Jul 18, 2024

All Submissions:

  • My code follow the WordPress' coding standards
  • My code satisfies feature requirements
  • My code is tested
  • My code passes the PHPCS tests
  • My code has proper inline documentation
  • I've included related pull request(s) (optional)
  • I've included developer documentation (optional)
  • I've added proper labels to this pull request

Changes proposed in this Pull Request:

We can introduce media options for both short descriptions and long descriptions.

Changelog entry

Added media support for Product Short description and description.

Before Changes

Describe the issue before changes with screenshots(s).

After Changes

Vendors can add media on the product edit page.

Feature Video (optional)

Link of detailed video if this PR is for a feature.

PR Self Review Checklist:

  • Code is not following code style guidelines
  • Bad naming: make sure you would understand your code if you read it a few months from now.
  • KISS: Keep it simple, Sweetie (not stupid!).
  • DRY: Don't Repeat Yourself.
  • Code that is not readable: too many nested 'if's are a bad sign.
  • Performance issues
  • Complicated constructions that need refactoring or comments: code should almost always be self-explanatory.
  • Grammar errors.

FOR PR REVIEWER ONLY:

As a reviewer, your feedback should be focused on the idea, not the person. Seek to understand, be respectful, and focus on constructive dialog.

As a contributor, your responsibility is to learn from suggestions and iterate your pull request should it be needed based on feedback. Seek to collaborate and produce the best possible contribution to the greater whole.

  • Correct — Does the change do what it’s supposed to? ie: code 100% fulfilling the requirements?
  • Secure — Would a nefarious party find some way to exploit this change? ie: everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities?
  • Readable — Will your future self be able to understand this change months down the road?
  • Elegant — Does the change fit aesthetically within the overall style and architecture?

Summary by CodeRabbit

  • New Features

    • Enabled media buttons in the editor settings for easier post excerpt and content editing.
  • Updates

    • Updated documentation links in the admin settings to point to the new domain dokan.co.
    • Updated support and documentation URLs in the admin header to reflect the new dokan.co domain.

Copy link
Contributor

coderabbitai bot commented Jul 18, 2024

Walkthrough

The recent changes primarily involve updating URLs in a WordPress plugin to reflect a new domain, from wedevs.com to dokan.co, likely due to a rebranding or domain migration. Additionally, modifications were made to the media_buttons parameter in a template file to potentially alter the behavior of media buttons in the editor settings.

Changes

File Change Summary
templates/products/edit-product-single.php Updated media_buttons parameter from false to true in two arrays.
includes/Admin/Settings.php Updated various documentation links from wedevs.com to dokan.co in the admin settings.
templates/admin-header.php Updated support and documentation URLs from wedevs.com to dokan.co in the admin header template.

Poem

In the code, a shift we see,
From wedevs to dokan we flee.
Media buttons now in place,
Bringing change with a gentle grace.
URLs updated, fresh and new,
A brighter path for all to view.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9e1d883 and 2d382fb.

Files selected for processing (1)
  • templates/products/edit-product-single.php (2 hunks)
Additional comments not posted (2)
templates/products/edit-product-single.php (2)

438-438: Approved: Enabled media buttons for short description.

This change enhances the user experience by allowing media to be added directly in the editor for the short description.


458-458: Approved: Enabled media buttons for long description.

This change enhances the user experience by allowing media to be added directly in the editor for the long description.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2d382fb and 955b874.

Files selected for processing (2)
  • includes/Admin/Settings.php (6 hunks)
  • templates/admin-header.php (3 hunks)
Additional comments not posted (10)
templates/admin-header.php (4)

36-36: URL update approved.

The URL has been correctly updated to https://app.dokan.co/support/create/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=dokan-lite.


57-57: URL update approved.

The URL has been correctly updated to https://dokan.co/docs/wordpress/getting-started/?utm_source=plugin&utm_medium=wp-admin&utm_campaign=dokan-lite.


82-82: URL update approved.

The URL has been correctly updated to https://dokan.co/wordpress/feature-requests/.


Line range hint 302-302:
URL update approved.

The URL has been correctly updated to https://dokan.co/docs/wordpress/settings/general/.

includes/Admin/Settings.php (6)

302-302: URL update approved.

The URL has been correctly updated to https://dokan.co/docs/wordpress/settings/general/.


311-311: URL update approved.

The URL has been correctly updated to https://dokan.co/docs/wordpress/settings/selling-options/.


320-320: URL update approved.

The URL has been correctly updated to https://dokan.co/docs/wordpress/settings/withdraw-options/.


329-329: URL update approved.

The URL has been correctly updated to https://dokan.co/docs/wordpress/withdraw/dokan-reverse-withdrawal/.


338-338: URL update approved.

The URL has been correctly updated to https://dokan.co/docs/wordpress/settings/page-settings-2/.


347-347: URL update approved.

The URL has been correctly updated to https://dokan.co/docs/wordpress/settings/appearance/.

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.

1 participant