{"id":13401363,"url":"https://github.com/iamntz/carbon-fields-urlpicker","last_synced_at":"2026-02-15T05:31:14.717Z","repository":{"id":24644917,"uuid":"102125267","full_name":"iamntz/carbon-fields-urlpicker","owner":"iamntz","description":"Add an URL Picker field to Carbon","archived":false,"fork":false,"pushed_at":"2023-03-10T07:34:26.000Z","size":708,"stargazers_count":14,"open_issues_count":4,"forks_count":18,"subscribers_count":4,"default_branch":"v3","last_synced_at":"2025-10-01T17:58:56.559Z","etag":null,"topics":["carbon-fields","carbon-fields-field","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/iamntz.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}},"created_at":"2017-09-01T15:10:33.000Z","updated_at":"2024-09-03T10:59:56.000Z","dependencies_parsed_at":"2024-06-21T05:43:28.045Z","dependency_job_id":"c667c5d2-6f04-4247-b5fa-a038b6ae4692","html_url":"https://github.com/iamntz/carbon-fields-urlpicker","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/iamntz/carbon-fields-urlpicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamntz%2Fcarbon-fields-urlpicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamntz%2Fcarbon-fields-urlpicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamntz%2Fcarbon-fields-urlpicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamntz%2Fcarbon-fields-urlpicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamntz","download_url":"https://codeload.github.com/iamntz/carbon-fields-urlpicker/tar.gz/refs/heads/v3","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamntz%2Fcarbon-fields-urlpicker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29470600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T05:26:30.465Z","status":"ssl_error","status_checked_at":"2026-02-15T05:26:21.858Z","response_time":118,"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":["carbon-fields","carbon-fields-field","wordpress","wordpress-plugin"],"created_at":"2024-07-30T19:01:01.960Z","updated_at":"2026-02-15T05:31:14.698Z","avatar_url":"https://github.com/iamntz.png","language":"JavaScript","funding_links":["https://www.paypal.me/iamntz"],"categories":["Fields (Carbon Fields 2+)","Fields"],"sub_categories":[],"readme":"## Carbon Field: urlpicker\n\n_(this is an extension of [Carbon Fields](http://carbonfields.net/) plugin)_\n\nYou can install it via composer:\n\n```\ncomposer require iamntz/carbon-fields-urlpicker --prefer-dist\n```\n\nIf you install it from the source, you need to make sure that you also run `npm install` and `npm run production` in order to have assets compiled.\n\n## Return values:\nThe field will return an associative array with the following values:\n\n```\nurl: the actual URL\nanchor: the text anchor (might be blank)\nblank: wether the link should open in a new window or not\n```\n\n## Example\n\n### Registering A Field\nThis goes in your `functions.php` as with other Carbon Fields fields. The only difference is that the type is `urlpicker`.\n\n```php\nuse Carbon_Fields\\Container;\nuse Carbon_Fields\\Field;\n\nadd_action( 'carbon_fields_register_fields', 'crb_url_picker_test' );\n\nfunction crb_url_picker_test() {\n  Container::make( 'post_meta', 'URL Picker Test' )\n    -\u003eadd_fields( array(\n      Field::make( 'urlpicker', 'crb_my_link', 'URL Picker Test' )\n      -\u003eset_help_text( \"This is a test of the URL picker.\" )\n    ));\n}\n```\n\n### Using Field Values\n\n```php\n\u003c?php $my_link = carbon_get_the_post_meta( 'crb_my_link' ); ?\u003e\n\u003ca href=\"\u003c?= $my_link[url] ?\u003e\"\u003c?= ( $my_link[blank] ? ' target=\"_blank\"' : '') ?\u003e\u003e\u003c?= $my_link[anchor] ?\u003e\u003c/a\u003e\n```\n\nNote that the `blank` field will return `0` or `1`, depending on whether the checkbox is ticked next to \"Open link in a new tab\".\n\n## Found this useful?\n\nYou can get [hosting](https://m.do.co/c/c95a44d0e992) (and receive $10 credit!), [donate](https://www.paypal.me/iamntz) or buy me a [gift](http://iamntz.com/wishlist).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamntz%2Fcarbon-fields-urlpicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamntz%2Fcarbon-fields-urlpicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamntz%2Fcarbon-fields-urlpicker/lists"}