Skip to content

Replace deprecated jQuery and var declarations#84

Merged
Zodiac1978 merged 1 commit into
Zodiac1978:developfrom
apermo:fix/js-modernization
Apr 14, 2026
Merged

Replace deprecated jQuery and var declarations#84
Zodiac1978 merged 1 commit into
Zodiac1978:developfrom
apermo:fix/js-modernization

Conversation

@apermo
Copy link
Copy Markdown
Contributor

@apermo apermo commented Apr 13, 2026

Summary

  • Replace jQuery.parseJSON() with JSON.parse() — deprecated since jQuery 3.0, removed in 4.0
  • Replace all var with const/let as appropriate
  • Leave jQuery.post() as-is (jQuery already loaded by WP admin)

Fixes #83

Compatibility

No concern — const/let and JSON.parse() are ES6 (2015), supported by every browser WordPress targets. IE11 support was dropped in WP 5.8.

Test in WordPress Playground

Before (develop — baseline): Open in WordPress Playground

After (this branch — modernized JS): Open in WordPress Playground

Pre-installed test plugins: Apermo Admin Bar (outdated), giWeather (closed/removed)

Test plan

  • Open both links — verify identical behavior (plugins load progressively, table renders correctly)
  • Check browser console in the After link for any JS errors
  • Verify CSV export still works in the After link

Replace jQuery.parseJSON() with JSON.parse() and
all var declarations with const/let.
Copy link
Copy Markdown
Owner

@Zodiac1978 Zodiac1978 left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the PR again! 👍

@Zodiac1978 Zodiac1978 merged commit 9c05b4d into Zodiac1978:develop Apr 14, 2026
1 check passed
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.

JS cleanup: deprecated jQuery patterns and var declarations

2 participants