Open lucky-yoolk opened 1 year ago
Hey looks good. I guess you should return the values using rest_ensure_response()
. What are the values that you want to have in $lang_array?
$blog = MslsBlogCollection::instance()->get_current_blog();
$language = $blog->get_language(); // en_US
$alpha2 = $blog->get_alpha2(); // en
or
$arr = [];
foreach ( MslsBlogCollection::instance()->get() as $blog ) {
$arr[] = $blog->get_language();
}
?
Read on here: https://msls.co/developer-docs/snippets-examples/
hi,
first thanks for your awesome plugin! Saves me a lot of time when i have to manage Multilingual websites.
Is there a way to register translations when calling Wordpress Rest API?
Below is my attempt at doing something beyond my expertise ^^