Title: echo messes with header &#8211; function column_css echoes on &#8216;init&#8217; hook
Last modified: December 30, 2017

---

# echo messes with header – function column_css echoes on ‘init’ hook

 *  [apedog](https://wordpress.org/support/users/apedog/)
 * (@apedog)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/echo-messes-with-header-function-column_css-echoes-on-init-hook/)
 * PHP Error:
 * > Warning Cannot modify header information – headers already sent by (output 
   > started at /home/iac/public_html/new/wp-content/plugins/image-cleanup/image-
   > cleanup.plugin.php:151)
 * Function column_css echoes an in-line <style> on ‘admin_init’ hook (!) – before
   headers are sent. It prints the style before <doctype> is even declared.
 * Try instead to hook on ‘admin_enqueue_scripts’:
 *     ```
       add_action( 'admin_enqueue_scripts', array ($this, 'img_clnup_admin_style' ));
       function img_clnup_admin_style(){ 
         wp_enqueue_style('img_clnup_admin_style', IMGCLNUP_PLUGIN_URL . "img_clnup_admin.css");
       }
       ```
   
 * (or at least print/echo it on the page – safely inside the html body)
 * Salut!
    -  This topic was modified 8 years, 5 months ago by [apedog](https://wordpress.org/support/users/apedog/).
    -  This topic was modified 8 years, 5 months ago by [apedog](https://wordpress.org/support/users/apedog/).

The topic ‘echo messes with header – function column_css echoes on ‘init’ hook’ 
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/image-cleanup_e2e2e2.svg)
 * [Image Cleanup](https://wordpress.org/plugins/image-cleanup/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/image-cleanup/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/image-cleanup/)
 * [Active Topics](https://wordpress.org/support/plugin/image-cleanup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/image-cleanup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/image-cleanup/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [apedog](https://wordpress.org/support/users/apedog/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/echo-messes-with-header-function-column_css-echoes-on-init-hook/)
 * Status: not resolved