PluginProbe
Send Users Email – Email Subscribers, Email Marketing Newsletter / trunk
Send Users Email – Email Subscribers, Email Marketing Newsletter vtrunk
2.0.3 2.0.2 2.0.1 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.1.0 1.1.1 1.1.2 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 All 51 releases
send-users-email / includes / class-queue-meta-schema.php

class-queue-meta-schema.php in Send Users Email – Email Subscribers, Email Marketing Newsletter trunk, at includes/class-queue-meta-schema.php

56 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 * Summary of Queue Meta Schema
4 * Use this class to create database tables for Queue Meta feature.
5 */
6 class Queue_Meta_Schema
7 {
8 /**
9 * Summary of init
10 * Initializes the database schema for external lists.
11 * @return void
12 */
13 public static function init()
14 {
15 // Initialization code if needed
16 self::create_table();
17 }
18
19 /**
20 * Summary of get_table_name
21 * Get the name of the external list table.
22 * @return string
23 */
24 public static function get_table_name()
25 {
26 global $wpdb;
27 return $wpdb->prefix . 'sue_queue_meta';
28 }
29
30 /**
31 * Summary of create_table_external_list
32 * Creates the database table for storing external list entries.
33 * @return void
34 */
35 private static function create_table()
36 {
37 global $wpdb;
38 $table_name = self::get_table_name();
39
40 $charset_collate = $wpdb->get_charset_collate();
41
42 // Table for CSV rows
43 $sql_rows = "CREATE TABLE $table_name (
44 id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
45 sue_email_id BIGINT UNSIGNED NOT NULL,
46 title VARCHAR(255) DEFAULT '',
47 tagline VARCHAR(255) DEFAULT '',
48 send_to_unsubscribed_users TINYINT(1) DEFAULT 0,
49 created_at DATETIME NOT NULL,
50 PRIMARY KEY (id),
51 KEY sue_email_id (sue_email_id)
52 ) $charset_collate;";
53
54 dbDelta($sql_rows);
55 }
56 }