Testing of this plugin has been temporarily suspended due to an error. It will automatically resume when a new plugin version is released.
function plt_hide_yet_another_stars_rating_menus() {
//Hide "Yet Another Stars Rating".
remove_menu_page('yasr_settings_page');
//Hide "Yet Another Stars Rating → Settings".
remove_submenu_page('yasr_settings_page', 'yasr_settings_page');
//Hide "Yet Another Stars Rating → Manage Ratings".
remove_submenu_page('yasr_settings_page', 'yasr_stats_page');
//Hide "Yet Another Stars Rating → Affiliation".
remove_submenu_page('yasr_settings_page', 'yasr_settings_page-affiliation');
//Hide "Yet Another Stars Rating → Upgrade".
remove_submenu_page('yasr_settings_page', 'yasr_settings_page-pricing');
}
add_action('admin_menu', 'plt_hide_yet_another_stars_rating_menus', 1000000000);
function plt_hide_yet_another_stars_rating_metaboxes() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Hide the "YASR" meta box.
remove_meta_box('yasr_metabox_overall_rating', $screen->id, 'side');
//Hide the "Yet Another Stars Rating" meta box.
remove_meta_box('yasr_metabox_below_editor', $screen->id, 'normal');
}
add_action('add_meta_boxes', 'plt_hide_yet_another_stars_rating_metaboxes', 20);
function plt_hide_yet_another_stars_rating_dashboard_widgets() {
$screen = get_current_screen();
if ( !$screen ) {
return;
}
//Remove the "YASR: Recent Ratings" widget.
remove_meta_box('yasr_widget_log_dashboard', 'dashboard', 'normal');
//Remove the "YASR: Your Ratings" widget.
remove_meta_box('yasr_users_dashboard_widget', 'dashboard', 'normal');
}
add_action('wp_dashboard_setup', 'plt_hide_yet_another_stars_rating_dashboard_widgets', 20);