403Webshell
Server IP : 14.225.204.176  /  Your IP : 216.73.216.169
Web Server : nginx/1.24.0
System : Linux nodejs-ybgk 6.8.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 x86_64
User : root ( 0)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/html/php/langngon.com/wp-content/plugins/wordpress-seo/admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/php/langngon.com/wp-content/plugins/wordpress-seo/admin/class-admin-user-profile.php
<?php
/**
 * @package WPSEO\Admin
 * @since      1.8.0
 */

/**
 * Customizes user profile.
 */
class WPSEO_Admin_User_Profile {
	/**
	 * Class constructor
	 */
	public function __construct() {
		add_action( 'show_user_profile', array( $this, 'user_profile' ) );
		add_action( 'edit_user_profile', array( $this, 'user_profile' ) );
		add_action( 'personal_options_update', array( $this, 'process_user_option_update' ) );
		add_action( 'edit_user_profile_update', array( $this, 'process_user_option_update' ) );

		add_action( 'update_user_meta', array( $this, 'clear_author_sitemap_cache' ), 10, 3 );
	}

	/**
	 * Clear author sitemap cache when settings are changed
	 *
	 * @since 3.1
	 *
	 * @param int    $meta_id The ID of the meta option changed.
	 * @param int    $object_id The ID of the user.
	 * @param string $meta_key The key of the meta field changed.
	 */
	public function clear_author_sitemap_cache( $meta_id, $object_id, $meta_key ) {
		if ( '_yoast_wpseo_profile_updated' === $meta_key ) {
			WPSEO_Utils::clear_sitemap_cache( array( 'author' ) );
		}
	}

	/**
	 * Filter POST variables.
	 *
	 * @param string $var_name Name of the variable to filter.
	 *
	 * @return mixed
	 */
	private function filter_input_post( $var_name ) {
		$val = filter_input( INPUT_POST, $var_name );
		if ( $val ) {
			return WPSEO_Utils::sanitize_text_field( $val );
		}
		return '';
	}

	/**
	 * Updates the user metas that (might) have been set on the user profile page.
	 *
	 * @param    int $user_id of the updated user.
	 */
	public function process_user_option_update( $user_id ) {
		update_user_meta( $user_id, '_yoast_wpseo_profile_updated', time() );

		$nonce_value = $this->filter_input_post( 'wpseo_nonce' );

		if ( empty( $nonce_value ) ) { // Submit from alternate forms.
			return;
		}

		check_admin_referer( 'wpseo_user_profile_update', 'wpseo_nonce' );

		update_user_meta( $user_id, 'wpseo_title', $this->filter_input_post( 'wpseo_author_title' ) );
		update_user_meta( $user_id, 'wpseo_metadesc', $this->filter_input_post( 'wpseo_author_metadesc' ) );
		update_user_meta( $user_id, 'wpseo_metakey', $this->filter_input_post( 'wpseo_author_metakey' ) );
		update_user_meta( $user_id, 'wpseo_excludeauthorsitemap', $this->filter_input_post( 'wpseo_author_exclude' ) );
		update_user_meta( $user_id, 'wpseo_content_analysis_disable', $this->filter_input_post( 'wpseo_content_analysis_disable' ) );
		update_user_meta( $user_id, 'wpseo_keyword_analysis_disable', $this->filter_input_post( 'wpseo_keyword_analysis_disable' ) );
	}

	/**
	 * Add the inputs needed for SEO values to the User Profile page
	 *
	 * @param WP_User $user User instance to output for.
	 */
	public function user_profile( $user ) {
		$options = WPSEO_Options::get_option( 'wpseo_titles' );

		wp_nonce_field( 'wpseo_user_profile_update', 'wpseo_nonce' );

		require_once( 'views/user-profile.php' );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit