diff --git a/bin/Handbook_Command.php b/bin/Handbook_Command.php index 66420041..c29f45a6 100644 --- a/bin/Handbook_Command.php +++ b/bin/Handbook_Command.php @@ -645,6 +645,15 @@ private static function gen_cmd_pages( $cmd, $parent = [], $verbose = false ) { } $docs = implode( "\n", $bits ); + // Decode HTML entities inside backticks. + $docs = preg_replace_callback( + '/`([^`]*)`/', + function ( $matches ) { + return '`' . html_entity_decode( $matches[1], ENT_QUOTES | ENT_HTML401 ) . '`'; + }, + $docs + ); + // Hack to prevent double encoding in code blocks. $docs = preg_replace( '/ < /', ' < ', $docs ); $docs = preg_replace( '/ > /', ' > ', $docs ); diff --git a/commands/config/list.md b/commands/config/list.md index 06fa8668..88d6d37c 100644 --- a/commands/config/list.md +++ b/commands/config/list.md @@ -61,8 +61,8 @@ options: +------------------+------------------------------------------------------------------+----------+ | key | value | type | +------------------+------------------------------------------------------------------+----------+ - | AUTH_SALT | n:]Xditk+_7>Qi=>BmtZHiH-6/Ecrvl(V5ceeGP:{>?;BT^=[B3-0>,~F5z$(+Q$ | constant | - | SECURE_AUTH_SALT | ?Z/p|XhDw3w}?c.z%|+BAr|(Iv*H%%U+Du&kKR y?cJOYyRVRBeB[2zF-`(>+LCC | constant | + | AUTH_SALT | n:]Xditk+_7>Qi=>BmtZHiH-6/Ecrvl(V5ceeGP:{>?;BT^=[B3-0>,~F5z$(+Q$ | constant | + | SECURE_AUTH_SALT | ?Z/p|XhDw3w}?c.z%|+BAr|(Iv*H%%U+Du&kKR y?cJOYyRVRBeB[2zF-`(>+LCC | constant | | LOGGED_IN_SALT | +$@(1{b~Z~s}Cs>8Y]6[m6~TnoCDpE>O%e75u}&6kUH!>q:7uM4lxbB6[1pa_X,q | constant | | NONCE_SALT | _x+F li|QL?0OSQns1_JZ{|Ix3Jleox-71km/gifnyz8kmo=w-;@AE8W,(fP<N}2 | constant | +------------------+------------------------------------------------------------------+----------+ diff --git a/commands/core/verify-checksums.md b/commands/core/verify-checksums.md index eeff247b..ecc3b665 100644 --- a/commands/core/verify-checksums.md +++ b/commands/core/verify-checksums.md @@ -8,7 +8,7 @@ Downloads md5 checksums for the current version from WordPress.org, and compares For security, avoids loading WordPress when verifying checksums. -If you experience issues verifying from this command, ensure you are passing the relevant `--locale` and `--version` arguments according to the values from the `Dashboard->Updates` menu in the admin area of the site. +If you experience issues verifying from this command, ensure you are passing the relevant `--locale` and `--version` arguments according to the values from the `Dashboard->Updates` menu in the admin area of the site. ### OPTIONS diff --git a/commands/find.md b/commands/find.md index 520c7b7c..8f8152bb 100644 --- a/commands/find.md +++ b/commands/find.md @@ -58,7 +58,7 @@ These fields will be displayed by default for each installation: These fields are optionally available: -* wp_path - Path that can be passed to `--path=<path>` global parameter. +* wp_path - Path that can be passed to `--path=` global parameter. * db_host - Host name for the database. * db_user - User name for the database. * db_name - Database name for the database. diff --git a/commands/package/install.md b/commands/package/install.md index e384b5f7..19cade35 100644 --- a/commands/package/install.md +++ b/commands/package/install.md @@ -15,7 +15,7 @@ Packages are installed to `~/.wp-cli/packages/` by default. Use the `WP_CLI_PACK When installing a local directory, WP-CLI simply registers a reference to the directory. If you move or delete the directory, WP-CLI's reference breaks. -When installing a .zip file, WP-CLI extracts the package to `~/.wp-cli/packages/local/<package-name>`. +When installing a .zip file, WP-CLI extracts the package to `~/.wp-cli/packages/local/`. If Github token authorization is required, a GitHub Personal Access Token (https://github.com/settings/tokens) can be used. The following command will add a GitHub Personal Access Token to Composer's global configuration: composer config -g github-oauth.github.com <GITHUB_TOKEN> Once this has been added, the value used for <GITHUB_TOKEN> will be used for future authorization requests. diff --git a/commands/profile/eval-file.md b/commands/profile/eval-file.md index e1541f39..a99f39b4 100644 --- a/commands/profile/eval-file.md +++ b/commands/profile/eval-file.md @@ -42,7 +42,7 @@ options: ### EXAMPLES - # Profile from a file `request.php` containing `<?php wp_remote_get( "https://www.apple.com/" );`. + # Profile from a file `request.php` containing `` to have the file placed in that theme. [\--plugin=<plugin>] : Create files in the given plugin's directory. diff --git a/commands/scaffold/cpt.md b/commands/scaffold/cpt.md index 6dd8bd4d..cb75cfa7 100644 --- a/commands/scaffold/cpt.md +++ b/commands/scaffold/cpt.md @@ -21,7 +21,7 @@ See the [argument syntax](https://make.wordpress.org/cli/handbook/references/arg : The dashicon to use in the menu. [\--theme] -: Create a file in the active theme directory, instead of sending to STDOUT. Specify a theme with `--theme=<theme>` to have the file placed in that theme. +: Create a file in the active theme directory, instead of sending to STDOUT. Specify a theme with `--theme=` to have the file placed in that theme. [\--plugin=<plugin>] : Create a file in the given plugin's directory, instead of sending to STDOUT. diff --git a/commands/scaffold/plugin-tests.md b/commands/scaffold/plugin-tests.md index 4b1d7d37..fdd600a5 100644 --- a/commands/scaffold/plugin-tests.md +++ b/commands/scaffold/plugin-tests.md @@ -5,7 +5,7 @@ Generates files needed for running PHPUnit tests in a plugin. The following files are generated by default: * `phpunit.xml.dist` is the configuration file for PHPUnit. -* `.circleci/config.yml` is the configuration file for CircleCI. Use `--ci=<provider>` to select a different service. +* `.circleci/config.yml` is the configuration file for CircleCI. Use `--ci=` to select a different service. * `bin/install-wp-tests.sh` configures the WordPress test suite and a test database. * `tests/bootstrap.php` is the file that makes the current plugin active when running the test suite. * `tests/test-sample.php` is a sample file containing the actual tests. diff --git a/commands/scaffold/plugin.md b/commands/scaffold/plugin.md index e860555f..98b0348d 100644 --- a/commands/scaffold/plugin.md +++ b/commands/scaffold/plugin.md @@ -15,7 +15,7 @@ The following files are always generated: The following files are also included unless the `--skip-tests` is used: * `phpunit.xml.dist` is the configuration file for PHPUnit. -* `.circleci/config.yml` is the configuration file for CircleCI. Use `--ci=<provider>` to select a different service. +* `.circleci/config.yml` is the configuration file for CircleCI. Use `--ci=` to select a different service. * `bin/install-wp-tests.sh` configures the WordPress test suite and a test database. * `tests/bootstrap.php` is the file that makes the current plugin active when running the test suite. * `tests/test-sample.php` is a sample file containing test cases. diff --git a/commands/scaffold/post-type.md b/commands/scaffold/post-type.md index d1ca9bef..46802cdc 100644 --- a/commands/scaffold/post-type.md +++ b/commands/scaffold/post-type.md @@ -21,7 +21,7 @@ See the [argument syntax](https://make.wordpress.org/cli/handbook/references/arg : The dashicon to use in the menu. [\--theme] -: Create a file in the active theme directory, instead of sending to STDOUT. Specify a theme with `--theme=<theme>` to have the file placed in that theme. +: Create a file in the active theme directory, instead of sending to STDOUT. Specify a theme with `--theme=` to have the file placed in that theme. [\--plugin=<plugin>] : Create a file in the given plugin's directory, instead of sending to STDOUT. diff --git a/commands/scaffold/tax.md b/commands/scaffold/tax.md index 4fdd1867..00e3970a 100644 --- a/commands/scaffold/tax.md +++ b/commands/scaffold/tax.md @@ -21,7 +21,7 @@ See the [argument syntax](https://make.wordpress.org/cli/handbook/references/arg : The textdomain to use for the labels. [\--theme] -: Create a file in the active theme directory, instead of sending to STDOUT. Specify a theme with `--theme=<theme>` to have the file placed in that theme. +: Create a file in the active theme directory, instead of sending to STDOUT. Specify a theme with `--theme=` to have the file placed in that theme. [\--plugin=<plugin>] : Create a file in the given plugin's directory, instead of sending to STDOUT. diff --git a/commands/scaffold/taxonomy.md b/commands/scaffold/taxonomy.md index 26b2d282..bba3d466 100644 --- a/commands/scaffold/taxonomy.md +++ b/commands/scaffold/taxonomy.md @@ -21,7 +21,7 @@ See the [argument syntax](https://make.wordpress.org/cli/handbook/references/arg : The textdomain to use for the labels. [\--theme] -: Create a file in the active theme directory, instead of sending to STDOUT. Specify a theme with `--theme=<theme>` to have the file placed in that theme. +: Create a file in the active theme directory, instead of sending to STDOUT. Specify a theme with `--theme=` to have the file placed in that theme. [\--plugin=<plugin>] : Create a file in the given plugin's directory, instead of sending to STDOUT. diff --git a/commands/scaffold/theme-tests.md b/commands/scaffold/theme-tests.md index 9e510ffb..7fa41a6d 100644 --- a/commands/scaffold/theme-tests.md +++ b/commands/scaffold/theme-tests.md @@ -5,7 +5,7 @@ Generates files needed for running PHPUnit tests in a theme. The following files are generated by default: * `phpunit.xml.dist` is the configuration file for PHPUnit. -* `.circleci/config.yml` is the configuration file for CircleCI. Use `--ci=<provider>` to select a different service. +* `.circleci/config.yml` is the configuration file for CircleCI. Use `--ci=` to select a different service. * `bin/install-wp-tests.sh` configures the WordPress test suite and a test database. * `tests/bootstrap.php` is the file that makes the current theme active when running the test suite. * `tests/test-sample.php` is a sample file containing the actual tests. diff --git a/commands/site/empty.md b/commands/site/empty.md index 60bbe9a2..e838b7aa 100644 --- a/commands/site/empty.md +++ b/commands/site/empty.md @@ -12,8 +12,8 @@ To also empty custom database tables, you'll need to hook into command execution WP_CLI::add_hook( 'after_invoke:site empty', function(){ global $wpdb; foreach( array( 'p2p', 'p2pmeta' ) as $table ) { - $table = $wpdb->$table; - $wpdb->query( "TRUNCATE $table" ); + $table = $wpdb->$table; + $wpdb->query( "TRUNCATE $table" ); } }); ``` diff --git a/commands/transient/set.md b/commands/transient/set.md index b2b91992..50ed0562 100644 --- a/commands/transient/set.md +++ b/commands/transient/set.md @@ -2,7 +2,7 @@ Sets a transient value. -`<expiration>` is the time until expiration, in seconds. +`` is the time until expiration, in seconds. For a more complete explanation of the transient cache, including the network|site cache, please see docs for `wp transient`.