Y
Y
Yury Bondaruk2021-08-20 01:37:29
WordPress
Yury Bondaruk, 2021-08-20 01:37:29

How to get 'name' from get_tags() in WP Rest Api?

Like in this code:

register_rest_field( 'post', 'GetTags', array(
  'get_callback' => function ( $data ) {
    return get_tags( $data['id'], '', '');
  }, ));


Get element: "name"? Thanks in advance!

XnYmGTtUerg.jpg?size=302x245&quality=96&sign=1d4727bdf7a0e399a61ea65b095188f4&type=album

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question