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-user-profile.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Admin
[4] Fix | Delete
* @since 1.8.0
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
/**
[8] Fix | Delete
* Customizes user profile.
[9] Fix | Delete
*/
[10] Fix | Delete
class WPSEO_Admin_User_Profile {
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* Class constructor.
[14] Fix | Delete
*/
[15] Fix | Delete
public function __construct() {
[16] Fix | Delete
add_action( 'show_user_profile', [ $this, 'user_profile' ] );
[17] Fix | Delete
add_action( 'edit_user_profile', [ $this, 'user_profile' ] );
[18] Fix | Delete
[19] Fix | Delete
add_action( 'update_user_meta', [ $this, 'clear_author_sitemap_cache' ], 10, 3 );
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
/**
[23] Fix | Delete
* Clear author sitemap cache when settings are changed.
[24] Fix | Delete
*
[25] Fix | Delete
* @since 3.1
[26] Fix | Delete
*
[27] Fix | Delete
* @param int $meta_id The ID of the meta option changed.
[28] Fix | Delete
* @param int $object_id The ID of the user.
[29] Fix | Delete
* @param string $meta_key The key of the meta field changed.
[30] Fix | Delete
*
[31] Fix | Delete
* @return void
[32] Fix | Delete
*/
[33] Fix | Delete
public function clear_author_sitemap_cache( $meta_id, $object_id, $meta_key ) {
[34] Fix | Delete
if ( $meta_key === '_yoast_wpseo_profile_updated' ) {
[35] Fix | Delete
WPSEO_Sitemaps_Cache::clear( [ 'author' ] );
[36] Fix | Delete
}
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* Updates the user metas that (might) have been set on the user profile page.
[41] Fix | Delete
*
[42] Fix | Delete
* @deprecated 22.6
[43] Fix | Delete
* @codeCoverageIgnore
[44] Fix | Delete
*
[45] Fix | Delete
* @param int $user_id User ID of the updated user.
[46] Fix | Delete
*
[47] Fix | Delete
* @return void
[48] Fix | Delete
*/
[49] Fix | Delete
public function process_user_option_update( $user_id ) {
[50] Fix | Delete
_deprecated_function( __METHOD__, 'Yoast SEO 22.6' );
[51] Fix | Delete
[52] Fix | Delete
update_user_meta( $user_id, '_yoast_wpseo_profile_updated', time() );
[53] Fix | Delete
[54] Fix | Delete
if ( ! check_admin_referer( 'wpseo_user_profile_update', 'wpseo_nonce' ) ) {
[55] Fix | Delete
return;
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
$wpseo_author_title = isset( $_POST['wpseo_author_title'] ) ? sanitize_text_field( wp_unslash( $_POST['wpseo_author_title'] ) ) : '';
[59] Fix | Delete
$wpseo_author_metadesc = isset( $_POST['wpseo_author_metadesc'] ) ? sanitize_text_field( wp_unslash( $_POST['wpseo_author_metadesc'] ) ) : '';
[60] Fix | Delete
$wpseo_noindex_author = isset( $_POST['wpseo_noindex_author'] ) ? sanitize_text_field( wp_unslash( $_POST['wpseo_noindex_author'] ) ) : '';
[61] Fix | Delete
$wpseo_content_analysis_disable = isset( $_POST['wpseo_content_analysis_disable'] ) ? sanitize_text_field( wp_unslash( $_POST['wpseo_content_analysis_disable'] ) ) : '';
[62] Fix | Delete
$wpseo_keyword_analysis_disable = isset( $_POST['wpseo_keyword_analysis_disable'] ) ? sanitize_text_field( wp_unslash( $_POST['wpseo_keyword_analysis_disable'] ) ) : '';
[63] Fix | Delete
$wpseo_inclusive_language_analysis_disable = isset( $_POST['wpseo_inclusive_language_analysis_disable'] ) ? sanitize_text_field( wp_unslash( $_POST['wpseo_inclusive_language_analysis_disable'] ) ) : '';
[64] Fix | Delete
[65] Fix | Delete
update_user_meta( $user_id, 'wpseo_title', $wpseo_author_title );
[66] Fix | Delete
update_user_meta( $user_id, 'wpseo_metadesc', $wpseo_author_metadesc );
[67] Fix | Delete
update_user_meta( $user_id, 'wpseo_noindex_author', $wpseo_noindex_author );
[68] Fix | Delete
update_user_meta( $user_id, 'wpseo_content_analysis_disable', $wpseo_content_analysis_disable );
[69] Fix | Delete
update_user_meta( $user_id, 'wpseo_keyword_analysis_disable', $wpseo_keyword_analysis_disable );
[70] Fix | Delete
update_user_meta( $user_id, 'wpseo_inclusive_language_analysis_disable', $wpseo_inclusive_language_analysis_disable );
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
/**
[74] Fix | Delete
* Add the inputs needed for SEO values to the User Profile page.
[75] Fix | Delete
*
[76] Fix | Delete
* @param WP_User $user User instance to output for.
[77] Fix | Delete
*
[78] Fix | Delete
* @return void
[79] Fix | Delete
*/
[80] Fix | Delete
public function user_profile( $user ) {
[81] Fix | Delete
wp_nonce_field( 'wpseo_user_profile_update', 'wpseo_nonce' );
[82] Fix | Delete
[83] Fix | Delete
require_once WPSEO_PATH . 'admin/views/user-profile.php';
[84] Fix | Delete
}
[85] Fix | Delete
}
[86] Fix | Delete
[87] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function