{"id":15150769,"url":"https://github.com/allin-data/wordpress-micro-core","last_synced_at":"2025-09-29T20:31:07.267Z","repository":{"id":56945979,"uuid":"229586310","full_name":"allin-data/wordpress-micro-core","owner":"allin-data","description":"The Core module of the All.In Data Micro Plugin provides fundamental and reusable functionality for the modern development of Wordpress plugins.","archived":true,"fork":false,"pushed_at":"2020-09-01T09:39:03.000Z","size":50495,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-16T11:05:13.580Z","etag":null,"topics":["wordpress","wordpress-boilerplate","wordpress-development","wordpress-php-library","wordpress-plugin","wordpress-plugins"],"latest_commit_sha":null,"homepage":"","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/allin-data.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"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":"2019-12-22T15:09:51.000Z","updated_at":"2023-01-02T19:25:39.000Z","dependencies_parsed_at":"2022-08-21T07:20:14.473Z","dependency_job_id":null,"html_url":"https://github.com/allin-data/wordpress-micro-core","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allin-data%2Fwordpress-micro-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allin-data%2Fwordpress-micro-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allin-data%2Fwordpress-micro-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/allin-data%2Fwordpress-micro-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/allin-data","download_url":"https://codeload.github.com/allin-data/wordpress-micro-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234659857,"owners_count":18867628,"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":["wordpress","wordpress-boilerplate","wordpress-development","wordpress-php-library","wordpress-plugin","wordpress-plugins"],"created_at":"2024-09-26T14:41:47.528Z","updated_at":"2025-09-29T20:31:01.956Z","avatar_url":"https://github.com/allin-data.png","language":"PHP","readme":"# All.In Data Micro Core \n## A Micro Wordpress Plugin Framework\n\nThe Core module of the All.In Data Micro Plugin Framework provides fundamental and \nreusable functionality for the modern development of Wordpress plugins.\n\n\n## Installment\n### Requirements\n\nCreate a new plugin folder in your wordpress project, e.g. `foobar-wp`.\nUse the terminal inside the folder and run:\n\n    composer require allindata/wordpress-micro-core\n    \nCreate the plugin bootstrap file `foobar-wp.php` with the following (minimal) content:\n\n```\n\u003c?php\n\ndeclare(strict_types=1);\n\n/**\n * Plugin Name: Foobar Wordpress\n * Description: Foobar Wordpress\n * Version: 1.0\n * Author: All.In Data GmbH\n * Author URI: https://www.all-in-data.de\n * Text Domain: hfoobar-wp\n * Domain Path: /languages\n * License: GPL-2.0-or-later\n * License URI: https://www.gnu.org/licenses/gpl-2.0.html\n * WC requires at least: 5.0.0\n * WC tested up to: 5.3.0\n */\n\ndefined('ABSPATH') or exit;\n\nrequire __DIR__ . '/vendor/autoload.php';\n\nclass FoobarWp extends \\AllInData\\Micro\\Core\\Init\n{\n    const PLUGIN_CONFIGURATION = \\FoobarWp\\PluginConfiguration::class;\n    const SLUG = 'foobar-wp';\n    const VERSION = '1.0';\n    const TEMPLATE_DIR = __DIR__ . '/view/';\n    const TEMP_DIR = ABSPATH . 'tmp/';\n    const FILE = __FILE__;\n}\nadd_action('allindata/micro/core/init', [FoobarWp::class, 'init']);\n```\n\n### Plugin Configuration (Dependency Injection)\nThe plugin framework supports the [Disco](https://github.com/bitExpert/disco) Dependecy Injection container, for this the configuration class \n`PluginConfiguration.php` will be created in the folder src:\n\n```\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace FoobarWp;\n\nuse AllInData\\Micro\\Core\\Controller\\PluginControllerInterface;\nuse AllInData\\Micro\\Core\\Module\\PluginModuleInterface;\nuse AllInData\\Micro\\Core\\ShortCode\\PluginShortCodeInterface;\nuse bitExpert\\Disco\\Annotations\\Configuration;\nuse bitExpert\\Disco\\Annotations\\Bean;\n\n/**\n * Class PluginConfiguration\n * @package FoobarWp\n * @Configuration\n */\nclass PluginConfiguration\n{\n    /**\n     * @Bean\n     */\n    public function PluginApp(): Plugin\n    {\n        return new Plugin(\n            \\FoobarWp::load()-\u003egetTemplateDirectory(),\n            $this-\u003egetPluginModules(),\n            $this-\u003egetPluginControllers(),\n            $this-\u003egetPluginShortCodes()\n        );\n    }\n\n    /**\n     * @return PluginModuleInterface[]\n     */\n    private function getPluginModules(): array\n    {\n        return [];\n    }\n\n    /**\n     * @return PluginControllerInterface[]\n     */\n    private function getPluginControllers(): array\n    {\n        return [];\n    }\n\n    /**\n     * @return PluginShortCodeInterface[]\n     */\n    private function getPluginShortCodes(): array\n    {\n        return [];\n    }\n}\n```\n\n### Plugin Class (Application Entrypoint)\n```\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace FoobarWp;\n\nuse AllInData\\Micro\\Core\\AbstractPlugin;\nuse AllInData\\Micro\\Core\\PluginInterface;\n\nclass Plugin extends AbstractPlugin implements PluginInterface\n{\n    public function load()\n    {\n        // some examples\n        add_action('wp_enqueue_scripts', [$this, 'addScripts'], 999);\n        add_action('admin_enqueue_scripts', [$this, 'addAdminScripts'], 999);\n        add_action('admin_enqueue_scripts', [$this, 'addAdminStyles'], 999);\n    }\n\n    public function addAdminStyles()\n    {\n        // ...\n    }\n\n    public function addScripts()\n    {\n        // ...\n    }\n\n    public function addAdminScripts()\n    {\n        // ...\n    }\n}\n```\n\nThis should be enough as a scaffold to start your plugin development.\n\n## Contribution\nFeel free to contribute to this library by reporting issues or create some pull requests for improvements.\n\n## License\nThe library is released under the GPL 2.0 or later license.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallin-data%2Fwordpress-micro-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fallin-data%2Fwordpress-micro-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fallin-data%2Fwordpress-micro-core/lists"}