Changeset 2707108
- Timestamp:
- 04/08/2022 03:47:58 PM (4 years ago)
- Location:
- visual-form-builder/trunk/admin
- Files:
-
- 5 edited
-
class-admin-menu.php (modified) (1 diff)
-
class-entries-detail.php (modified) (2 diffs)
-
class-entries-list.php (modified) (5 diffs)
-
class-forms-edit.php (modified) (1 diff)
-
class-forms-list.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
visual-form-builder/trunk/admin/class-admin-menu.php
r2617887 r2707108 265 265 <form id="entries-filter" method="post" action=""> 266 266 <?php 267 $entries_list->search_box( 'search', 'search_id' );268 $entries_list->display();267 $entries_list->search_box( 'search', 'search_id' ); 268 $entries_list->display(); 269 269 ?> 270 270 </form> -
visual-form-builder/trunk/admin/class-entries-detail.php
r2624218 r2707108 15 15 public function entries_detail() { 16 16 global $wpdb; 17 18 check_admin_referer( 'vfb_view_entry' ); 17 19 18 20 $entry_id = absint( $_GET['entry'] ); … … 66 68 <div id="major-publishing-actions"> 67 69 <div id="delete-action"> 68 <?php echo sprintf( '<a class="submitdelete deletion entry-delete" href="%2$s&action=%3$s&entry=%4$d">%1$s</a>', __( 'Move to Trash', 'visual-form-builder' ), admin_url( 'admin.php?page=vfb-entries' ), 'trash', $entry_id ); ?>70 <?php echo sprintf( '<a class="submitdelete deletion entry-delete" href="%2$s&action=%3$s&entry=%4$d">%1$s</a>', __( 'Move to Trash', 'visual-form-builder' ), wp_nonce_url( admin_url( 'admin.php?page=vfb-entries' ), 'vfb_trash_entry' ), 'trash', $entry_id ); ?> 69 71 </div> 70 72 <div id="publishing-action"> -
visual-form-builder/trunk/admin/class-entries-list.php
r2624218 r2707108 54 54 // Build row actions 55 55 if ( !$this->get_entry_status() || 'all' == $this->get_entry_status() ) 56 $actions['view'] = sprintf( '<a href="%s&action=%s&entry=%s" id="%3$s" class="view-entry">View</a>', admin_url( 'admin.php?page=vfb-entries' ), 'view', $item['entry_id'] );56 $actions['view'] = sprintf( '<a href="%s&action=%s&entry=%s" id="%3$s" class="view-entry">View</a>', wp_nonce_url( admin_url( 'admin.php?page=vfb-entries' ), 'vfb_view_entry' ), 'view', $item['entry_id'] ); 57 57 58 58 if ( !$this->get_entry_status() || 'all' == $this->get_entry_status() ) 59 $actions['trash'] = sprintf( '<a href="%s&action=%s&entry=%s">Trash</a>', admin_url( 'admin.php?page=vfb-entries' ), 'trash', $item['entry_id'] );59 $actions['trash'] = sprintf( '<a href="%s&action=%s&entry=%s">Trash</a>', wp_nonce_url( admin_url( 'admin.php?page=vfb-entries' ), 'vfb_trash_entry' ), 'trash', $item['entry_id'] ); 60 60 elseif ( $this->get_entry_status() && 'trash' == $this->get_entry_status() ) { 61 $actions['restore'] = sprintf( '<a href="%s&action=%s&entry=%s">%s</a>', admin_url( 'admin.php?page=vfb-entries' ), 'restore', $item['entry_id'], __( 'Restore', 'visual-form-builder' ) );62 $actions['delete'] = sprintf( '<a href="%s&action=%s&entry=%s">%s</a>', admin_url( 'admin.php?page=vfb-entries' ), 'delete', $item['entry_id'], __( 'Delete Permanently', 'visual-form-builder' ) );61 $actions['restore'] = sprintf( '<a href="%s&action=%s&entry=%s">%s</a>', wp_nonce_url( admin_url( 'admin.php?page=vfb-entries' ), 'vfb_undo_trash_entry' ), 'restore', $item['entry_id'], __( 'Restore', 'visual-form-builder' ) ); 62 $actions['delete'] = sprintf( '<a href="%s&action=%s&entry=%s">%s</a>', wp_nonce_url( admin_url( 'admin.php?page=vfb-entries' ), 'vfb_delete_entry' ), 'delete', $item['entry_id'], __( 'Delete Permanently', 'visual-form-builder' ) ); 63 63 } 64 64 … … 307 307 switch( $this->current_action() ) : 308 308 case 'trash' : 309 check_admin_referer( 'vfb_trash_entry' ); 310 309 311 foreach ( $entry_id as $id ) { 310 312 $id = absint( $id ); … … 314 316 315 317 case 'delete' : 318 check_admin_referer( 'vfb_delete_entry' ); 319 316 320 foreach ( $entry_id as $id ) { 317 321 $id = absint( $id ); … … 321 325 322 326 case 'restore' : 327 check_admin_referer( 'vfb_undo_trash_entry' ); 328 323 329 foreach ( $entry_id as $id ) { 324 330 $id = absint( $id ); … … 328 334 329 335 case 'delete' : 336 check_admin_referer( 'vfb_delete_entry' ); 337 330 338 $entry_id = ( isset( $_GET['entry'] ) && is_array( $_GET['entry'] ) ) ? $_GET['entry'] : array( $_GET['entry'] ); 331 339 -
visual-form-builder/trunk/admin/class-forms-edit.php
r2705942 r2707108 13 13 public function display() { 14 14 global $wpdb; 15 16 check_admin_referer( 'vfb_edit_form' ); 15 17 16 18 $current_user = wp_get_current_user(); -
visual-form-builder/trunk/admin/class-forms-list.php
r2617877 r2707108 52 52 53 53 // Edit Form 54 $form_title = sprintf( '<strong><a href="%s&action=%s&form=%s" id="%3$s" class="view-form">%s</a></strong>', admin_url( 'admin.php?page=visual-form-builder' ), 'edit', $item['form_id'], $item['form_title'] ); 55 $actions['edit'] = sprintf( '<a href="%s&action=%s&form=%s" id="%3$s" class="view-form">%s</a>', admin_url( 'admin.php?page=visual-form-builder' ), 'edit', $item['form_id'], __( 'Edit', 'visual-form-builder' ) ); 54 $edit_link = wp_nonce_url( admin_url( 'admin.php?page=visual-form-builder' ), 'vfb_edit_form' ); 55 $form_title = sprintf( '<strong><a href="%s&action=%s&form=%s" id="%3$s" class="view-form">%s</a></strong>', $edit_link, 'edit', $item['form_id'], $item['form_title'] ); 56 $actions['edit'] = sprintf( '<a href="%s&action=%s&form=%s" id="%3$s" class="view-form">%s</a>', $edit_link, 'edit', $item['form_id'], __( 'Edit', 'visual-form-builder' ) ); 56 57 57 58 // Duplicate Form
Note: See TracChangeset
for help on using the changeset viewer.