Download the PHP package piotrpress/wordpress-plugin without Composer
On this page you can find all versions of the php package piotrpress/wordpress-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download piotrpress/wordpress-plugin
More information about piotrpress/wordpress-plugin
Files in piotrpress/wordpress-plugin
Download piotrpress/wordpress-plugin
More information about piotrpress/wordpress-plugin
Files in piotrpress/wordpress-plugin
Vendor piotrpress
Package wordpress-plugin
Short Description This library is WordPress plugin singleton base class with methods to get data from plugin's header fields.
License GPL-3.0
Homepage https://github.com/PiotrPress/wordpress-plugin
Package wordpress-plugin
Short Description This library is WordPress plugin singleton base class with methods to get data from plugin's header fields.
License GPL-3.0
Homepage https://github.com/PiotrPress/wordpress-plugin
Please rate this library. Is it a good library?
Informations about the package wordpress-plugin
WordPress Plugin
This library is WordPress plugin singleton base class with methods to get data from plugin's header fields.
Installation
Usage
NOTE: Plugin's translations are loaded automatically according to Text Domain and Domain Path plugin's header fields.
Methods
Basic static methods handling plugin's default header fields
getName()- returnsstringwith the name of the plugin fromPlugin Nameheader fieldgetPluginURI()- returnsstringwith the home page of the plugin or emptystringifPlugin URIheader field is not setgetVersion()- returnsstringwith the current version number of the plugin or emptystringifVersionheader field is not setgetDescription()- returnsstringwith a short description of the plugin or emptystringifDescriptionheader field is not setgetAuthor()- returnsstringwith the name of the plugin author or emptystringifAuthorheader field is not setgetAuthorURI()- returnsstringwith the website of the plugin's author or emptystringifAuthor URIheader field is not setgetTextDomain()- returnsstringwith the gettext text domain of the plugin or directory name of the plugin ifText Domainheader field is not setgetDomainPath()- returnsstringwith the path to translations directory or emptystringifDomain Pathheader field is not setgetNetwork()- returnsboolwhether the plugin can only be activated network-wide according toNetworkheader fieldgetRequiresWP()- returnsstringwith the lowest WordPress version that the plugin will work on or emptystringifRequires at leastheader field is not setgetRequiresPHP()- returnsstringwith the minimum required PHP version or emptystringifRequires PHPheader field is not setgetUpdateURI()- returnsstringwith third-party plugin's update server or emptystringifUpdate URIheader field is not setRequiresPlugins()- returnsstringwith the comma-separated list of WordPress.org-formatted slugs for its dependencies or emptystringifRequires Pluginsheader field is not set
Additional static methods handling plugin's paths
getSlug()- returnsstringwith the sanitized name of the plugingetPrefix()- returnsstringwith the prefix for plugin's hooksgetFile()- returnsstringwith the path to main plugin's filegetDir()- returnsstringwith the path to plugin's directorygetUrl()- returnsstringwith the url to plugin's directorygetBaseName()- returnsstringwith the basename of the plugingetDirName()- returnsstringwith the directory name of the plugin
Inherited Singleton's static methods
getInstance()- returns the instance of the Plugin class
Abstract methods handling plugin's de/activation
activation()- executed while plugin activationdeactivation()- executed while plugin deactivation
Handling custom plugin's header fields
-
Add WordPress support for extra plugin's header fields using
extra_plugin_headersfilter: - Add methods to handle extra plugin's header fields:
NOTE: get prefixed methods are automagically created for plugin'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-plugin with dependencies
PHP Build Version
Package Version
The package piotrpress/wordpress-plugin contains the following files
Loading the files please wait ...