Title: Inline assets
Last modified: June 26, 2022

---

# Inline assets

 *  Resolved [yoyurec](https://wordpress.org/support/users/yoyurec/)
 * (@yoyurec)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/inline-assets/)
 * Awesome plugin!
 * Do you plan to add an option to inline CSS (and JS)?
    Something like
 *     ```
       function hook_inline_css() {
           $css_path = 'wp-content/uploads/some.css'
           $css_content = file_get_contents( $css_path );
           echo '<style>'
       	.PHP_EOL
       	.'/*' . $css_path . '*/'
       	.PHP_EOL
       	. $css_content
       	.'</style>';
       }
       add_action('wp_head','hook_inline_css');
       ```
   
    -  This topic was modified 3 years, 11 months ago by [yoyurec](https://wordpress.org/support/users/yoyurec/).
    -  This topic was modified 3 years, 11 months ago by [yoyurec](https://wordpress.org/support/users/yoyurec/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Firas Abd Alrahman](https://wordpress.org/support/users/doonfrs/)
 * (@doonfrs)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/inline-assets/#post-15801546)
 * Thank you for rating, I will work on this feature soon.
 *  Thread Starter [yoyurec](https://wordpress.org/support/users/yoyurec/)
 * (@yoyurec)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/inline-assets/#post-15802205)
 * And maybe also “defer” JS in addition to “async”? ))
    It reuses same code, so
   it will be verrryy easy update. Tnx!
    -  This reply was modified 3 years, 10 months ago by [yoyurec](https://wordpress.org/support/users/yoyurec/).
 *  Plugin Author [Firas Abd Alrahman](https://wordpress.org/support/users/doonfrs/)
 * (@doonfrs)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/inline-assets/#post-15802537)
 * Thank you for feedback.
    Defer added, please upgrade to 1.8
 * best;
 *  Thread Starter [yoyurec](https://wordpress.org/support/users/yoyurec/)
 * (@yoyurec)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/inline-assets/#post-15802706)
 * **JS tab**: Adding attribute to file… `async/defer` are mutually exclusive! So
   should be dropdown select.
    **CSS tab**: No changes were needed for this section
   as for CSS used another solution and no `defer` attr exists ))
 * So as result on JS tabs near asset select with 3 options “Sync(default)/Defer/
   Async”, on CSS tab checkbox “Async”.
 *  Plugin Author [Firas Abd Alrahman](https://wordpress.org/support/users/doonfrs/)
 * (@doonfrs)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/inline-assets/#post-15802719)
 * You are right, I will find time for that.
    Currently, it does its job 😉

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Inline assets’ is closed to new replies.

 * ![](https://ps.w.org/gsp-assets-manager/assets/icon-256x256.png?rev=2642137)
 * [GSP Assets Manager (Easy Live Assets Editor)](https://wordpress.org/plugins/gsp-assets-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gsp-assets-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gsp-assets-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/gsp-assets-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gsp-assets-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gsp-assets-manager/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Firas Abd Alrahman](https://wordpress.org/support/users/doonfrs/)
 * Last activity: [3 years, 10 months ago](https://wordpress.org/support/topic/inline-assets/#post-15802719)
 * Status: resolved