Remove hardcoded data and use proper WP actions