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.../public_h.../wp-conte.../plugins/wordpres.../admin
File: class-admin-utils.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
* Represents the utils for the admin.
[8] Fix | Delete
*/
[9] Fix | Delete
class WPSEO_Admin_Utils {
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* Gets the install URL for the passed plugin slug.
[13] Fix | Delete
*
[14] Fix | Delete
* @param string $slug The slug to create an install link for.
[15] Fix | Delete
*
[16] Fix | Delete
* @return string The install URL. Empty string if the current user doesn't have the proper capabilities.
[17] Fix | Delete
*/
[18] Fix | Delete
public static function get_install_url( $slug ) {
[19] Fix | Delete
if ( ! current_user_can( 'install_plugins' ) ) {
[20] Fix | Delete
return '';
[21] Fix | Delete
}
[22] Fix | Delete
[23] Fix | Delete
return wp_nonce_url(
[24] Fix | Delete
self_admin_url( 'update.php?action=install-plugin&plugin=' . dirname( $slug ) ),
[25] Fix | Delete
'install-plugin_' . dirname( $slug )
[26] Fix | Delete
);
[27] Fix | Delete
}
[28] Fix | Delete
[29] Fix | Delete
/**
[30] Fix | Delete
* Gets the activation URL for the passed plugin slug.
[31] Fix | Delete
*
[32] Fix | Delete
* @param string $slug The slug to create an activation link for.
[33] Fix | Delete
*
[34] Fix | Delete
* @return string The activation URL. Empty string if the current user doesn't have the proper capabilities.
[35] Fix | Delete
*/
[36] Fix | Delete
public static function get_activation_url( $slug ) {
[37] Fix | Delete
if ( ! current_user_can( 'install_plugins' ) ) {
[38] Fix | Delete
return '';
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
return wp_nonce_url(
[42] Fix | Delete
self_admin_url( 'plugins.php?action=activate&plugin_status=all&paged=1&s&plugin=' . $slug ),
[43] Fix | Delete
'activate-plugin_' . $slug
[44] Fix | Delete
);
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
/**
[48] Fix | Delete
* Creates a link if the passed plugin is deemend a directly-installable plugin.
[49] Fix | Delete
*
[50] Fix | Delete
* @param array $plugin The plugin to create the link for.
[51] Fix | Delete
*
[52] Fix | Delete
* @return string The link to the plugin install. Returns the title if the plugin is deemed a Premium product.
[53] Fix | Delete
*/
[54] Fix | Delete
public static function get_install_link( $plugin ) {
[55] Fix | Delete
$install_url = self::get_install_url( $plugin['slug'] );
[56] Fix | Delete
[57] Fix | Delete
if ( $install_url === '' || ( isset( $plugin['premium'] ) && $plugin['premium'] === true ) ) {
[58] Fix | Delete
return $plugin['title'];
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
return sprintf(
[62] Fix | Delete
'<a href="%s">%s</a>',
[63] Fix | Delete
$install_url,
[64] Fix | Delete
$plugin['title']
[65] Fix | Delete
);
[66] Fix | Delete
}
[67] Fix | Delete
[68] Fix | Delete
/**
[69] Fix | Delete
* Gets a visually hidden accessible message for links that open in a new browser tab.
[70] Fix | Delete
*
[71] Fix | Delete
* @return string The visually hidden accessible message.
[72] Fix | Delete
*/
[73] Fix | Delete
public static function get_new_tab_message() {
[74] Fix | Delete
return sprintf(
[75] Fix | Delete
'<span class="screen-reader-text">%s</span>',
[76] Fix | Delete
/* translators: Hidden accessibility text. */
[77] Fix | Delete
esc_html__( '(Opens in a new browser tab)', 'wordpress-seo' )
[78] Fix | Delete
);
[79] Fix | Delete
}
[80] Fix | Delete
}
[81] Fix | Delete
[82] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function