move options admin page into separate file
This commit is contained in:
parent
bc964971f7
commit
1abd155217
|
@ -4,12 +4,7 @@ class ComicPressOptionsAdmin {
|
|||
function render_admin() {
|
||||
$nonce = wp_create_nonce('comicpress');
|
||||
|
||||
echo '<div class="wrap">';
|
||||
echo '<h2>ComicPress Config</h2>';
|
||||
echo '<form method="post">';
|
||||
echo '<input type="hidden" name="cp[_nonce]" value="' . $nonce . '" />';
|
||||
echo '</form>';
|
||||
echo '</div>';
|
||||
include(dirname(__FILE__) . '/partials/options-admin.inc');
|
||||
}
|
||||
|
||||
function get_root_categories() {
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<div class="wrap">
|
||||
<h2>ComicPress Config</h2>
|
||||
<form method="post">
|
||||
<input type="hidden" name="cp[_nonce]" value="<?php echo $nonce ?>" />
|
||||
<table>
|
||||
<tr>
|
||||
<th scope="row">Master Comic Category</th>
|
||||
<td>
|
||||
<select name="cp[comiccat]">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
|
@ -16,7 +16,7 @@ class OptionsPageTest extends PHPUnit_Framework_TestCase {
|
|||
ob_start();
|
||||
$this->admin->render_admin();
|
||||
$source = ob_get_clean();
|
||||
|
||||
|
||||
$this->assertTrue(($xml = _to_xml($source)) !== false);
|
||||
foreach (array(
|
||||
'//input[@name="cp[_nonce]" and @value="' . $nonce . '"]' => true
|
||||
|
|
Loading…
Reference in New Issue