WP_Theme::get_screenshot

SummerySummery

Returns the main screenshot file for the theme.

Syntax

WP_Theme::get_screenshot( string $uri = 'uri' )

DescriptionDescription

The main screenshot is called screenshot.png. gif and jpg extensions are also allowed.

Screenshots for a theme must be in the stylesheet directory. (In the case of child themes, parent theme screenshots are not inherited.)

ParametersParameters

$uri

(string) (Optional) Type of URL to return, either 'relative' or an absolute URI. Defaults to absolute URI.

Default value: 'uri'

ReturnReturn

(string|false) Screenshot file. False if the theme does not have a screenshot.

SourceSource

File: wp-includes/class-wp-theme.php


			

ChangelogChangelog

Changelog
Version Description
3.4.0 Introduced.
Scroll to Top