Automattic / Automattic/WP-Job-Manager

Enhanced documentation

Open
#1,968 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
899
Forks
369
Avg merge
11h 37m
Merged PRs (30d)
12

Description

**Is your feature request related to a problem? Please describe.**
Not directly but insufficient documentation to ensure the developer is not tripped up.

**Describe the solution you'd like**
In the documentation on https://wpjobmanager.com/document/editing-job-submission-fields/, there is missing vital information when it comes to using a wp-editor.

If a user is going to customize an input and use an HTML editor for the input, they should then specify a custom sanitization_callback to avoid WP Job Manager defaulting to sanitize_text_field on line [https://github.com/Automattic/WP-Job-Manager/blob/master/includes/class-wp-job-manager-post-types.php#L1250](https://github.com/Automattic/WP-Job-Manager/blob/master/includes/class-wp-job-manager-post-types.php#L1250).

The example help could be similar to: [https://gist.github.com/greggunner/455596c12547a8177704e572d7720d26](https://gist.github.com/greggunner/455596c12547a8177704e572d7720d26)

**Describe alternatives you've considered**
Tried adding an additional job_manager_save_job_listing hook action to save the posted data and perform a clean of the data, but the fully sanitized input per sanitize_text_field got saved.

**Additional context**
None

Contributor guide

Open the contributing guide

Research direction

Review the “Editing Job Submission Fields” documentation page and the referenced sanitization behavior in includes/class-wp-job-manager-post-types.php around line 1250. Use the linked gist as the example reference. Done means the page explains the wp-editor sanitization_callback requirement and includes suitable guidance for preserving intended HTML input.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.