Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

What impact does disabling do_action('admin_init'); in admin.php make? I disabled this function because Whenever i was trying to insert featured image, I get 404 error, i.e. media-upload.php and ajax-admin.php was not found in the server.

After disabling do_action('admin_init'); , everything worked fine except admin design was gone. I then manually hooked colors-classic.css.

Thanks Sabin

share|improve this question
add comment

1 Answer

What it does: It offers an action handler, a moment in run time to execute other functions.

So it is a hook for plugins and core functions. Removing all hooked functions or changing the core file will break WordPress.
If your plugin fails to work with it – fix the plugin.

share|improve this answer
    
I tried disabling all the plugins but in vain, thats why what i did was something i could to at last. The error was caused due to do_action("admin_init"). Disabling this function fixed the 404 error problem. But, still I know disabling this hooked function might make impact on the system. –  WatsMyName Mar 19 '12 at 8:52
1  
Find out what exactly happens, don’t just delete random code. Xdebug or similar tools will tell you what goes wrong. –  toscho Mar 19 '12 at 8:54
    
Okay i discoverd, this was due to APC installed in the server, I disabled APC using ini_set and fixed the problem Thanks for helping. –  WatsMyName Mar 19 '12 at 9:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.