You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that all these properties are going to be used in JavaScript, we should use camel-case as the naming convention:
Rename admin_url to adminUrl (we can keep the old for backward compatibility until references are all removed)
Rename base_url to homeUrl (this is what it is actually referencing, but we shouldn't append the index.php part)
Rename site.url to siteUrl
We should also strive to flatten the structure where possible. For example, we should remove the sdk property and just let its contents live at the top level. Additionally, site.title should just become siteTitle.
It is okay to nest things, but only where it makes logical sense and doesn't over-complicate data fetching. For example, having a capabilities property that contains an object of capability mappings is fine.
The text was updated successfully, but these errors were encountered:
This is the current state of our
prepareRuntime()
method: https://github.com/newfold-labs/wp-module-runtime/blob/trunk/includes/Runtime.php#L39-L52There are a few things missing:
Given that all these properties are going to be used in JavaScript, we should use camel-case as the naming convention:
admin_url
toadminUrl
(we can keep the old for backward compatibility until references are all removed)base_url
tohomeUrl
(this is what it is actually referencing, but we shouldn't append theindex.php
part)site.url
tositeUrl
We should also strive to flatten the structure where possible. For example, we should remove the
sdk
property and just let its contents live at the top level. Additionally,site.title
should just becomesiteTitle
.It is okay to nest things, but only where it makes logical sense and doesn't over-complicate data fetching. For example, having a
capabilities
property that contains an object of capability mappings is fine.The text was updated successfully, but these errors were encountered: