Skip to content

Conversation

@arifulhoque7
Copy link
Contributor

@arifulhoque7 arifulhoque7 commented Nov 4, 2025

Summary Close issue

Replaced all crown SVG icons (green/orange) with the new pro-badge.svg throughout
the WP User Frontend plugin. Updated "Upgrade to Pro" button styling from
orange/amber to green color scheme for consistent branding.

Changes Made

Icon Replacement

  • Replaced all crown.svg references with pro-badge.svg in PHP files
  • Removed crown icons from "Upgrade to PRO" buttons (text only)
  • Replaced standalone crown icons with pro-badge.svg
  • Changed from inline SVG (file_get_contents) to tags for proper rendering
  • Added clickable link to pro-badge on modules page

CSS Updates

  • Updated overlay background from dark (rgba(0,0,0,0.4)) to light green (rgba(236,253,245,0.5))
  • Added green dashed border (#10b981) to pro-field-overlay
  • Updated button-upgrade-to-pro styling:
    • Background: #ff9000 → #059669 (hover: #d07805 → #10b981)
    • Padding: 10px 15px → 8px 16px
    • Border radius: 5px → 6px
    • Added font-weight: 500, font-size: 14px, line-height: 1.5
    • Added transition effects
  • Fixed pro-icon alignment issues with vertical-align and line-height adjustments
  • Added wpuf-module-pro-badge class for modules page positioning

Vue Component Updates

  • Updated SectionInputField.vue: Changed amber-500/600 to emerald-600/700
  • Removed crown SVG from upgrade buttons in Vue components
  • ProTooltip.vue: Now uses green button styling via CSS class

Files Modified

  • /includes/functions/settings-options.php
  • /includes/Free/Free_Loader.php
  • /includes/Free/Subscription_Element.php
  • /includes/Free/templates/page-registration-form.php
  • /includes/Admin/Forms/Post/Templates/*.php (4 files)
  • /includes/Admin/template-parts/modal*.php (3 files)
  • /wpuf-functions.php
  • /assets/css/admin.css
  • /assets/css/admin/wpuf-module.css
  • /assets/less/admin.less
  • /assets/js/components/subscriptions/SectionInputField.vue
  • /assets/js/components/ProTooltip.vue

Visual Changes

  • All pro feature indicators now display with consistent green branding
  • Pro-badge icon appears properly with gradient colors (not white)
  • Pro-badge on modules page appears in top-right corner with link to pricing
  • Form table labels with pro icons are properly centered vertically
  • Module overlay matches the same light green aesthetic as other pro overlays

Testing Notes

  • Verify pro-badge.svg displays correctly across all admin pages
  • Check icon alignment in settings forms (form-table labels)
  • Test module page overlay and pro-badge link functionality
  • Confirm all "Upgrade to Pro" buttons use green color scheme
  • Validate overlay transparency doesn't affect child elements

Summary by CodeRabbit

  • Style
    • Replaced PRO badge artwork across the UI for a consistent indicator.
    • Restyled "Upgrade to PRO" CTA with green theme, tighter padding, larger radius and smoother hover.
    • Refreshed pro preview overlay with lighter tint, dashed border and rounded corners.
    • Improved icon/text alignment and tooltip spacing for cleaner, more consistent layouts.

@coderabbitai
Copy link

coderabbitai bot commented Nov 4, 2025

Walkthrough

This pull request replaces crown icon usages with a pro-badge asset across PHP templates and loaders, updates pro-related CSS/LESS styling (overlay, upgrade button, icon alignment, module badge), and simplifies Vue components by replacing inline SVGs with image tags and trimming CTA markup.

Changes

Cohort / File(s) Summary
Stylesheets
assets/css/admin.css, assets/css/admin/wpuf-module.css, assets/less/admin.less
Updated pro-preview overlay to a light mint tint with dashed border; reworked upgrade-to-pro button (green background, adjusted padding, gap, border-radius, typography, hover); added .wpuf-module-pro-badge; improved icon/title vertical alignment and svg/img sizing.
Vue components
assets/js/components/ProTooltip.vue, assets/js/components/ProBadge.vue, assets/js/components/subscriptions/SectionInputField.vue, assets/js/components/subscriptions/Subsection.vue
Replaced inline SVG badge with <img> bound to computed asset URL; removed inner SVG/icon markup from upgrade CTAs; adjusted classes and spacing around ProBadge/tooltip.
Admin template parts
includes/Admin/template-parts/modal.php, includes/Admin/template-parts/modal-v4.1.php, includes/Admin/template-parts/modal-v4.2.php
Swapped crown.svg references for pro-badge.svg in modal/template lists (two locations in v4.2).
Pro form preview templates
includes/Admin/Forms/Post/Templates/Pro_Form_Preview_Artwork.php, ..._EDD.php, ..._Press_Release.php, ..._Professional_Video.php
Replaced constructor pro_icon asset path from crown.svg to pro-badge.svg.
Free loader & subscription UI
includes/Free/Free_Loader.php, includes/Free/Subscription_Element.php, includes/Free/templates/page-registration-form.php
Replaced crown SVG with pro-badge.svg; switched from file_get_contents inline SVG to external image tags for pro badge; adjusted upgrade link markup/targets.
Helpers & settings
includes/functions/settings-options.php, wpuf-functions.php
Replaced inline crown SVG rendering with image tag references to pro-badge.svg; simplified pro preview HTML/tooltip markup by removing inline SVG content.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Changes are primarily repetitive asset swaps and styling, but span CSS, PHP templates, and Vue — requiring cross-layer visual verification.
  • Areas to pay extra attention:
    • Image path correctness and asset URL resolution in JS components (computed assetUrl/badgeUrl).
    • Places where inline SVG was removed — ensure alt text, sizing, and accessibility remain acceptable.
    • CSS rule specificity and potential regressions for other module badges or tooltips.

Possibly related PRs

Suggested labels

needs: developer feedback

Suggested reviewers

  • Rubaiyat-E-Mohammad
  • sapayth

Poem

🐰 I swapped the crown for a shiny badge today,
Mint overlays now light the way,
Buttons turned green, the gap set right,
Icons align and gleam in sight—
I hop, I nibble, I cheer, hooray! 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: replacing crown icons with a new pro-badge SVG and updating branding colors from orange/amber to green.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@arifulhoque7 arifulhoque7 added the needs: dev review This PR needs review by a developer label Nov 4, 2025
Copy link

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
includes/Free/Subscription_Element.php (1)

7-13: Rename variable to match the new asset

The variable $crown_icon now references pro-badge.svg, but the variable name still refers to "crown". This creates confusion and reduces code maintainability. Consider renaming it to better reflect the asset it represents.

-        $crown_icon = WPUF_ROOT . '/assets/images/pro-badge.svg';
-        $crown      = '';
+        $pro_badge_icon = WPUF_ROOT . '/assets/images/pro-badge.svg';
+        $pro_badge      = '';
 
-        if ( file_exists( $crown_icon ) ) {
-            $crown = sprintf( '<span class="pro-icon-title"> %s</span>', file_get_contents( $crown_icon ) );
+        if ( file_exists( $pro_badge_icon ) ) {
+            $pro_badge = sprintf( '<span class="pro-icon-title"> %s</span>', file_get_contents( $pro_badge_icon ) );
         }

Note: You'll also need to update line 16 where $crown is used in the echo statement.

🧹 Nitpick comments (10)
includes/Free/templates/page-registration-form.php (1)

148-149: Refactor: Consider switching from file_get_contents() to an <img> tag for consistency.

The file_get_contents() approach for rendering the pro-badge is inconsistent with the cleaner pattern used in settings-options.php (line 687), which uses an <img> tag. This duplication also appears twice in this file with identical parameters.

Consider refactoring to match the img tag pattern:

-<div class="crown-icon pro-icon">
-    <?php echo file_get_contents( wp_kses($crown_icon, array('svg' => [ 'xmlns' => true, 'width' => true, 'height' => true, 'viewBox' => true, 'fill' => true ], 'path' => [ 'd' => true, 'fill' => true ], 'circle' => [ 'cx' => true, 'cy' => true, 'r' => true ], ) ) ); // @codingStandardsIgnoreLine ?>
-</div>
+<div class="crown-icon pro-icon">
+    <img src="<?php echo esc_url( WPUF_ASSET_URI . '/images/pro-badge.svg' ); ?>" alt="PRO">
+</div>

And similarly for line 195:

-<span class="pro-icon icon-white"> <?php echo file_get_contents( wp_kses($crown_icon, array('svg' => [ 'xmlns' => true, 'width' => true, 'height' => true, 'viewBox' => true, 'fill' => true ], 'path' => [ 'd' => true, 'fill' => true ], 'circle' => [ 'cx' => true, 'cy' => true, 'r' => true ], ) ) ); // @codingStandardsIgnoreLine ?></span>
+<span class="pro-icon icon-white"><img src="<?php echo esc_url( WPUF_ASSET_URI . '/images/pro-badge.svg' ); ?>" alt="PRO"></span>

Also applies to: 195-195

includes/Admin/template-parts/modal-v4.2.php (1)

269-269: Remove unused variable.

The $crown_icon variable is defined but never used in this file. Only $pro_badge (line 270) is utilized in the img tag at line 353.

Apply this diff to remove the unused variable:

-$crown_icon = WPUF_ROOT . '/assets/images/pro-badge.svg';
 $pro_badge = WPUF_ASSET_URI . '/images/pro-badge.svg';
includes/Admin/template-parts/modal.php (1)

123-125: Refactor: Consolidate duplicated code and consider switching to <img> tag.

The file_get_contents() call with identical parameters is duplicated on lines 124 and 140. Additionally, modal-v4.2.php uses a cleaner <img> tag approach (line 353) that should be adopted here for consistency.

Consider refactoring to match the pattern in modal-v4.2.php:

Update the variable definition:

-$crown_icon = WPUF_ROOT . '/assets/images/pro-badge.svg';
+$pro_badge = WPUF_ASSET_URI . '/images/pro-badge.svg';

Then replace line 124:

-if ( file_exists( $crown_icon ) ) {
-    printf( '<span class="pro-icon-title"> %s</span>', wp_kses_post( file_get_contents( wp_kses($crown_icon, array('svg' => [ 'xmlns' => true, 'width' => true, 'height' => true, 'viewBox' => true, 'fill' => true ], 'path' => [ 'd' => true, 'fill' => true ], 'circle' => [ 'cx' => true, 'cy' => true, 'r' => true ] ) ) ) ) );
-}
+printf( '<span class="pro-icon-title"><img src="%s" alt="PRO"></span>', esc_url( $pro_badge ) );

And replace line 140:

-if ( file_exists( $crown_icon ) ) {
-    printf( '<span class="pro-icon"> %s</span>', wp_kses_post( file_get_contents( wp_kses($crown_icon, array('svg' => [ 'xmlns' => true, 'width' => true, 'height' => true, 'viewBox' => true, 'fill' => true ], 'path' => [ 'd' => true, 'fill' => true ], 'circle' => [ 'cx' => true, 'cy' => true, 'r' => true ] ) ) ) ) );
-}
+printf( '<span class="pro-icon"><img src="%s" alt="PRO"></span>', esc_url( $pro_badge ) );

Also applies to: 139-141

includes/Admin/template-parts/modal-v4.1.php (1)

44-44: Remove unused variable.

The $crown_icon variable is defined but never used in this file. Only $pro_badge (line 45) is utilized in the img tag at line 117.

Apply this diff to remove the unused variable:

-$crown_icon = WPUF_ROOT . '/assets/images/pro-badge.svg';
 $pro_badge = WPUF_ASSET_URI . '/images/pro-badge.svg';
assets/js/components/ProTooltip.vue (1)

43-45: Consider removing unnecessary flex utility classes

The anchor now contains only text without an icon. The classes wpuf-items-center and wpuf-justify-around may no longer be necessary since they were likely used to align the icon with the text. Consider simplifying the class list to just wpuf-button button-upgrade-to-pro wpuf-w-[calc(100%-2rem)] unless these utilities are needed for vertical centering or other layout purposes.

-            target="_blank" class="wpuf-button button-upgrade-to-pro wpuf-flex wpuf-items-center wpuf-w-[calc(100%-2rem)] wpuf-justify-around">Upgrade to PRO</a></div><i style="left: 50%; top: 100%; transform: initial;"></i>
+            target="_blank" class="wpuf-button button-upgrade-to-pro wpuf-flex wpuf-w-[calc(100%-2rem)]">Upgrade to PRO</a></div><i style="left: 50%; top: 100%; transform: initial;"></i>
assets/js/components/subscriptions/SectionInputField.vue (1)

308-316: Consider removing unused gap utility class

The anchor now contains only text without an icon. The wpuf-gap-2 class, which adds spacing between flex items, may no longer be necessary. This is a minor cleanup opportunity to simplify the styling.

-                   class="wpuf-button button-upgrade-to-pro wpuf-inline-flex wpuf-items-center wpuf-px-4 wpuf-py-2 wpuf-bg-emerald-600 focus:wpuf-bg-emerald-700 hover:wpuf-bg-emerald-700 wpuf-text-white hover:wpuf-text-white wpuf-rounded-md wpuf-gap-2 wpuf-font-medium wpuf-text-sm">
+                   class="wpuf-button button-upgrade-to-pro wpuf-inline-flex wpuf-items-center wpuf-px-4 wpuf-py-2 wpuf-bg-emerald-600 focus:wpuf-bg-emerald-700 hover:wpuf-bg-emerald-700 wpuf-text-white hover:wpuf-text-white wpuf-rounded-md wpuf-font-medium wpuf-text-sm">
includes/Free/Free_Loader.php (2)

186-874: Consider consolidating the pro-badge HTML generation.

The pattern '<img src="' . WPUF_ASSET_URI . '/images/pro-badge.svg" alt="PRO">' is repeated 40+ times across this file. This creates maintenance burden and inconsistency risk.

Consider extracting this to a helper method:

private function get_pro_badge_html() {
    return '<img src="' . esc_url( WPUF_ASSET_URI . '/images/pro-badge.svg' ) . '" alt="' . esc_attr__( 'PRO', 'wp-user-frontend' ) . '">';
}

Then use it throughout:

-                'title'          => __( 'SMS', 'wp-user-frontend' ) . '<span class="pro-icon-title"> ' . '<img src="' . WPUF_ASSET_URI . '/images/pro-badge.svg" alt="PRO">' . '</span>',
+                'title'          => __( 'SMS', 'wp-user-frontend' ) . '<span class="pro-icon-title"> ' . $this->get_pro_badge_html() . '</span>',

This approach also adds proper escaping with esc_url() and esc_attr__() for security.


1004-1004: Inconsistent pro-badge rendering approach.

The codebase uses two different approaches for rendering the pro-badge:

  1. Lines 186-874: Direct <img> tags with WPUF_ASSET_URI
  2. Lines 1004, 1063: Loading SVG content with file_get_contents() and rendering inline

This inconsistency makes the code harder to maintain and may cause visual inconsistencies between different admin sections.

Standardize on one approach throughout the file. The <img> tag approach (lines 186-874) is simpler and more performant since it:

  • Doesn't require file I/O operations
  • Allows browser caching
  • Has cleaner separation of concerns

Consider refactoring lines 1004-1063 to use the same <img> tag approach used elsewhere.

Also applies to: 1142-1144

assets/css/admin.css (1)

732-737: Remove commented CSS code.

The commented CSS rules should either be uncommented if needed, or removed entirely to keep the codebase clean.

Apply this diff to remove the commented code:

-/* span.pro-icon.icon-white svg path {
-  fill: #fff;
-} */
-/* label span.pro-icon svg path {
-  fill: #10b981;
-} */

If these rules are needed for specific scenarios, they should be uncommented and documented. Otherwise, they should be removed to avoid confusion.

assets/less/admin.less (1)

951-957: Remove commented LESS code.

These commented rules in the LESS source are being compiled into the CSS output, creating unnecessary bloat.

Apply this diff to clean up the commented code:

-/* span.pro-icon.icon-white svg path {
-    fill: #fff;
-} */
-
-/* label span.pro-icon svg path {
-    fill: #10b981;
-} */

If these styles are needed, uncomment and document them. Otherwise, remove them to keep the source clean.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 61f733e and 21063fb.

📒 Files selected for processing (17)
  • assets/css/admin.css (5 hunks)
  • assets/css/admin/wpuf-module.css (1 hunks)
  • assets/js/components/ProTooltip.vue (1 hunks)
  • assets/js/components/subscriptions/SectionInputField.vue (1 hunks)
  • assets/less/admin.less (5 hunks)
  • includes/Admin/Forms/Post/Templates/Pro_Form_Preview_Artwork.php (1 hunks)
  • includes/Admin/Forms/Post/Templates/Pro_Form_Preview_EDD.php (1 hunks)
  • includes/Admin/Forms/Post/Templates/Pro_Form_Preview_Press_Release.php (1 hunks)
  • includes/Admin/Forms/Post/Templates/Pro_Form_Preview_Professional_Video.php (1 hunks)
  • includes/Admin/template-parts/modal-v4.1.php (1 hunks)
  • includes/Admin/template-parts/modal-v4.2.php (1 hunks)
  • includes/Admin/template-parts/modal.php (1 hunks)
  • includes/Free/Free_Loader.php (15 hunks)
  • includes/Free/Subscription_Element.php (1 hunks)
  • includes/Free/templates/page-registration-form.php (1 hunks)
  • includes/functions/settings-options.php (1 hunks)
  • wpuf-functions.php (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
wpuf-functions.php (1)
includes/Free/Pro_Prompt.php (2)
  • Pro_Prompt (8-32)
  • get_upgrade_to_pro_popup_url (29-31)
🪛 PHPMD (2.15.0)
includes/Free/Free_Loader.php

182-182: Avoid unused local variables such as '$crown_icon_path'. (undefined)

(UnusedLocalVariable)


248-248: Avoid unused local variables such as '$crown_icon_path'. (undefined)

(UnusedLocalVariable)

🔇 Additional comments (10)
includes/Admin/Forms/Post/Templates/Pro_Form_Preview_EDD.php (1)

31-31: LGTM!

The asset path update from crown.svg to pro-badge.svg is clean and correct.

includes/Admin/Forms/Post/Templates/Pro_Form_Preview_Artwork.php (1)

31-31: LGTM!

The asset path update is consistent with other Pro_Form_Preview classes.

includes/functions/settings-options.php (1)

687-687: LGTM!

The refactored implementation using an <img> tag is cleaner and more maintainable than the previous file_get_contents() approach. This pattern should be considered for other files still using file_get_contents().

includes/Admin/Forms/Post/Templates/Pro_Form_Preview_Professional_Video.php (1)

31-31: LGTM!

The asset path update is consistent with other Pro_Form_Preview template classes.

includes/Admin/Forms/Post/Templates/Pro_Form_Preview_Press_Release.php (1)

28-32: LGTM! Asset path updated correctly

The pro icon path has been successfully updated from crown.svg to pro-badge.svg, aligning with the PR's objective to replace crown icons with the new pro-badge asset.

wpuf-functions.php (2)

4652-4656: LGTM! Function simplified correctly

The wpuf_get_pro_preview_html() function has been successfully updated to return a text-only upgrade button, removing the inline icon markup. This change aligns with the PR objectives and maintains backward compatibility by keeping the function signature unchanged.


4665-4694: LGTM! Tooltip function updated correctly

The wpuf_get_pro_preview_tooltip() function has been updated to use a text-only upgrade button while appropriately retaining the check icons for the feature list items. The function structure is well-organized and the changes align with the PR objectives.

assets/css/admin/wpuf-module.css (1)

86-99: LGTM! Pro-overlay styling updated consistently.

The overlay styling changes align well with the new pro-badge branding:

  • Light mint/green tint background provides better readability
  • Dashed green border creates a clear visual indicator
  • Border-radius adds polish to the UI

The color choice #10b981 is consistent with the green theme used throughout this PR.

assets/css/admin.css (1)

690-719: LGTM! Upgrade button styling aligns with new branding.

The button styling updates are well-executed:

  • Green color scheme (#059669, #10b981) replaces orange, aligning with the new pro-badge branding
  • Improved spacing with gap: 8px and consistent padding
  • Better typography with font-size: 14px and font-weight: 500
  • Smooth transition on hover enhances user experience

The inline-flex layout with centered content ensures proper alignment of text and badge icon.

assets/less/admin.less (1)

874-879: LGTM! Styling changes align with the green branding refresh.

The LESS source correctly implements the new pro-badge styling:

  • Pro-field overlay updated with light green tint and dashed border
  • Upgrade button now uses green color scheme with proper hover states
  • Consistent use of #059669 (base) and #10b981 (hover/accent) colors
  • Icon alignment improvements with vertical-align: middle

These changes will compile correctly to the CSS and provide a cohesive visual update across the admin interface.

Also applies to: 896-925

*/
public function pro_sections( $sections ) {
$crown_icon_path = WPUF_ROOT . '/assets/images/crown.svg';
$crown_icon_path = WPUF_ROOT . '/assets/images/pro-badge.svg';
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Remove unused variables.

The $crown_icon_path variable is assigned but never used in this method. This creates dead code and can be confusing for future maintainers.

Apply this diff to remove the unused variables:

-        $crown_icon_path = WPUF_ROOT . '/assets/images/pro-badge.svg';
         $new_sections    = [
-        $crown_icon_path = WPUF_ROOT . '/assets/images/pro-badge.svg';
         $settings_fields['wpuf_general'][] = [

Based on static analysis hints.

Also applies to: 248-248

🧰 Tools
🪛 PHPMD (2.15.0)

182-182: Avoid unused local variables such as '$crown_icon_path'. (undefined)

(UnusedLocalVariable)

🤖 Prompt for AI Agents
In includes/Free/Free_Loader.php around lines 182 and 248, the variable
$crown_icon_path is assigned but never used; remove these dead-variable
assignments at both line locations to eliminate unused code and update
surrounding code/formatting accordingly so no references remain.

@Rubaiyat-E-Mohammad
Copy link
Contributor

Rubaiyat-E-Mohammad commented Nov 7, 2025

Pro badge not updated in subscription creation flow @arifulhoque7 vai
image
image

@sapayth sapayth added Dev Review Done and removed needs: dev review This PR needs review by a developer labels Nov 11, 2025
@arifulhoque7
Copy link
Contributor Author

@Rubaiyat-E-Mohammad vai , Please check now it is showing properly

Copy link

@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

🧹 Nitpick comments (1)
assets/js/components/ProBadge.vue (1)

11-13: Confirm: badge URL resolves in admin; add image fallback.

assets/images/pro-badge.svg exists and wpufSubscriptions.assetUrl is localized in includes/Admin/Admin_Subscription.php and exposed on window (assets/js/subscriptions.js), so ProBadge (assets/js/components/ProBadge.vue) will resolve the badge URL in the subscriptions admin components (assets/js/components/subscriptions/Subsection.vue, SectionInputField.vue). Add a small client-side fallback (e.g., img onerror to hide/swap to inline SVG or use injected wpufSubscriptions when available) to avoid a broken-image icon if the asset fails to load.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 21063fb and 3767ffd.

📒 Files selected for processing (3)
  • assets/js/components/ProBadge.vue (1 hunks)
  • assets/js/components/subscriptions/SectionInputField.vue (1 hunks)
  • assets/js/components/subscriptions/Subsection.vue (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • assets/js/components/subscriptions/SectionInputField.vue
🔇 Additional comments (2)
assets/js/components/subscriptions/Subsection.vue (1)

71-71: LGTM! Padding adjustment aligns with image-based badge.

Removing wpuf-pt-1 is appropriate now that ProBadge renders as an <img> tag with fixed dimensions (39×22). This should improve vertical alignment with the section label text.

assets/js/components/ProBadge.vue (1)

1-9: Verify the fallback path assumption, but primary asset URL is handled correctly.

The primary asset URL is defined via plugins_url() in wpuf.php:30, which respects WordPress's plugin directory structure. However, the fallback in ProBadge.vue assumes the path /wp-content/plugins/wp-user-frontend/assets, which will fail if:

  • WordPress uses a custom WP_CONTENT_DIR
  • The plugin folder is renamed from wp-user-frontend

The asset URL is passed to the frontend via wp_localize_script() before the component loads, so the fallback should rarely activate. Still, if it does trigger in non-standard setups, the image will fail to load.

Test in installations with custom WordPress structures to confirm the badge displays correctly. Consider removing the hardcoded fallback or making it dynamic if the plugin should support custom configurations.

@Rubaiyat-E-Mohammad Rubaiyat-E-Mohammad added QA Approved This PR is approved by the QA team and removed needs: testing labels Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dev Review Done QA Approved This PR is approved by the QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants