/** * Entry method. * * Handles Plugin installation. * * @access public * @static */ function install() { $me = new AgmPluginInstaller(); if (!$me->has_database_table()) { $me->create_database_table(); $me->set_default_options(); } }
function json_fix_missing_table() { $status = false; if (current_user_can('manage_options')) { $installer = new AgmPluginInstaller(); if (!$installer->has_database_table()) { $installer->create_database_table(); $status = $installer->has_database_table(); } else { $status = true; } } header('Content-type: application/json'); echo json_encode(array('status' => $status ? 1 : 0)); exit; }