Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter csacchetti

    (@csacchetti)

    “languages” is the name of menu and it repeat it inside the drop-down menu instead of putting the names of the various languages. For example, if I change language in Italian I have in menu “lingua” and in drop-down menu 3 buttons with “lingua” and not the name of three languages I put in site

    Thread Starter csacchetti

    (@csacchetti)

    thank you very much

    I apologize for my ignorance. This plugin looks great to me. But I’m having trouble because it doesn’t auto flush.I too have unknown in my EndPoint but I cannot understand from the faq how to proceed. There is a file that I need to edit. If so where do I find this file. Excuse me but I’m at the beginning.

    Where I can do this?
    Yes you can! Use the hook wp_rest_cache/determine_object_type like this:
    function wprc_determine_object_type( $object_type, $cache_key, $data, $uri ) {
    if ( $object_type !== ‘unknown’ || strpos( $uri, $this->namespace . ‘/’ . $this->rest_base ) === false ) {
    return $object_type;
    }
    // Do your magic here
    $object_type = ‘website’;
    // Do your magic here
    return $object_type;
    }
    add_filter( ‘wp_rest_cache/determine_object_type’, ‘wprc_determine_object_type’, 10, 4 );

    Thanks in advance

    • This reply was modified 4 years, 6 months ago by csacchetti.
Viewing 3 replies - 1 through 3 (of 3 total)