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

Docs: Fix script module data filter documentation examples #7990

Conversation

sirreal
Copy link
Member

@sirreal sirreal commented Dec 11, 2024

The script_module_data_{$module_id} filter documentation is truncated.. It seems that the example tag is not processed and instead ends the description section of the documentation.

Change the examples for this filter to use Example: and an indented code block. This seems to work in other places:

* Example:
*
* true === is_utf8_charset( 'UTF-8' );
* true === is_utf8_charset( 'utf8' );
* false === is_utf8_charset( 'latin1' );
* false === is_utf8_charset( 'UTF 8' );
*
* // Only strings match.
* false === is_utf8_charset( [ 'charset' => 'utf-8' ] );
*
* // Without a given charset, it depends on the site option "blog_charset".
* $is_utf8 = is_utf8_charset();

Trac ticket: https://core.trac.wordpress.org/ticket/62281


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props jonsurrell.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@SergeyBiryukov
Copy link
Member

Thanks for the PR! Merged in r59505.

@sirreal sirreal deleted the docs/fix-script-modules-data-filter-examples branch December 11, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants