Download the PHP package piotrpress/wordpress-theme without Composer
On this page you can find all versions of the php package piotrpress/wordpress-theme. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download piotrpress/wordpress-theme
More information about piotrpress/wordpress-theme
Files in piotrpress/wordpress-theme
Download piotrpress/wordpress-theme
More information about piotrpress/wordpress-theme
Files in piotrpress/wordpress-theme
Vendor piotrpress
Package wordpress-theme
Short Description This library is WordPress theme singleton base class with methods to get data from theme's header fields.
License GPL-3.0
Homepage https://github.com/PiotrPress/wordpress-theme
Package wordpress-theme
Short Description This library is WordPress theme singleton base class with methods to get data from theme's header fields.
License GPL-3.0
Homepage https://github.com/PiotrPress/wordpress-theme
Please rate this library. Is it a good library?
Informations about the package wordpress-theme
WordPress Theme
This library is WordPress theme singleton base class with methods to get data from theme's header fields.
Installation
Usage
Methods
Basic static methods handling theme's default header fields
getName()
- returnsstring
with the name of the theme fromTheme Name
header fieldgetThemeURI()
- returnsstring
with the home page of the theme or emptystring
ifTheme URI
header field is not setgetDescription()
- returnsstring
with a short description of the theme or emptystring
ifDescription
header field is not setgetTags()
- returnsstring
with the tags of the theme or emptystring
ifTags
header field is not setgetVersion()
- returnsstring
with the current version number of the theme or emptystring
ifVersion
header field is not setgetRequiresWP()
- returnsstring
with the lowest WordPress version that the theme will work on or emptystring
ifRequires at least
header field is not setgetRequiresPHP()
- returnsstring
with the minimum required PHP version or emptystring
ifRequires PHP
header field is not setgetAuthor()
- returnsstring
with the name of the theme's author or emptystring
ifAuthor
header field is not setgetAuthorURI()
- returnsstring
with the website of the theme's author or emptystring
ifAuthor URI
header field is not setgetUpdateURI()
- returnsstring
with third-party theme's update server or emptystring
ifUpdate URI
header field is not setgetTextDomain()
- returnsstring
with the gettext text domain of the theme or emptystring
ifText Domain
header field is not setgetDomainPath()
- returnsstring
with the path to translations directory or emptystring
ifDomain Path
header field is not set
Additional static methods
getDir()
- returnsstring
with the path to theme's directorygetUrl()
- returnsstring
with the url to theme's directorygetSlug()
- returnsstring
with the sanitized name of the themegetPrefix()
- returnsstring
with the prefix for theme's hooks
Inherited Singleton's static methods
getInstance()
- returns the instance of the Theme class
Handling custom theme's header fields
-
Add WordPress support for extra theme's header fields using
extra_theme_headers
filter: - Add methods to handle extra theme's header fields:
NOTE: get
prefixed methods are automagically created for theme's header fields that meet valid function name rules. e.g. getLicense()
method.
Requirements
PHP >= 7.4
version.
License
GPL 3.0
All versions of wordpress-theme with dependencies
PHP Build Version
Package Version
The package piotrpress/wordpress-theme contains the following files
Loading the files please wait ....