migrate() ){ // would trigger upgrade handlers here in future releases } } // we'll need our own translations on all admin pages not just our own, for menu items etc.. self::init_l10n(); } } /** * "admin_init" callback. * Unhooks failure notice that would fire if this hook was not successful */ public function on_admin_init(){ remove_action( 'admin_notices', array('Loco_compat_Failure','print_hook_failure') ); } /** * plugin_action_links action callback */ public function on_plugin_action_links( $links, $plugin = '' ){ try { if( $plugin && current_user_can('loco_admin') && Loco_package_Plugin::get_plugin($plugin) ){ // ok to add "translate" link into meta row $href = Loco_mvc_AdminRouter::generate('plugin-view', array( 'bundle' => $plugin) ); $links[] = ''.esc_html__('Translate','loco-translate').''; } } catch( Exception $e ){ // $links[] = esc_html( 'Debug: '.$e->getMessage() ); } return $links; } /** * deactivate_plugin action callback * public function on_deactivate_plugin( $plugin, $network = false ){ if( loco_plugin_self() === $plugin ){ // TODO flush all our transient cache entries // "DELETE FROM ___ WHERE `option_name` LIKE '_transient_loco_%' OR `option_name` LIKE '_transient_timeout_loco_%'"; } }*/ /*public function filter_all( $hook ){ error_log( $hook, 0 ); }*/ }