{"id":13660282,"url":"https://github.com/samrap/acf-fluent","last_synced_at":"2025-04-04T08:06:13.966Z","repository":{"id":44400924,"uuid":"82142588","full_name":"samrap/acf-fluent","owner":"samrap","description":"✒️ A fluent interface for the Advanced Custom Fields WordPress plugin","archived":false,"fork":false,"pushed_at":"2022-12-14T10:54:08.000Z","size":78,"stargazers_count":284,"open_issues_count":1,"forks_count":13,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-28T07:04:56.779Z","etag":null,"topics":["acf","acf-field","advanced-custom-fields","fluent","fluent-interface","wordpress"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/samrap.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":"2017-02-16T05:23:32.000Z","updated_at":"2025-03-14T03:57:37.000Z","dependencies_parsed_at":"2023-01-28T22:00:57.918Z","dependency_job_id":null,"html_url":"https://github.com/samrap/acf-fluent","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrap%2Facf-fluent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrap%2Facf-fluent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrap%2Facf-fluent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samrap%2Facf-fluent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samrap","download_url":"https://codeload.github.com/samrap/acf-fluent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142032,"owners_count":20890651,"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","advanced-custom-fields","fluent","fluent-interface","wordpress"],"created_at":"2024-08-02T05:01:19.661Z","updated_at":"2025-04-04T08:06:13.944Z","avatar_url":"https://github.com/samrap.png","language":"PHP","funding_links":[],"categories":["PHP"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"http://i.imgur.com/nrXtc1e.png\" width=\"350px\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/travis/samrap/acf-fluent/master.svg?style=flat-square\" alt=\"Build Status\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://scrutinizer-ci.com/g/samrap/acf-fluent/?branch=master\"\u003e\u003cimg src=\"https://img.shields.io/scrutinizer/g/samrap/acf-fluent.svg?style=flat-square\" alt=\"Code Quality\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/samrap/acf-fluent\"\u003e\u003cimg src=\"https://img.shields.io/packagist/v/samrap/acf-fluent.svg?style=flat-square\" alt=\"Packagist Version\" /\u003e\u003c/a\u003e\n\u003ca href=\"#\"\u003e\u003cimg src=\"https://img.shields.io/github/license/samrap/acf-fluent.svg?style=flat-square\" alt=\"MIT License\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**Are you using ACF Fluent?**\n\nACF Fluent is almost at 8000 downloads, which I think is pretty cool! I mean, it's not _a ton_ of downloads, but cool nonetheless. If you're using it, I would love to hear your feedback. [Shoot me an email](mailto:me@samrapdev.com) and let me know what kind of projects you've used it on :). While I'm not working on it actively at this time, I'm still happy to maintain it.\n\n### What is ACF Fluent?\n\nACF Fluent is a [fluent interface](https://en.wikipedia.org/wiki/Fluent_interface) for the Advanced Custom Fields WordPress plugin. It enables theme developers to create custom field \"queries\" using an expressive, fluent interface that makes templating with ACF a breeze.\n\n### Why?\n\nIf you make heavy use of Advanced Custom Fields in your WordPress templates (you should), then you probably find yourself writing a lot of repetitive code just to print out your fields. For example, you might have a `heading` field for your page's hero section:\n\n```php\n\u003c?php\n\n$heading = get_field('heading');\n\nif (is_null($heading)) {\n    $heading = get_the_title();\n} else {\n    $heading = esc_html($heading);\n}\n\n?\u003e\n\n\u003ch1\u003e\u003c?= $heading ?\u003e\u003c/h1\u003e\n```\n\nAs you know, this type of template coding will clutter up your template files quickly, turning your well-structured HTML into a mess of PHP tags and blocks. The worst part is, you'll find yourself not only in a clutter of PHP logic, but repeating the same logic over and over!\n\nACF Fluent aims to minimize the mess with a fluent builder that lets you easily get and update fields and sub fields and add constraints along the way. Let's take a look at the same functionality above, using ACF Fluent:\n\n```php\n\u003c?php\n\nuse Samrap\\Acf\\Acf;\n\n$heading = Acf::field('heading')\n                -\u003edefault(get_the_title())\n                -\u003eescape()\n                -\u003eget();\n\n?\u003e\n\n\u003ch1\u003e\u003c?= $heading ?\u003e\u003c/h1\u003e\n\n```\n\nInterested? ACF Fluent packs a lot more features and has **no** dependencies. [Check out the docs](docs/01-basic-usage.md) see all of the awesome features.\n\n### Documentation\n\n- [Basic Usage](docs/01-basic-usage.md)\n- [Builder Methods](docs/02-builder-methods.md)\n- [Updating Fields](docs/03-updating-fields.md)\n- [Macros](docs/04-macros.md)\n\n### Contributing\n\nACF Fluent is still in its early stages. Issues, PRs, and enhancement ideas are encouraged and appreciated.\n\n---\n\n![Tweeter](http://i.stack.imgur.com/IWyBR.png) Built by [@thesamrapaport](https://twitter.com/thesamrapaport), [samrapaport.com](https://samrapaport.com)\n\nThe ACF logo is owned by [Elliot Condon](http://www.elliotcondon.com/) and the [Advanced Custom Fields Plugin](https://www.advancedcustomfields.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrap%2Facf-fluent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamrap%2Facf-fluent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamrap%2Facf-fluent/lists"}