-
Notifications
You must be signed in to change notification settings - Fork 131
Closed as not planned
Labels
[Plugin] Performance LabIssue relates to work in the Performance Lab Plugin onlyIssue relates to work in the Performance Lab Plugin only[Plugin] Regenerate Existing ImagesIssues for the Regenerate Existing Images moduleIssues for the Regenerate Existing Images module
Description
Create a admin settings screen to start the Regenerate Existing Images background job. This will be a new screen available under the 'Tools' menu and display basic settings to start the Regenerate Existing Images background job.
Acceptance Criteria
- Create a new admin settings screen under “Tools > Regenerate Images”
- This screen is only accessible to users with the
upload_files
andmanage_options
capabilities. - The screen will display the following on the page
- The title "Regenerate Existing Images"
- A brief description explaining the feature
- A basic form containing the following controls:
- A "Regenerate Images" button that will start the Regenerate Existing Images background job.
- A
delete_images
checkbox to delete old images. By default the checkbox is unchecked.
- When the form is submitted, the POST request is handled by doing the following:
- Validate the form submission with
wp_verify_nonce
- Check the
delete_images
checkbox value - Create a new background job with the
perflab_create_background_job
function passing the followingregenerate_images
as the job namearray( 'delete_images' => $delete_images )
as the job data, passing the value of thedelete_images
checkbox as part of the data
- Using the
$job_id
returned byperflab_start_background_job
function- Passing the newly created
$job_id
returned by theperflab_create_background_job
function
- Passing the newly created
- Validate the form submission with
Metadata
Metadata
Assignees
Labels
[Plugin] Performance LabIssue relates to work in the Performance Lab Plugin onlyIssue relates to work in the Performance Lab Plugin only[Plugin] Regenerate Existing ImagesIssues for the Regenerate Existing Images moduleIssues for the Regenerate Existing Images module