1 | <?php namespace EmailLog\Core\DB; |
||
13 | class TableManager { |
||
14 | |||
15 | /* Database table name */ |
||
16 | const TABLE_NAME = 'email_log'; |
||
17 | |||
18 | /* Database option name */ |
||
19 | const DB_OPTION_NAME = 'email-log-db'; |
||
20 | |||
21 | /* Database version */ |
||
22 | const DB_VERSION = '0.1'; |
||
23 | |||
24 | /** |
||
25 | * Setup hooks. |
||
26 | */ |
||
27 | public function load() { |
||
34 | |||
35 | /** |
||
36 | * On plugin activation, create table if needed. |
||
37 | * |
||
38 | * @global object $wpdb |
||
39 | */ |
||
40 | public function on_activate( $network_wide ) { |
||
57 | |||
58 | /** |
||
59 | * Create email log table when a new blog is created. |
||
60 | */ |
||
61 | public function on_create_blog( $blog_id, $user_id, $domain, $path, $site_id, $meta ) { |
||
68 | |||
69 | /** |
||
70 | * Add email log table to the list of tables deleted when a blog is deleted. |
||
71 | * |
||
72 | * @global object $wpdb |
||
73 | * |
||
74 | * @param array $tables List of tables to be deleted. |
||
75 | * @return array $tables Modified list of tables to be deleted. |
||
76 | */ |
||
77 | public function on_delete_blog( $tables ) { |
||
83 | |||
84 | /** |
||
85 | * Create email log table. |
||
86 | * |
||
87 | * @access private |
||
88 | * |
||
89 | * @global object $wpdb |
||
90 | */ |
||
91 | private function create_table() { |
||
116 | } |
||
117 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.