PluginProbe
Floating Button – Easily Create Sticky, Fixed & Floating Buttons / 5.2
Floating Button – Easily Create Sticky, Fixed & Floating Buttons v5.2
trunk 2.0.2 3.0 4.0 4.1.2 4.3 5.0 5.0.1 5.1 5.1.1 5.2 5.3 5.3.1 6.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 All 31 releases
floating-button / admin / settings / database.php

database.php in Floating Button – Easily Create Sticky, Fixed & Floating Buttons 5.2, at admin/settings/database.php

53 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Include data param for Wow Plugin
4 *
5 * @package Wow_Plugin
6 * @subpackage Admin/Data_Item
7 * @author Wow-Company <helper@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 $act = ( isset( $_REQUEST["act"] ) ) ? sanitize_text_field( $_REQUEST["act"] ) : '';
18
19
20 if ( $act === "update" ) {
21 $rec_id = absint( $_REQUEST["id"] );
22 $query = $wpdb->prepare( "SELECT * FROM {$data} WHERE id=%d", absint( $rec_id ) );
23 $result = $wpdb->get_row( $query );
24 if ( $result ) {
25 $id = $result->id;
26 $title = $result->title;
27 $param = unserialize( $result->param );
28 $tool_id = $id;
29 $add_action = 2;
30 $btn = esc_attr__( 'Update', 'floating-button' );
31 }
32 } elseif ( $act === "duplicate" ) {
33 $rec_id = absint( $_REQUEST["id"] );
34 $query = $wpdb->prepare( "SELECT * FROM {$data} WHERE id=%d", absint( $rec_id ) );
35 $result = $wpdb->get_row( $query );
36 $id = "";
37 $title = "";
38 $add_action = 1;
39 $btn = esc_attr__( 'Save', 'floating-button' );
40 $last = $wpdb->get_col( "SELECT id FROM {$data}" );
41 $tool_id = ! empty( $last ) ? max( $last ) + 1 : 1;
42 $param = ( $result ) ? unserialize( $result->param ) : '';
43
44 } else {
45 $id = "";
46 $title = "";
47 $last = $wpdb->get_col( "SELECT id FROM {$data}" );
48 $tool_id = ! empty( $last ) ? max( $last ) + 1 : 1;
49 $param = '';
50 $add_action = 1;
51 $btn = esc_attr__( 'Save', 'floating-button' );
52 }
53