• Resolved dberdal

    (@dberdal)


    I use this plugin in a hands off type mode where I need to be able to activate it, and already have defined what custom post types can be duplicated.

    Is there any method where I could define or filter in a function the plugin settings such as post types and roles?

Viewing 1 replies (of 1 total)
  • Plugin Author Enrico Battocchi

    (@lopo)

    Hi dberdal,
    at the moment there are no filters for post types and roles, but the settings can be easily changed since they are stored in the database:

    • the allowed post types are stored in the duplicate_post_types_enabled option as an array of post type names [default: array('post', 'page')], so you can change them with an update_option() call (just be sure you run that once if you don’t want to overwrite the value if someone changes it using the Settings page)
    • the roles allowed to perform the cloning have the copy_posts capability, so you can use the methods of WP_Role class to edit and query the capabilities.

    I hope this helps, let me know!

Viewing 1 replies (of 1 total)
  • The topic ‘function for defining permissions’ is closed to new replies.