[Converted to Issue] The first code block should be a copyable example. #12
StevenDufresne
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
I think this is great; examples are usually a better starting point for me than the full spec. I think it's important to show multiple, though, like: activate_plugin( 'my-plugin/bootstrap.php' );
activate_plugin( 'my-plugin/bootstrap.php', '', true ); // network-wide
activate_plugin( 'my-plugin/bootstrap.php', admin_url( 'my-special-activation-page' ), false, true ); // uncommon behavior |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We should prefer copyable code blocks over function definitions. While users can already copy the function definitions, maybe because of the datatypes or because it doesn't look like a code block, it isn't apparent that I can use that line of code.
By removing the argument names, and optional parameters and giving the block more visual preference, we have a block of code that is easy to copy and paste into your own environment.
Note: I've switched the description and parameters section. Related: #9 #7
Beta Was this translation helpful? Give feedback.
All reactions