Yes, it’s important and it’s part of cornerstone standard. It makes code cleaner and properly grouped/ordered, and since cornerstone is using transients, it will be faster since cornerstone can call them by part.
This reply was modified 1 month, 1 week ago by Rad.
Yes, the examples are basic. It will be harder to follow if it’s too complex.
And about the context, it’s under the Mapping element control sections.
At this level of the control definition, you will also see context and suggest paired together. This is preparatory work in the API for an upcoming Cornerstone feature where users will be able to set the default values of element controls globally. If you set ‘context’ => ‘content’, you can prevent users from editing controls that may not make sense to have a global value for. suggest can be used to provide a default value in that case.
There will be an upcoming change in the cornerstone, maybe major changes and documentation may change as well. I understand it’s a bit crowded but we’ll improve it. For now, it only covers the basic one, and if you wish to dig deeper, you can find existing elements from cornerstone itself though its source files.