PluginProbe
MaxButtons – Create buttons / 6.28
MaxButtons – Create buttons v6.28
6.23 6.24 6.25 6.26 6.26.1 6.27 6.28 6.3 6.4 6.5 6.6 6.7 6.8 6.9 7.0 7.1 7.1.1 7.1.2 7.1.3 7.10 7.11 7.13 7.13.1 7.13.2 7.13.3 All 100 releases
← All changes | classes/installation.php +7 -2 6.46.28 View file →
@@ -1,5 +1,8 @@
1 1 <?php
2 +namespace MaxButtons;
3 +defined('ABSPATH') or die('No direct access permitted');
4 +
2 5 class maxInstall
3 6 {
4 7 static function activation_hook($network_wide) {
5 8 if ($network_wide) {
@@ -228,9 +231,9 @@
228 231 require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
229 232
230 233 $table_name = maxUtils::get_table_name();
231 234 $button = new maxButton();
232 - $blocks = $button->getDefinedBlocks();
235 + $blocks = $button->getBlocks();
233 236
234 237 // IMPORTANT: There MUST be two spaces between the PRIMARY KEY keywords
235 238 // and the column name, and the column name MUST be in parenthesis.
236 239 $sql = "CREATE TABLE " . $table_name . " (
@@ -242,9 +245,11 @@
242 245
243 246
244 247 foreach($blocks as $block)
245 248 {
246 - $sql .= "" . $block . " TEXT NULL, \n ";
249 + $block_name = $block->get_name();
250 +
251 + $sql .= "" . $block_name . " TEXT NULL, \n ";
247 252 }
248 253
249 254 $sql .= "updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
250 255 created TIMESTAMP DEFAULT 0 NOT NULL,