{"id":20140242,"url":"https://github.com/10quality/wpmvc-addon-resources","last_synced_at":"2026-04-15T21:32:04.940Z","repository":{"id":37885558,"uuid":"255250504","full_name":"10quality/wpmvc-addon-resources","owner":"10quality","description":"WordPress MVC add-on resources (common assets).","archived":false,"fork":false,"pushed_at":"2023-01-05T22:09:52.000Z","size":813,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-18T17:10:41.436Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/10quality.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-13T06:37:08.000Z","updated_at":"2023-01-05T22:08:46.000Z","dependencies_parsed_at":"2023-02-04T19:45:26.183Z","dependency_job_id":null,"html_url":"https://github.com/10quality/wpmvc-addon-resources","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/10quality/wpmvc-addon-resources","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fwpmvc-addon-resources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fwpmvc-addon-resources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fwpmvc-addon-resources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fwpmvc-addon-resources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/10quality","download_url":"https://codeload.github.com/10quality/wpmvc-addon-resources/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10quality%2Fwpmvc-addon-resources/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31861350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-11-13T21:49:52.349Z","updated_at":"2026-04-15T21:32:04.926Z","avatar_url":"https://github.com/10quality.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress MVC add-on resources\n\n[![Latest Stable Version](https://poser.pugx.org/10quality/wpmvc-addon-resources/v/stable)](https://packagist.org/packages/10quality/wpmvc-addon-resources)\n[![Total Downloads](https://poser.pugx.org/10quality/wpmvc-addon-resources/downloads)](https://packagist.org/packages/10quality/wpmvc-addon-resources)\n[![License](https://poser.pugx.org/10quality/wpmvc-addon-resources/license)](https://packagist.org/packages/10quality/wpmvc-addon-resources)\n\nThis package provides resources (in the form of assets) that may be shared by different add-ons or WordPress MVC projects.\n\n## Setup\n\n### Via composer\n\nInstall the package via composer:\n```bash\ncomposer install 10quality/wpmvc-addon-resources --no-plugins\n```\n\n### Via composer.json\n\nAdd this package as your add-on dependencies (`\"require\"`):\n```json\n{\n    \"require\": {\n        \"10quality/wpmvc-addon-resources\": \"1.0.*\"\n    },\n}\n```\n\nAnd run:\n\n```bash\ncomposer update --no-plugins\n```\n\n## Resources\n\n* [Font Awesome v4](https://fontawesome.com/v4.7.0/) (css and fonts).\n* [Select2](https://select2.org/) (js, css and i18n) and initializer script.\n* [Spectrum colorpicker](https://bgrins.github.io/spectrum/) (js, css and i18n) and initializer script.\n* [Datetimepicker](https://xdsoft.net/jqplugins/datetimepicker/) (js and css) and initializer script.\n* [jQuery UI Datepicker](https://jqueryui.com/datepicker/) (css) and initializer script.\n* [WP Media uploader](https://github.com/10quality/wp-media-uploader) (js) and scripts.\n* **Radio group** (custom css).\n* **Choose** (custom css).\n* **Switch** (custom js and css).\n* **Hide/show** (custom js).\n* **Repeater** (custom js).\n\n## Usage\n\nThis package provides 2 global functions:\n\n### wpmvc_register_addon_resource\n\n`wpmvc_register_addon_resource()` is used to register the asset.\n```php\nwpmvc_register_addon_resource( $resource_id );\n```\n\nAnd:\n\n`wpmvc_enqueue_addon_resource()` is used to force enqueue the asset.\n```php\nwpmvc_enqueue_addon_resource( $resource_id );\n```\n\n### Resources list\n\n| Resource ID | Description | Type |\n| --- | --- | --- |\n| `font-awesome` | Hide and show resources. | *css* |\n| `select2` | Select2 resources. | *css*, *js* |\n| `spectrum` | Spectrum colorpicker resources. | *css*, *js* |\n| `datetimepicker` | jQuery datetimepicker resources. | *css*, *js* |\n| `jquery-ui-datepicker` | jQuery UI datepicker resources. | *css* |\n| `wp-media-uploader` | WordPress media uploader resources. | *js* |\n| `wpmvc-hideshow` | Hide and show resources. | *js* |\n| `wpmvc-repeater` | Repeater resources (depends on `wpmvc-hideshow`). | *css*, *js* |\n| `wpmvc-choose` | Choose resources. | *css* |\n| `wpmvc-radio` | Redio group resources. | *css* |\n| `wpmvc-switch` | Redio group resources. | *css*, *js* |\n| `wpmvc-select2` | Select2 implementation resources (depends on `select2`). | *css*, *js* |\n| `wpmvc-colorpicker` | Colorpicker implementation resources (depends on `spectrum`). | *js* |\n| `wpmvc-datepicker` | Datepicker implementation resources (depends on `jquery-ui-datepicker`). | *js* |\n| `wpmvc-datetimepicker` | Datetimepicker implementation resources (depends on `datetimepicker`). | *js* |\n| `wpmvc-media` | Media implementation resources (depends on `wp-media-uploader`). | *css*, *js* |\n\nSamples:\n```php\nadd_action( 'wp_enqueue_scripts', function() {\n    \n    wpmvc_register_addon_resource( 'font-awesome' );\n    wpmvc_register_addon_resource( 'select2' );\n    wpmvc_register_addon_resource( 'wpmvc-select2' );\n\n} );\n```\n\nOr:\n```php\nadd_action( 'wp_enqueue_scripts', function() {\n    \n    wpmvc_enqueue_addon_resource( 'font-awesome' );\n    wpmvc_register_addon_resource( 'select2' );\n    wpmvc_enqueue_addon_resource( 'wpmvc-select2' );\n\n} );\n```\n\nYou can also use regular WordPress enqueue functions after the resources have been registered:\n```php\nwp_enqueue_style( 'font-awesome' );\nwp_enqueue_style( 'wpmvc-select2' );\nwp_enqueue_script( 'wpmvc-select2' );\n```\n\n## Coding Guidelines\n\nPSR-2 coding guidelines.\n\n## License\n\nMIT License. (c) 2020 [10 Quality](https://www.10quality.com/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10quality%2Fwpmvc-addon-resources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F10quality%2Fwpmvc-addon-resources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F10quality%2Fwpmvc-addon-resources/lists"}