Run functions only in the admin area?
There is very little overhead to assigning couple of filters on hooks that simply won’t fire on front end. In general it would be something like this: add_action(‘init’, ‘admin_only’); function admin_only() { if( !is_admin() ) return; // filter assignemnts and such go here } Also create_function() is not recommended for performance and some other reasons. … Read more