@@ -7,7 +7,8 @@ discard block |
||
| 7 | 7 | * @since 1.0.0 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -if ( ! isset( $_GET['edithook'] ) ) { // WPCS: CSRF OK. |
|
| 10 | +if ( ! isset( $_GET['edithook'] ) ) { |
|
| 11 | +// WPCS: CSRF OK. |
|
| 11 | 12 | return; |
| 12 | 13 | } |
| 13 | 14 | |
@@ -15,7 +16,8 @@ discard block |
||
| 15 | 16 | |
| 16 | 17 | $points_types = wordpoints_get_points_types(); |
| 17 | 18 | |
| 18 | -if ( isset( $_GET['addnew'] ) ) { // WPCS: CSRF OK. |
|
| 19 | +if ( isset( $_GET['addnew'] ) ) { |
|
| 20 | +// WPCS: CSRF OK. |
|
| 19 | 21 | |
| 20 | 22 | // - We are adding a new points hook. |
| 21 | 23 | |
@@ -33,7 +35,8 @@ discard block |
||
| 33 | 35 | return; |
| 34 | 36 | } |
| 35 | 37 | |
| 36 | - if ( isset( $_GET['base'], $_GET['num'] ) ) { // WPCS: CSRF OK. |
|
| 38 | + if ( isset( $_GET['base'], $_GET['num'] ) ) { |
|
| 39 | +// WPCS: CSRF OK. |
|
| 37 | 40 | |
| 38 | 41 | // Copy minimal info from an existing instance of this hook to a new instance. |
| 39 | 42 | $hook = WordPoints_Points_Hooks::get_handler_by_id_base( |
@@ -132,8 +135,11 @@ discard block |
||
| 132 | 135 | <div class="hook-control-actions"> |
| 133 | 136 | <?php if ( isset( $_GET['addnew'] ) ) : /* WPCS: CSRF OK. */ ?> |
| 134 | 137 | <a href="<?php echo esc_url( self_admin_url( 'admin.php?page=wordpoints_points_hooks' ) ); ?>" class="button alignleft"><?php esc_html_e( 'Cancel', 'wordpoints' ); ?></a> |
| 135 | - <?php else : ?> |
|
| 136 | - <?php submit_button( _x( 'Delete', 'points hook', 'wordpoints' ), 'alignleft', 'removehook', false ); ?> |
|
| 138 | + <?php else { |
|
| 139 | + : ?> |
|
| 140 | + <?php submit_button( _x( 'Delete', 'points hook', 'wordpoints' ), 'alignleft', 'removehook', false ); |
|
| 141 | +} |
|
| 142 | +?> |
|
| 137 | 143 | <?php endif; ?> |
| 138 | 144 | |
| 139 | 145 | <?php submit_button( __( 'Save Hook', 'wordpoints' ), 'primary alignright', 'savehook', false ); ?> |