PHP Classes
elePHPant
Icontem

WP_Plugin-Info: Retrieve WordPress plugin information values

Recommend this page to a friend!
  Info   View files Example   View files View files (186)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2017-12-06 (5 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 37 This week: 12All time: 9,070 This week: 82Up
Version License PHP version Categories
wp_plugin-info 1.0Custom (specified...5PHP 5, Content management, Blogs
Description Author

This package can retrieve WordPress plugin information values.

It can get an object that identifies a given plugin by name.

The package can also retrieve configuration values of each plugin using that object like the name, slug, version, author, profile, contributors, etc..

Innovation Award
PHP Programming Innovation award nominee
November 2017
Nominee
Vote
There are many WordPress plugins that depend on other plugins that may be installed or not.

This package provides a general solution for checking if other plugins with certain names are installed in a WordPress installation.

Manuel Lemos
  Performance   Level  
Name: Josantonius is available for providing paid consulting. Contact Josantonius .
Classes: 19 packages by
Country: Spain Spain
Age: ???
All time rank: 231257 in Spain Spain
Week rank: 2 Up1 in Spain Spain Up
Innovation award
Innovation award
Nominee: 8x

Details

WP Plugin Info · Eliasis module

Latest Stable Version Total Downloads Latest Unstable Version License Travis

Versión en español

Get and save plugin information from WordPress API to be consumed by other modules.

Installation

Install plugin module from Composer. In the root folder of plugin run:

$ composer require Josantonius/WP_Plugin-Info

The previous command will only install the necessary files, if you prefer to download the entire source code (including tests, vendor folder, sass files, docs...) you can use:

$ composer require Josantonius/WP_Plugin-Info --prefer-source

Or you can also clone the complete repository with Git:

$ git clone https://github.com/Josantonius/WP_Plugin-Info.git

Requirements

This pluggin is supported by PHP versions 5.6 or higher and is compatible with HHVM versions 3.0 or higher.

Usage

Get plugin information:

<?php
use Eliasis\Complement\Type\Plugin\Plugin;

$Info = Plugin::WP_Plugin_Info()->instance('Info');
$name = $Info->get('name', 'plugin-slug'); //string
$slug = $Info->get('slug', 'plugin-slug'); //string
$version = $Info->get('version', 'plugin-slug'); //string
$author = $Info->get('author', 'plugin-slug'); //string
$author_profile = $Info->get('author_profile', 'plugin-slug'); //string
$contributors = $Info->get('contributors', 'plugin-slug'); //array
$requires = $Info->get('requires', 'plugin-slug'); //string
$tested = $Info->get('tested', 'plugin-slug'); //string
$compatibility = $Info->get('compatibility', 'plugin-slug'); //array
$rating = $Info->get('rating', 'plugin-slug'); //int
$ratings = $Info->get('ratings', 'plugin-slug'); //array
$num_ratings = $Info->get('num_ratings', 'plugin-slug'); //int
$support_threads = $Info->get('support_threads', 'plugin-slug'); //int
$support_threads_resolved = $Info->get('support_threads_resolved', 'plugin-slug'); //int
$downloaded = $Info->get('downloaded', 'plugin-slug'); //int
$last_updated = $Info->get('last_updated', 'plugin-slug'); //string
$added = $Info->get('added', 'plugin-slug'); //string
$homepage = $Info->get('homepage', 'plugin-slug'); //string
$download_link = $Info->get('download_link', 'plugin-slug'); //string
$tags = $Info->get('tags', 'plugin-slug'); //array
$donate_link = $Info->get('donate_link', 'plugin-slug'); //string

Tests

To run tests simply:

$ git clone https://github.com/Josantonius/WP_Plugin-Info.git

$ cd WP_Plugin-Info

$ bash bin/install-wp-tests.sh wordpress_test root '' localhost latest

$ phpunit

? TODO

  • [x] Create tests
  • [ ] Improve documentation

Contribute

  1. Check for open issues or open a new issue to start a discussion around a bug or feature.
  2. Fork the repository on GitHub to start making your changes.
  3. Write one or more tests for the new feature or that expose the bug.
  4. Make code changes to implement the feature or fix the bug.
  5. Send a pull request to get your changes merged and published.

This is intended for large and long-lived objects.

License

This project is licensed under GPL-2.0+. See the LICENSE file for more info.

Copyright

2017 Josantonius, josantonius.com

If you find it useful, let me know :wink:

You can contact me on Twitter or through my email.

  Files folder image Files  
File Role Description
Files folder imagebin (1 file)
Files folder imageconfig (5 files)
Files folder imagesrc (1 file, 3 directories)
Files folder imagetests (2 files, 1 directory)
Files folder imagevendor (1 file, 3 directories)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file CONDUCT.md Data Auxiliary data
Accessible without login Plain text file contributors.txt Doc. Documentation
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README-ES.md Doc. Documentation
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file wp_plugin-info.jsond Data Auxiliary data
Accessible without login Plain text file _config.yml Data Auxiliary data

  Files folder image Files  /  bin  
File Role Description
  Accessible without login Plain text file install-wp-tests.sh Data Auxiliary data

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file add-paths.php Example Example script
  Accessible without login Plain text file add-urls.php Example Example script
  Accessible without login Plain text file files.php Example Example script
  Accessible without login Plain text file namespaces.php Aux. Auxiliary script
  Accessible without login Plain text file settings.php Aux. Auxiliary script

  Files folder image Files  /  src  
File Role Description
Files folder imageController (1 directory)
Files folder imagedata (1 file)
Files folder imageModel (1 directory)
  Accessible without login Plain text file bootstrap.php Aux. Auxiliary script

  Files folder image Files  /  src  /  Controller  
File Role Description
Files folder imageInfo (1 file)

  Files folder image Files  /  src  /  Controller  /  Info  
File Role Description
  Plain text file Info.php Class Class source

  Files folder image Files  /  src  /  data  
File Role Description
  Accessible without login Plain text file plugins.jsond Data Auxiliary data

  Files folder image Files  /  src  /  Model  
File Role Description
Files folder imageInfo (1 file)

  Files folder image Files  /  src  /  Model  /  Info  
File Role Description
  Plain text file Info.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageWP_Plugin_Info (1 directory)
  Accessible without login Plain text file bootstrap.php Example Example script
  Accessible without login Plain text file sample-plugin.php Aux. Auxiliary script

  Files folder image Files  /  tests  /  WP_Plugin_Info  
File Role Description
Files folder imageTest (1 file)

  Files folder image Files  /  tests  /  WP_Plugin_Info  /  Test  
File Role Description
  Plain text file PluginInfoTest.php Class Class source

  Files folder image Files  /  vendor  
File Role Description
Files folder imagecomposer (8 files, 1 directory)
Files folder imageeliasis-framework (2 directories)
Files folder imagejosantonius (4 directories)
  Accessible without login Plain text file autoload.php Aux. Auxiliary script

  Files folder image Files  /  vendor  /  composer  
File Role Description
Files folder imageinstallers (9 files, 2 directories)
  Accessible without login Plain text file autoload_classmap.php Aux. Auxiliary script
  Accessible without login Plain text file autoload_namespaces.php Aux. Auxiliary script
  Accessible without login Plain text file autoload_psr4.php Aux. Auxiliary script
  Plain text file autoload_real.php Class Class source
  Plain text file autoload_static.php Class Class source
  Plain text file ClassLoader.php Class Class source
  Accessible without login Plain text file installed.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text

  Files folder image Files  /  vendor  /  composer  /  installers  
File Role Description
Files folder imagesrc (1 file, 1 directory)
Files folder imagetests (1 file, 1 directory)
  Accessible without login Plain text file .editorconfig Data Auxiliary data
  Accessible without login Plain text file .travis.yml Data Auxiliary data
  Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text
  Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
  Accessible without login Plain text file README.md Doc. Documentation
  Accessible without login Plain text file _config.yml Data Auxiliary data

  Files folder image Files  /  vendor  /  composer  /  installers  /  src  
File Role Description
Files folder imageComposer (1 directory)
  Accessible without login Plain text file bootstrap.php Aux. Auxiliary script

  Files folder image Files  /  vendor  /  composer  /  installers  /  src  /  Composer  
File Role Description
Files folder imageInstallers (85 files)

  Files folder image Files  /  vendor  /  composer  /  installers  /  src  /  Composer  /  Installers  
File Role Description
  Plain text file AglInstaller.php Class Class source
  Plain text file AimeosInstaller.php Class Class source
  Plain text file AnnotateCmsInstaller.php Class Class source
  Plain text file AsgardInstaller.php Class Class source
  Plain text file AttogramInstaller.php Class Class source
  Plain text file BaseInstaller.php Class Class source
  Plain text file BitrixInstaller.php Class Class source
  Plain text file BonefishInstaller.php Class Class source
  Plain text file CakePHPInstaller.php Class Class source
  Plain text file ChefInstaller.php Class Class source
  Plain text file ClanCatsFrameworkInstaller.php Class Class source
  Plain text file CockpitInstaller.php Class Class source
  Plain text file CodeIgniterInstaller.php Class Class source
  Plain text file Concrete5Installer.php Class Class source
  Plain text file CraftInstaller.php Class Class source
  Plain text file CroogoInstaller.php Class Class source
  Plain text file DecibelInstaller.php Class Class source
  Plain text file DokuWikiInstaller.php Class Class source
  Plain text file DolibarrInstaller.php Class Class source
  Plain text file DrupalInstaller.php Class Class source
  Plain text file ElggInstaller.php Class Class source
  Plain text file EliasisInstaller.php Class Class source
  Plain text file ExpressionEngineInstaller.php Class Class source
  Plain text file EzPlatformInstaller.php Class Class source
  Plain text file FuelInstaller.php Class Class source
  Plain text file FuelphpInstaller.php Class Class source
  Plain text file GravInstaller.php Class Class source
  Plain text file HuradInstaller.php Class Class source
  Plain text file ImageCMSInstaller.php Class Class source
  Plain text file Installer.php Class Class source
  Plain text file ItopInstaller.php Class Class source
  Plain text file JoomlaInstaller.php Class Class source
  Plain text file KanboardInstaller.php Class Class source
  Plain text file KirbyInstaller.php Class Class source
  Plain text file KodiCMSInstaller.php Class Class source
  Plain text file KohanaInstaller.php Class Class source
  Plain text file LanManagementSystemInstaller.php Class Class source
  Plain text file LaravelInstaller.php Class Class source
  Plain text file LavaLiteInstaller.php Class Class source
  Plain text file LithiumInstaller.php Class Class source
  Plain text file MagentoInstaller.php Class Class source
  Plain text file MakoInstaller.php Class Class source
  Plain text file MauticInstaller.php Class Class source
  Plain text file MayaInstaller.php Class Class source
  Plain text file MediaWikiInstaller.php Class Class source
  Plain text file MicroweberInstaller.php Class Class source
  Plain text file MODULEWorkInstaller.php Class Class source
  Plain text file MODXEvoInstaller.php Class Class source
  Plain text file MoodleInstaller.php Class Class source
  Plain text file OctoberInstaller.php Class Class source
  Plain text file OntoWikiInstaller.php Class Class source
  Plain text file OsclassInstaller.php Class Class source
  Plain text file OxidInstaller.php Class Class source
  Plain text file PhiftyInstaller.php Class Class source
  Plain text file PhpBBInstaller.php Class Class source
  Plain text file PimcoreInstaller.php Class Class source
  Plain text file PiwikInstaller.php Class Class source
  Plain text file PlentymarketsInstaller.php Class Class source
  Plain text file Plugin.php Class Class source
  Plain text file PortoInstaller.php Class Class source
  Plain text file PPIInstaller.php Class Class source
  Plain text file PrestashopInstaller.php Class Class source
  Plain text file PuppetInstaller.php Class Class source
  Plain text file RadPHPInstaller.php Class Class source
  Plain text file RedaxoInstaller.php Class Class source
  Plain text file ReIndexInstaller.php Class Class source
  Plain text file RoundcubeInstaller.php Class Class source
  Plain text file ShopwareInstaller.php Class Class source
  Plain text file SilverStripeInstaller.php Class Class source
  Plain text file SMFInstaller.php Class Class source
  Plain text file SyDESInstaller.php Class Class source
  Plain text file Symfony1Installer.php Class Class source
  Plain text file TheliaInstaller.php Class Class source
  Plain text file TuskInstaller.php Class Class source
  Plain text file TYPO3CmsInstaller.php Class Class source
  Plain text file TYPO3FlowInstaller.php Class Class source
  Plain text file UserFrostingInstaller.php Class Class source
  Plain text file VanillaInstaller.php Class Class source
  Plain text file VgmcpInstaller.php Class Class source
  Plain text file WHMCSInstaller.php Class Class source
  Plain text file WolfCMSInstaller.php Class Class source
  Plain text file WordPressInstaller.php Class Class source
  Plain text file YawikInstaller.php Class Class source
  Plain text file ZendInstaller.php Class Class source
  Plain text file ZikulaInstaller.php Class Class source

  Files folder image Files  /  vendor  /  composer  /  installers  /  tests  
File Role Description
Files folder imageComposer (1 directory)
  Accessible without login Plain text file bootstrap.php Example Example script

  Files folder image Files  /  vendor  /  composer  /  installers  /  tests  /  Composer  
File Role Description
Files folder imageInstallers (1 directory)

  Files folder image Files  /  vendor  /  composer  /  installers  /  tests  /  Composer  /  Installers  
File Role Description
Files folder imageTest (17 files)

  Files folder image Files  /  vendor  /  composer  /  installers  /  tests  /  Composer  /  Installers  /  Test  
File Role Description
  Plain text file AsgardInstallerTest.php Class Class source
  Plain text file BitrixInstallerTest.php Class Class source
  Plain text file CakePHPInstallerTest.php Class Class source
  Plain text file CraftInstallerTest.php Class Class source
  Plain text file DokuWikiInstallerTest.php Class Class source
  Plain text file GravInstallerTest.php Class Class source
  Plain text file InstallerTest.php Class Class source
  Plain text file MayaInstallerTest.php Class Class source
  Plain text file MediaWikiInstallerTest.php Class Class source
  Plain text file OctoberInstallerTest.php Class Class source
  Plain text file OntoWikiInstallerTest.php Class Class source
  Plain text file PimcoreInstallerTest.php Class Class source
  Plain text file PiwikInstallerTest.php Class Class source
  Plain text file SyDESInstallerTest.php Class Class source
  Plain text file TestCase.php Class Class source
  Plain text file VgmcpInstallerTest.php Class Class source
  Plain text file YawikInstallerTest.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  
File Role Description
Files folder imagecomplement (2 files, 1 directory)
Files folder imageeliasis (2 files, 2 directories)

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  
File Role Description
Files folder imagesrc (1 file, 4 directories)
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  
File Role Description
Files folder imageException (1 file)
Files folder imagepublic (3 directories)
Files folder imageTraits (6 files)
Files folder imageType (4 directories)
  Plain text file Complement.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  /  Exception  
File Role Description
  Plain text file ComplementException.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  /  public  
File Role Description
Files folder imagecss (1 file)
Files folder imagejs (1 file)
Files folder imagetemplate (1 file)

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  /  public  /  css  
File Role Description
  Accessible without login Plain text file eliasis-complement-min.css Data Auxiliary data

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  /  public  /  js  
File Role Description
  Accessible without login Plain text file eliasis-complement-min.js Data Auxiliary data

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  /  public  /  template  
File Role Description
  Accessible without login Plain text file eliasis-complement.php Aux. Auxiliary script

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  /  Traits  
File Role Description
  Plain text file ComplementAction.php Class Class source
  Plain text file ComplementHandler.php Class Class source
  Plain text file ComplementImport.php Class Class source
  Plain text file ComplementRequest.php Class Class source
  Plain text file ComplementState.php Class Class source
  Plain text file ComplementView.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  /  Type  
File Role Description
Files folder imageComponent (1 file)
Files folder imageModule (1 file)
Files folder imagePlugin (1 file)
Files folder imageTemplate (1 file)

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  /  Type  /  Component  
File Role Description
  Plain text file Component.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  /  Type  /  Module  
File Role Description
  Plain text file Module.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  /  Type  /  Plugin  
File Role Description
  Plain text file Plugin.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  complement  /  src  /  Type  /  Template  
File Role Description
  Plain text file Template.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  eliasis  
File Role Description
Files folder imageconfig (1 file)
Files folder imagesrc (4 directories)
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text

  Files folder image Files  /  vendor  /  eliasis-framework  /  eliasis  /  config  
File Role Description
  Accessible without login Plain text file info.php Aux. Auxiliary script

  Files folder image Files  /  vendor  /  eliasis-framework  /  eliasis  /  src  
File Role Description
Files folder imageApp (1 file)
Files folder imageController (1 file, 1 directory)
Files folder imageModel (1 file, 1 directory)
Files folder imageView (1 file)

  Files folder image Files  /  vendor  /  eliasis-framework  /  eliasis  /  src  /  App  
File Role Description
  Plain text file App.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  eliasis  /  src  /  Controller  
File Role Description
Files folder imageException (1 file)
  Plain text file Controller.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  eliasis  /  src  /  Controller  /  Exception  
File Role Description
  Plain text file ControllerException.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  eliasis  /  src  /  Model  
File Role Description
Files folder imageException (1 file)
  Plain text file Model.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  eliasis  /  src  /  Model  /  Exception  
File Role Description
  Plain text file ModelException.php Class Class source

  Files folder image Files  /  vendor  /  eliasis-framework  /  eliasis  /  src  /  View  
File Role Description
  Plain text file View.php Class Class source

  Files folder image Files  /  vendor  /  josantonius  
File Role Description
Files folder imagefile (2 files, 1 directory)
Files folder imagehook (2 files, 1 directory)
Files folder imagejson (2 files, 1 directory)
Files folder imageurl (2 files, 1 directory)

  Files folder image Files  /  vendor  /  josantonius  /  file  
File Role Description
Files folder imagesrc (1 directory)
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text

  Files folder image Files  /  vendor  /  josantonius  /  file  /  src  
File Role Description
Files folder imageFile (1 file)

  Files folder image Files  /  vendor  /  josantonius  /  file  /  src  /  File  
File Role Description
  Plain text file File.php Class Class source

  Files folder image Files  /  vendor  /  josantonius  /  hook  
File Role Description
Files folder imagesrc (1 directory)
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text

  Files folder image Files  /  vendor  /  josantonius  /  hook  /  src  
File Role Description
Files folder imageHook (1 file)

  Files folder image Files  /  vendor  /  josantonius  /  hook  /  src  /  Hook  
File Role Description
  Plain text file Hook.php Class Class source

  Files folder image Files  /  vendor  /  josantonius  /  json  
File Role Description
Files folder imagesrc (1 directory)
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text

  Files folder image Files  /  vendor  /  josantonius  /  json  /  src  
File Role Description
Files folder imageJson (1 file, 1 directory)

  Files folder image Files  /  vendor  /  josantonius  /  json  /  src  /  Json  
File Role Description
Files folder imageException (1 file)
  Plain text file Json.php Class Class source

  Files folder image Files  /  vendor  /  josantonius  /  json  /  src  /  Json  /  Exception  
File Role Description
  Plain text file JsonException.php Class Class source

  Files folder image Files  /  vendor  /  josantonius  /  url  
File Role Description
Files folder imagesrc (1 directory)
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file LICENSE Lic. License text

  Files folder image Files  /  vendor  /  josantonius  /  url  /  src  
File Role Description
Files folder imageUrl (1 file)

  Files folder image Files  /  vendor  /  josantonius  /  url  /  src  /  Url  
File Role Description
  Plain text file Url.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:37
This week:12
All time:9,070
This week:82Up