Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/wordpres.../admin
File: class-premium-popup.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
/**
[7] Fix | Delete
* Class WPSEO_Premium_popup.
[8] Fix | Delete
*/
[9] Fix | Delete
class WPSEO_Premium_Popup {
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* An unique identifier for the popup
[13] Fix | Delete
*
[14] Fix | Delete
* @var string
[15] Fix | Delete
*/
[16] Fix | Delete
private $identifier = '';
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* The heading level of the title of the popup.
[20] Fix | Delete
*
[21] Fix | Delete
* @var string
[22] Fix | Delete
*/
[23] Fix | Delete
private $heading_level = '';
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* The title of the popup.
[27] Fix | Delete
*
[28] Fix | Delete
* @var string
[29] Fix | Delete
*/
[30] Fix | Delete
private $title = '';
[31] Fix | Delete
[32] Fix | Delete
/**
[33] Fix | Delete
* The content of the popup.
[34] Fix | Delete
*
[35] Fix | Delete
* @var string
[36] Fix | Delete
*/
[37] Fix | Delete
private $content = '';
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* The URL for where the button should link to.
[41] Fix | Delete
*
[42] Fix | Delete
* @var string
[43] Fix | Delete
*/
[44] Fix | Delete
private $url = '';
[45] Fix | Delete
[46] Fix | Delete
/**
[47] Fix | Delete
* Wpseo_Premium_Popup constructor.
[48] Fix | Delete
*
[49] Fix | Delete
* @param string $identifier An unique identifier for the popup.
[50] Fix | Delete
* @param string $heading_level The heading level for the title of the popup.
[51] Fix | Delete
* @param string $title The title of the popup.
[52] Fix | Delete
* @param string $content The content of the popup.
[53] Fix | Delete
* @param string $url The URL for where the button should link to.
[54] Fix | Delete
*/
[55] Fix | Delete
public function __construct( $identifier, $heading_level, $title, $content, $url ) {
[56] Fix | Delete
$this->identifier = $identifier;
[57] Fix | Delete
$this->heading_level = $heading_level;
[58] Fix | Delete
$this->title = $title;
[59] Fix | Delete
$this->content = $content;
[60] Fix | Delete
$this->url = $url;
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
/**
[64] Fix | Delete
* Returns the premium popup as an HTML string.
[65] Fix | Delete
*
[66] Fix | Delete
* @param bool $popup Show this message as a popup show it straight away.
[67] Fix | Delete
*
[68] Fix | Delete
* @return string
[69] Fix | Delete
*/
[70] Fix | Delete
public function get_premium_message( $popup = true ) {
[71] Fix | Delete
// Don't show in Premium.
[72] Fix | Delete
if ( defined( 'WPSEO_PREMIUM_FILE' ) ) {
[73] Fix | Delete
return '';
[74] Fix | Delete
}
[75] Fix | Delete
[76] Fix | Delete
$assets_uri = trailingslashit( plugin_dir_url( WPSEO_FILE ) );
[77] Fix | Delete
[78] Fix | Delete
/* translators: %s expands to Yoast SEO Premium */
[79] Fix | Delete
$cta_text = esc_html( sprintf( __( 'Get %s', 'wordpress-seo' ), 'Yoast SEO Premium' ) );
[80] Fix | Delete
/* translators: Hidden accessibility text. */
[81] Fix | Delete
$new_tab_message = '<span class="screen-reader-text">' . esc_html__( '(Opens in a new browser tab)', 'wordpress-seo' ) . '</span>';
[82] Fix | Delete
$caret_icon = '<span aria-hidden="true" class="yoast-button-upsell__caret"></span>';
[83] Fix | Delete
$classes = '';
[84] Fix | Delete
if ( $popup ) {
[85] Fix | Delete
$classes = ' hidden';
[86] Fix | Delete
}
[87] Fix | Delete
$micro_copy = __( '1 year free support and updates included!', 'wordpress-seo' );
[88] Fix | Delete
[89] Fix | Delete
$popup = <<<EO_POPUP
[90] Fix | Delete
<div id="wpseo-{$this->identifier}-popup" class="wpseo-premium-popup wp-clearfix$classes">
[91] Fix | Delete
<img class="alignright wpseo-premium-popup-icon" src="{$assets_uri}packages/js/images/Yoast_SEO_Icon.svg" width="150" height="150" alt="Yoast SEO"/>
[92] Fix | Delete
<{$this->heading_level} id="wpseo-contact-support-popup-title" class="wpseo-premium-popup-title">{$this->title}</{$this->heading_level}>
[93] Fix | Delete
{$this->content}
[94] Fix | Delete
<a id="wpseo-{$this->identifier}-popup-button" class="yoast-button-upsell" href="{$this->url}" target="_blank">
[95] Fix | Delete
{$cta_text} {$new_tab_message} {$caret_icon}
[96] Fix | Delete
</a><br/>
[97] Fix | Delete
<small>{$micro_copy}</small>
[98] Fix | Delete
</div>
[99] Fix | Delete
EO_POPUP;
[100] Fix | Delete
[101] Fix | Delete
return $popup;
[102] Fix | Delete
}
[103] Fix | Delete
}
[104] Fix | Delete
[105] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function