Skip to content

Refactor admin scripts to use proper WordPress enqueue system#13

Merged
Woldbye merged 1 commit intomainfrom
fix-admin-script-enqueue
Feb 13, 2026
Merged

Refactor admin scripts to use proper WordPress enqueue system#13
Woldbye merged 1 commit intomainfrom
fix-admin-script-enqueue

Conversation

@Woldbye
Copy link
Copy Markdown
Collaborator

@Woldbye Woldbye commented Feb 4, 2026

Refactors admin JavaScript to use WordPress's proper script enqueue system instead of inline <script> tags. Consolidates dashboard link and banner dismiss scripts into a single enqueued JS file.

Changes

  • Create admin/js/betterlytics-admin.js consolidating admin scripts as per the wp-reviewers request.
  • Add enqueue_scripts() method using wp_enqueue_script() and wp_localize_script()
  • Remove inline scripts from admin controller and admin class

- dashboard link and banner dismiss scripts are now in a single enqueued JS file as per the reviewers request
@Woldbye Woldbye changed the title - use proper script enqueue system Refactor admin scripts to use proper WordPress enqueue system Feb 4, 2026
@Woldbye Woldbye merged commit 7c345e9 into main Feb 13, 2026
3 checks 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.

1 participant