* @package WPSEO\Frontend
* This code adds the OpenGraph output.
/* ********************* DEPRECATED METHODS ********************* */
public function __construct() {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
public function opengraph() {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Internal function to output FB tags. This also adds an output filter to each bit of output based on the property.
* @param string $property Property attribute value.
* @param string $content Content attribute value.
public function og_tag( $property, $content ) {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Filter: 'wpseo_og_' . $og_property - Allow developers to change the content of specific OG meta tags.
* @api string $content The content of the property.
$content = apply_filters_deprecated( 'wpseo_og_' . $og_property, $content, 'WPSEO 14.0' );
* Outputs the canonical URL as OpenGraph URL, which consolidates likes and shares.
* @link https://ogp.me/#type_article
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Outputs the SEO title as OpenGraph title.
* @link https://ogp.me/#type_article
* @param bool $echo Whether or not to echo the output.
public function og_title( $echo = true ) {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Outputs the OpenGraph description, specific OG description first, if not, grabs the meta description.
* @param bool $echo Whether to echo or return the description.
public function description( $echo = true ) {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Outputs the author's FB page.
* @link https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/
* @link https://ogp.me/#type_article
public function article_author_facebook() {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Outputs the website's FB page.
* @link https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/
* @link https://ogp.me/#type_article
public function website_facebook() {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Outputs the OpenGraph type.
* @param bool $echo Whether to echo or return the type.
public function type( $echo = true ) {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Outputs the locale, doing some conversions to make sure the proper Facebook locale is output.
* Last update/compare with FB list done on 2015-03-16 by Rarst.
* @link https://developers.facebook.com/docs/internationalization/#locales for the list of supported locales.
* @link https://ogp.me/#type_article
* @param bool $echo Whether to echo or return the locale.
public function locale( $echo = true ) {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Filters the Facebook plugins metadata.
* @param array $meta_tags The array to fix.
public function facebook_filter( $meta_tags ) {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Outputs the site name straight from the blog info.
public function site_name() {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Outputs the article publish and last modification date.
* @link https://ogp.me/#type_article
public function publish_date() {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Creates new WPSEO_OpenGraph_Image class and get the images to set the og:image.
* @param string|bool $image Optional. Image URL.
public function image( $image = false ) {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Outputs the Facebook app_id.
public function app_id() {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Outputs the article tags as article:tag tags.
* @link https://ogp.me/#type_article
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
* Outputs the article category as an article:section tag.
* @link https://ogp.me/#type_article
public function category() {
_deprecated_function( __METHOD__, 'WPSEO 14.0' );