Fields API Chat Summary: September 13th, 2023

These are the notes from the first post-WCUS chat we had on Thursday, September 13th, 2023 at 12:00 PM CDT in the #core-fields channel of Make WordPress Slack.

Key Links

Proposed agenda items

A few agenda items were proposed in the channel by @alexstandiford including the following items. (Marked to show what we ended up getting through so far)

  1. ☑ Broadly speaking, what is the scope for V1?
  2. ☐ Can we define the independent pieces of this project? If not, what do we need to know in order to understand those pieces?
  3. ☐ Is it realistic to expect that we could split this project into smaller pieces, lead by groups of the contributors?
  4. ☐ How do we approach presenting this to coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.? How often to we provide updates?
  5. ☐ General discussion around the findings and conclusions surrounding the JSON fields API pitch. Could defining the JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. help us understand the components that make the fields APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.?

What we talked about in the chat

We ended up spending over an hour discussing only that first item: What we as contributors think that V1 should and should not include. Feedback was varied so I gathered the list of things people came up with and turned that into a survey that contributors could vote on.

Survey: What to include in a V1 proposal

We also invite everyone in the community to provide feedback on what you think the V1 proposal for Fields API should include.

Fill out the survey to let us know what you’d like to see in a V1 of the Fields API

The survey will close on Wednesday, September 20th, 2023 at 12:00 PM (UTC-5) and we will share the results in the planned Fields API chat that day.

Remaining areas to research

We still have a few more screens to add research documentation for and those are these:

  • Users
    • User registration form
  • Media – Media modal
  • CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. API – @sc0ttkclark will take this on
  • Nav Menus (classic)
    • Name Menu form
    • Nav Menu Item form

If you’d like to help out, hop into #core-fields and or GitHub repository and let us know what area you’d like to contribute to.

Next scheduled chat

We will be meeting again in #core-fields on Wednesday, September 20th, 2023 at 12:00 PM (UTC-5)

See many of you then!

#feature-plugins, #fields-api, #options-meta, #summary

Fields API Progress Summary: WCUS Contributor Day 2023

We had a solid day of progress today at the WCUS Contributor DayContributor Day Contributor Days are standalone days, frequently held before or after WordCamps but they can also happen at any time. They are events where people get together to work on various areas of https://make.wordpress.org/ There are many teams that people can participate in, each with a different focus. https://2017.us.wordcamp.org/contributor-day/ https://make.wordpress.org/support/handbook/getting-started/getting-started-at-a-contributor-day/.. I sat down at an empty table and before long it was full of people who were eager to help bring the vision of the Fields APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. to fruition.

If you aren’t familiar yet with what we’ve been planning, check out the post below about the kick-off we had at the start of this year. Otherwise, continue on below to see what we’ve accomplished and what’s left in the Research phase.

Progress at Contributor Day

Research has continued and we now have docs for many of the areas we had planned plus new areas we discovered together.

Research docs

  • Settings API@joedolson (ahead of Contributor Day)
  • Meta Box API@sc0ttkclark
  • List Tables@codearachnid
    • ✅ Quick Edit
    • ✅ Custom Columns
  • Taxonomies@wvega
    • ✅ Add term form
    • ✅ Edit term form (separate from the Add term form in how you work with it)
  • Users
    • User profile@ohryan
    • Add new user form
    • Add new user form (/networknetwork (versus site, blog)/ variation)
    • Add existing user to site form (Multisitemultisite Used to describe a WordPress installation with a network of multiple blogs, grouped by sites. This installation type has shared users tables, and creates separate database tables for each blog (wp_posts becomes wp_0_posts). See also network, blog, site)
  • Media – Media modal
  • Comments – Add new comment (front of site) – @cr0ybot
  • BlockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. Editor
  • CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. API
  • Nav Menus (classic)
    • Name Menu form
    • Nav Menu Item form
  • Widgets (classic)@cr0ybot

Proposal draft work

We also had help from @lauriewood who spent time writing a proposal draft for us that we can use to build from with more technical details.

Comparison sheet

I put together a comparison sheet that goes over coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. APIs vs a few popular plugins. It may help you visualize what we are doing here.

What’s next?

Our next meeting

We’re going to set up another meeting in #core-fields on SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. in September to get everyone together again. I’ll post here again as soon as we have a time set so others who are interested can join.

Research will continue

We have a few more docs to continue working on. We will coordinate who does what in the #core-fields Slack channel. If you’re interested in helping, feel free to mention me (@sc0ttkclark) there!

Proposing the Fields API

We will then be able to officially propose the Fields API based on our research and gather feedback on what we’ve put together. The proposed code will likely remain similar to what was proposed in 2017 but with more modern PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher 7+ code and potentially support for JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. schema files if there’s appetite in core to expand beyond the Blocks JSON schema implementation and into other config areas.

#feature-plugins, #fields-api, #options-meta, #summary

Fields API Kick-off Chat Summary: January 5th, 2023

It’s been over 4 years since the Fields API project has been active and many things have changed for WordPress in that period.

Since then, many things were introduced into WordPress itself including things like:

  • BlockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. Editor
  • Full Site Editing has replaced the CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. (which is now only used for classic themes)
  • New Navigation editing
  • Widgets are now legacy and have been replaced with new blocks and a new WidgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. editor
  • Newer PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher compatibility (testing still in progress for PHP 8.0+) and talks of upping the minimum PHP version

All of that has led to @joedolson approaching me to determine if it’s worth bringing Fields APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. back with a new vision.

After some initial discussion, the passion reignited within me to get this going again and we ended up having our first kick-off meeting today to discuss where we’ve been, where we’re at, and where we want to go in 2023. This and future work will be organized through our SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel #core-fields

Read below for what we discussed and here’s a link to watch the video from our initial meeting.

Video recording

The kick-off discussion

Meeting notes

Introductions

  • @sc0ttkclark – Scott Kingsley Clark
    • Senior Software Engineer at Pagely / GoDaddy
    • Lead Developer of the Pods Framework
    • Previously Co-Lead of the Fields API project from 2013-2016 with @ericlewis and then Lead Developer from 2016-2017
  • @borkweb – Matthew Batchelder
    • Been working with WordPress since ~2004
    • Worked with The Events Calendar and now Director of Engineering at StellarWP overseeing their products and initiatives
  • @joedolson – Joe Dolson
    • Contributing to WordPress since about 2006
    • WP CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. Committercommitter A developer with commit access. WordPress has five lead developers and four permanent core developers with commit access. Additionally, the project usually has a few guest or component committers - a developer receiving commit access, generally for a single release cycle (sometimes renewed) and/or for a specific component.
    • Working on the AccessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) team
    • Reached out to Scott about Fields API from the perspective of improving accessibility for the Settings page
  • @jason_the_adams – Jason Adams
    • Manager of Development at GiveWP
    • Matt and him want to get together about how to help create unified libraries for multiple projects across StellarWP and other companies
    • GiveWP has it’s own Field API that it’s been pushing forward as well
  • @peteringersoll – Peter Ingersoll
    • Worked with WP for about 10 years
    • Not a developer but a user/self-titled user advocate
    • Coming at this as a perspective as a user who is interested in how this will work

Overview of Fields API – where we started

  • Started work in November 2013 with @ericlewis as lead and @sc0ttkclark as co-lead
  • Started holding meetings back when Freenode IRCIRC Internet Relay Chat, a network where users can have conversations online. IRC channels are used widely by open source projects, and by WordPress. The primary WordPress channels are #wordpress and #wordpress-dev, on irc.freenode.net. was being used before Slack
  • Initial focus was around Post metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. fields and meta boxes in the Post Editor
  • Expanded over time to cover a generalized API to work with
    • Post meta boxes and their fields
    • Settings fields (replacing the Settings API)
    • User profile fields (edit profile, add new user)
    • Term fields (add term, edit term)
    • Comment fields (add comment on frontend, edit comment in dashboard)
    • Media fields (modal)
    • Customizer (allowing the Customizer to see Fields API configurations)
  • We built 3 different prototypes over time
  • Hundred of plugins in WP have their own Fields API and lots of devs have their own preference on code structure so there were lots of voices with different opinions for what the Fields API should look like
  • WP Core team (committers and contributors) were somewhat receptive but we couldn’t gain momentum
  • The block editor and other projects started up which reduced priority for getting Fields API into WP especially since it wasn’t just one small part of WP
  • @sc0ttkclark reached out for anyone else to take over the project as lead (while Scott supported) but couldn’t find anyone so the project became inactive

Rebooting Fields API – where we’re at

  • @joedolson approached @courane01 and @sc0ttkclark to see if we wanted to tackle Accessibility as a goal for a smaller reboot of the Fields API
  • The GitHub repository has been unarchived and is ready to start the next steps of getting things going again
  • Lots of test coverage for the API itself
  • A number of examples of how to work with the API
  • Implementations that were covered at the time (in WP 4.5)
  • Things that were in progress at the time (in WP 4.5)
  • @jason_the_adams gave a demo of the GiveWP Fields API
    • Uses a mid-level API to register the configurations
    • Implementations handle rendering those
    • The primary implementation is a Block Editor powered form editing experience
    • @borkweb and @sc0ttkclark provided positive feedback about the PHP side of things

Where we’re going

  • @sc0ttkclark What PHP version should we target?
    • PHP 5.6 is the current minimum and we’ll stick to that unless progress is made on upping the minimum WP version
    • If the minimum version is upped, we can revisit this and adjust our code to follow suit
  • @borkweb How we approach things in WP now is much different than back when the Fields API started
    • Is there merit in separation of data and output like what GiveWP is doing versus what the very coupled approach that the Fields API has right now
  • @joedolson Whether this can be potentially be used for the Block Editor may have a big impact on whether it has traction, though there are plenty places where it could be useful
  • @sc0ttkclark
    • Content areas like Posts and Terms, we’ll likely see more expansion of the Block Editor
    • There are a few places in WP that may not make sense to be in the block editor itself
      • Settings
      • User profile
      • Maybe others?
    • Those areas may eventually use ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/. components to render but won’t live in the “Block Editor” that we know of today
    • We could separate the Fields API focus into specific component implementations, not unlike what we had before but with the goal being that we are registering structure – whether or not that is the same exact input used for each screen (some screens will need their own form implementations for their inputs that may not be HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. renders)
    • If we wanted to implement Fields API for the Block Editor, it could help register Components for the Inspector Panel for Blocks, which is currently an area with high copy/paste
      • Fields API could register Inspector Panel sections and components
    • PHP has grown up and it may be better to use objects than straight PHP arrays especially since that can work with IDEs and help with autocomplete for a better developer experience
    • With the Fields API, I want to make possible the idea that you can interact with the configuration of a form and add/change fields by registering new fields or adjusting their configurations
    • Knowing what the structure of a page is (outside of just basic actions that people use now to render HTML) gives devs the ability to take those configurations and consume them through WP-CLIWP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/, the REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/., and PHP for custom implementations like the WordPress iOSiOS The operating system used on iPhones and iPads. app and many other apps that need to represent the various edit screens
  • @borkweb So the Fields API project would morph into a data layer and one or more rendering implementations to consume that
  • @sc0ttkclark
    • We can focus on Settings page at first and go from there into the User profile, but leave everything else out until we gain traction and get something into Core
    • Don’t focus on legacy things like the Classic Editor or Customizer or the Widget forms
  • @joedolson Getting this built out and implemented is a challenge but I’m game
  • @sc0ttkclark We should figure out what we want to structure the Fields API off of, but use object oriented as much as possible and make the focus on better developer experience so we can help level up working with WP
    • We could look at the structure of GiveWP’s Fields API and other modern Fields APIs from other plugins/libraries
    • Avoid looking back at older/legacy plugins and libraries
    • Find a consensus on what makes sense that most people will be familiar with based on what’s popular/modern
    • The current Fields API is based on the Customizer API which has become antiquated already

Next steps

  • Meetings: Figure out the frequency of meetings and when our next meeting is
  • Viability: Get a gut-check from WP core dev team in the core meeting and through responses to this post on direction and our focus
  • Spec: Look at modern Fields APIs in modern plugins/libraries and figure out how we want that structure to look like through a new spec doc
  • Code: Start with a Settings API implementation collaborating with @joedolson and the Accessibility team to ensure that side is accessible
  • Testing: Ensure the API is well tested with unit tests
#feature-plugins, #fields-api, #options-meta, #summary

Fields API — Where we’re at

Over the past few months, we’ve been working towards one of the most wide-reaching APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.’s to be suggested for coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. inclusion, apart from the REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/.. It has the potential to touch nearly every area of WordPress that deals with forms and fields. The Fields API is nearly there, and we’re seeking more feedback on a number of areas we need to tie down before we go into the official proposal stage for core inclusion.

What is the Fields API?

We just published a specification for the Fields API last week and we’re seeking constructive feedback on that now. Please take a moment to read about it, ask questions, and voice your concerns with us so we can address those things before we go to the next official stage.

There’s also some helpful docs which include TerminologyRegistration of fields, and example code.

What can you do with the Fields API right now?

We’ve put together a number of implementations to show the potential of what the Fields API can accomplish inside of core. Each implementation is an example of what could end up in WordPress core, should the Fields API itself be merged.

  • Edit User screen (@sc0ttkclark, @technosailor)
    • Our internal implementation of the Edit User screen replaces core’s entirely using the Fields API.
    • Here’s a code example to add more fields (and sections and controls) to the Edit User screen
    • Backwards compatibility hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same.
    • To-do: Further custom markup and/or styling to match uniform layout
  • Edit Post screen (@sc0ttkclark, @brentvr)
    • Our internal implementation of the Edit Post screen will replace core’s entirely using the Fields API, we only have support for adding new sections / controls right now
    • To-do: Register sections / controls based on what’s on the Post Editor screen currently (@brentvr is working on this now)
    • To-do: Add additional output types (no metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. box, etc)
    • To-do: Backwards compatibility hooks
  • Term Add / Edit (@sc0ttkclark, @technosailor)
    • Our internal implementations of the Add Term and Edit Term screen replaces core’s entirely using the Fields API
    • Backwards compatibility hooks
  • Comment Edit (@sc0ttkclark)
    • Our internal implementation of the Edit Comment screen will replace core’s entirely using the Fields API, we only have support for adding new sections / controls right now
    • To-do: Register sections / controls based on what’s on the Comment Editor screen currently
    • To-do: Add additional output types (no meta box, etc)
    • To-do: Backwards compatibility hooks
  • Settings Pages (@sc0ttkclark, @technosailor)
  • WidgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. Forms (@nicholasio, @sc0ttkclark)
    • Our internal implementation of the Widget forms will integrate with WP_Widget to allow form fields to be registered for widgets and rendered/saved automatically without the custom code every widget ends up needing currently.
    • To-do: WP_Widget integration (@nicholasio is working on this now)
  • Nav Menu Items (@diddledan, @sc0ttkclark)
    • Our internal implementation of the Nav Menu Items overrides the core Walker class used for building the Nav Menu Item forms, and uses the Fields API to output registered controls.
    • To-do: More compatibility work for CSSCSS Cascading Style Sheets.
    • To-do: Look into CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. integration
    • To-do: Getting/saving values for nav menu item fields
  • Media
    • We do not currently have an implementation for this yet, but one was proposed by @wpsmith, and we are seeking additional help from anyone looking to make this happen
    • To-do: Add sections and controls to Media Edit
    • To-do: Add sections and controls to Media Modal Add/Edit
  • REST API
    • We currently have limited direct integration with the REST API, but we’d like to work with the REST API team towards implementing REST API options and building in addition configurations the REST API can consume for it’s endpoint(s)
    • register_rest_field integration

Possible Roadmap to Merge

Here’s an example of how Fields API could eventually be merged into core, along with other implementations.

  • Release 1: Merge Fields API into core
  • Release 2: Merge Implementation 1 into core
  • etc..

So each release could focus on a different implementation, which of course is a great time to coincide to UXUX User experience / design work on each area, like the User Profile screen. There’s lots of options here, but hey, let’s discuss it!

How to help

If you’d like to help anywhere, please just reach out and I’ll get you into it. Every area needs review, some areas still need more work to finish, but any area could use additional help.

So who do you contact or where do you go to help?

Next Meeting Agenda – March 14th, 2016

Our next meeting is Monday 20:00 UTC 2015 and it promises to be eventful. We plan on discussing a number of things including:

  • The Fields API specification
  • Terminology of Fields
  • Proposed by @johnbillion: “Why would I, as a developer of Meta Field PluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party X, switch to using the Fields API?”

#feature-plugins, #fields-api, #options-meta

Fields API updates from Q4 of 2015

It’s been a while since I updated everyone here about progress on the Fields APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.. I’ve been hard at work in the code and haven’t come up for air until now, but I’m planning on more regular updates in the coming weeks 🙂

Lots of progress since our last chat summary in early October, here’s a bird’s eye view of what we’ve been up to:

Where can we use help right now?

  • Review our User Profile screen implementation, let us know if it makes sense to you as a developer. It’s the kind of code you’ll be looking at needing for any custom screens you want to implement in plugins or themes, and it’s the kind of code we’re looking at using for other WordPress screens too (Post editor screen, Term editor screen, etc..)
  • Help us create use-cases for each type of object (Custom Post Types, Custom Taxonomies, Users, Comments, Media, Widgets, Nav Menu Items, etc..) — we’re specifically looking for what custom fields you could create for these use-cases and how it could make sense in real world scenarios. You can start out with just the structure, we can help you build the code for it.
  • We’re getting ready to release this on WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ as a pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party, we could use some help to write up a good readme and ensure it directs people to the correct places for involvement

So who do you contact or where do you go to help?

Oh and did I mention that every minute you help us, you make someone really really really happy in the future? It could be your future self that gets to reap the rewards of your hard work!

#feature-plugins, #fields-api, #options-meta

Fields API chat summary – October 5th, 2015

Present: @sc0ttkclark, @nicholas_io, @tomharrigan, @ericlewis, @potatomaster

Logs: https://wordpress.slack.com/archives/core-fields/s1444021200000000

  • I just got 100 hours from 10up to work on Fields API!
  • I will be working on getting the WP 4.3 CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. changes put into the Fields APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways., my first pass doesn’t have unit tests passing yet
  • We’ll be fleshing out Control classes, based on Customizer control classes and expand the main control class into individual classes as opposed to a ‘switch’
  • We laid out a few implementations we’d like to get into prototyping
    • User profile fields (piggy backing existing UIUI User interface of section heading + fields) @sc0ttkclark
    • Settings API (cue the oooh’s and aaah’s sound effect) @sc0ttkclark
    • Post editor (metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. boxes + fields) @tomharrigan
    • WidgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. forms @nicholas_io
    • Future: Term editor (sections + fields)
    • Future: Comment forms?
  • We want to improve the main Fields API readme to better explain the project, offer more links to information about the Customizer API since it’s what we based the Fields API on, and flesh out more examples
  • We need more examples, so any use-cases we can put together for any object type, would be handy to start putting that code together (structures, not custom implementations or overrides)

We certainly could use additional contributors involved with the project, especially as we seek to start more implementation prototypes of how things could work. Just hop into SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. #core-fields or check out our Github repo. Over the next 5 weeks my involvement in the project will be greatly increased, so if you are going to get involved — now would be the right timing!

Next chat: Monday 20:00 UTC 2015 (every Monday)

#chats, #feature-plugins, #fields-api, #meeting-notes, #options-meta

Fields API: Request for review of direction

Over the past many months this year, I have been working with guidance from @helen on the new Fields APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. with the intention of inclusion into WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. It’s based on the CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. API, so those who have experience with it will see a lot of similarities. The goal isn’t to create a duplicate API though, and in our proposal we would be implementing the Fields API within the Customizer API.

What does that bring to core as a whole? It gives core a very real and far reaching API to add fields to any type of object in a standard interface. Given the growth of the Customizer API and its inclusion of fields, @helen and I both agreed it’d be great to leverage everything it can do in our efforts here. The goal isn’t focused on the actual Customizer UIUI User interface or editing on the front-end, it’s all data-oriented.

We would create implementations behind the scenes in the various existing APIs such as the Customizer API (now) and Settings API (later) while maintaining backwards compatibility. We’re also hoping to implement the Fields API within the User profile screen. This would give core more flexibility towards revamping the User profile screen in the future, without having to tackle even more than just a UI refresh. That’s also not mentioning the fact that pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party and theme authors could leverage this API to extend WordPress with their own fields in the various areas. Future places we’d look at integrating Fields API with would be the Post editor, which I’ve pegged as our third focus, behind User profile fields and the Customizer API.

Anyways, that leads us to the point we’re at now, we have an API but we don’t have all of the built-in Field Types (control types) yet or the latest Customizer API changes from 4.3 merged upstream into the Fields API. There are unit tests that are running (and passing!) so that is going to help us on our road towards core for sure.

We need developers to give their feedback on the direction we’re heading. Here are the relevant links for those reviewing:

I’d love more feedback from anyone contributing to WordPress, or the *countless* plugin and theme developers who would use the Fields API. Please comment on this post, or if you’d like to discuss further, you can hop into our weekly meetings on Mondays (Monday 20:00 UTC 2015) in the WP SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. #core-fields channel, or pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” me there anytime.

Update – 08/10/2015:

We now also have a growing list of developers who are behind this project and would implement it in their projects if it were merged into core.

#fields-api, #options-meta

Metadata API project reborn: The new Fields API project

Many of you will remember that a couple of years ago, @ericlewis and a group of us set out to start a project to make sense of all of the different APIs that arose from third party plugins and themes to build custom fieldCustom Field Custom Field, also referred to as post meta, is a feature in WordPress. It allows users to add additional information when writing a post, eg contributors’ names, auth. WordPress stores this information as metadata. Users can display this meta data by using template tags in their WordPress themes. solutions on top of WordPress. That project was nicknamed “Metamorphosis” and subsequently went by the “Metadata UIUI User interface/APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.” project. As pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party authors dealing with and using custom fields and content types, we had been tackling the issues of developing for multiple object types in WordPress for years prior to getting together.

Now, @helen and I are pleased to (re)introduce to you what we’re hoping to be the fruits of all of this labor: Meet the new Fields API project.

function fields_api_example_post_field_register( $wp_fields ) {

   // 1. Define a new section (meta box) for fields to appear in
   $wp_fields->add_section( 'post_type', 'my_cpt', 'my_meta_box',
      array(
         // Visible title of section
         'title'       => __( 'My Meta Box', 'mytheme' ),

         // Determines what order this appears in
         'priority'    => 'high',

         // Determines what order this appears in
         'context'     => 'side',

         // Capability needed to tweak
         'capability'  => 'my_custom_capability'
      )
   );

   // 2. Register new fields
   $wp_fields->add_field( 'post_type', 'my_cpt', 'my_custom_field',
      array(
         // Default field/value to save
         'default'    => 'All about that post',

         // Optional. Special permissions for accessing this field.
         'capability' => 'my_custom_capability',

         // Optional. Add an associated control (otherwise it won't show up in the UI)
         'control' => array(
            // Don't set 'id' and it will automatically be generated for you as
            'id' => 'mysite_my_custom_field',

            // Admin-visible name of the control
            'label'   => __( 'My Custom Field', 'mytheme' ),

            // ID of the section this control should render in (can be one of yours, or a WordPress default section)
            'section' => 'my_meta_box',

            // Control type
            'type'    => 'text'
         )
      )
   );

}
add_action( 'fields_register', 'fields_api_example_post_field_register' );

(Please note: The code above may not be the same as the final implementation, it will especially change over the next few weeks)

First of all, we split off the UI side of the project to focus solely on the API. This way, we’re not held up by anything as we move towards implementation inside of coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. We can tackle each UI separately and that helps us keep the project nimble and on track.

The goals of this new API proposal will be to be implemented across WordPress objects as an API to register fields and sections for. We aim to cover these objects (not necessarily in this order):

  • CustomizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. (retrofitting it beneath the existing Customizer API)
  • User profile screen
  • Post editor
  • Settings screens (retrofitting it beneath the existing Settings API)
  • And other areas in the future (Comment editor, Networknetwork (versus site, blog) Settings screens [see #15691], Media modals, etc)

This API offers a great deal of standardization across all of WordPress and code reusability. It’s paramount for third-party developers, who will be able to utilize these structures in their own plugins and themes, build apps and give access to other developers so they can contextually see what a site really contains. I see the biggest use-case being able to expose the entirety of WordPress to the REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/. and giving apps like the WordPress iOSiOS The operating system used on iPhones and iPads. app access to metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. boxes and custom fields to display real editor screens with field inputs based on the control types natively.

Areas we need help currently:

  • Examples and use cases for Customizer, User profile screen, Post editor, and Settings screens (submit issues in GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ with your ideas, coordinate with us to refine them if you want)
  • Unit tests for core
  • Testing Customizer implementation, you’ll find the core files to replace under the /implementations/ folder in the repo
  • Brainstorming implementation classes for other object types to implement in the UI, starting with User profile screen

If you’re interested in joining our merry crew which includes @helen and a few of us, hop into SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. #core-fields and join our weekly meetings every Monday (Monday 20:00 UTC 2015). You can check out the Fields API and submit PRs on GitHub, or pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” us in #core-fields throughout the week with questions or concerns.

#customize, #fields-api, #options-meta, #team-update

WP Metadata UI / API project update and new meeting time/place

It’s been a few weeks since we’ve posted an update, @mikeschinkel has been working hard on some new commits to give us some shortcuts for option arrays and things have stabilized there finally. We’re now focused on documenting field type development so we can get some contributors in there fleshing out the remaining field types.

We are also moving our “Office Hours” time and place, to Mondays @ 1800 UTC , but instead of IRCIRC Internet Relay Chat, a network where users can have conversations online. IRC channels are used widely by open source projects, and by WordPress. The primary WordPress channels are #wordpress and #wordpress-dev, on irc.freenode.net. where people can’t sync up and collaborate, we’re moving it to our public Gitter room. Some other WP projects are using it and we’ve found it incredibly helpful to keep up with GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ activity along with chat that can happen at all times of the day and it sticks around for you to read anytime you want to.

Our Gitter chat can be found here: https://gitter.im/wordpress-metadata/metadata-ui-api

Anyone can see the chat messages, and if you want to participate it’s just a GitHub login away. They have iOSiOS The operating system used on iPhones and iPads. / Mac apps too, so that’s helpful to some people as well.

If you’re interested in contributing, or if you want to check out what we’ve got and need some insight, just pingPing The act of sending a very small amount of data to an end point. Ping is used in computer science to illicit a response from a target server to test it’s connection. Ping is also a term used by Slack users to @ someone or send them a direct message (DM). Users might say something along the lines of “Ping me when the meeting starts.” us — anytime — in Gitter 🙂

#fields-api, #options-meta

WP Metadata API / UI office hours this Friday

We will continue our weekly meetings this Friday. As no other suggestions have been made, it will remain at 18:00 UTC on Fridays in #wordpress-coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.-plugins on Freenode IRCIRC Internet Relay Chat, a network where users can have conversations online. IRC channels are used widely by open source projects, and by WordPress. The primary WordPress channels are #wordpress and #wordpress-dev, on irc.freenode.net..

We may be transitioning from meeting into office hours as we haven’t had as many contributors joining us at the meetings as we had hoped. We will continue developing some awesomeness over at https://github.com/wordpress-metadata/metadata-ui-api

Feel free to hop into the issues and take ownership of new field types or documentation. We’re also looking for help with styling of the form fields and JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. in relation to support for repeatable fields.

#fields-api, #options-meta