PHP Class Yoast_Dashboard_Widget, wordpress-seo

Show file Open project: yoast/wordpress-seo

Protected Properties

Property Type Description
$statistics WPSEO_Statistics

Public Methods

Method Description
__construct ( WPSEO_Statistics $statistics = null )
add_dashboard_widget ( ) Adds dashboard widget to WordPress
clear_cache ( ) Clears the dashboard widget items cache
display_dashboard_widget ( ) Display the dashboard widget
enqueue_dashboard_stylesheet ( ) Enqueue's stylesheet for the dashboard if the current page is the dashboard
wpseo_dashboard_overview_class ( array $classes ) : array Adds CSS classes to the dashboard widget.

Private Methods

Method Description
filter_items ( array $item ) : boolean Filter items if they have a count of zero
get_seo_scores_with_post_count ( ) : array Set the SEO scores belonging to their SEO score result
get_title_for_rank ( WPSEO_Rank $rank ) : string Returns a dashboard widget label to use for a certain rank
map_rank_to_widget ( WPSEO_Rank $rank ) : array Converts a rank to data usable in the dashboard widget
set_statistic_items_for_this_user ( array | boolean $transient ) : mixed Set the cache for a specific user
show_widget ( ) : boolean Returns true when the dashboard widget should be shown.
statistic_items ( ) : array An array representing items to be added to the At a Glance dashboard widget

Method Details

__construct() public method

public __construct ( WPSEO_Statistics $statistics = null )
$statistics WPSEO_Statistics The statistics class to retrieve statistics from.

add_dashboard_widget() public method

Adds dashboard widget to WordPress

clear_cache() public method

Clears the dashboard widget items cache
public clear_cache ( )

display_dashboard_widget() public method

Display the dashboard widget

enqueue_dashboard_stylesheet() public method

Enqueue's stylesheet for the dashboard if the current page is the dashboard

wpseo_dashboard_overview_class() public method

Adds CSS classes to the dashboard widget.
public wpseo_dashboard_overview_class ( array $classes ) : array
$classes array An array of postbox CSS classes.
return array

Property Details

$statistics protected property

protected WPSEO_Statistics $statistics
return WPSEO_Statistics