It was brought to our attention that MasterPress would give a tonne of warnings and deprecation notices when used with PHP 7.4 – this update addresses those.
Parses attributes passed to a shortcode handler to retrieve an “id” for the shortcode, accepting the following styles of shortcode:
- [item 1]
- [item id=”1″]
That is, if there are no named attributes, this function will assume the first attribute is the ID. Note that this also checks if that ID is numeric, and if not, the number 1 will be returned. This is intended for the specific use case in the example, where we can retrieve a field item in a field set.