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.../src/helpers
File: permalink-helper.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Helpers;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Models\Indexable;
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* A helper object for permalinks.
[7] Fix | Delete
*/
[8] Fix | Delete
class Permalink_Helper {
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* Retrieves the permalink for an indexable.
[12] Fix | Delete
*
[13] Fix | Delete
* @param Indexable $indexable The indexable.
[14] Fix | Delete
*
[15] Fix | Delete
* @return string|null The permalink.
[16] Fix | Delete
*/
[17] Fix | Delete
public function get_permalink_for_indexable( $indexable ) {
[18] Fix | Delete
switch ( true ) {
[19] Fix | Delete
case $indexable->object_type === 'post':
[20] Fix | Delete
if ( $indexable->object_sub_type === 'attachment' ) {
[21] Fix | Delete
return \wp_get_attachment_url( $indexable->object_id );
[22] Fix | Delete
}
[23] Fix | Delete
return \get_permalink( $indexable->object_id );
[24] Fix | Delete
case $indexable->object_type === 'home-page':
[25] Fix | Delete
return \home_url( '/' );
[26] Fix | Delete
case $indexable->object_type === 'term':
[27] Fix | Delete
$term = \get_term( $indexable->object_id );
[28] Fix | Delete
[29] Fix | Delete
if ( $term === null || \is_wp_error( $term ) ) {
[30] Fix | Delete
return null;
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
return \get_term_link( $term, $term->taxonomy );
[34] Fix | Delete
case $indexable->object_type === 'system-page' && $indexable->object_sub_type === 'search-page':
[35] Fix | Delete
return \get_search_link();
[36] Fix | Delete
case $indexable->object_type === 'post-type-archive':
[37] Fix | Delete
return \get_post_type_archive_link( $indexable->object_sub_type );
[38] Fix | Delete
case $indexable->object_type === 'user':
[39] Fix | Delete
return \get_author_posts_url( $indexable->object_id );
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
return null;
[43] Fix | Delete
}
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function