{"id":15462672,"url":"https://github.com/devidw/acf-helper","last_synced_at":"2025-04-10T05:34:42.880Z","repository":{"id":56966662,"uuid":"458193215","full_name":"devidw/acf-helper","owner":"devidw","description":null,"archived":false,"fork":false,"pushed_at":"2022-04-11T13:59:34.000Z","size":61,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-18T21:04:23.614Z","etag":null,"topics":["acf","acf-field","acf-fields","advanced-custom-fields","helper","helpers","helpers-library"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/devidw/acf-helper","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/devidw.png","metadata":{"files":{"readme":"README.adoc","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":"2022-02-11T13:15:43.000Z","updated_at":"2022-09-19T16:53:33.000Z","dependencies_parsed_at":"2022-08-21T11:20:20.549Z","dependency_job_id":null,"html_url":"https://github.com/devidw/acf-helper","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devidw%2Facf-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devidw%2Facf-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devidw%2Facf-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devidw%2Facf-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devidw","download_url":"https://codeload.github.com/devidw/acf-helper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248163702,"owners_count":21058001,"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":["acf","acf-field","acf-fields","advanced-custom-fields","helper","helpers","helpers-library"],"created_at":"2024-10-02T00:03:18.127Z","updated_at":"2025-04-10T05:34:42.841Z","avatar_url":"https://github.com/devidw.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"= ACF Helper\n\nA set of PHP classes and methods to assist with ACF. Enables a straight forward way of working with ACF fields by providing a simple, clean and self describing intererface.\n\nAll methods are static and can be called directly from the class name from anywhere in the code.\n\nThe libary adds functionality to get the visibility state of a field and also provides a way to get the completeness amount of all fields in a field group based on the visibility state and the amount of filled fields by the user.\n\n\n== Installation\n\nInstall the libary using Composer:\n\n[source,zsh]\n----\ncomposer require devidw/acf-helper\n----\n\n\n== Comparison\n\n|===\n| ACF Helper | ACF\n\na|\n[source,php]\n----\nField::setKey('field_xxxxx')::get();\n----\n\na|\n[source,php]\n----\nget_field_object('field_xxxxx');\n----\n\na|\n[source,php]\n----\nField::setKey('field_xxxxx')::get('label');\n----\n\na|\n[source,php]\n----\nget_field_object('field_xxxxx')['label'];\n----\n\na|\n[source,php]\n----\nField::setKey('field_xxxxx')::setUserId(2458)::getValue();\n----\n\na|\n[source,php]\n----\nget_field('field_xxxxx', 'user_2458');\n----\n|===\n\n\n== Usage Examples\n\n=== Get _full_ field name\n\nGets the full field name of a field. Fields nested in fields like repeater, group or flexible content fields will also be returned as full field names.\n\nWith ACF you can only get the direct name of a field. This method allows you to get the full field name.\n\nLet's say you have a group of `test_group_field` and a sub field of `test_sub_field` in the group. Using the `getName()` method you can get the full field name of the sub field: `test_group_field_test_sub_field`.\n\n[source,php]\n----\n\u003c?php\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\nuse Devidw\\ACF\\Field\\Field;\n\n$fieldName = Field::setKey('field_xxxxx')::getName();\n\ndump($fieldName);\n----\n\nCredits to https://wordpress.stackexchange.com/users/13418/adam[Adam] for the https://wordpress.stackexchange.com/a/401663/218274[StackOverflow answer].\n\n\n\n== Documentation\n\nDocumentation is available at https://devidw.github.io/acf-helper/api/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevidw%2Facf-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevidw%2Facf-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevidw%2Facf-helper/lists"}