Viewing 4 reply threads
  • Author
    Posts
    • #2300
      Jason
      Keymaster

      I’ve started a gist for a class I’ve started including in my projects that have Piklist. It’s called PiklistHelper, and just adds some simple functionality (e.g. using constants as a post type in a meta-box) and validations that I could see myself using more than once.

      My goal with this is to add more opinionated functionality to Piklist that is useful, but doesn’t belong in its core. I’ve used docblock syntax everywhere, so if you use phpdoc you can generate a manual for the class.

      Link: https://gist.github.com/JasonTheAdams/4a9fc4b2ad0104ab219f

      P.S. If there’s enough interest, I’d be happy to open this over to github. Otherwise, I’ll just keep it around for my personal use. 🙂

    • #2309
      tuckerjoenz
      Member

      Good stuff man!

    • #2321
      Steve
      Keymaster

      @jason– This is awesome. Looking forward to seeing where this goes.

    • #2367
      Jason
      Keymaster

      I made some revisions to PiklistHelper:

      • Consolidated piklist_validation_rules hooks to a single function.
      • Added further docblock information to indicate when functions were added.
      • Added a new validation, ‘group-mismatch’ that checks every field in a group to make sure no two fields have the same value.

      Happy coding!

    • #2403
      Jason
      Keymaster

      I did it! Piklist Helper has been moved from the gist to Github. So if you have any problems/questions using it, add an issue. If you have a sweet idea or validation you commonly use, do a pull-request! I also touched up the README as to explain how to use it and what it’s all about.

      Check it out: https://github.com/JasonTheAdams/PiklistHelper

Viewing 4 reply threads
  • You must be logged in to reply to this topic.