Skip to content

Commit

Permalink
Add php @global docs (#59931)
Browse files Browse the repository at this point in the history
* Added php @global docs

* Added php @global docs

* Added php @global docs

* Added php @global docs

* Resolved Spacing Issue After @global doc

Co-authored-by: shail-mehta <shailu25@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
  • Loading branch information
3 people committed Mar 22, 2024
1 parent b194917 commit 305ea52
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/block-library/src/query-no-results/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*
* @since 6.0.0
*
* @global WP_Query $wp_query WordPress Query object.
*
* @param array $attributes Block attributes.
* @param string $content Block default content.
* @param WP_Block $block Block instance.
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/query-pagination-next/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*
* @since 5.8.0
*
* @global WP_Query $wp_query WordPress Query object.
*
* @param array $attributes Block attributes.
* @param string $content Block default content.
* @param WP_Block $block Block instance.
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/query-pagination-numbers/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*
* @since 5.8.0
*
* @global WP_Query $wp_query WordPress Query object.
*
* @param array $attributes Block attributes.
* @param string $content Block default content.
* @param WP_Block $block Block instance.
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/template-part/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
*
* @since 5.9.0
*
* @global WP_Embed $wp_embed WordPress Embed object.
*
* @param array $attributes The block attributes.
*
* @return string The render.
Expand Down
7 changes: 7 additions & 0 deletions packages/widgets/src/blocks/widget-group/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
/**
* Renders the 'core/widget-group' block.
*
* @global array $wp_registered_sidebars
* @global int|string $_sidebar_being_rendered
*
* @param array $attributes The block attributes.
* @param string $content The block content.
* @param WP_Block $block The block.
Expand Down Expand Up @@ -59,6 +62,8 @@ function register_block_core_widget_group() {
* it. This lets us get to the current sidebar in
* render_block_core_widget_group().
*
* @global int|string $_sidebar_being_rendered
*
* @param int|string $index Index, name, or ID of the dynamic sidebar.
*/
function note_sidebar_being_rendered( $index ) {
Expand All @@ -70,6 +75,8 @@ function note_sidebar_being_rendered( $index ) {
/**
* Clear whatever we set in note_sidebar_being_rendered() after WordPress
* finishes rendering a sidebar.
*
* @global int|string $_sidebar_being_rendered
*/
function discard_sidebar_being_rendered() {
global $_sidebar_being_rendered;
Expand Down

0 comments on commit 305ea52

Please sign in to comment.