$term, 'taxonomy' ) ) { return ''; } $analysis_seo = new WPSEO_Metabox_Analysis_SEO(); $analysis_readability = new WPSEO_Metabox_Analysis_Readability(); if ( $analysis_seo->is_enabled() ) { return $this->get_score( WPSEO_Taxonomy_Meta::get_term_meta( $term->term_id, $term->taxonomy, 'linkdex' ) ); } if ( $analysis_readability->is_enabled() ) { return $this->get_score( WPSEO_Taxonomy_Meta::get_term_meta( $term->term_id, $term->taxonomy, 'content_score' ) ); } return ''; } /** * Takes the SEO score and makes the score icon for the admin bar for it. * * @param int $score The 0-100 rating of the score. Can be either SEO score or content score. * * @return string Score markup. */ protected function get_score( $score ) { $score_class = WPSEO_Utils::translate_score( $score ); $translated_score = WPSEO_Utils::translate_score( $score, false ); /* translators: %s expands to the SEO score. */ $screen_reader_text = sprintf( __( 'SEO score: %s', 'wordpress-seo' ), $translated_score ); $score_adminbar_element = '
'; return $score_adminbar_element; } /** * Gets the URL to the main admin settings page. * * @return string Admin settings page URL. */ protected function get_settings_page_url() { return self_admin_url( 'admin.php?page=' . WPSEO_Admin::PAGE_IDENTIFIER ); } /** * Gets the notification counter if in a valid context. * * @return string Notification counter markup, or empty string if not available. */ protected function get_notification_counter() { $notification_center = Yoast_Notification_Center::get(); $notification_count = $notification_center->get_notification_count(); if ( ! $notification_count ) { return ''; } /* translators: %s: number of notifications */ $counter_screen_reader_text = sprintf( _n( '%s notification', '%s notifications', $notification_count, 'wordpress-seo' ), number_format_i18n( $notification_count ) ); return sprintf( '