Internal variables use hyphens instead of underscores.
-
Types and its related suite of plugins provide a very comprehensive and robust set of tools that allows a user to “avoid” programming.
However, for our project, we can across a fatal deal-breaker: When custom fields are created by Types, the names start with a prefix of “wpcf-” and then the remainder of the field name uses hyphens instead of underscores. Nor, does Types allow us to edit the names of the custom fields once they are created.
For example, one of our custom field names was “wpcf-shortcode-name” instead of “wpcf_shortcode_name”.
Why does this matter? If you stay completely within the Types environment and avoid all programming, it does not – Then, 5 stars.
However, for our website we have a 500+ line PHP function that we use. And, PHP does not allow hyphens to be used in a variable name – such as the name of a custom field. Thus, I cannot programatically access any of the custom fields created by Types.
I suppose that I could use some type of CamelCase, but then I still have the “wpcf-” prefix to deal with. Our research indicates that there is a “hack” that allows the end-user to modify or even eliminate the prefix. But, I shouldn’t need to hack it in the first place.
I consider this to be a serious oversight by the Types developers. I hope they will correct this issue in the future. Until then, 1 star.
Thank-you.
- The topic ‘Internal variables use hyphens instead of underscores.’ is closed to new replies.