Title: [Plugin: Gravity Forms &#8211; Update Post] Referencing plugin options in functions.php
Last modified: August 20, 2016

---

# [Plugin: Gravity Forms – Update Post] Referencing plugin options in functions.php

 *  [feshin](https://wordpress.org/support/users/feshin/)
 * (@feshin)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-gravity-forms-update-post-referencing-plugin-options-in-functionsphp/)
 * 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/](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.

 * ![](https://s.w.org/plugins/geopattern-icon/gravity-forms-update-post_68a432.
   svg)
 * [Gravity Forms - Update Post](https://wordpress.org/plugins/gravity-forms-update-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gravity-forms-update-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gravity-forms-update-post/)
 * [Active Topics](https://wordpress.org/support/plugin/gravity-forms-update-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gravity-forms-update-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gravity-forms-update-post/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [feshin](https://wordpress.org/support/users/feshin/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-gravity-forms-update-post-referencing-plugin-options-in-functionsphp/)
 * Status: not resolved