You are here

public function InstapageCmsPluginWPConnector::getOptionsDebugHTML in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/connectors/InstapageCmsPluginWPConnector.php \InstapageCmsPluginWPConnector::getOptionsDebugHTML()

Gets the HTML for CMS options.

Return value

string HTML to include in the debug log.

File

core/connectors/InstapageCmsPluginWPConnector.php, line 698

Class

InstapageCmsPluginWPConnector
Class that utilizes native WordPress functions to perform actions like remote requests and DB operations.

Code

public function getOptionsDebugHTML() {
  $necessaryOptions = array(
    'siteurl',
    'home',
    'permalink_structure',
    'blog_charset',
    'template',
    'db_version',
    'initial_db_version',
  );
  foreach ($necessaryOptions as $opt) {
    $options[$opt] = get_option($opt, 'n/a');
  }
  $view = InstapageCmsPluginViewModel::getInstance();
  $view
    ->init(INSTAPAGE_PLUGIN_PATH . '/templates/log_options.php');
  $view->rows = $options;
  return $view
    ->fetch();
}