PHPackages                             seothemes/core-constants - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. seothemes/core-constants

ActiveLibrary

seothemes/core-constants
========================

Dynamically defines constants for use throughout child themes

0.1.0(7y ago)01gpl-2.0-or-laterPHP

Since Aug 1Pushed 7y agoCompare

[ Source](https://github.com/seothemes/core-constants)[ Packagist](https://packagist.org/packages/seothemes/core-constants)[ RSS](/packages/seothemes-core-constants/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Constants
=========

[](#constants)

Dynamically defines constants for use throughout child themes.

Installation
------------

[](#installation)

This component should be installed using Composer, with the command `composer require seothemes/core-constants`.

Usage
-----

[](#usage)

Within your config file (typically found at `config/defaults.php`), use the `Constants::DEFINE` class constant as an array key to add a list of constants to define.

For example:

```
use SEOThemes\Core\Constants;

$constants = [
	Constants::DEFINE => [
		'CHILD_THEME_NAME'    => wp_get_theme()->get( 'Name' ),
		'CHILD_THEME_URL'     => wp_get_theme()->get( 'ThemeURI' ),
		'CHILD_THEME_VERSION' => wp_get_theme()->get( 'Version' ),
		'CHILD_THEME_HANDLE'  => wp_get_theme()->get( 'TextDomain' ),
		'CHILD_THEME_AUTHOR'  => wp_get_theme()->get( 'Author' ),
		'CHILD_THEME_DIR'     => get_stylesheet_directory(),
		'CHILD_THEME_URI'     => get_stylesheet_directory_uri(),
	],
];

return [
    Constants::class => $constants,
];
```

Load the component
------------------

[](#load-the-component)

Components should be loaded in your theme `functions.php` file, using the `Theme::setup` static method. Code should run on the `after_setup_theme` hook (or `genesis_setup` if you use Genesis Framework).

```
add_action( 'after_setup_theme', function() {
    $config = include_once __DIR__ . '/config/defaults.php';
    D2\Core\Theme::setup( $config );
} );
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2844d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/55b9ce7d3453d6c0c149cd77f4441a19bf692d968bf58b7f3dbc3cf9450c2051?d=identicon)[seothemes](/maintainers/seothemes)

---

Top Contributors

[![seothemes](https://avatars.githubusercontent.com/u/24793388?v=4)](https://github.com/seothemes "seothemes (3 commits)")

### Embed Badge

![Health badge](/badges/seothemes-core-constants/health.svg)

```
[![Health](https://phpackages.com/badges/seothemes-core-constants/health.svg)](https://phpackages.com/packages/seothemes-core-constants)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
