Fix exposers to new API response
This commit is contained in:
parent
e11f6bd8a0
commit
902b860fd4
|
@ -27,6 +27,7 @@ class Csv extends Exposer {
|
|||
);
|
||||
|
||||
$items = $response->get_data();
|
||||
$items = is_array($items) && isset($items['items']) ? $items['items'] : [];
|
||||
|
||||
if (sizeof($items) > 0) {
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ class Html extends Exposer {
|
|||
$response->set_headers( ['Content-Type: text/html; charset=' . get_option( 'blog_charset' )] );
|
||||
|
||||
$items = $response->get_data();
|
||||
$items = is_array($items) && isset($items['items']) ? $items['items'] : [];
|
||||
|
||||
$html = '
|
||||
<!DOCTYPE html>
|
||||
|
|
|
@ -181,7 +181,7 @@ class OAIPMH_List_Records extends OAIPMH_Expose {
|
|||
foreach ($maps as $key => $val) {
|
||||
|
||||
if( $val && is_object($val) )
|
||||
$this->xml_creater->addChild($this->working_node, $key, html_entity_decode($val->get_value()));
|
||||
$this->xml_creater->addChild($this->working_node, $key, html_entity_decode($val->get_value_as_string()));
|
||||
else
|
||||
$this->xml_creater->addChild($this->working_node, $key, '');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue