<?php
if(!defined('WPINC')) // MUST have WordPress.
exit ('Do not access this file directly.');
if(!class_exists('pluginName_options_page_class'))
{
/**
* Menu page blah
*
* @package blah
* @since 140617
*/
class pluginName_options_page_class
{
public function __construct()
{
echo '<div class="wrap menu-page">'."\n";
echo '<div class="wp-header-end"></div>'."\n";
echo '<div class="menu-page-toolbox">'."\n";
pluginName_some_other_class::display();
echo '</div>'."\n";
echo '<h2>Options</h2>'."\n";
echo '<table class="menu-page-table">'."\n";
echo '<tbody class="menu-page-table-tbody">'."\n";
echo '<tr class="menu-page-table-tr">'."\n";
echo '<td class="menu-page-table-l">'."\n";
echo '<form method="post" name="plugin_options_form" id="plugin--options-form" autocomplete="off">'."\n";
echo '<input type="hidden" name="plugin_options_save" id="plugin--options-save" value="'.esc_attr(wp_create_nonce('plugin--options-save')).'" />'."\n";
echo '<div class="menu-page-group" title="Account Details">'."\n";
/* includes things like this gem */
echo (!is_multisite() || !pluginName_utils_conds::is_multisite_farm() || is_main_site()) ? '<p>[ Really Long message about something ]</p>'."\n" : '';
/* ... continues until end ... */
echo '</div>'."\n";
}
}
}
new pluginName_options_page_class ();
The entire file is a single class with a constructor. The constructor is ~ 1150 lines of echo statements with a few PHP conditionals thrown in. There are no other methods. The class is instantiated as soon as it is defined. Clever...