fossasia / fossasia/codeheat.org

Approach 02: Codeheat Template

Open
#373 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Less
Stars
1.6k
Forks
331
PR merge metrics
No merged PRs in 30d

Description

The previous approach was not favourable as it is complex for the users.

## User flow:

1. User clicks "Add Contest" in the admin menu
2. Enters just the contest title
3. Clicks "Create Contest"
4. WordPress creates a new page with all the content from the template
1. This page is accessible in the pages of admin section and can be editable.
6. User clicks "Edit it here" and can modify the content using the familiar WordPress block editor

## Features to be added:

- [x] User can have the option to select among [multiple templates](https://github.com/fossasia/codeheat.org/issues/373#issuecomment-3271720159)
- [x] [Start and end date with dynamic fields](https://github.com/fossasia/codeheat.org/issues/373#issuecomment-3271720159)
- [x] [Redirect directly to editor](https://github.com/fossasia/codeheat.org/issues/373#issuecomment-3271720159) after creation
- [x] [improve security and prevent Cross-Site Request Forgery (CSRF)](https://github.com/fossasia/codeheat.org/issues/373#issuecomment-3271720159)
- [ ] #375
- [ ] Help menu can be added for tutorials (documentation/Video) for creating a contest

### Reference Documentation:

1. `add_menu_page()` - https://developer.wordpress.org/reference/functions/add_menu_page/
2. `submit_button()` - https://developer.wordpress.org/reference/functions/submit_button/
3. `sanitize_text_field()` - https://developer.wordpress.org/reference/functions/sanitize_text_field/
4. `$wpdb (WordPress Database Class)` - https://developer.wordpress.org/reference/classes/wpdb/

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.