/** * callback when admin notices are being printed */ function _loco_hook_admin_notices() { if (defined('WPLANG') && LocoAdmin::is_self() && WPLANG && 3 < (int) $GLOBALS['wp_version']) { LocoAdmin::warning(Loco::__('WPLANG is deprecated and should be removed from wp-config.php')); } LocoAdmin::flush_notices(); }
/** * Enqueue only admin styles we need */ function _loco_hook__current_screen() { if ($slug = LocoAdmin::is_self()) { // redirect legacy links if ($i = strpos($slug, '-legacy')) { $args = $_GET; $args['page'] = substr_replace($slug, '', $i); $uri = LocoAdmin::uri($args, $slug); wp_redirect($uri); } // add common resources for all Loco admin pages Loco::enqueue_styles('loco-admin'); } }