FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
wordpress-develop/src/index.php at trunk · mauteri/wordpress-develop · GitHub
mauteri
/
wordpress-develop
Public
forked from
WordPress/wordpress-develop
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
wordpress-develop
/
src
/
index.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
67 lines (54 loc) · 2.37 KB
Breadcrumbs
wordpress-develop
/
src
/
index.php
Copy path
File metadata and controls
67 lines (54 loc) · 2.37 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
/**
* Note: this file exists only to remind developers to build the assets.
* For the real index.php that gets built and boots WordPress,
* please refer to _index.php.
*/
/** Define ABSPATH as this file's directory */
if
( !
defined
(
'
ABSPATH
'
) ) {
define
(
'
ABSPATH
'
,
__DIR__
.
'
/
'
);
}
/*
* Load the actual index.php file if the assets were already built.
* Note: WPINC is not defined yet, it is defined later in wp-settings.php.
*/
if
(
file_exists
(
ABSPATH
.
'
wp-includes/js/jquery/jquery.js
'
) &&
is_dir
(
ABSPATH
.
'
wp-includes/build
'
) ) {
require_once
ABSPATH
.
'
_index.php
'
;
return
;
}
define
(
'
WPINC
'
,
'
wp-includes
'
);
require_once
ABSPATH
.
WPINC
.
'
/version.php
'
;
require_once
ABSPATH
.
WPINC
.
'
/compat.php
'
;
require_once
ABSPATH
.
WPINC
.
'
/load.php
'
;
// Check for the required PHP version and for the MySQL extension or a database drop-in.
wp_check_php_mysql_versions
();
// Standardize $_SERVER variables across setups.
wp_fix_server_vars
();
define
(
'
WP_CONTENT_DIR
'
,
ABSPATH
.
'
wp-content
'
);
require_once
ABSPATH
.
WPINC
.
'
/functions.php
'
;
wp_load_translations_early
();
// Die with an error message.
$
die
=
sprintf
(
'
<p>%s</p>
'
,
__
(
'
You are running WordPress without JavaScript and CSS files. These need to be built.
'
)
);
$
die
.=
'
<p>
'
.
sprintf
(
/* translators: %s: npm install */
__
(
'
Before running any build tasks you need to make sure the dependencies are installed. You can install these by running %s.
'
),
'
<code style="color: green;">npm install</code>
'
) .
'
</p>
'
;
$
die
.=
'
<ul>
'
;
$
die
.=
'
<li>
'
.
__
(
'
To build WordPress while developing, run:
'
) .
'
<br /><br />
'
;
$
die
.=
'
<code style="color: green;">npm run dev</code></li>
'
;
$
die
.=
'
<li>
'
.
__
(
'
To build files automatically when changing the source files, run:
'
) .
'
<br /><br />
'
;
$
die
.=
'
<code style="color: green;">npm run watch</code></li>
'
;
$
die
.=
'
<li>
'
.
__
(
'
To create a production build of WordPress, run:
'
) .
'
<br /><br />
'
;
$
die
.=
'
<code style="color: green;">npm run build</code></li>
'
;
$
die
.=
'
</ul>
'
;
$
die
.=
'
<p>
'
.
sprintf
(
/* translators: 1: npm URL, 2: Handbook URL. */
__
(
'
This requires <a href="%1$s">npm</a>. <a href="%2$s">Learn more about setting up your local development environment</a>.
'
),
'
https://www.npmjs.com/get-npm
'
,
__
(
'
https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/
'
)
) .
'
</p>
'
;
wp_die
(
$
die
,
__
(
'
WordPress › Error
'
) );
Back
|
FazBrowse Home
|
New Git URL