mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues. This change includes three notable additions: - Multiline function calls must now put each parameter on a new line. - Auto-formatting files is now part of the `grunt precommit` script. - Auto-fixable coding standards issues will now cause Travis failures. Fixes #44600. git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
50 lines
1.6 KiB
PHP
50 lines
1.6 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Note: this file exists only to remind developers to run WordPress from the
|
|
* build directory. 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', dirname( __FILE__ ) . '/' );
|
|
}
|
|
|
|
define( 'WPINC', 'wp-includes' );
|
|
require_once( ABSPATH . WPINC . '/load.php' );
|
|
|
|
// Standardize $_SERVER variables across setups.
|
|
wp_fix_server_vars();
|
|
|
|
require_once( ABSPATH . WPINC . '/functions.php' );
|
|
define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' );
|
|
require_once( ABSPATH . WPINC . '/version.php' );
|
|
|
|
wp_check_php_mysql_versions();
|
|
wp_load_translations_early();
|
|
|
|
// Die with an error message
|
|
$die = sprintf(
|
|
/* translators: %1$s: WordPress, %2$s: src, %3$s: build */
|
|
__( 'You seem to be running %1$s from the %2$s directory. %1$s needs to be built and run from the %3$s directory before we can get started.' ),
|
|
'WordPress',
|
|
'<code>src</code>',
|
|
'<code>build</code>'
|
|
) . '</p>';
|
|
$die .= '<p>' . sprintf(
|
|
/* translators: %s: WordPress */
|
|
__( 'You can build %s by running:' ),
|
|
'WordPress'
|
|
) . '</p>';
|
|
$die .= '<p><code>npm install && grunt build</code></p>';
|
|
$die .= '<p>' . sprintf(
|
|
/* translators: %1$s: NPM URL, %2$s: Grunt URL */
|
|
__( 'This requires <a href="%1$s">NPM</a> and <a href="%2$s">Grunt</a>. <a href="%3$s">Read more about setting up your local development environment</a>.' ),
|
|
'https://www.npmjs.com/',
|
|
'https://gruntjs.com/',
|
|
__( 'https://make.wordpress.org/core/handbook/tutorials/installing-wordpress-locally/' )
|
|
) . '</p>';
|
|
|
|
wp_die( $die, __( 'WordPress › Error' ) );
|