• Resolved packjallo

    (@packjallo)


    I’m trying to add a capability type using reorder_post_within_categories_capability mentioned in the F&Q’s. The problem is, I can’t get the function to work, and it seems to error with any other example than your default with “parameter 2 to be array, null given in”.

    Would it be possible to re-visit how this function works to allow something a bit more straight-forward? Ideally you just pass in a minimum capability like reorder_post_capability(‘custom_capability’), that way you won’t have to loop through every WordPress capability, find a match, then do a check on the one returned by reorder_post_within_categories_capability.

    If you have any questions, I’m happy to assist where possible.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Aurovrata Venet

    (@aurovrata)

    ooops, apologies for that you’re spot on, the functionality does not work anymore.

    I just fixed that in v1.5.0, please upgrade. It should now work.

    Would it be possible to re-visit how this function works to allow something a bit more straight-forward? Ideally you just pass in a minimum capability

    that’s currently the case.

    that way you won’t have to loop through every WordPress capability, find a match,

    this is simply done to ensure that the capability passed in the filter is an existing one. Else someone could pass ‘my_custom_capability’ which they have not registered and this would break the plugin.

    Thread Starter packjallo

    (@packjallo)

    No problem, thanks for the fast bugfix. Much appreciated!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘reorder_post_within_categories_capability not working’ is closed to new replies.