Support » Plugin: Yoast SEO » [Plugin: WordPress SEO by Yoast] Add WP filters in class-opengraph.php

  • Resolved Daniel Koskinen

    (@daniel-koskinen)


    Hi, the locale recognized by Facebook is not necessarily the same as the WordPress locale. This is the case in Finnish, where for years we have used ‘fi’, but Facebook only recognizes ‘fi_FI’. This results in an error with the FB debugger. I know you can’t take into account every single locale and exception in your plugin, but it would be nice if you could add filtering capabilities to the locale function in the WPSEO_OpenGraph class instead of just echoing the WP locale.

    Any other suggestions how to fix this are welcome of course.

    http://wordpress.org/extend/plugins/wordpress-seo/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Joost de Valk

    (@joostdevalk)

    Absolutely, just added it in trunk, it’ll be in the 1.1.7 release.

    Plugin Author Joost de Valk

    (@joostdevalk)

    Just realized I could also do a small “hack” and double it up automatically if the locale is only two letters long. So “fi” now automatically expands to “fi_fi” (Facebook actually wants it lowercased).

    Plugin Author Joost de Valk

    (@joostdevalk)

    Or even better, a full on translation. Just added that to development version.

    hi, lower case is one issue (as we talked about in the other thread).

    If the country code is 2 letters only, duplicating wont work in every case. In greek the current code is “el”, but the 4 letter code should be “el_GR”, not “el_el”, so it wont work for facebook. But I guess it wont hurt anyway.

    (i have already made a request to the greek translation team to use the 4 letter code “el_GR” from now on)

    Plugin Author Joost de Valk

    (@joostdevalk)

    The new commit I just made will already convert el to el_gr 🙂

    Hey, this is awesome. Automatic doubling is even better, since most people won’t know how to create a filter. Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] Add WP filters in class-opengraph.php’ is closed to new replies.