Feature: Add Inline/Enqueue JS/CSS #6770
leepeterson
started this conversation in
Ideas
Replies: 3 comments
-
There should also be filters available for cases where a source code solution is preferable. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Maybe this is obvious, maybe not: this idea relates to admin-rendered fields, assets being enqueued via admin_enqueue_scripts |
Beta Was this translation helpful? Give feedback.
0 replies
-
Right, I just want to make sure that when we implement it we also make sure there is a filter-based solution for those users that prefer to do things via code. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Overview
To help developers add custom JS-based functionality or custom CSS-based styles and/or interactions where Pods fields are rendered, adding 1 field for JS and 1 field for CSS might be helpful.
Expected Behavior
N/A
Current Behavior
N/A
Steps to Reproduce (for bugs)
N/A
Possible Solution
For Pods-created CPTs and taxonomies, the Advanced Options tab seems like a good candidate for such fields. A more granular approach (and one that would satisfy Extended Types) would be to place these fields within each Field's Advanced tab.
Methods to include these files would be
wp_enqueue_script/style
for Advanced Options tab placement; orwp_add_inline_script/style
for Advanced tab placement. The prior being an enqueued JS/CSS file for the entire Pod; the latter being raw JS/CSS on a per-field basis.WordPress Environment
N/A
Pods Package Export (helpful!)
N/A
Workaround or Alternate Solution Until Bug is Addressed
Placing HTML elements with inline styles and/or on[click/focus/change/blur/etc] attributes within the Description field helps to quickly render prototypes.
Related Issues and/or PRs
Unknown.
Beta Was this translation helpful? Give feedback.
All reactions