-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #419 from BeAPI/feat/gf-default-theme
Add Gravity Forms service to force default forms theme
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace BEA\Theme\Framework\Services; | ||
|
||
use BEA\Theme\Framework\Service; | ||
use BEA\Theme\Framework\Service_Container; | ||
|
||
class Gravity_Forms implements Service { | ||
|
||
public function register( Service_Container $container ): void { | ||
} | ||
|
||
public function boot( Service_Container $container ): void { | ||
add_filter( 'gform_form_theme_slug', [ $this, 'gform_form_theme_slug' ], 10, 1 ); | ||
} | ||
|
||
/** | ||
* Get service name | ||
* | ||
* @return string | ||
*/ | ||
public function get_service_name(): string { | ||
return 'gravity-forms'; | ||
} | ||
|
||
/** | ||
* Force form default theme slug. | ||
* | ||
* @return string | ||
* @author Marie Comet | ||
*/ | ||
public function gform_form_theme_slug(): string { | ||
return 'gravity-theme'; | ||
} | ||
} |