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/wp-conte.../plugins/wordpres.../admin/views/tabs/network
File: features.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Admin\Views
[4] Fix | Delete
*
[5] Fix | Delete
* @uses Yoast_Form $yform Form object.
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
use Yoast\WP\SEO\Presenters\Admin\Beta_Badge_Presenter;
[9] Fix | Delete
use Yoast\WP\SEO\Presenters\Admin\Premium_Badge_Presenter;
[10] Fix | Delete
[11] Fix | Delete
if ( ! defined( 'WPSEO_VERSION' ) ) {
[12] Fix | Delete
header( 'Status: 403 Forbidden' );
[13] Fix | Delete
header( 'HTTP/1.1 403 Forbidden' );
[14] Fix | Delete
exit();
[15] Fix | Delete
}
[16] Fix | Delete
[17] Fix | Delete
$feature_toggles = Yoast_Feature_Toggles::instance()->get_all();
[18] Fix | Delete
[19] Fix | Delete
?>
[20] Fix | Delete
<h2><?php esc_html_e( 'Features', 'wordpress-seo' ); ?></h2>
[21] Fix | Delete
<div class="yoast-measure">
[22] Fix | Delete
<?php
[23] Fix | Delete
printf(
[24] Fix | Delete
/* translators: %s expands to Yoast SEO */
[25] Fix | Delete
esc_html__( 'This tab allows you to selectively disable %s features for all sites in the network. By default all features are enabled, which allows site admins to choose for themselves if they want to toggle a feature on or off for their site. When you disable a feature here, site admins will not be able to use that feature at all.', 'wordpress-seo' ),
[26] Fix | Delete
'Yoast SEO'
[27] Fix | Delete
);
[28] Fix | Delete
[29] Fix | Delete
foreach ( $feature_toggles as $feature ) {
[30] Fix | Delete
$is_premium = YoastSEO()->helpers->product->is_premium();
[31] Fix | Delete
$premium_version = YoastSEO()->helpers->product->get_premium_version();
[32] Fix | Delete
[33] Fix | Delete
if ( $feature->premium && $feature->premium_version ) {
[34] Fix | Delete
$not_supported_in_current_premium_version = $is_premium && version_compare( $premium_version, $feature->premium_version, '<' );
[35] Fix | Delete
[36] Fix | Delete
if ( $not_supported_in_current_premium_version ) {
[37] Fix | Delete
continue;
[38] Fix | Delete
}
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
$help_text = esc_html( $feature->label );
[42] Fix | Delete
if ( ! empty( $feature->extra ) ) {
[43] Fix | Delete
$help_text .= ' ' . $feature->extra;
[44] Fix | Delete
}
[45] Fix | Delete
if ( ! empty( $feature->read_more_label ) ) {
[46] Fix | Delete
$url = $feature->read_more_url;
[47] Fix | Delete
if ( ! empty( $feature->premium ) && $feature->premium === true ) {
[48] Fix | Delete
$url = $feature->premium_url;
[49] Fix | Delete
}
[50] Fix | Delete
$help_text .= sprintf(
[51] Fix | Delete
'<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s</a>',
[52] Fix | Delete
esc_url( WPSEO_Shortlinker::get( $url ) ),
[53] Fix | Delete
esc_html( $feature->read_more_label )
[54] Fix | Delete
);
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
$feature_help = new WPSEO_Admin_Help_Panel(
[58] Fix | Delete
WPSEO_Option::ALLOW_KEY_PREFIX . $feature->setting,
[59] Fix | Delete
/* translators: Hidden accessibility text; %s expands to a feature's name. */
[60] Fix | Delete
sprintf( esc_html__( 'Help on: %s', 'wordpress-seo' ), esc_html( $feature->name ) ),
[61] Fix | Delete
$help_text
[62] Fix | Delete
);
[63] Fix | Delete
[64] Fix | Delete
$name = $feature->name;
[65] Fix | Delete
if ( ! empty( $feature->premium ) && $feature->premium === true ) {
[66] Fix | Delete
$name .= ' ' . new Premium_Badge_Presenter( $feature->name );
[67] Fix | Delete
}
[68] Fix | Delete
[69] Fix | Delete
if ( ! empty( $feature->in_beta ) && $feature->in_beta === true ) {
[70] Fix | Delete
$name .= ' ' . new Beta_Badge_Presenter( $feature->name );
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
$disabled = false;
[74] Fix | Delete
$show_premium_upsell = false;
[75] Fix | Delete
$premium_upsell_url = '';
[76] Fix | Delete
$note_when_disabled = '';
[77] Fix | Delete
[78] Fix | Delete
if ( $feature->premium === true && YoastSEO()->helpers->product->is_premium() === false ) {
[79] Fix | Delete
$disabled = true;
[80] Fix | Delete
$show_premium_upsell = true;
[81] Fix | Delete
$premium_upsell_url = WPSEO_Shortlinker::get( $feature->premium_upsell_url );
[82] Fix | Delete
}
[83] Fix | Delete
[84] Fix | Delete
$preserve_disabled_value = false;
[85] Fix | Delete
if ( $disabled ) {
[86] Fix | Delete
$preserve_disabled_value = true;
[87] Fix | Delete
}
[88] Fix | Delete
[89] Fix | Delete
$yform->toggle_switch(
[90] Fix | Delete
WPSEO_Option::ALLOW_KEY_PREFIX . $feature->setting,
[91] Fix | Delete
[
[92] Fix | Delete
'on' => __( 'Allow Control', 'wordpress-seo' ),
[93] Fix | Delete
'off' => __( 'Disable', 'wordpress-seo' ),
[94] Fix | Delete
],
[95] Fix | Delete
$name,
[96] Fix | Delete
$feature_help->get_button_html() . $feature_help->get_panel_html(),
[97] Fix | Delete
[
[98] Fix | Delete
'disabled' => $disabled,
[99] Fix | Delete
'preserve_disabled_value' => $preserve_disabled_value,
[100] Fix | Delete
'show_premium_upsell' => $show_premium_upsell,
[101] Fix | Delete
'premium_upsell_url' => $premium_upsell_url,
[102] Fix | Delete
'note_when_disabled' => $note_when_disabled,
[103] Fix | Delete
]
[104] Fix | Delete
);
[105] Fix | Delete
}
[106] Fix | Delete
?>
[107] Fix | Delete
</div>
[108] Fix | Delete
<?php
[109] Fix | Delete
/*
[110] Fix | Delete
* Required to prevent our settings framework from saving the default because the field
[111] Fix | Delete
* isn't explicitly set when saving the Dashboard page.
[112] Fix | Delete
*/
[113] Fix | Delete
$yform->hidden( 'show_onboarding_notice', 'wpseo_show_onboarding_notice' );
[114] Fix | Delete
[115] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function