Add stub for bump_stats_extra().

This commit is contained in:
Ian Dunn 2022-07-28 09:23:23 -07:00
parent ce43d6952a
commit cdd7e0b383
No known key found for this signature in database
GPG key ID: 99B971B50343CBCB
3 changed files with 17 additions and 0 deletions

15
.env/0-sandbox.php Normal file
View file

@ -0,0 +1,15 @@
<?php
/*
* These are stubs for closed source code, or things that only apply to local environments.
*/
namespace {
defined( 'WPINC' ) || die();
/**
* Stub.
*/
function bump_stats_extra( $name, $value, $views = 1 ) {
}
}

1
.gitignore vendored
View file

@ -2,6 +2,7 @@
*.js.map
mu-plugins/vendor
mu-plugins/0-sandbox.php
node_modules
plugins/*

View file

@ -17,6 +17,7 @@ In order to contribute with code changes, you'll want to set up a local environm
1. Run `git clone git@github.com:[your username]/five-for-the-future.git wp-content`, replacing `[your username]` with your github username to clone your forked repo.
1. Ensure this newly cloned `wp-content` folder is where it should be in the WP structure.
1. Copy over the base theme with: `svn export https://meta.svn.wordpress.org/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg themes/pub/wporg` (this should be run from the `wp-content` folder).
1. Install the sandbox mu-plugin with `cd wp-content && mkdir mu-plugins && ln -s .env/0-sandbox.php mu-plugins/0-sandbox.php`
1. If you are making changes to the plugins, you can run `composer install` at `/wp-content/plugins/wporg-5ftf` and then `composer run test` to run the WP unit tests.
### Configuring the site