Documentation errors with filters?

#84606
  • Resolved Ben
    Rank Math business

    https://rankmath.com/kb/filters-hooks-api-developer/#change-post-schema-data it says:

    **
     * Filter to change the schema data.
     * Replace $schmea_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_{$schema}_entity", function( $entity ) {
     return $entity;
    });

    In this example you are missing a forward slash, but also you are referencing a variable named $schmea_type

    Schema is spelled wrong and doesn’t even have any reference in the function.

Viewing 1 replies (of 1 total)
  • Alberto
    Rank Math business

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    Thank you for letting us know about those mistakes, I will send them to our editors (and also about the examples).

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Documentation errors with filters?’ is closed to new replies.