• This is most likely a silly question, but I can’t seem to figure it out.

    Summary: I’d like to enable the delete button and the restriction per role in functions.php instead of directly in the plugin files.

    I see that people can enable the delete and role restriction options by directly editing the file: gravityforms-update-post.php:

    class GFUpdatePost
    {
      public $options = array(
        'request_id' => 'gform_post_id'
        ,'post_status' => 'default'
        ,'capabilities' => array(
          'update' => 'default'
          ,'delete' => 'disable'
        )
        ,'entries' => true
      );

    However, I think you can do it by using the plugin options function referenced on the FAQ page (again, I’m no programmer, so I could be way off):

    function gform_update_post_id($id)
    {
      $options['request_id'] = 'gform_post_id_special';
      return $options;
    }
    add_filter('gform_update_post_id', 'gform_update_post_id');

    Since “capabilities” are a subarray I’m not certain how to reference them in the above code. If switched to:

    $options['delete'] = 'enable';

    the delete button doesn’t work.

    Am I way off track here?

    http://wordpress.org/extend/plugins/gravity-forms-update-post/

  • The topic ‘[Plugin: Gravity Forms – Update Post] Referencing plugin options in functions.php’ is closed to new replies.