{"id":34910606,"url":"https://github.com/arraypress/wp-register-includes","last_synced_at":"2025-12-26T11:08:54.386Z","repository":{"id":325916987,"uuid":"1103010690","full_name":"arraypress/wp-register-includes","owner":"arraypress","description":"Simple file inclusion management for WordPress plugins and themes.","archived":false,"fork":false,"pushed_at":"2025-11-24T11:16:41.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-27T09:28:27.148Z","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/arraypress.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-24T10:13:13.000Z","updated_at":"2025-11-24T11:16:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/arraypress/wp-register-includes","commit_stats":null,"previous_names":["arraypress/wp-register-includes"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/arraypress/wp-register-includes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-register-includes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-register-includes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-register-includes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-register-includes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arraypress","download_url":"https://codeload.github.com/arraypress/wp-register-includes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arraypress%2Fwp-register-includes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28053401,"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","status":"online","status_checked_at":"2025-12-26T02:00:06.189Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2025-12-26T11:08:49.406Z","updated_at":"2025-12-26T11:08:54.365Z","avatar_url":"https://github.com/arraypress.png","language":"PHP","readme":"# WordPress Register Includes\n\nSimple file inclusion management for WordPress plugins and themes.\n\n## Installation\n```bash\ncomposer require arraypress/wp-register-includes\n```\n\n## Usage\n```php\n// Register your base path\narraypress_register_loader( 'myplugin', MY_PLUGIN_DIR );\n\n// Load directories\narraypress_register_includes( 'myplugin', [\n\t'includes/core',\n\t'includes/admin'\n] );\n\n// Load specific files\narraypress_register_includes( 'myplugin', [\n\t'includes/config.php',\n\t'includes/functions.php'\n] );\n\n// Load recursively\narraypress_register_includes( 'myplugin', [ 'includes' ], true );\n\n// Custom exclusions\narraypress_register_loader( 'myplugin', MY_PLUGIN_DIR, [ 'index.php', 'uninstall.php' ] );\n```\n\n## Real Example\n```php\nclass Plugin {\n\tprivate function setup_files(): void {\n\t\t// Register base\n\t\tarraypress_register_loader( 'sugarcart', SUGARCART_PLUGIN_DIR );\n\n\t\t// Core components\n\t\tarraypress_register_includes( 'sugarcart', [\n\t\t\t'includes/abstracts',\n\t\t\t'includes/classes'\n\t\t] );\n\n\t\t// Database files\n\t\tarraypress_register_includes( 'sugarcart', [\n\t\t\t'includes/database/tables',\n\t\t\t'includes/database/schemas',\n\t\t\t'includes/database/queries'\n\t\t] );\n\n\t\t// Admin (recursive)\n\t\tif ( is_admin() ) {\n\t\t\tarraypress_register_includes( 'sugarcart', [ 'includes/admin' ], true );\n\t\t}\n\t}\n}\n```\n\n## Features\n\n- ✅ Prefix-based registration\n- ✅ Automatic duplicate prevention\n- ✅ File and directory support\n- ✅ Optional recursive loading\n- ✅ Custom file exclusions\n- ✅ Multiple plugin support\n\n## Requirements\n\n- PHP 7.4+\n- WordPress 5.0+\n\n## License\n\nGPL-2.0-or-later","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farraypress%2Fwp-register-includes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farraypress%2Fwp-register-includes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farraypress%2Fwp-register-includes/lists"}