PluginProbe ʕ •ᴥ•ʔ
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 20.2.1
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v20.2.1
27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 19.1 19.10 19.11 19.12 19.13 19.14 19.2 19.3 19.4 19.5 19.5.1 19.6 19.6.1 19.7 19.7.1 19.7.2 19.8 19.9 20.0 20.1 20.10 20.11 20.12 20.13 20.2 20.2.1 20.3 20.4 20.5 20.6 20.7 20.8 20.9 21.0 21.1 21.2 21.3 21.4 21.5 21.6 21.7 21.8 21.8.1 21.9 21.9.1 22.0 22.1 22.2 22.3 22.4 22.5 22.6 22.7 22.8 22.9 23.0 23.1 23.2 23.3 23.4 23.5 23.6 23.7 23.8 23.9 24.0 24.1 24.2 24.3 24.4 24.5 24.6 24.7 24.8 24.8.1 24.9 25.0 25.1 25.2 25.3 25.3.1 25.4 25.5 25.6 25.7 25.8 25.9 26.0 26.1 26.1.1 26.2 26.3 26.4 26.5 26.6 26.7 26.8 26.9 27.0 27.1 27.1.1 27.2 27.3 27.4
wordpress-seo / src / main.php
wordpress-seo / src Last commit date
actions 3 years ago builders 3 years ago commands 3 years ago conditionals 3 years ago config 3 years ago context 3 years ago deprecated 3 years ago exceptions 3 years ago generated 3 years ago generators 3 years ago helpers 3 years ago initializers 3 years ago integrations 3 years ago loggers 5 years ago memoizers 3 years ago models 3 years ago presentations 3 years ago presenters 3 years ago repositories 3 years ago routes 3 years ago schema-templates 3 years ago services 3 years ago surfaces 3 years ago values 3 years ago wordpress 4 years ago wrappers 3 years ago functions.php 5 years ago loadable-interface.php 5 years ago loader.php 3 years ago main.php 5 years ago
main.php
83 lines
1 <?php
2
3 namespace Yoast\WP\SEO;
4
5 use Yoast\WP\Lib\Abstract_Main;
6 use Yoast\WP\SEO\Dependency_Injection\Container_Compiler;
7 use Yoast\WP\SEO\Generated\Cached_Container;
8 use Yoast\WP\SEO\Surfaces\Classes_Surface;
9 use Yoast\WP\SEO\Surfaces\Helpers_Surface;
10 use Yoast\WP\SEO\Surfaces\Meta_Surface;
11
12 if ( ! \defined( 'WPSEO_VERSION' ) ) {
13 \header( 'Status: 403 Forbidden' );
14 \header( 'HTTP/1.1 403 Forbidden' );
15 exit();
16 }
17
18 /**
19 * Class Main.
20 *
21 * @property Classes_Surface $classes The classes surface.
22 * @property Meta_Surface $meta The meta surface.
23 * @property Helpers_Surface $helpers The helpers surface.
24 */
25 class Main extends Abstract_Main {
26
27 /**
28 * The API namespace constant.
29 *
30 * @var string
31 */
32 const API_V1_NAMESPACE = 'yoast/v1';
33
34 /**
35 * The WP CLI namespace constant.
36 *
37 * @var string
38 */
39 const WP_CLI_NAMESPACE = 'yoast';
40
41 /**
42 * {@inheritDoc}
43 */
44 protected function get_container() {
45 if ( $this->is_development() && \class_exists( '\Yoast\WP\SEO\Dependency_Injection\Container_Compiler' ) ) {
46 // Exception here is unhandled as it will only occur in development.
47 Container_Compiler::compile(
48 $this->is_development(),
49 __DIR__ . '/generated/container.php',
50 __DIR__ . '/../config/dependency-injection/services.php',
51 __DIR__ . '/../vendor/composer/autoload_classmap.php',
52 'Yoast\WP\SEO\Generated'
53 );
54 }
55
56 if ( \file_exists( __DIR__ . '/generated/container.php' ) ) {
57 require_once __DIR__ . '/generated/container.php';
58
59 return new Cached_Container();
60 }
61
62 return null;
63 }
64
65 /**
66 * {@inheritDoc}
67 */
68 protected function get_name() {
69 return 'yoast-seo';
70 }
71
72 /**
73 * {@inheritDoc}
74 */
75 protected function get_surfaces() {
76 return [
77 'classes' => Classes_Surface::class,
78 'meta' => Meta_Surface::class,
79 'helpers' => Helpers_Surface::class,
80 ];
81 }
82 }
83