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/clone/wp-conte.../plugins/wordpres.../src/values/open-gra...
File: images.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Values\Open_Graph;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Helpers\Open_Graph\Image_Helper as Open_Graph_Image_Helper;
[4] Fix | Delete
use Yoast\WP\SEO\Values\Images as Base_Images;
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* Value object for the Open Graph Images.
[8] Fix | Delete
*/
[9] Fix | Delete
class Images extends Base_Images {
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* The Open Graph image helper.
[13] Fix | Delete
*
[14] Fix | Delete
* @var Open_Graph_Image_Helper
[15] Fix | Delete
*/
[16] Fix | Delete
protected $open_graph_image;
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* Sets the helpers.
[20] Fix | Delete
*
[21] Fix | Delete
* @required
[22] Fix | Delete
*
[23] Fix | Delete
* @codeCoverageIgnore - Is handled by DI-container.
[24] Fix | Delete
*
[25] Fix | Delete
* @param Open_Graph_Image_Helper $open_graph_image Image helper for Open Graph.
[26] Fix | Delete
*
[27] Fix | Delete
* @return void
[28] Fix | Delete
*/
[29] Fix | Delete
public function set_helpers( Open_Graph_Image_Helper $open_graph_image ) {
[30] Fix | Delete
$this->open_graph_image = $open_graph_image;
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
/**
[34] Fix | Delete
* Outputs the images.
[35] Fix | Delete
*
[36] Fix | Delete
* @codeCoverageIgnore - The method is empty, nothing to test.
[37] Fix | Delete
*
[38] Fix | Delete
* @return void
[39] Fix | Delete
*/
[40] Fix | Delete
public function show() {}
[41] Fix | Delete
[42] Fix | Delete
/**
[43] Fix | Delete
* Adds an image to the list by image ID.
[44] Fix | Delete
*
[45] Fix | Delete
* @param int $image_id The image ID to add.
[46] Fix | Delete
*
[47] Fix | Delete
* @return void
[48] Fix | Delete
*/
[49] Fix | Delete
public function add_image_by_id( $image_id ) {
[50] Fix | Delete
$attachment = $this->open_graph_image->get_image_by_id( $image_id );
[51] Fix | Delete
[52] Fix | Delete
if ( $attachment ) {
[53] Fix | Delete
$this->add_image( $attachment );
[54] Fix | Delete
}
[55] Fix | Delete
}
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function