Edit File by line
/home/barbar84/www/wp-conte.../plugins/wordpres.../src/helpers/schema
File: id-helper.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Helpers\Schema;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Config\Schema_IDs;
[4] Fix | Delete
use Yoast\WP\SEO\Context\Meta_Tags_Context;
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Schema utility functions.
[8] Fix | Delete
*/
[9] Fix | Delete
class ID_Helper {
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* Retrieve a users Schema ID.
[13] Fix | Delete
*
[14] Fix | Delete
* @param int $user_id The ID of the User you need a Schema ID for.
[15] Fix | Delete
* @param Meta_Tags_Context $context A value object with context variables.
[16] Fix | Delete
*
[17] Fix | Delete
* @return string The user's schema ID.
[18] Fix | Delete
*/
[19] Fix | Delete
public function get_user_schema_id( $user_id, $context ) {
[20] Fix | Delete
$user = \get_userdata( $user_id );
[21] Fix | Delete
if ( \is_a( $user, 'WP_User' ) ) {
[22] Fix | Delete
return $context->site_url . Schema_IDs::PERSON_HASH . \wp_hash( $user->user_login . $user_id );
[23] Fix | Delete
}
[24] Fix | Delete
[25] Fix | Delete
return '';
[26] Fix | Delete
}
[27] Fix | Delete
}
[28] Fix | Delete
[29] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function