Skip to content

Commit 4fbe1b1

Browse files
committed
Fix expire and purge links
The add_query_arg() function strips out [] from params
1 parent 09b07e8 commit 4fbe1b1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

dependency-minification.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ static function admin_page() {
398398
$_link_params = $link_params;
399399
$_link_params['depmin_task'] = 'purge';
400400
?>
401-
<a class="submitdelete" title="<?php esc_attr_e( 'Delete the cached error to try again.', 'depmin' ) ?>" href="<?php echo esc_url( add_query_arg( $_link_params, admin_url( 'admin-ajax.php' ) ) ) ?>">
401+
<a class="submitdelete" title="<?php esc_attr_e( 'Delete the cached error to try again.', 'depmin' ) ?>" href="<?php echo esc_url( admin_url( 'admin-ajax.php' ) . '?' . http_build_query( $_link_params ) ) ?>">
402402
<?php esc_html_e( 'Try again', 'dependency-minification' ) ?>
403403
</a>
404404
</span>
@@ -413,14 +413,14 @@ static function admin_page() {
413413
$_link_params = $link_params;
414414
$_link_params['depmin_task'] = 'expire';
415415
?>
416-
<a href="<?php echo esc_url( add_query_arg( $_link_params, admin_url( 'admin-ajax.php' ) ) ) ?>" title="<?php esc_attr_e( 'Expire this item to gracefully regenerate', 'dependency-minification' ) ?>"><?php esc_html_e( 'Expire', 'dependency-minification' ) ?></a> |
416+
<a href="<?php echo esc_url( admin_url( 'admin-ajax.php' ) . '?' . http_build_query( $_link_params ) ) ?>" title="<?php esc_attr_e( 'Expire this item to gracefully regenerate', 'dependency-minification' ) ?>"><?php esc_html_e( 'Expire', 'dependency-minification' ) ?></a> |
417417
</span>
418418
<span class="trash">
419419
<?php
420420
$_link_params = $link_params;
421421
$_link_params['depmin_task'] = 'purge';
422422
?>
423-
<a class="submitdelete" title="<?php esc_attr_e( 'Purge item from cache (delete immediately; NOT recommended)', 'dependency-minification' ) ?>" href="<?php echo esc_url( add_query_arg( $_link_params, admin_url( 'admin-ajax.php' ) ) ) ?>"><?php esc_html_e( 'Purge', 'dependency-minification' ) ?></a> |
423+
<a class="submitdelete" title="<?php esc_attr_e( 'Purge item from cache (delete immediately; NOT recommended)', 'dependency-minification' ) ?>" href="<?php echo esc_url( admin_url( 'admin-ajax.php' ) . '?' . http_build_query( $_link_params ) ) ?>"><?php esc_html_e( 'Purge', 'dependency-minification' ) ?></a> |
424424
</span>
425425
<span class="view">
426426
<a href="<?php echo esc_url( $minified_src ) ?>" target="_blank" title="<?php esc_attr_e( 'View minified dependencies (opens in new window)', 'dependency-minification' ) ?>" rel="permalink"><?php esc_html_e( 'View minified', 'dependency-minification' ) ?></a>
@@ -431,7 +431,7 @@ static function admin_page() {
431431
$_link_params = $link_params;
432432
$_link_params['depmin_task'] = 'purge';
433433
?>
434-
<a class="submitdelete" title="<?php esc_attr_e( 'Delete the cached error to try again.', 'dependency-minification' ) ?>" href="<?php echo esc_url( add_query_arg( $_link_params, admin_url( 'admin-ajax.php' ) ) ) ?>"><?php esc_html_e( 'Try again', 'dependency-minification' ) ?></a>
434+
<a class="submitdelete" title="<?php esc_attr_e( 'Delete the cached error to try again.', 'dependency-minification' ) ?>" href="<?php echo esc_url( admin_url( 'admin-ajax.php' ) . '?' . http_build_query( $_link_params ) ) ?>"><?php esc_html_e( 'Try again', 'dependency-minification' ) ?></a>
435435
</span>
436436
<?php endif; ?>
437437
</div>

0 commit comments

Comments
 (0)