• Resolved yoyurec

    (@yoyurec)


    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 2 years, 8 months ago by yoyurec.
    • This topic was modified 2 years, 8 months ago by yoyurec.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Firas Abd Alrahman

    (@doonfrs)

    Thank you for rating, I will work on this feature soon.

    Thread Starter yoyurec

    (@yoyurec)

    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 2 years, 8 months ago by yoyurec.
    Plugin Author Firas Abd Alrahman

    (@doonfrs)

    Thank you for feedback.
    Defer added, please upgrade to 1.8

    best;

    Thread Starter yoyurec

    (@yoyurec)

    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

    (@doonfrs)

    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.