Skip to content

Commit

Permalink
Generate stubs for WPGraphQL v1.29.1
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 13, 2024
1 parent 79bc096 commit 400e268
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
2 changes: 1 addition & 1 deletion source/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-sodium": "*",
"wpackagist-plugin/wp-graphql": "1.29.0"
"wpackagist-plugin/wp-graphql": "1.29.1"
},
"config": {
"allow-plugins": {
Expand Down
35 changes: 27 additions & 8 deletions wp-graphql-stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -5030,12 +5030,12 @@ protected function init()
* @property string $pingStatus
* @property string $slug
* @property array $template
* @property bool $isFrontPage
* @property bool $isPrivacyPage
* @property bool $isPostsPage
* @property bool $isPreview
* @property bool $isRevision
* @property bool $isSticky
* @property bool $isFrontPage
* @property bool $isPrivacyPage
* @property bool $isPostsPage
* @property bool $isPreview
* @property bool $isRevision
* @property bool $isSticky
* @property string $toPing
* @property string $pinged
* @property string $modified
Expand Down Expand Up @@ -5063,11 +5063,10 @@ protected function init()
* @property string $descriptionRaw
* @property string $descriptionRendered
* @property string $mediaType
* @property ?string $mediaItemUrl
* @property string $sourceUrl
* @property string $mimeType
* @property array $mediaDetails
*
* @package WPGraphQL\Model
*/
class Post extends \WPGraphQL\Model\Model
{
Expand Down Expand Up @@ -5095,6 +5094,16 @@ class Post extends \WPGraphQL\Model\Model
* @var \WP_Query
*/
protected $wp_query;
/**
* Stores the resolved image `sourceUrl`s keyed by size.
*
* This is used to prevent multiple calls to `wp_get_attachment_image_src`.
*
* If no source URL is found for a size, the value will be `null`.
*
* @var array<string,?string>
*/
protected $source_urls_by_size = [];
/**
* Post constructor.
*
Expand Down Expand Up @@ -5141,6 +5150,16 @@ protected function is_post_private($post_object = null)
protected function init()
{
}
/**
* Gets the source URL for an image attachment by size.
*
* This method caches the source URL for a given size to prevent multiple calls to `wp_get_attachment_image_src`.
*
* @param ?string $size The size of the image to get the source URL for. `full` by default.
*/
public function get_source_url_by_size(?string $size = 'full') : ?string
{
}
}
/**
* Class PostType - Models data for PostTypes
Expand Down

0 comments on commit 400e268

Please sign in to comment.