Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #803 Fix identifier for generate next-gen versions URL #804

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions inc/classes/class-imagify-files-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ public function column_actions( $item ) {
$this->retry_button( $item );
$this->reoptimize_buttons( $item );
$this->generate_nextgen_versions_button( $item );
$this->delete_webp_versions_button( $item );
$this->delete_nextgen_versions_button( $item );
$this->restore_button( $item );
}

Expand Down Expand Up @@ -821,14 +821,14 @@ protected function generate_nextgen_versions_button( $item ) {
}

/**
* Prints a button to delete WebP versions when the status is "already_optimized".
* Prints a button to delete next-gen versions when the status is "already_optimized".
*
* @since 1.9.6
*
* @param object $item The current item. It must contain at least a $process property.
*/
protected function delete_webp_versions_button( $item ) {
$button = get_imagify_attachment_delete_webp_versions_link( $item->process );
protected function delete_nextgen_versions_button( $item ) {
$button = get_imagify_attachment_delete_nextgen_versions_link( $item->process );

if ( $button ) {
echo $button . '<br/>';
Expand Down
16 changes: 8 additions & 8 deletions inc/functions/admin-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function get_imagify_attachment_optimization_text( $process ) {
$reoptimize_link = get_imagify_attachment_reoptimize_link( $process );
$reoptimize_link .= get_imagify_attachment_optimize_missing_thumbnails_link( $process );
$reoptimize_link .= get_imagify_attachment_generate_nextgen_versions_link( $process );
$reoptimize_link .= get_imagify_attachment_delete_webp_versions_link( $process );
$reoptimize_link .= get_imagify_attachment_delete_nextgen_versions_link( $process );
$reoptimize_output = $reoptimize_link ? $reoptimize_link : '';
$reoptimize_output_before = '<div class="imagify-datas-actions-links">';
$reoptimize_output_after = '</div><!-- .imagify-datas-actions-links -->';
Expand Down Expand Up @@ -375,7 +375,7 @@ function get_imagify_attachment_generate_nextgen_versions_link( $process ) {
return '';
}

$url = get_imagify_admin_url( 'generate-webp-versions', [
$url = get_imagify_admin_url( 'generate-nextgen-versions', [
'attachment_id' => $media->get_id(),
'context' => $context,
] );
Expand All @@ -388,15 +388,15 @@ function get_imagify_attachment_generate_nextgen_versions_link( $process ) {
}

/**
* Get the link to delete WebP versions when the status is "already_optimized".
* Get the link to delete next-gen versions when the status is "already_optimized".
*
* @since 1.9.6
* @author Grégory Viguier
* @since 1.9.6
*
* @param ProcessInterface $process The optimization process object.
* @return string The output to print.
*
* @return string The output to print.
*/
function get_imagify_attachment_delete_webp_versions_link( $process ) {
function get_imagify_attachment_delete_nextgen_versions_link( $process ) {
if ( ! $process->is_valid() ) {
return '';
}
Expand All @@ -416,7 +416,7 @@ function get_imagify_attachment_delete_webp_versions_link( $process ) {
}

$class = '';
$url = get_imagify_admin_url( 'delete-webp-versions', [
$url = get_imagify_admin_url( 'delete-nextgen-versions', [
'attachment_id' => $media_id,
'context' => $context,
] );
Expand Down