fix for badly-accessed object method in post media metabox
This commit is contained in:
parent
54774522c2
commit
a9c6b3d65c
|
@ -25,6 +25,11 @@ class ComicPressPostMediaHandlingMetabox {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _save_post($post_id) {
|
||||||
|
$mb = new ComicPressPostMediaHandlingMetabox();
|
||||||
|
$mb->save_post($post_id);
|
||||||
|
}
|
||||||
|
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
function admin_menu() {
|
function admin_menu() {
|
||||||
add_meta_box('comicpress-post-media-handling', __('ComicPress Post Media', 'comicpress'), array('ComicPressPostMediaHandlingMetabox', 'metabox'), 'post', 'normal', 'low');
|
add_meta_box('comicpress-post-media-handling', __('ComicPress Post Media', 'comicpress'), array('ComicPressPostMediaHandlingMetabox', 'metabox'), 'post', 'normal', 'low');
|
||||||
|
@ -46,4 +51,4 @@ class ComicPressPostMediaHandlingMetabox {
|
||||||
}
|
}
|
||||||
|
|
||||||
add_action('admin_menu', array('ComicPressPostMediaHandlingMetabox', 'admin_menu'));
|
add_action('admin_menu', array('ComicPressPostMediaHandlingMetabox', 'admin_menu'));
|
||||||
add_action('save_post', array('ComicPressPostMediaHandlingMetabox', 'save_post'));
|
add_action('save_post', array('ComicPressPostMediaHandlingMetabox', '_save_post'));
|
||||||
|
|
|
@ -37,7 +37,7 @@ class ArchiveDropdownWidgetTest extends PHPUnit_Framework_TestCase {
|
||||||
$html = $this->w->build_dropdown($entries);
|
$html = $this->w->build_dropdown($entries);
|
||||||
|
|
||||||
foreach (array(
|
foreach (array(
|
||||||
array('tag' => 'div', 'attributes' => array('class' => 'archive-dropdown-wrap')),
|
array('tag' => 'li', 'attributes' => array('class' => 'archive-dropdown-wrap')),
|
||||||
array('tag' => 'form', 'attributes' => array('action' => '', 'method' => 'get')),
|
array('tag' => 'form', 'attributes' => array('action' => '', 'method' => 'get')),
|
||||||
array('tag' => 'select', 'attributes' => array('name' => 'cp[urls]')),
|
array('tag' => 'select', 'attributes' => array('name' => 'cp[urls]')),
|
||||||
array('tag' => 'input', 'attributes' => array('name' => 'cp[_nonce]')),
|
array('tag' => 'input', 'attributes' => array('name' => 'cp[_nonce]')),
|
||||||
|
@ -48,7 +48,7 @@ class ArchiveDropdownWidgetTest extends PHPUnit_Framework_TestCase {
|
||||||
array('tag' => 'option', 'attributes' => array('value' => 'test'), 'content' => 'Test'),
|
array('tag' => 'option', 'attributes' => array('value' => 'test'), 'content' => 'Test'),
|
||||||
array('tag' => 'option', 'attributes' => array('value' => 'test2'), 'content' => 'Test2'),
|
array('tag' => 'option', 'attributes' => array('value' => 'test2'), 'content' => 'Test2'),
|
||||||
) as $matcher) {
|
) as $matcher) {
|
||||||
$this->assertTag($matcher, $html);
|
$this->assertTag($matcher, $html, print_r($matcher, true));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue