Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for parsing docs for single constants #204

Open
DrewAPicture opened this issue Nov 1, 2018 · 1 comment
Open

Add support for parsing docs for single constants #204

DrewAPicture opened this issue Nov 1, 2018 · 1 comment

Comments

@DrewAPicture
Copy link
Member

The parser already technically supports parsing constants, but the attached PR hooks them up to a new post type and retrieves the associated documentation. We can add post type / editing / display support at a later time in the wporg-developer theme, but it would be nice to be actually storing the descriptions somewhere.

PR: #203

It should be noted that parsing DocBlock template support is not yet available in phpDocumentor, which means core WordPress is kind of out of luck with the current state of constants documented in wp-config.php. Templates are the ability to document multiple elements at the same time, e.g.

/**#@+
 * DocBlock Template example: One summary for all.
 *
 * One description for all.
 *
 * @since 2.6.0
 */
define('AUTH_KEY',         '...');
define('SECURE_AUTH_KEY',  '...');
define('LOGGED_IN_KEY',    '...');
define('NONCE_KEY',        '...');
define('AUTH_SALT',        '...');
define('SECURE_AUTH_SALT', '...');
define('LOGGED_IN_SALT',   '...');
define('NONCE_SALT',       '...');

/**#@-*/
@DrewAPicture
Copy link
Member Author

Also worth noting that it might be possible to set up our own reflector to parse params/args passed when defining the constants. As it stands, phpDocumentor\Reflection\ConstantReflector doesn't support param/argument retrieval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant