<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[20137] trunk/wp-includes/class-wp-xmlrpc-server.php: XML-RPC: Initial implementation of Taxonomy and Term APIs.</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg > ul, #logmsg > ol { margin-left: 0; margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://core.trac.wordpress.org/changeset/20137">20137</a></dd>
<dt>Author</dt> <dd>westi</dd>
<dt>Date</dt> <dd>2012-03-07 17:02:22 +0000 (Wed, 07 Mar 2012)</dd>
</dl>

<h3>Log Message</h3>
<pre>XML-RPC: Initial implementation of Taxonomy and Term APIs.

Implements: wp.newTerm, wp.editTerm, wp.deleteTerm, wp.getTerm, wp.getTerms, wp.getTaxonomy and wp.getTaxonomies

See: <a href="http://core.trac.wordpress.org/ticket/18438">#18438</a>, <a href="http://core.trac.wordpress.org/ticket/18439">#18439</a>, <a href="http://core.trac.wordpress.org/ticket/18440">#18440</a>, <a href="http://core.trac.wordpress.org/ticket/18441">#18441</a>, <a href="http://core.trac.wordpress.org/ticket/18442">#18442</a>, <a href="http://core.trac.wordpress.org/ticket/18443">#18443</a>, and <a href="http://core.trac.wordpress.org/ticket/18444">#18444</a> props maxcutler, markoheijnen and nprasath002.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpincludesclasswpxmlrpcserverphp">trunk/wp-includes/class-wp-xmlrpc-server.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpincludesclasswpxmlrpcserverphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/class-wp-xmlrpc-server.php (20136 => 20137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/class-wp-xmlrpc-server.php        2012-03-07 16:32:11 UTC (rev 20136)
+++ trunk/wp-includes/class-wp-xmlrpc-server.php        2012-03-07 17:02:22 UTC (rev 20137)
</span><span class="lines">@@ -41,6 +41,13 @@
</span><span class="cx">                         'wp.deletePost'                        =&gt; 'this:wp_deletePost',
</span><span class="cx">                         'wp.getPost'                        =&gt; 'this:wp_getPost',
</span><span class="cx">                         'wp.getPosts'                        =&gt; 'this:wp_getPosts',
</span><ins>+                        'wp.newTerm'                        =&gt; 'this:wp_newTerm',
+                        'wp.editTerm'                        =&gt; 'this:wp_editTerm',
+                        'wp.deleteTerm'                        =&gt; 'this:wp_deleteTerm',
+                        'wp.getTerm'                        =&gt; 'this:wp_getTerm',
+                        'wp.getTerms'                        =&gt; 'this:wp_getTerms',
+                        'wp.getTaxonomy'                =&gt; 'this:wp_getTaxonomy',
+                        'wp.getTaxonomies'                =&gt; 'this:wp_getTaxonomies',
</ins><span class="cx">                         'wp.getPage'                        =&gt; 'this:wp_getPage',
</span><span class="cx">                         'wp.getPages'                        =&gt; 'this:wp_getPages',
</span><span class="cx">                         'wp.newPage'                        =&gt; 'this:wp_newPage',
</span><span class="lines">@@ -477,15 +484,47 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><ins>+         * Prepares taxonomy data for return in an XML-RPC object.
+         *
+         * @access protected
+        .*
+         * @param array|object $taxonomy The unprepared taxonomy data
+         * @return array The prepared taxonomy data
+         */
+        protected function _prepare_taxonomy( $taxonomy ) {
+                $_taxonomy = (array) $taxonomy;
+
+                unset( $_taxonomy['update_count_callback'] );
+
+                return apply_filters( 'xmlrpc__prepare_taxonomy', $_taxonomy, $taxonomy );
+        }
+
+        /**
+         * Prepares term data for return in an XML-RPC object.
+         *
+         * @access protected
+        .*
+         * @param array|object $term The unprepared term data
+         * @return array The prepared term data
+         */
+        protected function _prepare_term( $term ) {
+                $_term = $term;
+                if ( ! is_array( $_term) )
+                        $_term = get_object_vars( $_term );
+
+                return apply_filters( 'xmlrpc__prepare_term', $_term, $term );
+        }
+
+        /**
</ins><span class="cx">          * Prepares post data for return in an XML-RPC object.
</span><span class="cx">          *
</span><del>-         * @access private
</del><ins>+         * @access protected
</ins><span class="cx">          *
</span><span class="cx">          * @param array $post The unprepared post data
</span><span class="cx">          * @param array $fields The subset of post fields to return
</span><span class="cx">          * @return array The prepared post data
</span><span class="cx">          */
</span><del>-        function _prepare_post( $post, $fields ) {
</del><ins>+        protected function _prepare_post( $post, $fields ) {
</ins><span class="cx">                 // holds the data for this post. built up based on $fields
</span><span class="cx">                 $_post = array( 'post_id' =&gt; $post['ID'] );
</span><span class="cx"> 
</span><span class="lines">@@ -533,7 +572,7 @@
</span><span class="cx">                         $terms = wp_get_object_terms( $post['ID'], $post_type_taxonomies );
</span><span class="cx">                         $_post['terms'] = array();
</span><span class="cx">                         foreach ( $terms as $term ) {
</span><del>-                                $_post['terms'][] = (array) $term;
</del><ins>+                                $_post['terms'][] = $this-&gt;_prepare_term( $term );
</ins><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx"> 
</span><span class="lines">@@ -1112,6 +1151,435 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         /**
</span><ins>+         * Create a new term.
+         *
+         * @uses wp_insert_term()
+         * @param array $args Method parameters. Contains:
+         *  - int     $blog_id
+         *  - string  $username
+         *  - string  $password
+         *  - array   $content_struct
+         *      The $content_struct must contain:
+         *      - 'name'
+         *      - 'taxonomy'
+         *      Also, it can optionally contain:
+         *      - 'parent'
+         *      - 'description'
+         *      - 'slug'
+         * @return string term_id
+         */
+        function wp_newTerm( $args ) {
+                $this-&gt;escape( $args );
+
+                $blog_id            = (int) $args[0];
+                $username           = $args[1];
+                $password           = $args[2];
+                $content_struct     = $args[3];
+
+                if ( ! $user = $this-&gt;login( $username, $password ) )
+                        return $this-&gt;error;
+
+                do_action( 'xmlrpc_call', 'wp.newTerm' );
+
+                if ( ! taxonomy_exists( $content_struct['taxonomy'] ) )
+                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
+
+                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
+
+                if ( ! current_user_can( $taxonomy-&gt;cap-&gt;manage_terms ) )
+                        return new IXR_Error( 401, __( 'You are not allowed to create terms in this taxonomy.' ) );
+
+                $taxonomy = (array) $taxonomy;
+
+                // hold the data of the term
+                $term_data = array();
+
+                $term_data['name'] = trim( $content_struct['name'] );
+                if ( empty( $term_data['name'] ) )
+                        return new IXR_Error( 403, __( 'The term name cannot be empty.' ) );
+
+                if ( isset( $content_struct['parent'] ) ) {
+                        if ( ! $taxonomy['hierarchical'] )
+                                return new IXR_Error( 403, __( 'This taxonomy is not hierarchical.' ) );
+
+                        $parent_term_id = (int) $content_struct['parent'];
+                        $parent_term = get_term( $parent_term_id , $taxonomy['name'] );
+
+                        if ( is_wp_error( $parent_term ) )
+                                return new IXR_Error( 500, $parent_term-&gt;get_error_message() );
+
+                        if ( ! $parent_term )
+                                return new IXR_Error( 403, __( 'Parent term does not exist.' ) );
+
+                        $term_data['parent'] = $content_struct['parent'];
+                }
+
+                if ( isset( $content_struct['description'] ) )
+                        $term_data['description'] = $content_struct['description'];
+
+                if ( isset( $content_struct['slug'] ) )
+                        $term_data['slug'] = $content_struct['slug'];
+
+                $term = wp_insert_term( $term_data['name'] , $taxonomy['name'] , $term_data );
+
+                if ( is_wp_error( $term ) )
+                        return new IXR_Error( 500, $term-&gt;get_error_message() );
+
+                if ( ! $term )
+                        return new IXR_Error( 500, __( 'Sorry, your term could not be created. Something wrong happened.' ) );
+
+                return strval( $term['term_id'] );
+        }
+
+        /**
+         * Edit a term.
+         *
+         * @uses wp_update_term()
+         * @param array $args Method parameters. Contains:
+         *  - int     $blog_id
+         *  - string  $username
+         *  - string  $password
+         *  - string  $term_id
+         *  - array   $content_struct
+         *      The $content_struct must contain:
+         *      - 'taxonomy'
+         *      Also, it can optionally contain:
+         *      - 'name'
+         *      - 'parent'
+         *      - 'description'
+         *      - 'slug'
+         * @return bool True, on success.
+         */
+        function wp_editTerm( $args ) {
+                $this-&gt;escape( $args );
+
+                $blog_id            = (int) $args[0];
+                $username           = $args[1];
+                $password           = $args[2];
+                $term_id            = (int) $args[3];
+                $content_struct     = $args[4];
+
+                if ( ! $user = $this-&gt;login( $username, $password ) )
+                        return $this-&gt;error;
+
+                do_action( 'xmlrpc_call', 'wp.editTerm' );
+
+                if ( ! taxonomy_exists( $content_struct['taxonomy'] ) )
+                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
+
+                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
+
+                if ( ! current_user_can( $taxonomy-&gt;cap-&gt;edit_terms ) )
+                        return new IXR_Error( 401, __( 'You are not allowed to edit terms in this taxonomy.' ) );
+
+                $taxonomy = (array) $taxonomy;
+
+                // hold the data of the term
+                $term_data = array();
+
+                $term = get_term( $term_id , $content_struct['taxonomy'] );
+
+                if ( is_wp_error( $term ) )
+                        return new IXR_Error( 500, $term-&gt;get_error_message() );
+
+                if ( ! $term )
+                        return new IXR_Error( 404, __( 'Invalid term ID.' ) );
+
+                if ( isset( $content_struct['name'] ) ) {
+                        $term_data['name'] = trim( $content_struct['name'] );
+
+                        if ( empty( $term_data['name'] ) )
+                                return new IXR_Error( 403, __( 'The term name cannot be empty.' ) );
+                }
+
+                if ( isset( $content_struct['parent'] ) ) {
+                        if ( ! $taxonomy['hierarchical'] )
+                                return new IXR_Error( 403, __( &quot;This taxonomy is not hierarchical so you can't set a parent.&quot; ) );
+
+                        $parent_term_id = (int) $content_struct['parent'];
+                        $parent_term = get_term( $parent_term_id , $taxonomy['name'] );
+
+                        if ( is_wp_error( $parent_term ) )
+                                return new IXR_Error( 500, $parent_term-&gt;get_error_message() );
+
+                        if ( ! $parent_term )
+                                return new IXR_Error( 403, __( 'Parent term does not exist.' ) );
+
+                        $term_data['parent'] = $content_struct['parent'];
+                }
+
+                if ( isset( $content_struct['description'] ) )
+                        $term_data['description'] = $content_struct['description'];
+
+                if ( isset( $content_struct['slug'] ) )
+                        $term_data['slug'] = $content_struct['slug'];
+
+                $term = wp_update_term( $term_id , $taxonomy['name'] , $term_data );
+
+                if ( is_wp_error( $term ) )
+                        return new IXR_Error( 500, $term-&gt;get_error_message() );
+
+                if ( ! $term )
+                        return new IXR_Error( 500, __( 'Sorry, editing the term failed.' ) );
+
+                return true;
+        }
+
+        /**
+         * Delete a term.
+         *
+         * @uses wp_delete_term()
+         * @param array $args Method parameters. Contains:
+         *  - int     $blog_id
+         *  - string  $username
+         *  - string  $password
+         *  - string  $taxnomy_name
+         *  - string     $term_id
+         * @return boolean|IXR_Error If it suceeded true else a reason why not
+         */
+        function wp_deleteTerm( $args ) {
+                $this-&gt;escape( $args );
+
+                $blog_id            = (int) $args[0];
+                $username           = $args[1];
+                $password           = $args[2];
+                $taxonomy_name      = $args[3];
+                $term_id            = (int) $args[4];
+
+                if ( ! $user = $this-&gt;login( $username, $password ) )
+                        return $this-&gt;error;
+
+                do_action( 'xmlrpc_call', 'wp.deleteTerm' );
+
+                if ( ! taxonomy_exists( $taxonomy_name ) )
+                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
+
+                $taxonomy = get_taxonomy( $taxonomy_name );
+
+                if ( ! current_user_can( $taxonomy-&gt;cap-&gt;delete_terms ) )
+                        return new IXR_Error( 401, __( 'You are not allowed to delete terms in this taxonomy.' ) );
+
+                $term = get_term( $term_id, $taxonomy_name );
+
+                if ( is_wp_error( $term ) )
+                        return new IXR_Error( 500, $term-&gt;get_error_message() );
+
+                if ( ! $term )
+                        return new IXR_Error( 404, __( 'Invalid term ID.' ) );
+
+                $result = wp_delete_term( $term_id, $taxonomy_name );
+
+                if ( is_wp_error( $result ) )
+                        return new IXR_Error( 500, $term-&gt;get_error_message() );
+
+                if ( ! $result )
+                        return new IXR_Error( 500, __( 'Sorry, deleting the term failed.' ) );
+
+                return $result;
+        }
+
+        /**
+         * Retrieve a term.
+         *
+         * @uses get_term()
+         * @param array $args Method parameters. Contains:
+         *  - int     $blog_id
+         *  - string  $username
+         *  - string  $password
+         *  - string  $taxonomy_name
+         *  - string  $term_id
+         * @return array contains:
+         *  - 'term_id'
+         *  - 'name'
+         *  - 'slug'
+         *  - 'term_group'
+         *  - 'term_taxonomy_id'
+         *  - 'taxonomy'
+         *  - 'description'
+         *  - 'parent'
+         *  - 'count'
+         */
+        function wp_getTerm( $args ) {
+                $this-&gt;escape( $args );
+
+                $blog_id            = (int) $args[0];
+                $username           = $args[1];
+                $password           = $args[2];
+                $taxonomy_name      = $args[3];
+                $term_id            = (int) $args[4];
+
+                if ( ! $user = $this-&gt;login( $username, $password ) )
+                        return $this-&gt;error;
+
+                do_action( 'xmlrpc_call', 'wp.getTerm' );
+
+                if ( ! taxonomy_exists( $taxonomy_name ) )
+                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
+
+                $taxonomy = get_taxonomy( $taxonomy_name );
+
+                if ( ! current_user_can( $taxonomy-&gt;cap-&gt;assign_terms ) )
+                        return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );
+
+                $term = get_term( $term_id , $taxonomy_name, ARRAY_A );
+
+                if ( is_wp_error( $term ) )
+                        return new IXR_Error( 500, $term-&gt;get_error_message() );
+
+                if ( ! $term )
+                        return new IXR_Error( 404, __( 'Invalid term ID.' ) );
+
+                return $this-&gt;_prepare_term( $term );
+        }
+
+        /**
+         * Retrieve all terms for a taxonomy.
+         *
+         * The optional $filter parameter modifies the query used to retrieve terms.
+         * Accepted keys are 'number', 'offset', 'orderby', 'order', 'hide_empty', and 'search'.
+         *
+         * @uses get_terms()
+         * @param array $args Method parameters. Contains:
+         *  - int     $blog_id
+         *  - string  $username
+         *  - string  $password
+         *  - string  $taxonomy_name
+         *  - array   $filter optional
+         * @return array terms
+         */
+        function wp_getTerms( $args ) {
+                $this-&gt;escape( $args );
+
+                $blog_id        = (int) $args[0];
+                $username       = $args[1];
+                $password       = $args[2];
+                $taxonomy_name  = $args[3];
+                $filter         = isset( $args[4] ) ? $args[4] : array();
+
+                if ( ! $user = $this-&gt;login( $username, $password ) )
+                        return $this-&gt;error;
+
+                do_action( 'xmlrpc_call', 'wp.getTerms' );
+
+                if ( ! taxonomy_exists( $taxonomy_name ) )
+                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
+
+                $taxonomy = get_taxonomy( $taxonomy_name );
+
+                if ( ! current_user_can( $taxonomy-&gt;cap-&gt;assign_terms ) )
+                        return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );
+
+                $query = array();
+
+                if ( isset( $filter['number'] ) )
+                        $query['number'] = absint( $filter['number'] );
+
+                if ( isset( $filter['offset'] ) )
+                        $query['offset'] = absint( $filter['offset'] );
+
+                if ( isset( $filter['orderby'] ) ) {
+                        $query['orderby'] = $filter['orderby'];
+
+                        if ( isset( $filter['order'] ) )
+                                $query['order'] = $filter['order'];
+                }
+
+                if ( isset( $filter['hide_empty'] ) )
+                        $query['hide_empty'] = $filter['hide_empty'];
+                else
+                        $query['get'] = 'all';
+
+                if ( isset( $filter['search'] ) )
+                        $query['search'] = $filter['search'];
+
+                $terms = get_terms( $taxonomy_name, $query );
+
+                if ( is_wp_error( $terms ) )
+                        return new IXR_Error( 500, $terms-&gt;get_error_message() );
+
+                $struct = array();
+
+                foreach ( $terms as $term ) {
+                        $struct[] = $this-&gt;_prepare_term( $term );
+                }
+
+                return $struct;
+        }
+
+        /**
+         * Retrieve a taxonomy.
+         *
+         * @uses get_taxonomy()
+         * @param array $args Method parameters. Contains:
+         *  - int     $blog_id
+         *  - string  $username
+         *  - string  $password
+         *  - string  $taxonomy_name
+         * @return array (@see get_taxonomy())
+         */
+        function wp_getTaxonomy( $args ) {
+                $this-&gt;escape( $args );
+
+                $blog_id        = (int) $args[0];
+                $username       = $args[1];
+                $password       = $args[2];
+                $taxonomy_name  = $args[3];
+
+                if ( ! $user = $this-&gt;login( $username, $password ) )
+                        return $this-&gt;error;
+
+                do_action( 'xmlrpc_call', 'wp.getTaxonomy' );
+
+                if ( ! taxonomy_exists( $taxonomy_name ) )
+                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
+
+                $taxonomy = get_taxonomy( $taxonomy_name );
+
+                if ( ! current_user_can( $taxonomy-&gt;cap-&gt;assign_terms ) )
+                        return new IXR_Error( 401, __( 'You are not allowed to assign terms in this taxonomy.' ) );
+
+                return $this-&gt;_prepare_taxonomy( $taxonomy );
+        }
+
+        /**
+         * Retrieve all taxonomies.
+         *
+         * @uses get_taxonomies()
+         * @param array $args Method parameters. Contains:
+         *  - int     $blog_id
+         *  - string  $username
+         *  - string  $password
+         * @return array taxonomies
+         */
+        function wp_getTaxonomies( $args ) {
+                $this-&gt;escape( $args );
+
+                $blog_id            = (int) $args[0];
+                $username           = $args[1];
+                $password           = $args[2];
+
+                if ( ! $user = $this-&gt;login( $username, $password ) )
+                        return $this-&gt;error;
+
+                do_action( 'xmlrpc_call', 'wp.getTaxonomies' );
+
+                $taxonomies = get_taxonomies( array(), 'objects' );
+
+                // holds all the taxonomy data
+                $struct = array();
+
+                foreach ( $taxonomies as $taxonomy ) {
+                        // capability check for post_types
+                        if ( ! current_user_can( $taxonomy-&gt;cap-&gt;assign_terms ) )
+                                continue;
+
+                        $struct[] = $this-&gt;_prepare_taxonomy( $taxonomy );
+                }
+
+                return $struct;
+        }
+
+        /**
</ins><span class="cx">          * Retrieve page.
</span><span class="cx">          *
</span><span class="cx">          * @since 2.2.0
</span></span></pre>
</div>
</div>

</body>
</html>