• Resolved B0RG

    (@b0rg)


    Hi Pascal,

    on some website I found that this is also important to completely disable embeds:

    remove_action( 'template_redirect', 'rest_output_link_header', 11, 0 );

    I am not sure why this is not in the code for this plugin – is this triggered by some other setting?

    Or would it be important to add that to this plugin?

    Thanks for your attention!

    https://www.ads-software.com/plugins/disable-embeds/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    Hey there,

    As per the documentation, the rest_output_link_header() function sends a Link header for the REST API. As such, it has nothing to do with embeds.

    The link headers are important for scripts to detect the REST API in WordPress, so plugins like WP-API and others can work as expected. The Disable Embeds plugin already disables the oEmbed REST API endpoint, nothing else is needed on that side.

    tl;dr: Adding such a line is not needed to disable embeds.

    Thread Starter B0RG

    (@b0rg)

    AH, ok, thank you very much for clarification!
    Keep up the good work :)!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘why not rest_output_link_header ?’ is closed to new replies.