diff --git a/modules/website/wordpress/wordpress-cron-manager.sh b/modules/website/wordpress/wordpress-cron-manager.sh index 3421195..d589071 100755 --- a/modules/website/wordpress/wordpress-cron-manager.sh +++ b/modules/website/wordpress/wordpress-cron-manager.sh @@ -589,13 +589,26 @@ case "$choice" in # Check status echo "" echo "Check wp-cron status for:" - echo " 1) Specific domain" - echo " 2) Specific user" - echo " 0) Cancel" + echo -e " ${CYAN}1)${NC} Specific domain" + echo -e " ${CYAN}2)${NC} Specific user" + echo -e " ${RED}0)${NC} Cancel" echo "" - echo -n "Select [1]: " - read -r check_choice - check_choice="${check_choice:-1}" + echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" + + # Validate check_choice input + while true; do + echo -n "Select [1]: " + read -r check_choice + check_choice="${check_choice:-1}" + + if ! [[ "$check_choice" =~ ^[0-2]$ ]]; then + echo "" + print_error "Invalid choice. Please enter 0, 1, or 2" + echo "" + continue + fi + break + done if [ "$check_choice" = "0" ]; then echo "Operation cancelled."