If you really want to do this, then it should already be possible.
The global $wp_scripts
is an instance of the WP_Scripts
class, which is an instance of the WP_Dependencies
class.
So in theory (not tested), you should be able to do something like this:
function alter_script_tags()
{
echo '<pre>';
print $GLOBALS['wp_scripts']->print_html;
echo '</pre>';
}
add_action( 'wp_enqueue_scripts', 'alter_script_tags', 999999 );
This is just a rough sketch, but you should get the idea.
Related Posts:
- Search and Replace Script Loader in Head Only Works in Footer
- remove empty paragraphs from the_content?
- Set JPEG compression for specific custom image sizes
- Define custom Page Template without its own .php file
- Where and how to put inline js in pages
- syntax for remove_filter in parent theme with class
- Convert hyphen to underscore in permalinks
- Override parent theme function that is not hooked or in the functions.php file
- Programmatically Add Font-Awesome Icons to Category Widget
- Remove bulk actions based on user role or capabilities
- Removing title from page
- Hide some items from Screen options in dashboard for products
- Run Product Filter Javascript On Page Template
- Adding body class when post contains a specific shortcode
- Replace Archive Widget Link Text
- How to make unique add_filter to the_content of specific page template files – so each template gets its own addition
- Best way to programatically add “rel” attributes to page and post images
- Limit filter upgrader_post_install to a single plugin
- How to update feed only 2-3 times a week (for Feedburner email)?
- Manipulate Output of wp_list_something: select menu instead of li’s
- jquery won’t load in footer
- Show excerpt for only first post in query
- How to properly add NPM packages and integrate them in WordPress?
- Get Current User info using wp_localize_script, in functions.php
- How to get the post_name when in preview?
- Replace menu links with # and add name to its li
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Adding HTML to the end of every post with the Block Editor
- How do I add Bootstrap and LESS to my migrated WordPress site?
- Passing values from a widget to a function within a plugin
- Publish/Update post is changing image links from file url to post url
- Including a specific Javascript Script in a template. Is my code correct?
- how to en-queue jQuery to load before the tag
- Replace a menu with widget or a custom template file programmatically
- How do I remove the date and category form my portfolio pages
- Run wp_kses_decode_entities on atom feed?
- Filtering out the #more anchor link that gets produced by
- Can’t filter wp_get_attachment_link
- append to existing parent theme function
- Override the WordPress core function wp_referer_field
- Modify post filter to set custom number of posts per page and exclude child posts
- How to add custom JavaScript in functions?
- How to edit the Tags within the image file URLs?
- How to add_filter html template to middle of content
- I have problems with loading javascripts
- Dequeue script to prevent javascript event conflict on wordpress child theme
- Redefine function arguments before rendering
- javascript and css links not working on sever
- Run a jquery script on on a certain template page
- Combine embed_oembed_html and oembed_result
- login_headertitle is deprecated since version 5.2.0
- Filter to wp_list_authors
- Native gallery custom html output
- Javascript not loading after the document ready
- The_content and Preg_replace in loaded Iframe [closed]
- Auto scroll to id on page load on all pages except home page. Only do this on mobile
- How to load jQuery in TOP of wp_footer?
- Add Adsense code between job listings – wp job manager plugin
- Include Jquery libraries in wordpress theme?
- Replace header image on all other pages but home – URL issue
- Why a SlideShow (made using JQuery FlexSlider) can’t work if I load it form functions.php but work if I load it from my footer.php file? [closed]
- Creating multiple category drop down
- How to setup a popup registeration page in wordpress with function.php
- Any adverse effects of adding apply_filters to a function?
- how can I add filter in specfic field in my website?
- Customizing the wp_video_shortcode output with add_filter
- Running javascript without hooking wp_head
- How to add HTML into error message
- Removing comment lines from all enqueued js files using a filter function
- How Do I Unhook This Parent Theme Function?
- Allow user only create specific tags
- Child theme remove parent filter in functions
- Changing the default view of “The Events Calendar” for mobile
- function replace_text for entire page
- Help wiht adding fullcalendar.io to a WordPress page
- add product thumbnail to checkout page only and include variation name
- Remove External Links from WordPress posts Using add_filter() in Theme functions.php
- Graphic before title – Specific Category
- Which method is more correct for removing WooCommerce Extensions menu item?
- Hide disclaimer from summary excerpts
- Get child-pages slugs of current page into js-file
- Some code is added automatically to my site’s header – what is it?
- Only seems to be displaying one child when there are supposed to be multiple
- Why might wptexturize have become re-enabled?
- Javascript and Stylesheet in child page
- Shortcode to eliminate and replace with
- Automatic add space if user enters number(any digit)
- functions.php filters not applied in AJAX call
- Why are some custom javascript files working but some are not
- Settings in functions.php used by a plugin
- WordPress Javascript Widget jQuery Dependency Issue
- Allow tags and attributes in post and pages content
- Override parent theme function that is not hooked or in the functions.php file
- Can’t change excerpt length and more tag
- How do I get my nav menu to show sub pages?
- Why wp_ajax hooks doesn’t work?
- Filter to strip unnecessary attributes
- comment_post function with js not running
- function to show youtube videos within excerpt – if condition and apply_filters
- dynamically import array from another js file in WordPress