Edit File by line
/home/barbar84/www/wp-conte.../plugins/wordpres.../src/deprecat.../admin
File: extension.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Admin
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedClassFound -- Reason: The class is deprecated.
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Represents the values for a single Yoast Premium extension plugin.
[10] Fix | Delete
*
[11] Fix | Delete
* @deprecated 15.4
[12] Fix | Delete
*/
[13] Fix | Delete
class WPSEO_Extension {
[14] Fix | Delete
[15] Fix | Delete
/**
[16] Fix | Delete
* Holds the extension config.
[17] Fix | Delete
*
[18] Fix | Delete
* @var array
[19] Fix | Delete
*/
[20] Fix | Delete
protected $config = [];
[21] Fix | Delete
[22] Fix | Delete
/**
[23] Fix | Delete
* WPSEO_Extension constructor.
[24] Fix | Delete
*
[25] Fix | Delete
* @deprecated 15.4
[26] Fix | Delete
* @codeCoverageIgnore
[27] Fix | Delete
*
[28] Fix | Delete
* @param array $config The config to use.
[29] Fix | Delete
*/
[30] Fix | Delete
public function __construct( array $config ) {
[31] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 15.4' );
[32] Fix | Delete
[33] Fix | Delete
$this->config = $config;
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
/**
[37] Fix | Delete
* Returns the product title.
[38] Fix | Delete
*
[39] Fix | Delete
* @deprecated 15.4
[40] Fix | Delete
* @codeCoverageIgnore
[41] Fix | Delete
*
[42] Fix | Delete
* @return string The set title.
[43] Fix | Delete
*/
[44] Fix | Delete
public function get_title() {
[45] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 15.4' );
[46] Fix | Delete
[47] Fix | Delete
return $this->config['title'];
[48] Fix | Delete
}
[49] Fix | Delete
[50] Fix | Delete
/**
[51] Fix | Delete
* Returns the product title to display.
[52] Fix | Delete
*
[53] Fix | Delete
* @deprecated 15.4
[54] Fix | Delete
* @codeCoverageIgnore
[55] Fix | Delete
*
[56] Fix | Delete
* @return string The title to display on the license page.
[57] Fix | Delete
*/
[58] Fix | Delete
public function get_display_title() {
[59] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 15.4' );
[60] Fix | Delete
[61] Fix | Delete
return empty( $this->config['display_title'] ) ? $this->config['title'] : $this->config['display_title'];
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
/**
[65] Fix | Delete
* Returns URL to the page where the product can be bought.
[66] Fix | Delete
*
[67] Fix | Delete
* @deprecated 15.4
[68] Fix | Delete
* @codeCoverageIgnore
[69] Fix | Delete
*
[70] Fix | Delete
* @return string The buy url.
[71] Fix | Delete
*/
[72] Fix | Delete
public function get_buy_url() {
[73] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 15.4' );
[74] Fix | Delete
[75] Fix | Delete
return $this->config['buyUrl'];
[76] Fix | Delete
}
[77] Fix | Delete
[78] Fix | Delete
/**
[79] Fix | Delete
* Returns URL to the page with more info.
[80] Fix | Delete
*
[81] Fix | Delete
* @deprecated 15.4
[82] Fix | Delete
* @codeCoverageIgnore
[83] Fix | Delete
*
[84] Fix | Delete
* @return string The url to the info page.
[85] Fix | Delete
*/
[86] Fix | Delete
public function get_info_url() {
[87] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 15.4' );
[88] Fix | Delete
[89] Fix | Delete
return $this->config['infoUrl'];
[90] Fix | Delete
}
[91] Fix | Delete
[92] Fix | Delete
/**
[93] Fix | Delete
* Returns the image.
[94] Fix | Delete
*
[95] Fix | Delete
* @deprecated 15.4
[96] Fix | Delete
* @codeCoverageIgnore
[97] Fix | Delete
*
[98] Fix | Delete
* @return string The image.
[99] Fix | Delete
*/
[100] Fix | Delete
public function get_image() {
[101] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 15.4' );
[102] Fix | Delete
[103] Fix | Delete
return $this->config['image'];
[104] Fix | Delete
}
[105] Fix | Delete
[106] Fix | Delete
/**
[107] Fix | Delete
* Returns the buy button value if set, otherwise fallback to the title.
[108] Fix | Delete
*
[109] Fix | Delete
* @deprecated 15.4
[110] Fix | Delete
* @codeCoverageIgnore
[111] Fix | Delete
*
[112] Fix | Delete
* @return string The buy button.
[113] Fix | Delete
*/
[114] Fix | Delete
public function get_buy_button() {
[115] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 15.4' );
[116] Fix | Delete
[117] Fix | Delete
if ( isset( $this->config['buy_button'] ) ) {
[118] Fix | Delete
return $this->config['buy_button'];
[119] Fix | Delete
}
[120] Fix | Delete
[121] Fix | Delete
return $this->config['title'];
[122] Fix | Delete
}
[123] Fix | Delete
[124] Fix | Delete
/**
[125] Fix | Delete
* Returns the benefits.
[126] Fix | Delete
*
[127] Fix | Delete
* @deprecated 15.4
[128] Fix | Delete
* @codeCoverageIgnore
[129] Fix | Delete
*
[130] Fix | Delete
* @return array The array with benefits.
[131] Fix | Delete
*/
[132] Fix | Delete
public function get_benefits() {
[133] Fix | Delete
_deprecated_function( __METHOD__, 'WPSEO 15.4' );
[134] Fix | Delete
[135] Fix | Delete
return $this->config['benefits'];
[136] Fix | Delete
}
[137] Fix | Delete
}
[138] Fix | Delete
// phpcs:enable
[139] Fix | Delete
[140] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function