Edit File by line
/home/barbar84/www/wp-conte.../plugins/wordpres.../src
File: main.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\Lib\Abstract_Main;
[4] Fix | Delete
use Yoast\WP\SEO\Dependency_Injection\Container_Compiler;
[5] Fix | Delete
use Yoast\WP\SEO\Generated\Cached_Container;
[6] Fix | Delete
use Yoast\WP\SEO\Surfaces\Classes_Surface;
[7] Fix | Delete
use Yoast\WP\SEO\Surfaces\Helpers_Surface;
[8] Fix | Delete
use Yoast\WP\SEO\Surfaces\Meta_Surface;
[9] Fix | Delete
[10] Fix | Delete
if ( ! \defined( 'WPSEO_VERSION' ) ) {
[11] Fix | Delete
\header( 'Status: 403 Forbidden' );
[12] Fix | Delete
\header( 'HTTP/1.1 403 Forbidden' );
[13] Fix | Delete
exit();
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* Class Main.
[18] Fix | Delete
*
[19] Fix | Delete
* @property Classes_Surface $classes The classes surface.
[20] Fix | Delete
* @property Meta_Surface $meta The meta surface.
[21] Fix | Delete
* @property Helpers_Surface $helpers The helpers surface.
[22] Fix | Delete
*/
[23] Fix | Delete
class Main extends Abstract_Main {
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* The API namespace constant.
[27] Fix | Delete
*
[28] Fix | Delete
* @var string
[29] Fix | Delete
*/
[30] Fix | Delete
const API_V1_NAMESPACE = 'yoast/v1';
[31] Fix | Delete
[32] Fix | Delete
/**
[33] Fix | Delete
* The WP CLI namespace constant.
[34] Fix | Delete
*
[35] Fix | Delete
* @var string
[36] Fix | Delete
*/
[37] Fix | Delete
const WP_CLI_NAMESPACE = 'yoast';
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* {@inheritDoc}
[41] Fix | Delete
*/
[42] Fix | Delete
protected function get_container() {
[43] Fix | Delete
if ( $this->is_development() && \class_exists( '\Yoast\WP\SEO\Dependency_Injection\Container_Compiler' ) ) {
[44] Fix | Delete
// Exception here is unhandled as it will only occur in development.
[45] Fix | Delete
Container_Compiler::compile(
[46] Fix | Delete
$this->is_development(),
[47] Fix | Delete
__DIR__ . '/generated/container.php',
[48] Fix | Delete
__DIR__ . '/../config/dependency-injection/services.php',
[49] Fix | Delete
__DIR__ . '/../vendor/composer/autoload_classmap.php',
[50] Fix | Delete
'Yoast\WP\SEO\Generated'
[51] Fix | Delete
);
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
if ( \file_exists( __DIR__ . '/generated/container.php' ) ) {
[55] Fix | Delete
require_once __DIR__ . '/generated/container.php';
[56] Fix | Delete
[57] Fix | Delete
return new Cached_Container();
[58] Fix | Delete
}
[59] Fix | Delete
[60] Fix | Delete
return null;
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
/**
[64] Fix | Delete
* {@inheritDoc}
[65] Fix | Delete
*/
[66] Fix | Delete
protected function get_name() {
[67] Fix | Delete
return 'yoast-seo';
[68] Fix | Delete
}
[69] Fix | Delete
[70] Fix | Delete
/**
[71] Fix | Delete
* {@inheritDoc}
[72] Fix | Delete
*/
[73] Fix | Delete
protected function get_surfaces() {
[74] Fix | Delete
return [
[75] Fix | Delete
'classes' => Classes_Surface::class,
[76] Fix | Delete
'meta' => Meta_Surface::class,
[77] Fix | Delete
'helpers' => Helpers_Surface::class,
[78] Fix | Delete
];
[79] Fix | Delete
}
[80] Fix | Delete
}
[81] Fix | Delete
[82] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function