wpsc_dashboard_monthly_sales_cap

Located in: admin.php

Functions that call this hook: wpsc_dashboard_widget_setup()

Arguments Accepted: 'manage_options'

Version Introduced: 3.8.9

Description: Determine which capability is used for “Sales by Month” dashboard widget.

Code in context:

[php firstline=”695″ highlight=”698″]

$news_cap = apply_filters( ‘wpsc_dashboard_news_cap’ , ‘manage_options’ );

$sales_cap = apply_filters( ‘wpsc_dashboard_sales_summary_cap’ , ‘manage_options’ );

$quarterly_sales_cap = apply_filters( ‘wpsc_dashboard_quarterly_sales_cap’, ‘manage_options’ );

$monthly_sales_cap = apply_filters( ‘wpsc_dashboard_monthly_sales_cap’ , ‘manage_options’ );

// Add the dashboard widgets

if ( current_user_can( $news_cap ) )

wp_add_dashboard_widget( ‘wpsc_dashboard_news’, __( ‘Getshopped News’ , ‘wpsc’ ), ‘wpsc_dashboard_news’ );

if ( current_user_can( $sales_cap ) )

wp_add_dashboard_widget( ‘wpsc_dashboard_widget’, __( ‘Sales Summary’, ‘wpsc’ ), ‘wpsc_dashboard_widget’ );

if ( current_user_can( $quarterly_sales_cap ) )

wp_add_dashboard_widget( ‘wpsc_quarterly_dashboard_widget’, __( ‘Sales by Quarter’, ‘wpsc’ ), ‘wpsc_quarterly_dashboard_widget’ );

if ( current_user_can( $monthly_sales_cap ) )

wp_add_dashboard_widget( ‘wpsc_dashboard_4months_widget’, __( ‘Sales by Month’, ‘wpsc’ ), ‘wpsc_dashboard_4months_widget’ );

[/php]