Skip to content

Handled empty value - #4552

Merged
selul merged 1 commit into
developmentfrom
bugfix/pro/3221
Jul 29, 2026
Merged

Handled empty value#4552
selul merged 1 commit into
developmentfrom
bugfix/pro/3221

Conversation

@girishpanchal30

@girishpanchal30 girishpanchal30 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Added a flag is_empty to the dynamic selector meta, which allows us to check if a value is empty and return the default value instead of an empty value.

Check before Pull Request is ready:

Part of https://github.com/Codeinwp/neve-pro-addon/issues/3221

@girishpanchal30
girishpanchal30 requested a review from Copilot July 27, 2026 07:59
@pirate-bot pirate-bot added the pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) label Jul 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds optional empty-value fallback handling to dynamic CSS selector metadata.

Changes:

  • Introduces the is_empty metadata flag.
  • Returns the configured default when the flag is enabled and the value is empty.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +178 to +180
// Only check whether the value is empty when the meta has the is_empty flag set to true.
if ( isset( $meta[ self::META_IS_EMPTY ] ) && $meta[ self::META_IS_EMPTY ] && empty( $value ) ) {
return $default;
@girishpanchal30 girishpanchal30 added the pr-checklist-skip Allow this Pull Request to skip checklist. label Jul 27, 2026
@pirate-bot pirate-bot added pr-checklist-complete The Pull Request checklist is complete. (automatic label) and removed pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) labels Jul 27, 2026
@pirate-bot

Copy link
Copy Markdown
Collaborator

Plugin build for 0858412 is ready 🛎️!

@selul
selul merged commit 07ed022 into development Jul 29, 2026
19 of 22 checks passed
@selul
selul deleted the bugfix/pro/3221 branch July 29, 2026 11:56
@pirate-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 4.2.10 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants