• Hi, I am a WP developer who has been using Meta Slider for my latest website and I absolutely love it. However, I’ve noticed that when adding custom fields to a post or page, a list of internal Meta Slider properties appear in the list. In particular, the names include:

    • ml-slider_settings
    • ml-slider_type
    • ml-slider_url

    I presume that these properties are used internally, and are not meant to be seen by end users. I also suspect that the same issues applies to other Meta Slider properties (such as ml-slider_new_window). Fortunately, fixing this is quite trivial—simply prefix each of these meta keys with an underscore. Doing so will hide the meta key name from the list of available names for custom fields, as it should be.

    Therefore, I ask that you please prefix each of your meta key names with an underscore for the sake of WordPress devs and the users of their sites.

    Thanks very much,
    Caleb

    https://www.ads-software.com/plugins/ml-slider/

Viewing 1 replies (of 1 total)
  • Hi Caleb,

    Thanks for getting in touch. Unfortunately I wrote that code before I knew the ins and outs of WordPress (Meta Slider was the first ‘real’ plugin I wrote, still learning..). Ideally all of those keys should be serialised into a single key too.

    It’s easy to fix in principle – just add an underscore.. but it’s not so simple when we already have users whose databases contain values without the underscore, some of which will have custom code that references the key without the underscore. That’s whats been stopping me changing that up until now.

    But I think I can change the code, then add a filter to get_post_meta that checks the non underscore version too. That way new users will use the underscored version, and the change will be transparent to existing users. I’ll look at changing that in the next version ??

    Regards,
    Tom

Viewing 1 replies (of 1 total)
  • The topic ‘Request: prefix meta keys with an underscore’ is closed to new replies.