{"id":15292279,"url":"https://github.com/getolympus/zeus-core","last_synced_at":"2025-04-13T11:11:15.397Z","repository":{"id":48901704,"uuid":"58800302","full_name":"GetOlympus/Zeus-Core","owner":"GetOlympus","description":"Ζεύς — Olympus Zeus is a framework which allows you to make all your WordPress plugins and themes developments easier and efficient.","archived":false,"fork":false,"pushed_at":"2024-03-22T02:02:14.000Z","size":1955,"stargazers_count":8,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-26T15:01:28.753Z","etag":null,"topics":["core","cron","custom-post-types","hooks","metaboxes","olympus","olympus-framework","options-page","php","terms","users","wordpress","wordpress-development","wordpress-framework","zeus"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GetOlympus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"issuehunt":"GetOlympus/Zeus-Core"}},"created_at":"2016-05-14T09:37:07.000Z","updated_at":"2023-10-27T07:34:50.000Z","dependencies_parsed_at":"2024-09-30T16:17:19.385Z","dependency_job_id":"1109d04c-a215-4f80-bddf-45070727bd9a","html_url":"https://github.com/GetOlympus/Zeus-Core","commit_stats":{"total_commits":270,"total_committers":4,"mean_commits":67.5,"dds":0.4222222222222223,"last_synced_commit":"efa6a387fb305b72738455501afac1c9d2ffa599"},"previous_names":[],"tags_count":82,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetOlympus%2FZeus-Core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetOlympus%2FZeus-Core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetOlympus%2FZeus-Core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetOlympus%2FZeus-Core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GetOlympus","download_url":"https://codeload.github.com/GetOlympus/Zeus-Core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703198,"owners_count":21148118,"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":["core","cron","custom-post-types","hooks","metaboxes","olympus","olympus-framework","options-page","php","terms","users","wordpress","wordpress-development","wordpress-framework","zeus"],"created_at":"2024-09-30T16:17:15.022Z","updated_at":"2025-04-13T11:11:15.377Z","avatar_url":"https://github.com/GetOlympus.png","language":"PHP","funding_links":["https://issuehunt.io/r/GetOlympus/Zeus-Core"],"categories":[],"sub_categories":[],"readme":"# Olympus Zeus Core ![PHP Version][php-image]\n\u003e **Olympus Zeus Core** is a framework which allows you to make all your **WordPress** plugins and themes developments easier and efficient.\n\n```sh\ncomposer require getolympus/olympus-zeus-core\n```\n\n---\n\n[![Olympus Component][olympus-image]][olympus-url]\n[![CodeFactor Grade][codefactor-image]][codefactor-url]\n[![Packagist Version][packagist-image]][packagist-url]\n[![Travis Status][travis-image]][travis-url]\n[![MIT][license-image]][license-blob]\n\n---\n\n## Features\n\n+ Better and secure folder structure\n+ All **Olympus fields** integrated by default\n+ Olympus [**Hera Renderer**](https://github.com/GetOlympus/Hera-Renderer) and [**Hermes Translator**](https://github.com/GetOlympus/Hermes-Translator)\n+ Symfony [**HTTP Foundation**](https://github.com/symfony/http-foundation) and [**Class loader**](https://github.com/symfony/class-loader) components\n+ Dependency management with [**Composer**](https://getcomposer.org)\n+ And more...\n\n![With Composer](https://img.shields.io/badge/with-Composer-885630.svg?style=flat-square)\n\n## Initialization\n\nTo initialize `Zeus Core` from your `functions.php` WordPress theme file or main plugin php file:\n\n```php\n// file: functions.php\nnamespace MyThemeName;\n\n/**\n * Everything starts here.\n *\n * @package MyThemeName\n * @author  Your Name \u003cyourmail@domain-name.ext\u003e\n * @since   x.y.z\n *\n */\n\n// Directory separator and Vendor path.\ndefined('S')          or define('S', DIRECTORY_SEPARATOR); // Provided by Olympus container\ndefined('VENDORPATH') or define('VENDORPATH', realpath(dirname(__DIR__)).S.'vendor'.S); // Provided by Olympus container\n\n/**\n * MyThemeName class definition\n */\n\nif (!class_exists('MyThemeName')) {\n    /**\n     * Use of Zeus abstract PHP class to initialize everything.\n     */\n    class MyThemeName extends \\GetOlympus\\Zeus\\Zeus\n    {\n        /**\n         * Define all useful folders\n         */\n        // Load option admin pages\n        protected $adminpages = __DIR__.S.'controllers'.S.'adminpages';\n        // Load scheduled actions\n        protected $crons      = __DIR__.S.'controllers'.S.'crons';\n        // Load custom post types\n        protected $posttypes  = __DIR__.S.'controllers'.S.'posttypes';\n        // Load custom terms\n        protected $terms      = __DIR__.S.'controllers'.S.'terms';\n        // Load options for users\n        protected $users      = __DIR__.S.'controllers'.S.'users';\n        // Load custom widgets\n        protected $widgets    = __DIR__.S.'controllers'.S.'widgets';\n\n        /**\n         * Define WordPress optimizations and configurations in a single var.\n         */\n        protected $configurations = [\n            'AccessManagement' =\u003e [/*...*/],\n            'Assets'           =\u003e [/*...*/],\n            'Clean'            =\u003e [/*...*/],\n            'Menus'            =\u003e [/*...*/],\n            'Settings'         =\u003e [/*...*/],\n            'Shortcodes'       =\u003e [/*...*/],\n            'Sidebars'         =\u003e [/*...*/],\n            'Sizes'            =\u003e [/*...*/],\n            'Supports'         =\u003e [/*...*/],\n        ];\n\n        /**\n         * Main function which defines vendors path\n         * and some useful actions needed by your application\n         */\n        protected function setVars()\n        {\n            // Load Zeus framework vendors.\n            if (file_exists($autoload = VENDORPATH.'autoload.php')) {\n                include $autoload;\n            }\n\n            // Add custom actions.\n        }\n    }\n}\n\n// Instanciate MyThemeName\nreturn new MyThemeName();\n```\n\n## A custom post type example\n\nAssuming you need a new `Movie` custom post type, here is the `controllers/posttypes/MoviePosttype.php` content file:\n\n```php\n// file: controllers/posttypes/MoviePosttype.php\nnamespace MyThemeName\\Controllers\\Posttypes;\n\n/**\n * Extends main \\GetOlympus\\Zeus\\Posttype\\Posttype class to use all functionalities\n */\nclass MoviePosttype extends \\GetOlympus\\Zeus\\Posttype\\Posttype\n{\n    /**\n     * @var array\n     */\n    protected $args = [\n        'menu_icon'     =\u003e 'dashicons-video-alt3',\n        'supports'      =\u003e ['title', 'excerpt', 'thumbnail'],\n        'taxonomies'    =\u003e ['post_tag'],\n        'rewrite'       =\u003e [\n            'slug'          =\u003e 'movie',\n            'with_front'    =\u003e true,\n        ],\n    ];\n\n    /**\n     * @var string\n     */\n    protected $slug = 'movie';\n\n    /**\n     * Prepare variables.\n     */\n    public function setVars()\n    {\n        // Update labels\n        $this-\u003esetLabels([\n            'name'          =\u003e __('Movies', 'mythemename'),\n            'singular_name' =\u003e __('Movie', 'mythemename'),\n        ]);\n\n        // Add metabox\n        $this-\u003eaddMetabox(__('Details', 'mythemename'), [\n            \\GetOlympus\\Dionysos\\Field\\Text::build('link', [\n                'title' =\u003e __('Movie source URL', 'mythemename'),\n            ]),\n            \\GetOlympus\\Dionysos\\Field\\Text::build('length', [\n                'title' =\u003e __('Length in seconds', 'mythemename'),\n            ]),\n            \\GetOlympus\\Dionysos\\Field\\Text::build('author', [\n                'title' =\u003e __('Author name', 'mythemename'),\n            ]),\n            // (...)\n        ]);\n    }\n}\n```\n\n## Release History\n\nSee [**CHANGELOG.md**][changelog-blob] for all details.\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/GetOlympus/Zeus-Core/fork\u003e)\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n\n---\n\n**Built with ♥ by [Achraf Chouk](http://github.com/crewstyle \"Achraf Chouk\") ~ (c) since a long time.**\n\n\u003c!-- links \u0026 imgs dfn's --\u003e\n[olympus-image]: https://img.shields.io/badge/for-Olympus-44cc11.svg?style=flat-square\n[olympus-url]: https://github.com/GetOlympus\n[changelog-blob]: https://github.com/GetOlympus/Zeus-Core/blob/master/CHANGELOG.md\n[codefactor-image]: https://www.codefactor.io/repository/github/GetOlympus/Zeus-Core/badge?style=flat-square\n[codefactor-url]: https://www.codefactor.io/repository/github/getolympus/zeus-core\n[license-blob]: https://github.com/GetOlympus/Zeus-Core/blob/master/LICENSE\n[license-image]: https://img.shields.io/badge/license-MIT_License-blue.svg?style=flat-square\n[packagist-image]: https://img.shields.io/packagist/v/getolympus/olympus-zeus-core.svg?style=flat-square\n[packagist-url]: https://packagist.org/packages/getolympus/olympus-zeus-core\n[php-image]: https://img.shields.io/travis/php-v/GetOlympus/Zeus-Core.svg?style=flat-square\n[travis-image]: https://img.shields.io/travis/GetOlympus/Zeus-Core/master.svg?style=flat-square\n[travis-url]: https://travis-ci.org/GetOlympus/Zeus-Core","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetolympus%2Fzeus-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetolympus%2Fzeus-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetolympus%2Fzeus-core/lists"}