Skip to content

Align View enqueue methods with WordPress wp_enqueue_style/wp_enqueue_script signatures#65

Merged
gfazioli merged 1 commit intowpbones:masterfrom
dansleboby:fix/signature-method
Feb 11, 2026
Merged

Align View enqueue methods with WordPress wp_enqueue_style/wp_enqueue_script signatures#65
gfazioli merged 1 commit intowpbones:masterfrom
dansleboby:fix/signature-method

Conversation

@dansleboby
Copy link
Copy Markdown
Contributor

Fix $ver default from [] to false to match WordPress signatures.
Add $media parameter to style methods and $args parameter to script
methods to allow full control as with native WordPress enqueue calls.

…_script signatures

Fix $ver default from [] to false to match WordPress signatures.
Add $media parameter to style methods and $args parameter to script
methods to allow full control as with native WordPress enqueue calls.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates View enqueue helper methods to better mirror WordPress wp_enqueue_style() / wp_enqueue_script() signatures, improving caller control over style media and script loading behavior.

Changes:

  • Change $ver default from [] to false for style/script enqueue helpers.
  • Add $media parameter to withAdminStyle() / withStyle() (and deprecated counterparts).
  • Add $args parameter to withAdminScript() / withScript() (and deprecated counterparts) and pass it through to wp_enqueue_script().

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

Comment thread src/View/View.php
Comment thread src/View/View.php
Copy link
Copy Markdown
Collaborator

@gfazioli gfazioli left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@gfazioli gfazioli self-assigned this Feb 11, 2026
@gfazioli gfazioli merged commit 4fb4dc8 into wpbones:master Feb 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants