Skip to content

Commit

Permalink
Merge pull request #401 from ernilambar/400-default-checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy authored Jan 25, 2024
2 parents 5f2c802 + d1a174b commit 64ecea7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/Admin/Admin_Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ public function render_page() {

$category_labels = Check_Categories::get_category_labels();

// Get user settings for category preferences and set a default value to check all categories by default.
$user_enabled_categories = get_user_setting( 'plugin_check_category_preferences', 'all_categories' );
$user_enabled_categories = 'all_categories' === $user_enabled_categories ? array_keys( $category_labels ) : explode( '__', $user_enabled_categories );
// Get user settings for category preferences and set a default value to check plugin_repo by default.
$user_enabled_categories = get_user_setting( 'plugin_check_category_preferences', 'plugin_repo' );
$user_enabled_categories = explode( '__', $user_enabled_categories );

require WP_PLUGIN_CHECK_PLUGIN_DIR_PATH . 'templates/admin-page.php';
}
Expand Down

0 comments on commit 64ecea7

Please sign in to comment.