Skip to content

Commit 7ae743a

Browse files
committed
HTML API: Exclude internal classes and methods from documentation.
Add `@ignore` annotations to internal HTML API methods and classes to exclude them from generated documentation. The HTML API relies heavily on internal methods and classes and they create a lot of noise in documentation. Developed in WordPress/wordpress-develop#11078. Props jonsurrell, westonruter. See #64224. Built from https://develop.svn.wordpress.org/trunk@61793 git-svn-id: http://core.svn.wordpress.org/trunk@61099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 28b9161 commit 7ae743a

8 files changed

+64
-5
lines changed

wp-includes/html-api/class-wp-html-active-formatting-elements.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* @since 6.4.0
3030
*
3131
* @access private
32+
* @ignore
3233
*
3334
* @see https://html.spec.whatwg.org/#list-of-active-formatting-elements
3435
* @see WP_HTML_Processor

wp-includes/html-api/class-wp-html-attribute-token.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* This class is for internal usage of the WP_HTML_Tag_Processor class.
1515
*
1616
* @access private
17+
* @ignore
18+
*
1719
* @since 6.2.0
1820
* @since 6.5.0 Replaced `end` with `length` to more closely match `substr()`.
1921
*

wp-includes/html-api/class-wp-html-open-elements.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* @since 6.4.0
2424
*
2525
* @access private
26+
* @ignore
2627
*
2728
* @see https://html.spec.whatwg.org/#stack-of-open-elements
2829
* @see WP_HTML_Processor

wp-includes/html-api/class-wp-html-processor-state.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* @since 6.4.0
1717
*
1818
* @access private
19+
* @ignore
1920
*
2021
* @see WP_HTML_Processor
2122
*/

wp-includes/html-api/class-wp-html-processor.php

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,7 @@ private function create_fragment_at_current_node( string $html ) {
583583
* @throws WP_HTML_Unsupported_Exception Halts execution of the parser.
584584
*
585585
* @since 6.7.0
586+
* @ignore
586587
*
587588
* @param string $message Explains support is missing in order to parse the current node.
588589
* @return never
@@ -791,8 +792,7 @@ public function next_token(): bool {
791792
* calls the {@see WP_HTML_Tag_Processor::base_class_next_token()} method.
792793
*
793794
* @since 6.7.2 Added for internal support.
794-
*
795-
* @access private
795+
* @ignore
796796
*
797797
* @return bool
798798
*/
@@ -881,6 +881,7 @@ public function is_tag_closer(): bool {
881881
* while processing HTML, rather than a token found in the HTML text itself.
882882
*
883883
* @since 6.6.0
884+
* @ignore
884885
*
885886
* @return bool Whether the current token is virtual.
886887
*/
@@ -1488,6 +1489,7 @@ public function serialize_token(): string {
14881489
* logic for the generalized WP_HTML_Processor::step() function.
14891490
*
14901491
* @since 6.7.0
1492+
* @ignore
14911493
*
14921494
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
14931495
*
@@ -1559,6 +1561,7 @@ private function step_initial(): bool {
15591561
* logic for the generalized WP_HTML_Processor::step() function.
15601562
*
15611563
* @since 6.7.0
1564+
* @ignore
15621565
*
15631566
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
15641567
*
@@ -1656,6 +1659,7 @@ private function step_before_html(): bool {
16561659
* logic for the generalized WP_HTML_Processor::step() function.
16571660
*
16581661
* @since 6.7.0
1662+
* @ignore
16591663
*
16601664
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
16611665
*
@@ -1753,6 +1757,7 @@ private function step_before_head(): bool {
17531757
* logic for the generalized WP_HTML_Processor::step() function.
17541758
*
17551759
* @since 6.7.0
1760+
* @ignore
17561761
*
17571762
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
17581763
*
@@ -1975,6 +1980,7 @@ private function step_in_head(): bool {
19751980
* logic for the generalized WP_HTML_Processor::step() function.
19761981
*
19771982
* @since 6.7.0
1983+
* @ignore
19781984
*
19791985
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
19801986
*
@@ -2078,6 +2084,7 @@ private function step_in_head_noscript(): bool {
20782084
* logic for the generalized WP_HTML_Processor::step() function.
20792085
*
20802086
* @since 6.7.0
2087+
* @ignore
20812088
*
20822089
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
20832090
*
@@ -2222,6 +2229,7 @@ private function step_after_head(): bool {
22222229
* logic for the generalized WP_HTML_Processor::step() function.
22232230
*
22242231
* @since 6.4.0
2232+
* @ignore
22252233
*
22262234
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
22272235
*
@@ -3247,6 +3255,7 @@ private function step_in_body(): bool {
32473255
* logic for the generalized WP_HTML_Processor::step() function.
32483256
*
32493257
* @since 6.7.0
3258+
* @ignore
32503259
*
32513260
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
32523261
*
@@ -3503,6 +3512,7 @@ private function step_in_table(): bool {
35033512
* logic for the generalized WP_HTML_Processor::step() function.
35043513
*
35053514
* @since 6.7.0 Stub implementation.
3515+
* @ignore
35063516
*
35073517
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
35083518
*
@@ -3522,6 +3532,7 @@ private function step_in_table_text(): bool {
35223532
* logic for the generalized WP_HTML_Processor::step() function.
35233533
*
35243534
* @since 6.7.0
3535+
* @ignore
35253536
*
35263537
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
35273538
*
@@ -3606,6 +3617,7 @@ private function step_in_caption(): bool {
36063617
* logic for the generalized WP_HTML_Processor::step() function.
36073618
*
36083619
* @since 6.7.0
3620+
* @ignore
36093621
*
36103622
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
36113623
*
@@ -3713,6 +3725,7 @@ private function step_in_column_group(): bool {
37133725
* logic for the generalized WP_HTML_Processor::step() function.
37143726
*
37153727
* @since 6.7.0
3728+
* @ignore
37163729
*
37173730
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
37183731
*
@@ -3816,6 +3829,7 @@ private function step_in_table_body(): bool {
38163829
* logic for the generalized WP_HTML_Processor::step() function.
38173830
*
38183831
* @since 6.7.0
3832+
* @ignore
38193833
*
38203834
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
38213835
*
@@ -3926,6 +3940,7 @@ private function step_in_row(): bool {
39263940
* logic for the generalized WP_HTML_Processor::step() function.
39273941
*
39283942
* @since 6.7.0
3943+
* @ignore
39293944
*
39303945
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
39313946
*
@@ -4030,6 +4045,7 @@ private function step_in_cell(): bool {
40304045
* logic for the generalized WP_HTML_Processor::step() function.
40314046
*
40324047
* @since 6.7.0
4048+
* @ignore
40334049
*
40344050
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
40354051
*
@@ -4205,6 +4221,7 @@ private function step_in_select(): bool {
42054221
* logic for the generalized WP_HTML_Processor::step() function.
42064222
*
42074223
* @since 6.7.0
4224+
* @ignore
42084225
*
42094226
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
42104227
*
@@ -4269,6 +4286,7 @@ private function step_in_select_in_table(): bool {
42694286
* logic for the generalized WP_HTML_Processor::step() function.
42704287
*
42714288
* @since 6.7.0
4289+
* @ignore
42724290
*
42734291
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
42744292
*
@@ -4398,6 +4416,7 @@ private function step_in_template(): bool {
43984416
* logic for the generalized WP_HTML_Processor::step() function.
43994417
*
44004418
* @since 6.7.0
4419+
* @ignore
44014420
*
44024421
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
44034422
*
@@ -4487,6 +4506,7 @@ private function step_after_body(): bool {
44874506
* logic for the generalized WP_HTML_Processor::step() function.
44884507
*
44894508
* @since 6.7.0
4509+
* @ignore
44904510
*
44914511
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
44924512
*
@@ -4606,6 +4626,7 @@ private function step_in_frameset(): bool {
46064626
* logic for the generalized WP_HTML_Processor::step() function.
46074627
*
46084628
* @since 6.7.0
4629+
* @ignore
46094630
*
46104631
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
46114632
*
@@ -4691,6 +4712,7 @@ private function step_after_frameset(): bool {
46914712
* logic for the generalized WP_HTML_Processor::step() function.
46924713
*
46934714
* @since 6.7.0
4715+
* @ignore
46944716
*
46954717
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
46964718
*
@@ -4754,6 +4776,7 @@ private function step_after_after_body(): bool {
47544776
* logic for the generalized WP_HTML_Processor::step() function.
47554777
*
47564778
* @since 6.7.0
4779+
* @ignore
47574780
*
47584781
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
47594782
*
@@ -4822,6 +4845,7 @@ private function step_after_after_frameset(): bool {
48224845
* logic for the generalized WP_HTML_Processor::step() function.
48234846
*
48244847
* @since 6.7.0
4848+
* @ignore
48254849
*
48264850
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
48274851
*
@@ -5143,6 +5167,7 @@ private function step_in_foreign_content(): bool {
51435167
*
51445168
* @since 6.4.0
51455169
* @since 6.5.0 Renamed from bookmark_tag() to bookmark_token().
5170+
* @ignore
51465171
*
51475172
* @throws Exception When unable to allocate requested bookmark.
51485173
*
@@ -5796,6 +5821,7 @@ public function has_bookmark( $bookmark_name ): bool {
57965821
* Closes a P element.
57975822
*
57985823
* @since 6.4.0
5824+
* @ignore
57995825
*
58005826
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
58015827
*
@@ -5811,6 +5837,7 @@ private function close_a_p_element(): void {
58115837
*
58125838
* @since 6.4.0
58135839
* @since 6.7.0 Full spec support.
5840+
* @ignore
58145841
*
58155842
* @see https://html.spec.whatwg.org/#generate-implied-end-tags
58165843
*
@@ -5848,6 +5875,7 @@ private function generate_implied_end_tags( ?string $except_for_this_element = n
58485875
*
58495876
* @since 6.4.0
58505877
* @since 6.7.0 Full spec support.
5878+
* @ignore
58515879
*
58525880
* @see WP_HTML_Processor::generate_implied_end_tags
58535881
* @see https://html.spec.whatwg.org/#generate-implied-end-tags
@@ -5890,6 +5918,7 @@ private function generate_implied_end_tags_thoroughly(): void {
58905918
* @see https://html.spec.whatwg.org/#adjusted-current-node
58915919
*
58925920
* @since 6.7.0
5921+
* @ignore
58935922
*
58945923
* @return WP_HTML_Token|null The adjusted current node.
58955924
*/
@@ -5909,6 +5938,7 @@ private function get_adjusted_current_node(): ?WP_HTML_Token {
59095938
* > been explicitly closed.
59105939
*
59115940
* @since 6.4.0
5941+
* @ignore
59125942
*
59135943
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
59145944
*
@@ -5951,6 +5981,7 @@ private function reconstruct_active_formatting_elements(): bool {
59515981
* Runs the reset the insertion mode appropriately algorithm.
59525982
*
59535983
* @since 6.7.0
5984+
* @ignore
59545985
*
59555986
* @see https://html.spec.whatwg.org/multipage/parsing.html#reset-the-insertion-mode-appropriately
59565987
*/
@@ -6143,6 +6174,7 @@ private function reset_insertion_mode_appropriately(): void {
61436174
* Runs the adoption agency algorithm.
61446175
*
61456176
* @since 6.4.0
6177+
* @ignore
61466178
*
61476179
* @throws WP_HTML_Unsupported_Exception When encountering unsupported HTML input.
61486180
*
@@ -6260,6 +6292,7 @@ private function run_adoption_agency_algorithm(): void {
62606292
* @see https://html.spec.whatwg.org/multipage/parsing.html#close-the-cell
62616293
*
62626294
* @since 6.7.0
6295+
* @ignore
62636296
*/
62646297
private function close_cell(): void {
62656298
$this->generate_implied_end_tags();
@@ -6278,6 +6311,7 @@ private function close_cell(): void {
62786311
* Inserts an HTML element on the stack of open elements.
62796312
*
62806313
* @since 6.4.0
6314+
* @ignore
62816315
*
62826316
* @see https://html.spec.whatwg.org/#insert-a-foreign-element
62836317
*
@@ -6291,6 +6325,7 @@ private function insert_html_element( WP_HTML_Token $token ): void {
62916325
* Inserts a foreign element on to the stack of open elements.
62926326
*
62936327
* @since 6.7.0
6328+
* @ignore
62946329
*
62956330
* @see https://html.spec.whatwg.org/#insert-a-foreign-element
62966331
*
@@ -6330,6 +6365,7 @@ private function insert_foreign_element( WP_HTML_Token $token, bool $only_add_to
63306365
* Inserts a virtual element on the stack of open elements.
63316366
*
63326367
* @since 6.7.0
6368+
* @ignore
63336369
*
63346370
* @throws Exception When unable to allocate a bookmark for the next token in the input HTML document.
63356371
*
@@ -6357,6 +6393,7 @@ private function insert_virtual_node( $token_name, $bookmark_name = null ): WP_H
63576393
* Indicates if the current token is a MathML integration point.
63586394
*
63596395
* @since 6.7.0
6396+
* @ignore
63606397
*
63616398
* @see https://html.spec.whatwg.org/#mathml-text-integration-point
63626399
*
@@ -6393,6 +6430,7 @@ private function is_mathml_integration_point(): bool {
63936430
* no other accounting is overlooked.
63946431
*
63956432
* @since 6.7.0
6433+
* @ignore
63966434
*
63976435
* @see https://html.spec.whatwg.org/#html-integration-point
63986436
*

wp-includes/html-api/class-wp-html-stack-event.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
* This class is for internal usage of the WP_HTML_Processor class.
1414
*
1515
* @access private
16+
* @ignore
17+
*
1618
* @since 6.6.0
1719
*
1820
* @see WP_HTML_Processor

0 commit comments

Comments
 (0)