PluginProbe
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI / 7.9.8
GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI v7.9.8
8.0.4 8.0.3 8.0.1 8.0.2 8.0.0 7.9.9.7 7.9.9.6 7.9.9.5 7.9.9.4 7.9.9.3 7.9.9.2 7.9.9.1 7.9.9 7.9.8 7.9.7 7.9.6 7.9.5 7.9.4 7.9.3 7.9.2 7.9.1 7.9.0 7.8.9 7.8.8 7.8.7 All 46 releases
gamipress / libraries / ct / includes / class-ct-table-meta.php

class-ct-table-meta.php in GamiPress – Gamification plugin to reward points, badges & ranks in WordPress, now with AI 7.9.8, at libraries/ct/includes/class-ct-table-meta.php

91 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Table meta class
4 *
5 * @author GamiPress <[email protected]>, Ruben Garcia <[email protected]>
6 *
7 * @since 1.0.0
8 */
9 // Exit if accessed directly
10 defined( 'ABSPATH' ) || exit;
11
12 if ( ! class_exists( 'CT_Table_Meta' ) ) :
13
14 class CT_Table_Meta {
15
16 /**
17 * Table key.
18 *
19 * @since 1.0.0
20 * @access public
21 * @var string $name
22 */
23 public $name;
24
25 /**
26 * Table Meta database.
27 *
28 * @since 1.0.0
29 * @access public
30 * @var CT_DataBase $db
31 */
32 public $db;
33
34 /**
35 * Table Meta table object.
36 *
37 * @since 1.0.0
38 * @access public
39 * @var CT_Table $table
40 */
41 public $table;
42
43 /**
44 * CT_Table_Meta constructor.
45 * @param CT_Table $table
46 */
47 public function __construct( $table ) {
48
49 $this->table = $table;
50 $this->name = $this->table->name . '_meta';
51
52 $this->db = new CT_DataBase( $this->name, array(
53 'version' => 1,
54 'global' => $this->table->db->global,
55 'schema' => array(
56 'meta_id' => array(
57 'type' => 'bigint',
58 'length' => 20,
59 'unsigned' => true,
60 'nullable' => false,
61 'auto_increment' => true,
62 'primary_key' => true
63 ),
64 $this->table->db->primary_key => array(
65 'type' => 'bigint',
66 'length' => 20,
67 'unsigned' => true,
68 'nullable' => false,
69 'default' => 0,
70 'key' => true
71 ),
72 'meta_key' => array(
73 'type' => 'varchar',
74 'length' => 255,
75 'nullable' => true,
76 'default' => null,
77 'key' => true
78 ),
79 'meta_value' => array(
80 'type' => 'longtext',
81 'nullable' => true,
82 'default' => null
83 ),
84 )
85 ) );
86
87 }
88
89 }
90
91 endif;