sitepress = $sitepress; } public function show_notice_for_old_site() { $notices = wpml_get_admin_notices(); $settings_url = admin_url( '?page=' . WPML_PLUGIN_FOLDER . '/menu/languages.php#wpml-translation-feedback-options' ); $main_text = sprintf( __( 'With WPML 3.8.0, you can now get visitor feedback for your translations (%slearn more%s).', 'sitepress' ), '', '' ); $text = '
' . $main_text . '
'; $text .= ''; $text .= __( 'Enable and configure the "Translation Feedback" feature', 'sitepress' ); $text .= '
'; $notice = $notices->get_new_notice( self::NOTICE_OLD_SITE, $text, self::NOTICE_GROUP ); $notice->set_dismissible( true ); $notice->set_css_class_types( 'notice-info' ); $notice->add_display_callback( array( 'WPML_TF_Promote_Notices', 'show_only_for_admin_users' ) ); if ( ! $notices->is_notice_dismissed( $notice ) ) { $notices->add_notice( $notice ); } } /** * @param int $user_id */ public function show_notice_for_new_site( $user_id ) { $notices = wpml_get_admin_notices(); $settings_url = admin_url( '?page=' . WPML_PLUGIN_FOLDER . '/menu/languages.php#wpml-translation-feedback-options' ); $user_lang = $this->sitepress->get_user_admin_language( $user_id ); $this->sitepress->switch_lang( $user_lang ); $text = '';
$text .= __( 'You got back several jobs from translation and they now appear on your site.', 'sitepress' );
$text .= ' ' . __( 'WPML lets you open these pages for feedback, so that visitors can tell you if they notice anything wrong.', 'sitepress' );
$text .= '
';
$text .= '' . __( 'Enable Translation Feedback', 'sitepress' ) . '';
$text .= ' ' . __( 'Learn more about translation feedback', 'sitepress' ) . '';
$text .= '