Skip to content

Commit

Permalink
Update Readme and Add explaination for high priority filter hooks [ci…
Browse files Browse the repository at this point in the history
… skip]
  • Loading branch information
doekenorg committed Nov 13, 2024
1 parent 2884193 commit 6cacd4d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 7 additions & 1 deletion includes/admin/class.render.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ class GravityView_Render_Settings {
* @since $ver$
*/
public static function register_hooks(): void {
// Filter is applied with priority 500 to act later in the process. It is very likely this filter will be
// used with default or slightly higher than default priorities. This priority makes it likely
// all (or most) options have been processed already.
add_filter( 'gk/gravityview/template/options', [ self::class, 'add_general_options' ], 500, 4 );
add_filter( 'gk/gravityview/template/options', [ self::class, 'maybe_sort_options' ], 900, 5 );

// Filter is applied with priority 1000 to act *very* late in the process. This gives users a wide range of
// priority values to work with, while making it very likely those options are still sorted properly.
add_filter( 'gk/gravityview/template/options', [ self::class, 'maybe_sort_options' ], 1000, 5 );
}

/**
Expand Down
4 changes: 1 addition & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ Beautifully display your Gravity Forms entries. Learn more on [gravitykit.com](h

= develop =

* Fixed: Some field settings could not be changed with the available filter hooks.

__Developer Updates:__

* Added: `gk/gravityview/template/options` filter in `class.render.settings.php`.
* Added: `gk/gravityview/template/options` filter to allow programmatically modifying Field settings in the View editor.

= 2.31.1 on November 8, 2024 =

Expand Down

0 comments on commit 6cacd4d

Please sign in to comment.