Gravity Forms - Update Post
Referencing plugin options in functions.php (1 post)

  1. feshin
    Posted 2 years ago #

    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?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Gravity Forms - Update Post
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.