Edit File by line
/home/barbar84/www/wp-conte.../plugins/wordpres.../src/deprecat.../frontend
File: class-opengraph.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Frontend
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* This code adds the OpenGraph output.
[8] Fix | Delete
*
[9] Fix | Delete
* @deprecated 14.0
[10] Fix | Delete
*/
[11] Fix | Delete
class WPSEO_OpenGraph {
[12] Fix | Delete
[13] Fix | Delete
/* ********************* DEPRECATED METHODS ********************* */
[14] Fix | Delete
[15] Fix | Delete
/**
[16] Fix | Delete
* Class constructor.
[17] Fix | Delete
*
[18] Fix | Delete
* @deprecated 14.0
[19] Fix | Delete
* @codeCoverageIgnore
[20] Fix | Delete
*/
[21] Fix | Delete
public function __construct() {
[22] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* Main OpenGraph output.
[27] Fix | Delete
*
[28] Fix | Delete
* @deprecated 14.0
[29] Fix | Delete
* @codeCoverageIgnore
[30] Fix | Delete
*/
[31] Fix | Delete
public function opengraph() {
[32] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
/**
[36] Fix | Delete
* Internal function to output FB tags. This also adds an output filter to each bit of output based on the property.
[37] Fix | Delete
*
[38] Fix | Delete
* @deprecated 14.0
[39] Fix | Delete
* @codeCoverageIgnore
[40] Fix | Delete
*
[41] Fix | Delete
* @param string $property Property attribute value.
[42] Fix | Delete
* @param string $content Content attribute value.
[43] Fix | Delete
*
[44] Fix | Delete
* @return bool
[45] Fix | Delete
*/
[46] Fix | Delete
public function og_tag( $property, $content ) {
[47] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[48] Fix | Delete
[49] Fix | Delete
/**
[50] Fix | Delete
* Filter: 'wpseo_og_' . $og_property - Allow developers to change the content of specific OG meta tags.
[51] Fix | Delete
*
[52] Fix | Delete
* @deprecated 14.0
[53] Fix | Delete
*
[54] Fix | Delete
* @api string $content The content of the property.
[55] Fix | Delete
*/
[56] Fix | Delete
$content = apply_filters_deprecated( 'wpseo_og_' . $og_property, $content, 'WPSEO 14.0' );
[57] Fix | Delete
[58] Fix | Delete
return true;
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
/**
[62] Fix | Delete
* Outputs the canonical URL as OpenGraph URL, which consolidates likes and shares.
[63] Fix | Delete
*
[64] Fix | Delete
* @deprecated 14.0
[65] Fix | Delete
* @codeCoverageIgnore
[66] Fix | Delete
*
[67] Fix | Delete
* @link https://ogp.me/#type_article
[68] Fix | Delete
*
[69] Fix | Delete
* @return bool
[70] Fix | Delete
*/
[71] Fix | Delete
public function url() {
[72] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[73] Fix | Delete
[74] Fix | Delete
return false;
[75] Fix | Delete
}
[76] Fix | Delete
[77] Fix | Delete
/**
[78] Fix | Delete
* Outputs the SEO title as OpenGraph title.
[79] Fix | Delete
*
[80] Fix | Delete
* @deprecated 14.0
[81] Fix | Delete
* @codeCoverageIgnore
[82] Fix | Delete
*
[83] Fix | Delete
* @link https://ogp.me/#type_article
[84] Fix | Delete
*
[85] Fix | Delete
* @param bool $echo Whether or not to echo the output.
[86] Fix | Delete
*
[87] Fix | Delete
* @return string|bool
[88] Fix | Delete
*/
[89] Fix | Delete
public function og_title( $echo = true ) {
[90] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[91] Fix | Delete
[92] Fix | Delete
return false;
[93] Fix | Delete
}
[94] Fix | Delete
[95] Fix | Delete
/**
[96] Fix | Delete
* Outputs the OpenGraph description, specific OG description first, if not, grabs the meta description.
[97] Fix | Delete
*
[98] Fix | Delete
* @deprecated 14.0
[99] Fix | Delete
* @codeCoverageIgnore
[100] Fix | Delete
*
[101] Fix | Delete
* @param bool $echo Whether to echo or return the description.
[102] Fix | Delete
*
[103] Fix | Delete
* @return string
[104] Fix | Delete
*/
[105] Fix | Delete
public function description( $echo = true ) {
[106] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[107] Fix | Delete
[108] Fix | Delete
return '';
[109] Fix | Delete
}
[110] Fix | Delete
[111] Fix | Delete
/**
[112] Fix | Delete
* Outputs the author's FB page.
[113] Fix | Delete
*
[114] Fix | Delete
* @deprecated 14.0
[115] Fix | Delete
* @codeCoverageIgnore
[116] Fix | Delete
*
[117] Fix | Delete
* @link https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/
[118] Fix | Delete
* @link https://ogp.me/#type_article
[119] Fix | Delete
*
[120] Fix | Delete
* @return bool
[121] Fix | Delete
*/
[122] Fix | Delete
public function article_author_facebook() {
[123] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[124] Fix | Delete
[125] Fix | Delete
return false;
[126] Fix | Delete
}
[127] Fix | Delete
[128] Fix | Delete
/**
[129] Fix | Delete
* Outputs the website's FB page.
[130] Fix | Delete
*
[131] Fix | Delete
* @deprecated 14.0
[132] Fix | Delete
* @codeCoverageIgnore
[133] Fix | Delete
*
[134] Fix | Delete
* @link https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/
[135] Fix | Delete
* @link https://ogp.me/#type_article
[136] Fix | Delete
*
[137] Fix | Delete
* @return bool
[138] Fix | Delete
*/
[139] Fix | Delete
public function website_facebook() {
[140] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[141] Fix | Delete
[142] Fix | Delete
return false;
[143] Fix | Delete
}
[144] Fix | Delete
[145] Fix | Delete
/**
[146] Fix | Delete
* Outputs the OpenGraph type.
[147] Fix | Delete
*
[148] Fix | Delete
* @deprecated 14.0
[149] Fix | Delete
* @codeCoverageIgnore
[150] Fix | Delete
*
[151] Fix | Delete
* @param bool $echo Whether to echo or return the type.
[152] Fix | Delete
*
[153] Fix | Delete
* @return string
[154] Fix | Delete
*/
[155] Fix | Delete
public function type( $echo = true ) {
[156] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[157] Fix | Delete
[158] Fix | Delete
return '';
[159] Fix | Delete
}
[160] Fix | Delete
[161] Fix | Delete
/**
[162] Fix | Delete
* Outputs the locale, doing some conversions to make sure the proper Facebook locale is output.
[163] Fix | Delete
*
[164] Fix | Delete
* Last update/compare with FB list done on 2015-03-16 by Rarst.
[165] Fix | Delete
*
[166] Fix | Delete
* @deprecated 14.0
[167] Fix | Delete
* @codeCoverageIgnore
[168] Fix | Delete
*
[169] Fix | Delete
* @link https://developers.facebook.com/docs/internationalization/#locales for the list of supported locales.
[170] Fix | Delete
* @link https://ogp.me/#type_article
[171] Fix | Delete
*
[172] Fix | Delete
* @param bool $echo Whether to echo or return the locale.
[173] Fix | Delete
*
[174] Fix | Delete
* @return string
[175] Fix | Delete
*/
[176] Fix | Delete
public function locale( $echo = true ) {
[177] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[178] Fix | Delete
[179] Fix | Delete
return '';
[180] Fix | Delete
}
[181] Fix | Delete
[182] Fix | Delete
/**
[183] Fix | Delete
* Filters the Facebook plugins metadata.
[184] Fix | Delete
*
[185] Fix | Delete
* @deprecated 14.0
[186] Fix | Delete
* @codeCoverageIgnore
[187] Fix | Delete
*
[188] Fix | Delete
* @param array $meta_tags The array to fix.
[189] Fix | Delete
*
[190] Fix | Delete
* @return array
[191] Fix | Delete
*/
[192] Fix | Delete
public function facebook_filter( $meta_tags ) {
[193] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[194] Fix | Delete
[195] Fix | Delete
return [];
[196] Fix | Delete
}
[197] Fix | Delete
[198] Fix | Delete
/**
[199] Fix | Delete
* Outputs the site name straight from the blog info.
[200] Fix | Delete
*
[201] Fix | Delete
* @deprecated 14.0
[202] Fix | Delete
* @codeCoverageIgnore
[203] Fix | Delete
*
[204] Fix | Delete
* @return void
[205] Fix | Delete
*/
[206] Fix | Delete
public function site_name() {
[207] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[208] Fix | Delete
}
[209] Fix | Delete
[210] Fix | Delete
/**
[211] Fix | Delete
* Outputs the article publish and last modification date.
[212] Fix | Delete
*
[213] Fix | Delete
* @deprecated 14.0
[214] Fix | Delete
* @codeCoverageIgnore
[215] Fix | Delete
*
[216] Fix | Delete
* @link https://ogp.me/#type_article
[217] Fix | Delete
*
[218] Fix | Delete
* @return bool ;
[219] Fix | Delete
*/
[220] Fix | Delete
public function publish_date() {
[221] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[222] Fix | Delete
[223] Fix | Delete
return true;
[224] Fix | Delete
}
[225] Fix | Delete
[226] Fix | Delete
/**
[227] Fix | Delete
* Creates new WPSEO_OpenGraph_Image class and get the images to set the og:image.
[228] Fix | Delete
*
[229] Fix | Delete
* @deprecated 14.0
[230] Fix | Delete
* @codeCoverageIgnore
[231] Fix | Delete
*
[232] Fix | Delete
* @param string|bool $image Optional. Image URL.
[233] Fix | Delete
*
[234] Fix | Delete
* @return void
[235] Fix | Delete
*/
[236] Fix | Delete
public function image( $image = false ) {
[237] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[238] Fix | Delete
}
[239] Fix | Delete
[240] Fix | Delete
/**
[241] Fix | Delete
* Outputs the Facebook app_id.
[242] Fix | Delete
*
[243] Fix | Delete
* @deprecated 14.0
[244] Fix | Delete
* @codeCoverageIgnore
[245] Fix | Delete
*
[246] Fix | Delete
* @return void
[247] Fix | Delete
*/
[248] Fix | Delete
public function app_id() {
[249] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[250] Fix | Delete
}
[251] Fix | Delete
[252] Fix | Delete
/**
[253] Fix | Delete
* Outputs the article tags as article:tag tags.
[254] Fix | Delete
*
[255] Fix | Delete
* @deprecated 14.0
[256] Fix | Delete
* @codeCoverageIgnore
[257] Fix | Delete
*
[258] Fix | Delete
* @link https://ogp.me/#type_article
[259] Fix | Delete
*
[260] Fix | Delete
* @return bool
[261] Fix | Delete
*/
[262] Fix | Delete
public function tags() {
[263] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[264] Fix | Delete
[265] Fix | Delete
return false;
[266] Fix | Delete
}
[267] Fix | Delete
[268] Fix | Delete
/**
[269] Fix | Delete
* Outputs the article category as an article:section tag.
[270] Fix | Delete
*
[271] Fix | Delete
* @deprecated 14.0
[272] Fix | Delete
* @codeCoverageIgnore
[273] Fix | Delete
*
[274] Fix | Delete
* @link https://ogp.me/#type_article
[275] Fix | Delete
*
[276] Fix | Delete
* @return bool ;
[277] Fix | Delete
*/
[278] Fix | Delete
public function category() {
[279] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 14.0' );
[280] Fix | Delete
[281] Fix | Delete
return false;
[282] Fix | Delete
}
[283] Fix | Delete
}
[284] Fix | Delete
[285] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function