mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-04 10:05:43 +03:00
Tools: Add formatting command, run to fix minor phpcs issues
This commit is contained in:
parent
28b102bc4c
commit
bb25e0c78b
13 changed files with 55 additions and 53 deletions
|
@ -15,8 +15,9 @@
|
||||||
"build:theme": "npm run build --workspace=wporg-5ftf",
|
"build:theme": "npm run build --workspace=wporg-5ftf",
|
||||||
"start:theme": "npm run watch --workspace=wporg-5ftf",
|
"start:theme": "npm run watch --workspace=wporg-5ftf",
|
||||||
"update:tools": "composer update && TEXTDOMAIN=wporg-5ftf composer exec update-configs",
|
"update:tools": "composer update && TEXTDOMAIN=wporg-5ftf composer exec update-configs",
|
||||||
|
"wp-env": "wp-env",
|
||||||
"lint:php": "composer lint ./themes/wporg-5ftf ./plugins/wporg-5ftf",
|
"lint:php": "composer lint ./themes/wporg-5ftf ./plugins/wporg-5ftf",
|
||||||
"wp-env": "wp-env"
|
"format:php": "composer format ./themes/wporg-5ftf ./plugins/wporg-5ftf",
|
||||||
},
|
},
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"themes/wporg-5ftf",
|
"themes/wporg-5ftf",
|
||||||
|
|
|
@ -181,4 +181,3 @@ function can_manage_pledge( $requested_pledge_id, $auth_token = '' ) {
|
||||||
__( 'Your link has expired.', 'wporg-5ftf' )
|
__( 'Your link has expired.', 'wporg-5ftf' )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,9 +171,9 @@ function get_snapshot_data() {
|
||||||
|
|
||||||
if ( Contributor\is_active( $user['last_logged_in'] ) ) {
|
if ( Contributor\is_active( $user['last_logged_in'] ) ) {
|
||||||
if ( $is_company_sponsored ) {
|
if ( $is_company_sponsored ) {
|
||||||
$active_company_sponsored_contributors++;
|
++$active_company_sponsored_contributors;
|
||||||
} else {
|
} else {
|
||||||
$active_self_sponsored_contributors++;
|
++$active_self_sponsored_contributors;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$snapshot_data['inactive_contributor_ids'][] = $user['user_id'];
|
$snapshot_data['inactive_contributor_ids'][] = $user['user_id'];
|
||||||
|
@ -185,7 +185,7 @@ function get_snapshot_data() {
|
||||||
|
|
||||||
foreach ( $user['team_names'] as $team ) {
|
foreach ( $user['team_names'] as $team ) {
|
||||||
if ( isset( $snapshot_data[ $team_contributor_key ][ $team ] ) ) {
|
if ( isset( $snapshot_data[ $team_contributor_key ][ $team ] ) ) {
|
||||||
$snapshot_data[ $team_contributor_key ][ $team ] ++;
|
++$snapshot_data[ $team_contributor_key ][ $team ];
|
||||||
} else {
|
} else {
|
||||||
$snapshot_data[ $team_contributor_key ][ $team ] = 1;
|
$snapshot_data[ $team_contributor_key ][ $team ] = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,9 +21,11 @@ require_once $_tests_dir . '/includes/functions.php';
|
||||||
* Manually load the plugin being tested.
|
* Manually load the plugin being tested.
|
||||||
*/
|
*/
|
||||||
function _manually_load_plugin() {
|
function _manually_load_plugin() {
|
||||||
|
if ( ! defined( 'WPORG_SUPPORT_FORUMS_BLOGID' ) ) {
|
||||||
define( 'WPORG_SUPPORT_FORUMS_BLOGID', 1 );
|
define( 'WPORG_SUPPORT_FORUMS_BLOGID', 1 );
|
||||||
|
}
|
||||||
|
|
||||||
require dirname( __FILE__, 2 ) . '/index.php';
|
require dirname( __DIR__, 1 ) . '/index.php';
|
||||||
require __DIR__ . '/helpers.php';
|
require __DIR__ . '/helpers.php';
|
||||||
}
|
}
|
||||||
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue