Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Looks like we have the following for the default values, but provide a filter to add others:

    $role_options = apply_filters( 'npu_plugin_roles', array(
    	'99' => __( 'Visitor', 'nextgen-public-uploader' ),
    	'0'  => __( 'Subscriber', 'nextgen-public-uploader' ),
    	'1'  => __( 'Contributor', 'nextgen-public-uploader' ),
    	'2'  => __( 'Author', 'nextgen-public-uploader' ),
    	'7'  => __( 'Editor', 'nextgen-public-uploader' ),
    	'10' => __( 'Admin', 'nextgen-public-uploader' )
    ) );

    You’d need to filter in your own values. The numbers, if I recall right, are the role value, and aren’t really relevant these days, so nothing you should stress getting “right”.

    Thread Starter overwhelmer

    (@overwhelmer)

    Thanks for your superfast answer. I’ll try that.

    Kudos!

    Thread Starter overwhelmer

    (@overwhelmer)

    Hi Michael

    If I add for example

    ‘0’ => __( ‘Customer’, ‘nextgen-public-uploader’ ),

    I’m getting the message that I would have to log in in order to upload an image. Once I’m logged in as a customer, the public uploader mask is not visible (all blank) for the customer. As admin, I can see it.

    You mentioned “You’d need to filter in your own values”. Can you specify a little bit what this exactly means?

    As far as I can track it down, “Customer” has been added by WooCommerce. Can this be the problem?

    Thanks for your time and assistance.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    Can you pastebin the code you’re using for this so far? Possible the number is still more important than I first realized, or something else is going on that I missed.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to restrict to Customer instead of Visitor or Subscriber?’ is closed to new replies.