{"id":18840099,"url":"https://github.com/seothemes/core-constants","last_synced_at":"2026-01-29T05:30:16.662Z","repository":{"id":57070013,"uuid":"143138979","full_name":"seothemes/core-constants","owner":"seothemes","description":"Dynamically defines constants for use throughout child themes","archived":false,"fork":false,"pushed_at":"2018-08-01T10:23:19.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-30T09:29:03.730Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seothemes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-01T10:09:36.000Z","updated_at":"2018-08-01T10:23:20.000Z","dependencies_parsed_at":"2022-08-24T14:54:20.491Z","dependency_job_id":null,"html_url":"https://github.com/seothemes/core-constants","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seothemes%2Fcore-constants","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seothemes%2Fcore-constants/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seothemes%2Fcore-constants/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seothemes%2Fcore-constants/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seothemes","download_url":"https://codeload.github.com/seothemes/core-constants/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239776253,"owners_count":19695069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T02:45:01.912Z","updated_at":"2026-01-29T05:30:16.620Z","avatar_url":"https://github.com/seothemes.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Constants\n\nDynamically defines constants for use throughout child themes.\n\n## Installation\n\nThis component should be installed using Composer, with the command `composer require seothemes/core-constants`.\n\n## Usage\n\nWithin 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.\n\nFor example:\n\n```php\nuse SEOThemes\\Core\\Constants;\n\n$constants = [\n\tConstants::DEFINE =\u003e [\n\t\t'CHILD_THEME_NAME'    =\u003e wp_get_theme()-\u003eget( 'Name' ),\n\t\t'CHILD_THEME_URL'     =\u003e wp_get_theme()-\u003eget( 'ThemeURI' ),\n\t\t'CHILD_THEME_VERSION' =\u003e wp_get_theme()-\u003eget( 'Version' ),\n\t\t'CHILD_THEME_HANDLE'  =\u003e wp_get_theme()-\u003eget( 'TextDomain' ),\n\t\t'CHILD_THEME_AUTHOR'  =\u003e wp_get_theme()-\u003eget( 'Author' ),\n\t\t'CHILD_THEME_DIR'     =\u003e get_stylesheet_directory(),\n\t\t'CHILD_THEME_URI'     =\u003e get_stylesheet_directory_uri(),\n\t],\n];\n\nreturn [\n    Constants::class =\u003e $constants,\n];\n ```\n\n## Load the component\n\nComponents 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).\n\n```php\nadd_action( 'after_setup_theme', function() {\n    $config = include_once __DIR__ . '/config/defaults.php';\n    D2\\Core\\Theme::setup( $config );\n} );\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseothemes%2Fcore-constants","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseothemes%2Fcore-constants","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseothemes%2Fcore-constants/lists"}