Skip to content

Commit

Permalink
Add @global to PHP doc comments (#59287)
Browse files Browse the repository at this point in the history
Co-authored-by: shail-mehta <[email protected]>
Co-authored-by: fabiankaegy <[email protected]>
  • Loading branch information
3 people authored Feb 23, 2024
1 parent 521378f commit e1b4e26
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ function gutenberg_build_files_notice() {
* Verify that we can initialize the Gutenberg editor , then load it.
*
* @since 1.5.0
*
* @global string $wp_version The WordPress version string.
*
*/
function gutenberg_pre_init() {
global $wp_version;
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/block/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
/**
* Renders the `core/block` block on server.
*
* @global WP_Embed $wp_embed
*
* @param array $attributes The block attributes.
*
* @return string Rendered HTML of the referenced block.
Expand Down
5 changes: 5 additions & 0 deletions packages/block-library/src/calendar/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
/**
* Renders the `core/calendar` block on server.
*
* @global int $monthnum.
* @global int $year.
*
* @param array $attributes The block attributes.
*
* @return string Returns the block content.
Expand Down Expand Up @@ -117,6 +120,8 @@ function block_core_calendar_has_published_posts() {
* Queries the database for any published post and saves
* a flag whether any published post exists or not.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @return bool Has any published posts or not.
*/
function block_core_calendar_update_has_published_posts() {
Expand Down
2 changes: 2 additions & 0 deletions packages/block-library/src/comments/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* the block is in legacy mode. If not, the HTML generated in the editor is
* returned instead.
*
* @global WP_Post $post Global post 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/widgets/src/blocks/legacy-widget/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
/**
* Renders the 'core/legacy-widget' block.
*
* @global int $wp_widget_factory.
*
* @param array $attributes The block attributes.
*
* @return string Rendered block.
Expand Down

0 comments on commit e1b4e26

Please sign in to comment.