WPSEO_Statistics_Service::get_header_from_statistics()
Gets a header summarizing the given statistics results.
Метод класса: WPSEO_Statistics_Service{}
Хуков нет.
Возвращает
Строку
. The header summing up the statistics results.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_header_from_statistics( $statistics );
- $statistics(массив) (обязательный)
- The statistics results.
Код WPSEO_Statistics_Service::get_header_from_statistics() WPSEO Statistics Service::get header from statistics Yoast 24.0
private function get_header_from_statistics( array $statistics ) { // Personal interpretation to allow release, should be looked at later. if ( $statistics['division'] === false ) { return __( 'You don\'t have any published posts, your SEO scores will appear here once you make your first post!', 'wordpress-seo' ); } if ( $statistics['division']['good'] > 0.66 ) { return __( 'Hey, your SEO is doing pretty well! Check out the stats:', 'wordpress-seo' ); } return __( 'Below are your published posts\' SEO scores. Now is as good a time as any to start improving some of your posts!', 'wordpress-seo' ); }