wp-project-header

1.0.1 • Public • Published

wp-project-header

Easily get a project's header file, theme or plugin.

Don't go through the hassle of determining if your module is running in a theme or a plugin everytime you need to determine the projects header file.

Install

Install with yarn:

$ yarn add wp-project-header --dev

OR

Install with npm:

$ npm install wp-project-header --save-dev

Usage

const projectHeader = require( 'wp-project-header' );
 
( async () => {
    /* Inside a Plugin */
    console.log( await projectHeader() );
    //=> '/path/to/your-plugin/your-plugin.php';'
 
    /* Inside a Theme */
    console.log( await projectHeader() );
    //=> '/path/to/your-theme/style.css';'
} )();

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    3
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    3
  • 1.0.0
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i wp-project-header

Weekly Downloads

3

Version

1.0.1

License

MIT

Unpacked Size

4.98 kB

Total Files

5

Last publish

Collaborators

  • time