PluginProbe
Button Generator – Easily Create Custom Buttons with Icons and Analytics / 2.3.9
Button Generator – Easily Create Custom Buttons with Icons and Analytics v2.3.9
trunk 1.1.1 2.0 2.1 2.2 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 2.3.8 2.3.9 3.0 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.2 3.1.3 3.2 3.2.1 3.2.2 3.2.3 All 28 releases
button-generation / admin / partials / tools-data-base.php

tools-data-base.php in Button Generator – Easily Create Custom Buttons with Icons and Analytics 2.3.9, at admin/partials/tools-data-base.php

30 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Database Result
4 *
5 * @package Wow Plugin
6 * @subpackage Admin/Database_result
7 * @author Wow-Company <yoda@wow-company.com>
8 * @copyright 2019 Wow-Company
9 * @license GNU Public License
10 * @version 1.0
11 */
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 global $wpdb;
18 $data = $wpdb->prefix . 'wow_' . $this->plugin['prefix'];
19 $info = ( isset( $_REQUEST['info'] ) ) ? sanitize_text_field( $_REQUEST['info'] ) : '';
20 if ( $info == 'saved' ) {
21 echo '<div class="updated" id="message"><p><strong>' . esc_attr__( 'Item Added', $this->plugin['text'] ) . '</strong>.</p></div>';
22 } elseif ( $info == 'update' ) {
23 echo '<div class="updated" id="message"><p><strong>' . esc_attr__( 'Item Updated', $this->plugin['text'] ) . '</strong>.</p></div>';
24 } elseif ( $info == 'delete' ) {
25 $delid = absint( $_GET['did'] );
26 if ( ! empty( $_GET['_wpnonce'] ) && wp_verify_nonce( $_GET['_wpnonce'], $this->plugin['slug'] . '_nonce' ) ) {
27 $wpdb->delete( $data, [ 'id' => $delid ], [ '%d' ] );
28 echo '<div class="updated" id="message"><p><strong>' . esc_attr__( 'Item Deleted', $this->plugin['text'] ) . '</strong>.</p></div>';
29 }
30 }